openc3-cosmos-tool-cmdtlmserver 7.1.1 → 7.2.1
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-DMSm_P6c-694a5d20f37aee56e971.js +2 -0
- data/tools/cmdtlmserver/{ArrayplotWidget-D5McM1rY-661317b5b349b1b727fe.js → ArrayplotWidget-fdXLhGAl-ee49423a88f0830f3d10.js} +1 -1
- data/tools/cmdtlmserver/{BarColumn-BtP1cQcf-6f53f3bdb97d0372645c.js → BarColumn-Bb305iCi-1d6370d3a5948e7070fb.js} +1 -1
- data/tools/cmdtlmserver/{BlockWidget-BKMse4hP-e7b70e89c2c39484d29d.js → BlockWidget-Do3W6tZh-0465ab5ccbba95c9cd95.js} +2 -2
- data/tools/cmdtlmserver/{ButtonWidget-BLNVL46w-4fa94ac0c43974482184.js → ButtonWidget-DukCQt0F-73553c5eb8665f5a122c.js} +2 -2
- data/tools/cmdtlmserver/CanvasWidget-BRdVWln5-ecfd6c23ebdef1641cbe.js +1 -0
- data/tools/cmdtlmserver/CanvasdotWidget-DV8PeDWz-9ea509837174f807accc.js +1 -0
- data/tools/cmdtlmserver/{CanvasimageWidget-B_JxCI_f-179f2f4699c4f93fb1ac.js → CanvasimageWidget-Czbq1GuF-f6237d2815bb4fb67627.js} +1 -1
- data/tools/cmdtlmserver/{CanvasimagevalueWidget-DwHIZzWo-fa3bbe0b2469593b289f.js → CanvasimagevalueWidget-DKt5JgEt-4d4748409b4390fd9317.js} +1 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-DW2I1ra1-21be90e9689988d7cc0b.js +1 -0
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-BhzvZVfD-98ba8f4d0b737ae50149.js +1 -0
- data/tools/cmdtlmserver/CanvaslineWidget-DsjY37tp-333343a7e55e7ced336a.js +1 -0
- data/tools/cmdtlmserver/{CanvaslinevalueWidget-DOrasE2j-5aeac7a23e9ec28f1941.js → CanvaslinevalueWidget-ihI97G8T-a999105fab2c48e7d5a3.js} +1 -1
- data/tools/cmdtlmserver/{CheckbuttonWidget-A07FryqU-9bc4830f39e3e35cffea.js → CheckbuttonWidget-B778Z-Zo-929c0f581f4e6fc8bb9b.js} +1 -1
- data/tools/cmdtlmserver/{CmdPacketsTab-29efedd4eb266ffd883d.js → CmdPacketsTab-ab63982334bccb674566.js} +1 -1
- data/tools/cmdtlmserver/{CmdTlmServer-68fb807aab8083098b67.js → CmdTlmServer-dbb3257de023db2ad7db.js} +2 -2
- data/tools/cmdtlmserver/{ComboboxWidget-xayce-aY-d54dfbc883dfdf372900.js → ComboboxWidget-CuuvOL9K-580e3a816c2a39c9dc31.js} +1 -1
- data/tools/cmdtlmserver/DataFlowsTab-651405c9f3cd11ec53ae.js +1 -0
- data/tools/cmdtlmserver/{DateWidget-DrYZJta_-df3b233595a6940ec169.js → DateWidget-COvQTAeo-8e7e5760cca1eca77fb7.js} +1 -1
- data/tools/cmdtlmserver/{DetailsDialog-CFCaJZWz-61ed81a308d60ab11b8c.js → DetailsDialog-DE7lK17G-f251b58f150be03f9878.js} +1 -1
- data/tools/cmdtlmserver/{DynamicWidget-BuSbQVhf-436ffdc664ae0abbc2a8.js → DynamicWidget-BuSbQVhf-d28b4dd265895ced834e.js} +1 -1
- data/tools/cmdtlmserver/{FilechecksumWidget-CTf0XGST-5f2822d0fdc84e064b12.js → FilechecksumWidget-DRnOt_UE-e8bcb330e9f8161abcb5.js} +1 -1
- data/tools/cmdtlmserver/{FiledisplayWidget-DLJuesmU-a0cbb5edf12ec790c493.js → FiledisplayWidget-26R46EjS-50600e2205e679c6e7a3.js} +1 -1
- data/tools/cmdtlmserver/{FormatvalueWidget-DODmUWPH-d4135b59235d1671b11e.js → FormatvalueWidget-BxyscMJc-deb6fbbd21db3f9b9533.js} +1 -1
- data/tools/cmdtlmserver/Graph-BKw7xw1a-cafa3fdb6d474421c777.js +1 -0
- data/tools/cmdtlmserver/{GraphWidget-Rc-fnHCt-d92fb66d84483c5f50e6.js → GraphWidget-Cs9mvqUu-bb3bb075fd0ea3764beb.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalWidget-CZqN6UYp-557a5be1a4e9ef13130c.js → HorizontalWidget-fWLFj7Kg-87dfe4a783ca9d8718a3.js} +1 -1
- data/tools/cmdtlmserver/{HorizontalboxWidget-BV7cyhwN-3fc1020bf4c46eac17df.js → HorizontalboxWidget-DEaXhKEz-3cc78a62e93fced5cc2d.js} +1 -1
- data/tools/cmdtlmserver/HorizontallineWidget-Bvu1QP3S-1c0a38d8daf4285046b0.js +1 -0
- data/tools/cmdtlmserver/{IframeWidget-BdOS5sm_-a1e455a7259e516c2b17.js → IframeWidget-B143k4lo-211336261edc12558ba4.js} +1 -1
- data/tools/cmdtlmserver/{ImageLoader-CnlQ4xLd-bd0a13b3fb8316bd8bb5.js → ImageLoader-BCpmQHIl-e1f186d47f7443384752.js} +1 -1
- data/tools/cmdtlmserver/{ImageviewerWidget-DoJBe5eZ-e46493a5012e67584e5f.js → ImageviewerWidget-CLrvr6dw-dbefc7bb490747b4d32b.js} +1 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-87892813bbc3da7dd816.js +27 -0
- data/tools/cmdtlmserver/{InterfacesTab-f5079d4a00c1e263ec24.js → InterfacesTab-c3d2cc4844087b3f946d.js} +1 -1
- data/tools/cmdtlmserver/{LabelWidget-DYwcB_S4-bfd0d30d820aa90fe748.js → LabelWidget-CA1bTX2B-2c9d603681176335c5dd.js} +1 -1
- data/tools/cmdtlmserver/LabelledWidget-BDhvr03J-fe41df86dd3cc7e1d625.js +1 -0
- data/tools/cmdtlmserver/{LabelprogressbarWidget-CRnteLAo-069c89074f9e19d3642a.js → LabelprogressbarWidget-g7A5CE8S-17fe760704ac3e7697ad.js} +1 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-B27xXxWg-960e3827bda04825c04a.js +1 -0
- data/tools/cmdtlmserver/LabelvalueWidget-DFn8o6LC-382c91895aa50abef201.js +1 -0
- data/tools/cmdtlmserver/{LabelvaluedescWidget-D5aDNr1o-d885dad7c04bba26bbef.js → LabelvaluedescWidget-BQpaxFaB-abcd49094e4d21057a3d.js} +1 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C-z96q8z-1f5e8f4cf393ac65098f.js +1 -0
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D2TMEv9O-11b6844f84b58504c3aa.js +1 -0
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-D99dZCjz-2c72dd417308f8cf3b83.js +1 -0
- data/tools/cmdtlmserver/{Layout-BBLYT0gE-d91dd5314e4c36560e3b.js → Layout--_zNJWnw-9367ae190fb0e9bf1b84.js} +1 -1
- data/tools/cmdtlmserver/{LedWidget-CL2dOxb7-cbd3cd315cc75f862cc6.js → LedWidget-D2uxHxe3-22c8c1f89536f753f5e6.js} +1 -1
- data/tools/cmdtlmserver/{LimitsBar-59_qNqi8-4ba4250a900c9205310f.js → LimitsBar-DN1s8-MS-d3248be80e3262273e82.js} +1 -1
- data/tools/cmdtlmserver/{LimitsbarWidget-C0N2611W-cf022e4fd099879650b8.js → LimitsbarWidget-Cqhh7LKU-7f40da6484ccbe5da287.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolorWidget-GfNCPo3i-0af98b4d40d5ce8c611b.js → LimitscolorWidget-haGB4RbY-ddf6b0791eb1be4ac6c5.js} +1 -1
- data/tools/cmdtlmserver/{LimitscolumnWidget-ut6NX68S-e246ad5cdeca74da2b62.js → LimitscolumnWidget-B1GdmlR_-86b9a2cc5c084b705674.js} +1 -1
- data/tools/cmdtlmserver/LinegraphWidget-COSOQ0uM-a5300046319a8e9bc2ac.js +1 -0
- data/tools/cmdtlmserver/{MatrixbycolumnsWidget-Cni63alW-06f4eae845e32a592cc2.js → MatrixbycolumnsWidget-coHlLETG-e799eaa675cfbf970ed5.js} +1 -1
- data/tools/cmdtlmserver/{OpenC3TimePicker-WVlNQdKk-1a6b624566a48500e00e.js → OpenC3TimePicker-B8Vu9GBz-89d21b420245131e470d.js} +1 -1
- data/tools/cmdtlmserver/{ProgressbarWidget-BWqCsk87-c8a5376745686c565b34.js → ProgressbarWidget-D_yFssIZ-2510755cf05a8167431f.js} +1 -1
- data/tools/cmdtlmserver/{RadiobuttonWidget-Dza2r34f-fb046e28929024f575af.js → RadiobuttonWidget-DL0jVTcb-101358296cb6f3e5ac75.js} +1 -1
- data/tools/cmdtlmserver/{RadiogroupWidget-DWmZMNmr-a1a0acab00cb25d11721.js → RadiogroupWidget-2-td69IA-98144436c4729f2db047.js} +1 -1
- data/tools/cmdtlmserver/{RangebarWidget-DsGCC1x7-f1d7ac55319f5d4530fd.js → RangebarWidget-i2mlnxys-3ecd19c88b6a2f13fc7a.js} +1 -1
- data/tools/cmdtlmserver/{RawBuffer-b57ec55fa04e3c02535c.js → RawBuffer-5a59e58e37f6021cf46c.js} +1 -1
- data/tools/cmdtlmserver/{RawDialog-042f9b067cb7fafa6742.js → RawDialog-3a0c000973893535a456.js} +1 -1
- data/tools/cmdtlmserver/{RollupWidget-DGElKXm3-4ddc608ad8cdf780c40d.js → RollupWidget-BEJ2Icg1-416b8d9160f2a81fd538.js} +1 -1
- data/tools/cmdtlmserver/{RoutersTab-f2b5a2e96c0205b9f30f.js → RoutersTab-7710ec67843901567d25.js} +1 -1
- data/tools/cmdtlmserver/{ScrollwindowWidget-BvKT59rV-e5bef711a079588548b8.js → ScrollwindowWidget-BU1cRpL8-d99f9e1c5467abc7ed03.js} +1 -1
- data/tools/cmdtlmserver/{SignalWidget-DRAFunW0-8f14111de3f274530506.js → SignalWidget-hiTkeem9-9efe6cdd22515ebf8555.js} +1 -1
- data/tools/cmdtlmserver/SpacerWidget-CBmzzS_X-e8f51b2251bb08fed6b0.js +1 -0
- data/tools/cmdtlmserver/{SparklineWidget-SBWjRrqq-6fedc7c3fb077a93841a.js → SparklineWidget-CizRh6QR-92a3ebcc84a5687d3b93.js} +1 -1
- data/tools/cmdtlmserver/{StatusTab-0dcb827cc6ba6b4248ea.js → StatusTab-efcdd278c79f71b06e9b.js} +1 -1
- data/tools/cmdtlmserver/{TabbookWidget-7l6fPoRA-13daf0b5a570cb171f15.js → TabbookWidget-CvL3Ozmx-19c91b22633cf0927a1e.js} +1 -1
- data/tools/cmdtlmserver/{TargetsTab-b949468238e2c47f586b.js → TargetsTab-326711a03f6c9686634d.js} +1 -1
- data/tools/cmdtlmserver/{TextboxWidget-Qb0TNt4Y-ce1afdf7e1d90cc64e61.js → TextboxWidget-BtEwXzDO-52792ac2b6593c85c776.js} +1 -1
- data/tools/cmdtlmserver/{TextfieldWidget-DcSGRfnF-a7809cd7d5a664b4c0c9.js → TextfieldWidget-BDbb57HP-7306fcc70fc27079b1d3.js} +1 -1
- data/tools/cmdtlmserver/TimeWidget-DzD8U8l8-db805689f0b8dbaab9f7.js +1 -0
- data/tools/cmdtlmserver/{TitleWidget-C8b9Vp5r-99cf2b02c10b64dca183.js → TitleWidget-CL53vf14-c0987297e98b6c858650.js} +1 -1
- data/tools/cmdtlmserver/{TlmPacketsTab-92fafc983fc6f8605eeb.js → TlmPacketsTab-91250bba537c7eb02f7c.js} +1 -1
- data/tools/cmdtlmserver/{Updater-1bff129cf4c5b566e4b7.js → Updater-af04370b0601580396d1.js} +1 -1
- data/tools/cmdtlmserver/{VWidget-BgNciXK1-381c03faa8917b011e04.js → VWidget-5qOYva88-5dc877752d53235d987d.js} +1 -1
- data/tools/cmdtlmserver/{ValueWidget-B1OvCmXK-d45771e1052030d4b9e4.js → ValueWidget-CAkuc_w_-0721aa9556f274d056ba.js} +1 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-Y8sO05E1-f729f6e347b2f5825407.js +1 -0
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-iOjB_fCj-ae174dd346919467bac7.js +1 -0
- data/tools/cmdtlmserver/{ValuerangebarWidget-DjL4ze3d-329b4ba511bfe843e5bf.js → ValuerangebarWidget-DsCoeAm6-7804711bfe999dad21a6.js} +1 -1
- data/tools/cmdtlmserver/{VerticalWidget-V5-vGq7l-6bba1f8b9fdc94e4a2ce.js → VerticalWidget-C6O0dhRU-a30bbb27eaa68c233c89.js} +1 -1
- data/tools/cmdtlmserver/{VerticalboxWidget-OigMLjH8-639722d4c54c41938b65.js → VerticalboxWidget-B-CoqRJG-ba12b0177fbcd7fb76e1.js} +1 -1
- data/tools/cmdtlmserver/{Widget-BiaunQ83-9db8c69b1fa2fb12a253.js → Widget-CtYQauzA-69fc956797d4c4719727.js} +1 -1
- data/tools/cmdtlmserver/main-78902a467d9f5f7771dd.js +1499 -0
- data/tools/cmdtlmserver/main.js +1 -1
- data/tools/cmdtlmserver/services-fee3a04fec3ff6af8998.js +10 -0
- metadata +84 -84
- data/tools/cmdtlmserver/ArrayWidget-CmKZQfWB-4e00489b0264cc8dfcda.js +0 -2
- data/tools/cmdtlmserver/CanvasWidget-1jy1JskS-78487686081412e10916.js +0 -1
- data/tools/cmdtlmserver/CanvasdotWidget-DxuFGoWt-ea33615de6d5602f32e1.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelWidget-Tt4dmAOI-037604d1b61d1b57a8fc.js +0 -1
- data/tools/cmdtlmserver/CanvaslabelvalueWidget-D1-kZsi--a596451eb90fe438480e.js +0 -1
- data/tools/cmdtlmserver/CanvaslineWidget-Din8LMyF-158bc2b4a39a4fae162f.js +0 -1
- data/tools/cmdtlmserver/DataFlowsTab-9e1ffcf4185c68ec95a6.js +0 -1
- data/tools/cmdtlmserver/Graph-Cwghj5Pc-afbf017b53a9be5d0b91.js +0 -1
- data/tools/cmdtlmserver/HorizontallineWidget-ChDLR_8D-0f9378586bac8a1d8808.js +0 -1
- data/tools/cmdtlmserver/InterfaceFlowChart-9fa028bf5a66351fbb3a.js +0 -27
- data/tools/cmdtlmserver/LabelledWidget-D4N2gPxJ-c27ae58bf9e701fbf918.js +0 -1
- data/tools/cmdtlmserver/LabelsparklineWidget-Bbjjio1S-bf6b2a25eadb7c67c730.js +0 -1
- data/tools/cmdtlmserver/LabelvalueWidget-Bc6HtTMO-8b6fcee12793b61c878d.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-CMnJoNKz-8c2102326e38b64f5171.js +0 -1
- data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-R5ofG4q1-5433c80ce010ca8d2b43.js +0 -1
- data/tools/cmdtlmserver/LabelvaluerangebarWidget-Qa3R2_4p-607724fcdde23b68bae1.js +0 -1
- data/tools/cmdtlmserver/LinegraphWidget-DaCyvdnI-4710a406ea75b58d5243.js +0 -1
- data/tools/cmdtlmserver/SpacerWidget-CUGpXBpA-6d23529747e319872c99.js +0 -1
- data/tools/cmdtlmserver/TimeWidget-aoMkDgRR-4cd49c22b8d67f43d653.js +0 -1
- data/tools/cmdtlmserver/ValuelimitsbarWidget-CUd9P_Xg-6791295e417059d96249.js +0 -1
- data/tools/cmdtlmserver/ValuelimitscolumnWidget-CbThSMma-cb2bb07907eb435bb5b5.js +0 -1
- data/tools/cmdtlmserver/main-d0fabc4d2acb27d40bfd.js +0 -1498
- data/tools/cmdtlmserver/services-156f0e34dd9a9852f2e9.js +0 -10
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
System.register(["vue","./Updater-1bff129cf4c5b566e4b7.js","./RawBuffer-b57ec55fa04e3c02535c.js","./main-d0fabc4d2acb27d40bfd.js","./services-156f0e34dd9a9852f2e9.js"],(function(Gi,bh){"use strict";var Ln,rt,Fn,_e,ht,Se,Mo,Do,ie,he,oe,ue,me,Ce,Oo,be,Ee,pe,qe,pt,gt,To,Pt,Ae,Po,Je,fe,Ve,nn,Re,Gn,zo,De,Oe,Pe,on,Ao,Ro,ge,ke,ye,Bo,Yn,vt,He,zt,Vo,Ho,Lo,Fo,Go,it,Yo;return{setters:[se=>{Ln=se.getCurrentScope,rt=se.inject,Fn=se.effectScope,_e=se.watch,ht=se.provide,Se=se.defineComponent,Mo=se.useSlots,Do=se.onUnmounted,ie=se.openBlock,he=se.createElementBlock,oe=se.unref,ue=se.createVNode,me=se.withCtx,Ce=se.renderSlot,Oo=se.createPropsRestProxy,be=se.toRef,Ee=se.ref,pe=se.computed,qe=se.onMounted,pt=se.normalizeClass,gt=se.getCurrentInstance,To=se.reactive,Pt=se.onScopeDispose,Ae=se.nextTick,Po=se.onBeforeMount,Je=se.shallowRef,fe=se.createElementVNode,Ve=se.Fragment,nn=se.renderList,Re=se.normalizeStyle,Gn=se.onBeforeUnmount,zo=se.isMemoSame,De=se.createBlock,Oe=se.createCommentVNode,Pe=se.toDisplayString,on=se.isRef,Ao=se.toRefs,Ro=se.customRef,ge=se.toValue,ke=se.resolveComponent,ye=se.h,Bo=se.useAttrs,Yn=se.mergeProps,vt=se.resolveDynamicComponent,He=se.createTextVNode,zt=se.markRaw,Vo=se.readonly,Ho=se.normalizeProps,Lo=se.guardReactiveProps},se=>{Fo=se.U},se=>{Go=se.R},se=>{it=se._},se=>{Yo=se.j}],execute:(function(){var se=document.createElement("style");se.textContent=`.details-table[data-v-06ee5ec0]{width:100%;overflow-x:hidden;overflow-y:hidden}.interface-node[data-v-31945a3b]{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-31945a3b]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.router-node[data-v-b1fbfb62]{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-b1fbfb62]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.cosmos-node[data-v-c2b5368b]{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-c2b5368b]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.target-node[data-v-125c8608]{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-125c8608]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.write-protocol-node[data-v-8e435f75]{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-8e435f75]{font-weight:500;font-size:10px;margin:2px 0;color:#374151}.read-protocol-node[data-v-791bf23d]{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-791bf23d]{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}.docs-overlay{position:absolute;top:10px;left:10px;z-index:5}.docs-link{display:inline-flex;align-items:center;padding:4px 10px;background-color:#1e3246d9;border:1px solid rgba(255,255,255,.2);border-radius:4px;color:#fffc;text-decoration:none;font-size:13px;transition:background-color .2s,color .2s}.docs-link:hover{background-color:#284664f2;color:#fff}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(se);function At(e){return Ln()?(Pt(e),!0):!1}function Qe(e){return typeof e=="function"?e():oe(e)}const Yi=typeof window<"u"&&typeof document<"u",Xi=e=>typeof e<"u",ji=Object.prototype.toString,Wi=e=>ji.call(e)==="[object Object]",Ui=()=>{};function Zi(e,t){function n(...o){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,o),{fn:t,thisArg:this,args:o})).then(r).catch(i)})}return n}const Xo=e=>e();function Ki(e=Xo){const t=Ee(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:Vo(t),pause:n,resume:o,eventFilter:r}}function jo(e,t=!1,n="Timeout"){return new Promise((o,r)=>{setTimeout(t?()=>r(n):o,e)})}function qi(e,t,n={}){const{eventFilter:o=Xo,...r}=n;return _e(e,Zi(o,t),r)}function St(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:a,resume:s,isActive:l}=Ki(o);return{stop:qi(e,t,{...r,eventFilter:i}),pause:a,resume:s,isActive:l}}function Ji(e,t={}){if(!on(e))return Ao(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=Ro(()=>({get(){return e.value[o]},set(r){var i;if((i=Qe(t.replaceRef))!=null?i:!0)if(Array.isArray(e.value)){const s=[...e.value];s[o]=r,e.value=s}else{const s={...e.value,[o]:r};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[o]=r}}));return n}function Xn(e,t=!1){function n(d,{flush:g="sync",deep:f=!1,timeout:b,throwOnTimeout:N}={}){let S=null;const $=[new Promise(m=>{S=_e(e,y=>{d(y)!==t&&(S?.(),m(y))},{flush:g,deep:f,immediate:!0})})];return b!=null&&$.push(jo(b,N).then(()=>Qe(e)).finally(()=>S?.())),Promise.race($)}function o(d,g){if(!on(d))return n(y=>y===d,g);const{flush:f="sync",deep:b=!1,timeout:N,throwOnTimeout:S}=g??{};let A=null;const m=[new Promise(y=>{A=_e([e,d],([V,F])=>{t!==(V===F)&&(A?.(),y(V))},{flush:f,deep:b,immediate:!0})})];return N!=null&&m.push(jo(N,S).then(()=>Qe(e)).finally(()=>(A?.(),Qe(e)))),Promise.race(m)}function r(d){return n(g=>!!g,d)}function i(d){return o(null,d)}function a(d){return o(void 0,d)}function s(d){return n(Number.isNaN,d)}function l(d,g){return n(f=>{const b=Array.from(f);return b.includes(d)||b.includes(Qe(d))},g)}function u(d){return c(1,d)}function c(d=1,g){let f=-1;return n(()=>(f+=1,f>=d),g)}return Array.isArray(Qe(e))?{toMatch:n,toContains:l,changed:u,changedTimes:c,get not(){return Xn(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:r,toBeNull:i,toBeNaN:s,toBeUndefined:a,changed:u,changedTimes:c,get not(){return Xn(e,!t)}}}function jn(e){return Xn(e)}function Qi(e){var t;const n=Qe(e);return(t=n?.$el)!=null?t:n}const Wo=Yi?window:void 0;function Uo(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=Wo):[t,n,o,r]=e,!t)return Ui;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],a=()=>{i.forEach(c=>c()),i.length=0},s=(c,d,g,f)=>(c.addEventListener(d,g,f),()=>c.removeEventListener(d,g,f)),l=_e(()=>[Qi(t),Qe(r)],([c,d])=>{if(a(),!c)return;const g=Wi(d)?{...d}:d;i.push(...n.flatMap(f=>o.map(b=>s(c,f,b,g))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return At(u),u}function ea(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Zo(...e){let t,n,o={};e.length===3?(t=e[0],n=e[1],o=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],o=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:r=Wo,eventName:i="keydown",passive:a=!1,dedupe:s=!1}=o,l=ea(t);return Uo(r,i,c=>{c.repeat&&Qe(s)||l(c)&&n(c)},a)}function ta(e){return JSON.parse(JSON.stringify(e))}function Wn(e,t,n,o={}){var r,i,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:g}=o,f=gt(),b=n||f?.emit||((r=f?.$emit)==null?void 0:r.bind(f))||((a=(i=f?.proxy)==null?void 0:i.$emit)==null?void 0:a.bind(f?.proxy));let N=u;t||(t="modelValue"),N=N||`update:${t.toString()}`;const S=m=>s?typeof s=="function"?s(m):ta(m):m,A=()=>Xi(e[t])?S(e[t]):d,$=m=>{g?g(m)&&b(N,m):b(N,m)};if(l){const m=A(),y=Ee(m);let V=!1;return _e(()=>e[t],F=>{V||(V=!0,y.value=S(F),Ae(()=>V=!1))}),_e(y,F=>{!V&&(F!==e[t]||c)&&$(F)},{deep:c}),y}else return pe({get(){return A()},set(m){$(m)}})}var na={value:()=>{}};function rn(){for(var e=0,t=arguments.length,n={},o;e<t;++e){if(!(o=arguments[e]+"")||o in n||/[\s.]/.test(o))throw new Error("illegal type: "+o);n[o]=[]}return new an(n)}function an(e){this._=e}function oa(e,t){return e.trim().split(/^|\s+/).map(function(n){var o="",r=n.indexOf(".");if(r>=0&&(o=n.slice(r+1),n=n.slice(0,r)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}an.prototype=rn.prototype={constructor:an,on:function(e,t){var n=this._,o=oa(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=ra(n[r],e.name)))return r;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++i<a;)if(r=(e=o[i]).type)n[r]=Ko(n[r],e.name,t);else if(t==null)for(r in n)n[r]=Ko(n[r],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new an(e)},call:function(e,t){if((r=arguments.length-2)>0)for(var n=new Array(r),o=0,r,i;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=this._[e],o=0,r=i.length;o<r;++o)i[o].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var o=this._[e],r=0,i=o.length;r<i;++r)o[r].value.apply(t,n)}};function ra(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function Ko(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=na,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var Un="http://www.w3.org/1999/xhtml";const qo={svg:"http://www.w3.org/2000/svg",xhtml:Un,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function sn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),qo.hasOwnProperty(t)?{space:qo[t],local:e}:e}function ia(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Un&&t.documentElement.namespaceURI===Un?t.createElement(e):t.createElementNS(n,e)}}function aa(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Jo(e){var t=sn(e);return(t.local?aa:ia)(t)}function sa(){}function Zn(e){return e==null?sa:function(){return this.querySelector(e)}}function la(e){typeof e!="function"&&(e=Zn(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=new Array(a),l,u,c=0;c<a;++c)(l=i[c])&&(u=e.call(l,l.__data__,c,i))&&("__data__"in l&&(u.__data__=l.__data__),s[c]=u);return new Be(o,this._parents)}function ua(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ca(){return[]}function Qo(e){return e==null?ca:function(){return this.querySelectorAll(e)}}function da(e){return function(){return ua(e.apply(this,arguments))}}function fa(e){typeof e=="function"?e=da(e):e=Qo(e);for(var t=this._groups,n=t.length,o=[],r=[],i=0;i<n;++i)for(var a=t[i],s=a.length,l,u=0;u<s;++u)(l=a[u])&&(o.push(e.call(l,l.__data__,u,a)),r.push(l));return new Be(o,r)}function er(e){return function(){return this.matches(e)}}function tr(e){return function(t){return t.matches(e)}}var ha=Array.prototype.find;function pa(e){return function(){return ha.call(this.children,e)}}function ga(){return this.firstElementChild}function va(e){return this.select(e==null?ga:pa(typeof e=="function"?e:tr(e)))}var ma=Array.prototype.filter;function _a(){return Array.from(this.children)}function ya(e){return function(){return ma.call(this.children,e)}}function wa(e){return this.selectAll(e==null?_a:ya(typeof e=="function"?e:tr(e)))}function ba(e){typeof e!="function"&&(e=er(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=[],l,u=0;u<a;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&s.push(l);return new Be(o,this._parents)}function nr(e){return new Array(e.length)}function xa(){return new Be(this._enter||this._groups.map(nr),this._parents)}function ln(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}ln.prototype={constructor:ln,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 Ea(e){return function(){return e}}function Na(e,t,n,o,r,i){for(var a=0,s,l=t.length,u=i.length;a<u;++a)(s=t[a])?(s.__data__=i[a],o[a]=s):n[a]=new ln(e,i[a]);for(;a<l;++a)(s=t[a])&&(r[a]=s)}function Sa(e,t,n,o,r,i,a){var s,l,u=new Map,c=t.length,d=i.length,g=new Array(c),f;for(s=0;s<c;++s)(l=t[s])&&(g[s]=f=a.call(l,l.__data__,s,t)+"",u.has(f)?r[s]=l:u.set(f,l));for(s=0;s<d;++s)f=a.call(e,i[s],s,i)+"",(l=u.get(f))?(o[s]=l,l.__data__=i[s],u.delete(f)):n[s]=new ln(e,i[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(g[s])===l&&(r[s]=l)}function ka(e){return e.__data__}function Ca(e,t){if(!arguments.length)return Array.from(this,ka);var n=t?Sa:Na,o=this._parents,r=this._groups;typeof e!="function"&&(e=Ea(e));for(var i=r.length,a=new Array(i),s=new Array(i),l=new Array(i),u=0;u<i;++u){var c=o[u],d=r[u],g=d.length,f=$a(e.call(c,c&&c.__data__,u,o)),b=f.length,N=s[u]=new Array(b),S=a[u]=new Array(b),A=l[u]=new Array(g);n(c,d,N,S,A,f,t);for(var $=0,m=0,y,V;$<b;++$)if(y=N[$]){for($>=m&&(m=$+1);!(V=S[m])&&++m<b;);y._next=V||null}}return a=new Be(a,o),a._enter=s,a._exit=l,a}function $a(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Ia(){return new Be(this._exit||this._groups.map(nr),this._parents)}function Ma(e,t,n){var o=this.enter(),r=this,i=this.exit();return typeof e=="function"?(o=e(o),o&&(o=o.selection())):o=o.append(e+""),t!=null&&(r=t(r),r&&(r=r.selection())),n==null?i.remove():n(i),o&&r?o.merge(r).order():r}function Da(e){for(var t=e.selection?e.selection():e,n=this._groups,o=t._groups,r=n.length,i=o.length,a=Math.min(r,i),s=new Array(r),l=0;l<a;++l)for(var u=n[l],c=o[l],d=u.length,g=s[l]=new Array(d),f,b=0;b<d;++b)(f=u[b]||c[b])&&(g[b]=f);for(;l<r;++l)s[l]=n[l];return new Be(s,this._parents)}function Oa(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var o=e[t],r=o.length-1,i=o[r],a;--r>=0;)(a=o[r])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function Ta(e){e||(e=Pa);function t(d,g){return d&&g?e(d.__data__,g.__data__):!d-!g}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var a=n[i],s=a.length,l=r[i]=new Array(s),u,c=0;c<s;++c)(u=a[c])&&(l[c]=u);l.sort(t)}return new Be(r,this._parents).order()}function Pa(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function za(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Aa(){return Array.from(this)}function Ra(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length;r<i;++r){var a=o[r];if(a)return a}return null}function Ba(){let e=0;for(const t of this)++e;return e}function Va(){return!this.node()}function Ha(e){for(var t=this._groups,n=0,o=t.length;n<o;++n)for(var r=t[n],i=0,a=r.length,s;i<a;++i)(s=r[i])&&e.call(s,s.__data__,i,r);return this}function La(e){return function(){this.removeAttribute(e)}}function Fa(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ga(e,t){return function(){this.setAttribute(e,t)}}function Ya(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Xa(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function ja(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 Wa(e,t){var n=sn(e);if(arguments.length<2){var o=this.node();return n.local?o.getAttributeNS(n.space,n.local):o.getAttribute(n)}return this.each((t==null?n.local?Fa:La:typeof t=="function"?n.local?ja:Xa:n.local?Ya:Ga)(n,t))}function or(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ua(e){return function(){this.style.removeProperty(e)}}function Za(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Ka(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function qa(e,t,n){return arguments.length>1?this.each((t==null?Ua:typeof t=="function"?Ka:Za)(e,t,n??"")):kt(this.node(),e)}function kt(e,t){return e.style.getPropertyValue(t)||or(e).getComputedStyle(e,null).getPropertyValue(t)}function Ja(e){return function(){delete this[e]}}function Qa(e,t){return function(){this[e]=t}}function es(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function ts(e,t){return arguments.length>1?this.each((t==null?Ja:typeof t=="function"?es:Qa)(e,t)):this.node()[e]}function rr(e){return e.trim().split(/^|\s+/)}function Kn(e){return e.classList||new ir(e)}function ir(e){this._node=e,this._names=rr(e.getAttribute("class")||"")}ir.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 ar(e,t){for(var n=Kn(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function sr(e,t){for(var n=Kn(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function ns(e){return function(){ar(this,e)}}function os(e){return function(){sr(this,e)}}function rs(e,t){return function(){(t.apply(this,arguments)?ar:sr)(this,e)}}function is(e,t){var n=rr(e+"");if(arguments.length<2){for(var o=Kn(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?rs:t?ns:os)(n,t))}function as(){this.textContent=""}function ss(e){return function(){this.textContent=e}}function ls(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function us(e){return arguments.length?this.each(e==null?as:(typeof e=="function"?ls:ss)(e)):this.node().textContent}function cs(){this.innerHTML=""}function ds(e){return function(){this.innerHTML=e}}function fs(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function hs(e){return arguments.length?this.each(e==null?cs:(typeof e=="function"?fs:ds)(e)):this.node().innerHTML}function ps(){this.nextSibling&&this.parentNode.appendChild(this)}function gs(){return this.each(ps)}function vs(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ms(){return this.each(vs)}function _s(e){var t=typeof e=="function"?e:Jo(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ys(){return null}function ws(e,t){var n=typeof e=="function"?e:Jo(e),o=t==null?ys:typeof t=="function"?t:Zn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function bs(){var e=this.parentNode;e&&e.removeChild(this)}function xs(){return this.each(bs)}function Es(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ns(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ss(e){return this.select(e?Ns:Es)}function ks(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Cs(e){return function(t){e.call(this,t,this.__data__)}}function $s(e){return e.trim().split(/^|\s+/).map(function(t){var n="",o=t.indexOf(".");return o>=0&&(n=t.slice(o+1),t=t.slice(0,o)),{type:t,name:n}})}function Is(e){return function(){var t=this.__on;if(t){for(var n=0,o=-1,r=t.length,i;n<r;++n)i=t[n],(!e.type||i.type===e.type)&&i.name===e.name?this.removeEventListener(i.type,i.listener,i.options):t[++o]=i;++o?t.length=o:delete this.__on}}}function Ms(e,t,n){return function(){var o=this.__on,r,i=Cs(t);if(o){for(var a=0,s=o.length;a<s;++a)if((r=o[a]).type===e.type&&r.name===e.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),r.value=t;return}}this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function Ds(e,t,n){var o=$s(e+""),r,i=o.length,a;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,u=s.length,c;l<u;++l)for(r=0,c=s[l];r<i;++r)if((a=o[r]).type===c.type&&a.name===c.name)return c.value}return}for(s=t?Ms:Is,r=0;r<i;++r)this.each(s(o[r],t,n));return this}function lr(e,t,n){var o=or(e),r=o.CustomEvent;typeof r=="function"?r=new r(t,n):(r=o.document.createEvent("Event"),n?(r.initEvent(t,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(t,!1,!1)),e.dispatchEvent(r)}function Os(e,t){return function(){return lr(this,e,t)}}function Ts(e,t){return function(){return lr(this,e,t.apply(this,arguments))}}function Ps(e,t){return this.each((typeof t=="function"?Ts:Os)(e,t))}function*zs(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var o=e[t],r=0,i=o.length,a;r<i;++r)(a=o[r])&&(yield a)}var ur=[null];function Be(e,t){this._groups=e,this._parents=t}function Rt(){return new Be([[document.documentElement]],ur)}function As(){return this}Be.prototype=Rt.prototype={constructor:Be,select:la,selectAll:fa,selectChild:va,selectChildren:wa,filter:ba,data:Ca,enter:xa,exit:Ia,join:Ma,merge:Da,selection:As,order:Oa,sort:Ta,call:za,nodes:Aa,node:Ra,size:Ba,empty:Va,each:Ha,attr:Wa,style:qa,property:ts,classed:is,text:us,html:hs,raise:gs,lower:ms,append:_s,insert:ws,remove:xs,clone:Ss,datum:ks,on:Ds,dispatch:Ps,[Symbol.iterator]:zs};function Le(e){return typeof e=="string"?new Be([[document.querySelector(e)]],[document.documentElement]):new Be([[e]],ur)}function Rs(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Xe(e,t){if(e=Rs(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var o=n.createSVGPoint();return o.x=e.clientX,o.y=e.clientY,o=o.matrixTransform(t.getScreenCTM().inverse()),[o.x,o.y]}if(t.getBoundingClientRect){var r=t.getBoundingClientRect();return[e.clientX-r.left-t.clientLeft,e.clientY-r.top-t.clientTop]}}return[e.pageX,e.pageY]}const Bs={passive:!1},Bt={capture:!0,passive:!1};function qn(e){e.stopImmediatePropagation()}function Ct(e){e.preventDefault(),e.stopImmediatePropagation()}function cr(e){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",Ct,Bt);"onselectstart"in t?n.on("selectstart.drag",Ct,Bt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function dr(e,t){var n=e.document.documentElement,o=Le(e).on("dragstart.drag",null);t&&(o.on("click.drag",Ct,Bt),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const un=e=>()=>e;function Jn(e,{sourceEvent:t,subject:n,target:o,identifier:r,active:i,x:a,y:s,dx:l,dy:u,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:r,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:c}})}Jn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Vs(e){return!e.ctrlKey&&!e.button}function Hs(){return this.parentNode}function Ls(e,t){return t??{x:e.x,y:e.y}}function Fs(){return navigator.maxTouchPoints||"ontouchstart"in this}function Gs(){var e=Vs,t=Hs,n=Ls,o=Fs,r={},i=rn("start","drag","end"),a=0,s,l,u,c,d=0;function g(y){y.on("mousedown.drag",f).filter(o).on("touchstart.drag",S).on("touchmove.drag",A,Bs).on("touchend.drag touchcancel.drag",$).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(y,V){if(!(c||!e.call(this,y,V))){var F=m(this,t.call(this,y,V),y,V,"mouse");F&&(Le(y.view).on("mousemove.drag",b,Bt).on("mouseup.drag",N,Bt),cr(y.view),qn(y),u=!1,s=y.clientX,l=y.clientY,F("start",y))}}function b(y){if(Ct(y),!u){var V=y.clientX-s,F=y.clientY-l;u=V*V+F*F>d}r.mouse("drag",y)}function N(y){Le(y.view).on("mousemove.drag mouseup.drag",null),dr(y.view,u),Ct(y),r.mouse("end",y)}function S(y,V){if(e.call(this,y,V)){var F=y.changedTouches,j=t.call(this,y,V),X=F.length,q,P;for(q=0;q<X;++q)(P=m(this,j,y,V,F[q].identifier,F[q]))&&(qn(y),P("start",y,F[q]))}}function A(y){var V=y.changedTouches,F=V.length,j,X;for(j=0;j<F;++j)(X=r[V[j].identifier])&&(Ct(y),X("drag",y,V[j]))}function $(y){var V=y.changedTouches,F=V.length,j,X;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),j=0;j<F;++j)(X=r[V[j].identifier])&&(qn(y),X("end",y,V[j]))}function m(y,V,F,j,X,q){var P=i.copy(),x=Xe(q||F,V),v,T,p;if((p=n.call(y,new Jn("beforestart",{sourceEvent:F,target:g,identifier:X,active:a,x:x[0],y:x[1],dx:0,dy:0,dispatch:P}),j))!=null)return v=p.x-x[0]||0,T=p.y-x[1]||0,function I(_,M,z){var H=x,L;switch(_){case"start":r[X]=I,L=a++;break;case"end":delete r[X],--a;case"drag":x=Xe(z||M,V),L=a;break}P.call(_,y,new Jn(_,{sourceEvent:M,subject:p,target:g,identifier:X,active:L,x:x[0]+v,y:x[1]+T,dx:x[0]-H[0],dy:x[1]-H[1],dispatch:P}),j)}}return g.filter=function(y){return arguments.length?(e=typeof y=="function"?y:un(!!y),g):e},g.container=function(y){return arguments.length?(t=typeof y=="function"?y:un(y),g):t},g.subject=function(y){return arguments.length?(n=typeof y=="function"?y:un(y),g):n},g.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:un(!!y),g):o},g.on=function(){var y=i.on.apply(i,arguments);return y===i?g:y},g.clickDistance=function(y){return arguments.length?(d=(y=+y)*y,g):Math.sqrt(d)},g}function Qn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function fr(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Vt(){}var Ht=.7,cn=1/Ht,$t="\\s*([+-]?\\d+)\\s*",Lt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ys=/^#([0-9a-f]{3,8})$/,Xs=new RegExp(`^rgb\\(${$t},${$t},${$t}\\)$`),js=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),Ws=new RegExp(`^rgba\\(${$t},${$t},${$t},${Lt}\\)$`),Us=new RegExp(`^rgba\\(${je},${je},${je},${Lt}\\)$`),Zs=new RegExp(`^hsl\\(${Lt},${je},${je}\\)$`),Ks=new RegExp(`^hsla\\(${Lt},${je},${je},${Lt}\\)$`),hr={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};Qn(Vt,mt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:pr,formatHex:pr,formatHex8:qs,formatHsl:Js,formatRgb:gr,toString:gr});function pr(){return this.rgb().formatHex()}function qs(){return this.rgb().formatHex8()}function Js(){return wr(this).formatHsl()}function gr(){return this.rgb().formatRgb()}function mt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ys.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?vr(t):n===3?new ze(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?dn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?dn(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=Xs.exec(e))?new ze(t[1],t[2],t[3],1):(t=js.exec(e))?new ze(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Ws.exec(e))?dn(t[1],t[2],t[3],t[4]):(t=Us.exec(e))?dn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Zs.exec(e))?yr(t[1],t[2]/100,t[3]/100,1):(t=Ks.exec(e))?yr(t[1],t[2]/100,t[3]/100,t[4]):hr.hasOwnProperty(e)?vr(hr[e]):e==="transparent"?new ze(NaN,NaN,NaN,0):null}function vr(e){return new ze(e>>16&255,e>>8&255,e&255,1)}function dn(e,t,n,o){return o<=0&&(e=t=n=NaN),new ze(e,t,n,o)}function Qs(e){return e instanceof Vt||(e=mt(e)),e?(e=e.rgb(),new ze(e.r,e.g,e.b,e.opacity)):new ze}function eo(e,t,n,o){return arguments.length===1?Qs(e):new ze(e,t,n,o??1)}function ze(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}Qn(ze,eo,fr(Vt,{brighter(e){return e=e==null?cn:Math.pow(cn,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ht:Math.pow(Ht,e),new ze(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ze(_t(this.r),_t(this.g),_t(this.b),fn(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:mr,formatHex:mr,formatHex8:el,formatRgb:_r,toString:_r}));function mr(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function el(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function _r(){const e=fn(this.opacity);return`${e===1?"rgb(":"rgba("}${_t(this.r)}, ${_t(this.g)}, ${_t(this.b)}${e===1?")":`, ${e})`}`}function fn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _t(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yt(e){return e=_t(e),(e<16?"0":"")+e.toString(16)}function yr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Fe(e,t,n,o)}function wr(e){if(e instanceof Fe)return new Fe(e.h,e.s,e.l,e.opacity);if(e instanceof Vt||(e=mt(e)),!e)return new Fe;if(e instanceof Fe)return e;e=e.rgb();var t=e.r/255,n=e.g/255,o=e.b/255,r=Math.min(t,n,o),i=Math.max(t,n,o),a=NaN,s=i-r,l=(i+r)/2;return s?(t===i?a=(n-o)/s+(n<o)*6:n===i?a=(o-t)/s+2:a=(t-n)/s+4,s/=l<.5?i+r:2-i-r,a*=60):s=l>0&&l<1?0:a,new Fe(a,s,l,e.opacity)}function tl(e,t,n,o){return arguments.length===1?wr(e):new Fe(e,t,n,o??1)}function Fe(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}Qn(Fe,tl,fr(Vt,{brighter(e){return e=e==null?cn:Math.pow(cn,e),new Fe(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ht:Math.pow(Ht,e),new Fe(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,o=n+(n<.5?n:1-n)*t,r=2*n-o;return new ze(to(e>=240?e-240:e+120,r,o),to(e,r,o),to(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Fe(br(this.h),hn(this.s),hn(this.l),fn(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=fn(this.opacity);return`${e===1?"hsl(":"hsla("}${br(this.h)}, ${hn(this.s)*100}%, ${hn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function br(e){return e=(e||0)%360,e<0?e+360:e}function hn(e){return Math.max(0,Math.min(1,e||0))}function to(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 no=e=>()=>e;function nl(e,t){return function(n){return e+n*t}}function ol(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(o){return Math.pow(e+o*t,n)}}function rl(e){return(e=+e)==1?xr:function(t,n){return n-t?ol(t,n,e):no(isNaN(t)?n:t)}}function xr(e,t){var n=t-e;return n?nl(e,n):no(isNaN(e)?t:e)}const pn=(function e(t){var n=rl(t);function o(r,i){var a=n((r=eo(r)).r,(i=eo(i)).r),s=n(r.g,i.g),l=n(r.b,i.b),u=xr(r.opacity,i.opacity);return function(c){return r.r=a(c),r.g=s(c),r.b=l(c),r.opacity=u(c),r+""}}return o.gamma=e,o})(1);function il(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,o=t.slice(),r;return function(i){for(r=0;r<n;++r)o[r]=e[r]*(1-i)+t[r]*i;return o}}function al(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function sl(e,t){var n=t?t.length:0,o=e?Math.min(n,e.length):0,r=new Array(o),i=new Array(n),a;for(a=0;a<o;++a)r[a]=Ft(e[a],t[a]);for(;a<n;++a)i[a]=t[a];return function(s){for(a=0;a<o;++a)i[a]=r[a](s);return i}}function ll(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function We(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ul(e,t){var n={},o={},r;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(r in t)r in e?n[r]=Ft(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var oo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ro=new RegExp(oo.source,"g");function cl(e){return function(){return e}}function dl(e){return function(t){return e(t)+""}}function Er(e,t){var n=oo.lastIndex=ro.lastIndex=0,o,r,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(o=oo.exec(e))&&(r=ro.exec(t));)(i=r.index)>n&&(i=t.slice(n,i),s[a]?s[a]+=i:s[++a]=i),(o=o[0])===(r=r[0])?s[a]?s[a]+=r:s[++a]=r:(s[++a]=null,l.push({i:a,x:We(o,r)})),n=ro.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?dl(l[0].x):cl(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)s[(d=l[c]).i]=d.x(u);return s.join("")})}function Ft(e,t){var n=typeof t,o;return t==null||n==="boolean"?no(t):(n==="number"?We:n==="string"?(o=mt(t))?(t=o,pn):Er:t instanceof mt?pn:t instanceof Date?ll:al(t)?il:Array.isArray(t)?sl:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?ul:We)(e,t)}var Nr=180/Math.PI,io={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Sr(e,t,n,o,r,i){var a,s,l;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(l=e*n+t*o)&&(n-=e*l,o-=t*l),(s=Math.sqrt(n*n+o*o))&&(n/=s,o/=s,l/=s),e*o<t*n&&(e=-e,t=-t,l=-l,a=-a),{translateX:r,translateY:i,rotate:Math.atan2(t,e)*Nr,skewX:Math.atan(l)*Nr,scaleX:a,scaleY:s}}var gn;function fl(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?io:Sr(t.a,t.b,t.c,t.d,t.e,t.f)}function hl(e){return e==null||(gn||(gn=document.createElementNS("http://www.w3.org/2000/svg","g")),gn.setAttribute("transform",e),!(e=gn.transform.baseVal.consolidate()))?io:(e=e.matrix,Sr(e.a,e.b,e.c,e.d,e.e,e.f))}function kr(e,t,n,o){function r(u){return u.length?u.pop()+" ":""}function i(u,c,d,g,f,b){if(u!==d||c!==g){var N=f.push("translate(",null,t,null,n);b.push({i:N-4,x:We(u,d)},{i:N-2,x:We(c,g)})}else(d||g)&&f.push("translate("+d+t+g+n)}function a(u,c,d,g){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),g.push({i:d.push(r(d)+"rotate(",null,o)-2,x:We(u,c)})):c&&d.push(r(d)+"rotate("+c+o)}function s(u,c,d,g){u!==c?g.push({i:d.push(r(d)+"skewX(",null,o)-2,x:We(u,c)}):c&&d.push(r(d)+"skewX("+c+o)}function l(u,c,d,g,f,b){if(u!==d||c!==g){var N=f.push(r(f)+"scale(",null,",",null,")");b.push({i:N-4,x:We(u,d)},{i:N-2,x:We(c,g)})}else(d!==1||g!==1)&&f.push(r(f)+"scale("+d+","+g+")")}return function(u,c){var d=[],g=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,d,g),a(u.rotate,c.rotate,d,g),s(u.skewX,c.skewX,d,g),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,g),u=c=null,function(f){for(var b=-1,N=g.length,S;++b<N;)d[(S=g[b]).i]=S.x(f);return d.join("")}}}var pl=kr(fl,"px, ","px)","deg)"),gl=kr(hl,", ",")",")"),vl=1e-12;function Cr(e){return((e=Math.exp(e))+1/e)/2}function ml(e){return((e=Math.exp(e))-1/e)/2}function _l(e){return((e=Math.exp(2*e))-1)/(e+1)}const vn=(function e(t,n,o){function r(i,a){var s=i[0],l=i[1],u=i[2],c=a[0],d=a[1],g=a[2],f=c-s,b=d-l,N=f*f+b*b,S,A;if(N<vl)A=Math.log(g/u)/t,S=function(j){return[s+j*f,l+j*b,u*Math.exp(t*j*A)]};else{var $=Math.sqrt(N),m=(g*g-u*u+o*N)/(2*u*n*$),y=(g*g-u*u-o*N)/(2*g*n*$),V=Math.log(Math.sqrt(m*m+1)-m),F=Math.log(Math.sqrt(y*y+1)-y);A=(F-V)/t,S=function(j){var X=j*A,q=Cr(V),P=u/(n*$)*(q*_l(t*X+V)-ml(V));return[s+P*f,l+P*b,u*q/Cr(t*X+V)]}}return S.duration=A*1e3*t/Math.SQRT2,S}return r.rho=function(i){var a=Math.max(.001,+i),s=a*a,l=s*s;return e(a,s,l)},r})(Math.SQRT2,2,4);var It=0,Gt=0,Yt=0,$r=1e3,mn,Xt,_n=0,wt=0,yn=0,jt=typeof performance=="object"&&performance.now?performance:Date,Ir=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function ao(){return wt||(Ir(yl),wt=jt.now()+yn)}function yl(){wt=0}function wn(){this._call=this._time=this._next=null}wn.prototype=Mr.prototype={constructor:wn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?ao():+n)+(t==null?0:+t),!this._next&&Xt!==this&&(Xt?Xt._next=this:mn=this,Xt=this),this._call=e,this._time=n,so()},stop:function(){this._call&&(this._call=null,this._time=1/0,so())}};function Mr(e,t,n){var o=new wn;return o.restart(e,t,n),o}function wl(){ao(),++It;for(var e=mn,t;e;)(t=wt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--It}function Dr(){wt=(_n=jt.now())+yn,It=Gt=0;try{wl()}finally{It=0,xl(),wt=0}}function bl(){var e=jt.now(),t=e-_n;t>$r&&(yn-=t,_n=e)}function xl(){for(var e,t=mn,n,o=1/0;t;)t._call?(o>t._time&&(o=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:mn=n);Xt=e,so(o)}function so(e){if(!It){Gt&&(Gt=clearTimeout(Gt));var t=e-wt;t>24?(e<1/0&&(Gt=setTimeout(Dr,e-jt.now()-yn)),Yt&&(Yt=clearInterval(Yt))):(Yt||(_n=jt.now(),Yt=setInterval(bl,$r)),It=1,Ir(Dr))}}function Or(e,t,n){var o=new wn;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var El=rn("start","end","cancel","interrupt"),Nl=[],Tr=0,Pr=1,lo=2,bn=3,zr=4,uo=5,xn=6;function En(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Sl(e,n,{name:t,index:o,group:r,on:El,tween:Nl,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:Tr})}function co(e,t){var n=Ge(e,t);if(n.state>Tr)throw new Error("too late; already scheduled");return n}function Ue(e,t){var n=Ge(e,t);if(n.state>bn)throw new Error("too late; already running");return n}function Ge(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Sl(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=Mr(i,0,n.time);function i(u){n.state=Pr,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,g,f;if(n.state!==Pr)return l();for(c in o)if(f=o[c],f.name===n.name){if(f.state===bn)return Or(a);f.state===zr?(f.state=xn,f.timer.stop(),f.on.call("interrupt",e,e.__data__,f.index,f.group),delete o[c]):+c<t&&(f.state=xn,f.timer.stop(),f.on.call("cancel",e,e.__data__,f.index,f.group),delete o[c])}if(Or(function(){n.state===bn&&(n.state=zr,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=lo,n.on.call("start",e,e.__data__,n.index,n.group),n.state===lo){for(n.state=bn,r=new Array(g=n.tween.length),c=0,d=-1;c<g;++c)(f=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++d]=f);r.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=uo,1),d=-1,g=r.length;++d<g;)r[d].call(e,c);n.state===uo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=xn,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function Nn(e,t){var n=e.__transition,o,r,i=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((o=n[a]).name!==t){i=!1;continue}r=o.state>lo&&o.state<uo,o.state=xn,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function kl(e){return this.each(function(){Nn(this,e)})}function Cl(e,t){var n,o;return function(){var r=Ue(this,e),i=r.tween;if(i!==n){o=n=i;for(var a=0,s=o.length;a<s;++a)if(o[a].name===t){o=o.slice(),o.splice(a,1);break}}r.tween=o}}function $l(e,t,n){var o,r;if(typeof n!="function")throw new Error;return function(){var i=Ue(this,e),a=i.tween;if(a!==o){r=(o=a).slice();for(var s={name:t,value:n},l=0,u=r.length;l<u;++l)if(r[l].name===t){r[l]=s;break}l===u&&r.push(s)}i.tween=r}}function Il(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Ge(this.node(),n).tween,r=0,i=o.length,a;r<i;++r)if((a=o[r]).name===e)return a.value;return null}return this.each((t==null?Cl:$l)(n,e,t))}function fo(e,t,n){var o=e._id;return e.each(function(){var r=Ue(this,o);(r.value||(r.value={}))[t]=n.apply(this,arguments)}),function(r){return Ge(r,o).value[t]}}function Ar(e,t){var n;return(typeof t=="number"?We:t instanceof mt?pn:(n=mt(t))?(t=n,pn):Er)(e,t)}function Ml(e){return function(){this.removeAttribute(e)}}function Dl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ol(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttribute(e);return a===r?null:a===o?i:i=t(o=a,n)}}function Tl(e,t,n){var o,r=n+"",i;return function(){var a=this.getAttributeNS(e.space,e.local);return a===r?null:a===o?i:i=t(o=a,n)}}function Pl(e,t,n){var o,r,i;return function(){var a,s=n(this),l;return s==null?void this.removeAttribute(e):(a=this.getAttribute(e),l=s+"",a===l?null:a===o&&l===r?i:(r=l,i=t(o=a,s)))}}function zl(e,t,n){var o,r,i;return function(){var a,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),l=s+"",a===l?null:a===o&&l===r?i:(r=l,i=t(o=a,s)))}}function Al(e,t){var n=sn(e),o=n==="transform"?gl:Ar;return this.attrTween(e,typeof t=="function"?(n.local?zl:Pl)(n,o,fo(this,"attr."+e,t)):t==null?(n.local?Dl:Ml)(n):(n.local?Tl:Ol)(n,o,t))}function Rl(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Bl(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Vl(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Bl(e,i)),n}return r._value=t,r}function Hl(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Rl(e,i)),n}return r._value=t,r}function Ll(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var o=sn(e);return this.tween(n,(o.local?Vl:Hl)(o,t))}function Fl(e,t){return function(){co(this,e).delay=+t.apply(this,arguments)}}function Gl(e,t){return t=+t,function(){co(this,e).delay=t}}function Yl(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Fl:Gl)(t,e)):Ge(this.node(),t).delay}function Xl(e,t){return function(){Ue(this,e).duration=+t.apply(this,arguments)}}function jl(e,t){return t=+t,function(){Ue(this,e).duration=t}}function Wl(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Xl:jl)(t,e)):Ge(this.node(),t).duration}function Ul(e,t){if(typeof t!="function")throw new Error;return function(){Ue(this,e).ease=t}}function Zl(e){var t=this._id;return arguments.length?this.each(Ul(t,e)):Ge(this.node(),t).ease}function Kl(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ue(this,e).ease=n}}function ql(e){if(typeof e!="function")throw new Error;return this.each(Kl(this._id,e))}function Jl(e){typeof e!="function"&&(e=er(e));for(var t=this._groups,n=t.length,o=new Array(n),r=0;r<n;++r)for(var i=t[r],a=i.length,s=o[r]=[],l,u=0;u<a;++u)(l=i[u])&&e.call(l,l.__data__,u,i)&&s.push(l);return new et(o,this._parents,this._name,this._id)}function Ql(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,o=t.length,r=n.length,i=Math.min(o,r),a=new Array(o),s=0;s<i;++s)for(var l=t[s],u=n[s],c=l.length,d=a[s]=new Array(c),g,f=0;f<c;++f)(g=l[f]||u[f])&&(d[f]=g);for(;s<o;++s)a[s]=t[s];return new et(a,this._parents,this._name,this._id)}function eu(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 tu(e,t,n){var o,r,i=eu(t)?co:Ue;return function(){var a=i(this,e),s=a.on;s!==o&&(r=(o=s).copy()).on(t,n),a.on=r}}function nu(e,t){var n=this._id;return arguments.length<2?Ge(this.node(),n).on.on(e):this.each(tu(n,e,t))}function ou(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ru(){return this.on("end.remove",ou(this._id))}function iu(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Zn(e));for(var o=this._groups,r=o.length,i=new Array(r),a=0;a<r;++a)for(var s=o[a],l=s.length,u=i[a]=new Array(l),c,d,g=0;g<l;++g)(c=s[g])&&(d=e.call(c,c.__data__,g,s))&&("__data__"in c&&(d.__data__=c.__data__),u[g]=d,En(u[g],t,n,g,u,Ge(c,n)));return new et(i,this._parents,t,n)}function au(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Qo(e));for(var o=this._groups,r=o.length,i=[],a=[],s=0;s<r;++s)for(var l=o[s],u=l.length,c,d=0;d<u;++d)if(c=l[d]){for(var g=e.call(c,c.__data__,d,l),f,b=Ge(c,n),N=0,S=g.length;N<S;++N)(f=g[N])&&En(f,t,n,N,g,b);i.push(g),a.push(c)}return new et(i,a,t,n)}var su=Rt.prototype.constructor;function lu(){return new su(this._groups,this._parents)}function uu(e,t){var n,o,r;return function(){var i=kt(this,e),a=(this.style.removeProperty(e),kt(this,e));return i===a?null:i===n&&a===o?r:r=t(n=i,o=a)}}function Rr(e){return function(){this.style.removeProperty(e)}}function cu(e,t,n){var o,r=n+"",i;return function(){var a=kt(this,e);return a===r?null:a===o?i:i=t(o=a,n)}}function du(e,t,n){var o,r,i;return function(){var a=kt(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),kt(this,e))),a===l?null:a===o&&l===r?i:(r=l,i=t(o=a,s))}}function fu(e,t){var n,o,r,i="style."+t,a="end."+i,s;return function(){var l=Ue(this,e),u=l.on,c=l.value[i]==null?s||(s=Rr(t)):void 0;(u!==n||r!==c)&&(o=(n=u).copy()).on(a,r=c),l.on=o}}function hu(e,t,n){var o=(e+="")=="transform"?pl:Ar;return t==null?this.styleTween(e,uu(e,o)).on("end.style."+e,Rr(e)):typeof t=="function"?this.styleTween(e,du(e,o,fo(this,"style."+e,t))).each(fu(this._id,e)):this.styleTween(e,cu(e,o,t),n).on("end.style."+e,null)}function pu(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function gu(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&pu(e,a,n)),o}return i._value=t,i}function vu(e,t,n){var o="style."+(e+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(t==null)return this.tween(o,null);if(typeof t!="function")throw new Error;return this.tween(o,gu(e,t,n??""))}function mu(e){return function(){this.textContent=e}}function _u(e){return function(){var t=e(this);this.textContent=t??""}}function yu(e){return this.tween("text",typeof e=="function"?_u(fo(this,"text",e)):mu(e==null?"":e+""))}function wu(e){return function(t){this.textContent=e.call(this,t)}}function bu(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&wu(r)),t}return o._value=e,o}function xu(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,bu(e))}function Eu(){for(var e=this._name,t=this._id,n=Br(),o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],s=a.length,l,u=0;u<s;++u)if(l=a[u]){var c=Ge(l,t);En(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new et(o,this._parents,e,n)}function Nu(){var e,t,n=this,o=n._id,r=n.size();return new Promise(function(i,a){var s={value:a},l={value:function(){--r===0&&i()}};n.each(function(){var u=Ue(this,o),c=u.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),u.on=t}),r===0&&i()})}var Su=0;function et(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function Br(){return++Su}var tt=Rt.prototype;et.prototype={constructor:et,select:iu,selectAll:au,selectChild:tt.selectChild,selectChildren:tt.selectChildren,filter:Jl,merge:Ql,selection:lu,transition:Eu,call:tt.call,nodes:tt.nodes,node:tt.node,size:tt.size,empty:tt.empty,each:tt.each,on:nu,attr:Al,attrTween:Ll,style:hu,styleTween:vu,text:yu,textTween:xu,remove:ru,tween:Il,delay:Yl,duration:Wl,ease:Zl,easeVarying:ql,end:Nu,[Symbol.iterator]:tt[Symbol.iterator]};function ku(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Cu={time:null,delay:0,duration:250,ease:ku};function $u(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 Iu(e){var t,n;e instanceof et?(t=e._id,e=e._name):(t=Br(),(n=Cu).time=ao(),e=e==null?null:e+"");for(var o=this._groups,r=o.length,i=0;i<r;++i)for(var a=o[i],s=a.length,l,u=0;u<s;++u)(l=a[u])&&En(l,e,t,u,a,n||$u(l,t));return new et(o,this._parents,e,t)}Rt.prototype.interrupt=kl,Rt.prototype.transition=Iu;const Sn=e=>()=>e;function Mu(e,{sourceEvent:t,target:n,transform:o,dispatch:r}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}function 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 Mt=new nt(1,0,0);nt.prototype;function ho(e){e.stopImmediatePropagation()}function Wt(e){e.preventDefault(),e.stopImmediatePropagation()}function Du(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Ou(){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 Vr(){return this.__zoom||Mt}function Tu(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Pu(){return navigator.maxTouchPoints||"ontouchstart"in this}function zu(e,t,n){var o=e.invertX(t[0][0])-n[0][0],r=e.invertX(t[1][0])-n[1][0],i=e.invertY(t[0][1])-n[0][1],a=e.invertY(t[1][1])-n[1][1];return e.translate(r>o?(o+r)/2:Math.min(0,o)||Math.max(0,r),a>i?(i+a)/2:Math.min(0,i)||Math.max(0,a))}function Au(){var e=Du,t=Ou,n=zu,o=Tu,r=Pu,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=vn,u=rn("start","zoom","end"),c,d,g,f=500,b=150,N=0,S=10;function A(p){p.property("__zoom",Vr).on("wheel.zoom",X,{passive:!1}).on("mousedown.zoom",q).on("dblclick.zoom",P).filter(r).on("touchstart.zoom",x).on("touchmove.zoom",v).on("touchend.zoom touchcancel.zoom",T).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}A.transform=function(p,I,_,M){var z=p.selection?p.selection():p;z.property("__zoom",Vr),p!==z?V(p,I,_,M):z.interrupt().each(function(){F(this,arguments).event(M).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},A.scaleBy=function(p,I,_,M){A.scaleTo(p,function(){var z=this.__zoom.k,H=typeof I=="function"?I.apply(this,arguments):I;return z*H},_,M)},A.scaleTo=function(p,I,_,M){A.transform(p,function(){var z=t.apply(this,arguments),H=this.__zoom,L=_==null?y(z):typeof _=="function"?_.apply(this,arguments):_,C=H.invert(L),B=typeof I=="function"?I.apply(this,arguments):I;return n(m($(H,B),L,C),z,a)},_,M)},A.translateBy=function(p,I,_,M){A.transform(p,function(){return n(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof _=="function"?_.apply(this,arguments):_),t.apply(this,arguments),a)},null,M)},A.translateTo=function(p,I,_,M,z){A.transform(p,function(){var H=t.apply(this,arguments),L=this.__zoom,C=M==null?y(H):typeof M=="function"?M.apply(this,arguments):M;return n(Mt.translate(C[0],C[1]).scale(L.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof _=="function"?-_.apply(this,arguments):-_),H,a)},M,z)};function $(p,I){return I=Math.max(i[0],Math.min(i[1],I)),I===p.k?p:new nt(I,p.x,p.y)}function m(p,I,_){var M=I[0]-_[0]*p.k,z=I[1]-_[1]*p.k;return M===p.x&&z===p.y?p:new nt(p.k,M,z)}function y(p){return[(+p[0][0]+ +p[1][0])/2,(+p[0][1]+ +p[1][1])/2]}function V(p,I,_,M){p.on("start.zoom",function(){F(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){F(this,arguments).event(M).end()}).tween("zoom",function(){var z=this,H=arguments,L=F(z,H).event(M),C=t.apply(z,H),B=_==null?y(C):typeof _=="function"?_.apply(z,H):_,Z=Math.max(C[1][0]-C[0][0],C[1][1]-C[0][1]),w=z.__zoom,h=typeof I=="function"?I.apply(z,H):I,E=l(w.invert(B).concat(Z/w.k),h.invert(B).concat(Z/h.k));return function(D){if(D===1)D=h;else{var G=E(D),U=Z/G[2];D=new nt(U,B[0]-G[0]*U,B[1]-G[1]*U)}L.zoom(null,D)}})}function F(p,I,_){return!_&&p.__zooming||new j(p,I)}function j(p,I){this.that=p,this.args=I,this.active=0,this.sourceEvent=null,this.extent=t.apply(p,I),this.taps=0}j.prototype={event:function(p){return p&&(this.sourceEvent=p),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(p,I){return this.mouse&&p!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&p!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&p!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(p){var I=Le(this.that).datum();u.call(p,this.that,new Mu(p,{sourceEvent:this.sourceEvent,target:A,transform:this.that.__zoom,dispatch:u}),I)}};function X(p,...I){if(!e.apply(this,arguments))return;var _=F(this,I).event(p),M=this.__zoom,z=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,o.apply(this,arguments)))),H=Xe(p);if(_.wheel)(_.mouse[0][0]!==H[0]||_.mouse[0][1]!==H[1])&&(_.mouse[1]=M.invert(_.mouse[0]=H)),clearTimeout(_.wheel);else{if(M.k===z)return;_.mouse=[H,M.invert(H)],Nn(this),_.start()}Wt(p),_.wheel=setTimeout(L,b),_.zoom("mouse",n(m($(M,z),_.mouse[0],_.mouse[1]),_.extent,a));function L(){_.wheel=null,_.end()}}function q(p,...I){if(g||!e.apply(this,arguments))return;var _=p.currentTarget,M=F(this,I,!0).event(p),z=Le(p.view).on("mousemove.zoom",B,!0).on("mouseup.zoom",Z,!0),H=Xe(p,_),L=p.clientX,C=p.clientY;cr(p.view),ho(p),M.mouse=[H,this.__zoom.invert(H)],Nn(this),M.start();function B(w){if(Wt(w),!M.moved){var h=w.clientX-L,E=w.clientY-C;M.moved=h*h+E*E>N}M.event(w).zoom("mouse",n(m(M.that.__zoom,M.mouse[0]=Xe(w,_),M.mouse[1]),M.extent,a))}function Z(w){z.on("mousemove.zoom mouseup.zoom",null),dr(w.view,M.moved),Wt(w),M.event(w).end()}}function P(p,...I){if(e.apply(this,arguments)){var _=this.__zoom,M=Xe(p.changedTouches?p.changedTouches[0]:p,this),z=_.invert(M),H=_.k*(p.shiftKey?.5:2),L=n(m($(_,H),M,z),t.apply(this,I),a);Wt(p),s>0?Le(this).transition().duration(s).call(V,L,M,p):Le(this).call(A.transform,L,M,p)}}function x(p,...I){if(e.apply(this,arguments)){var _=p.touches,M=_.length,z=F(this,I,p.changedTouches.length===M).event(p),H,L,C,B;for(ho(p),L=0;L<M;++L)C=_[L],B=Xe(C,this),B=[B,this.__zoom.invert(B),C.identifier],z.touch0?!z.touch1&&z.touch0[2]!==B[2]&&(z.touch1=B,z.taps=0):(z.touch0=B,H=!0,z.taps=1+!!c);c&&(c=clearTimeout(c)),H&&(z.taps<2&&(d=B[0],c=setTimeout(function(){c=null},f)),Nn(this),z.start())}}function v(p,...I){if(this.__zooming){var _=F(this,I).event(p),M=p.changedTouches,z=M.length,H,L,C,B;for(Wt(p),H=0;H<z;++H)L=M[H],C=Xe(L,this),_.touch0&&_.touch0[2]===L.identifier?_.touch0[0]=C:_.touch1&&_.touch1[2]===L.identifier&&(_.touch1[0]=C);if(L=_.that.__zoom,_.touch1){var Z=_.touch0[0],w=_.touch0[1],h=_.touch1[0],E=_.touch1[1],D=(D=h[0]-Z[0])*D+(D=h[1]-Z[1])*D,G=(G=E[0]-w[0])*G+(G=E[1]-w[1])*G;L=$(L,Math.sqrt(D/G)),C=[(Z[0]+h[0])/2,(Z[1]+h[1])/2],B=[(w[0]+E[0])/2,(w[1]+E[1])/2]}else if(_.touch0)C=_.touch0[0],B=_.touch0[1];else return;_.zoom("touch",n(m(L,C,B),_.extent,a))}}function T(p,...I){if(this.__zooming){var _=F(this,I).event(p),M=p.changedTouches,z=M.length,H,L;for(ho(p),g&&clearTimeout(g),g=setTimeout(function(){g=null},f),H=0;H<z;++H)L=M[H],_.touch0&&_.touch0[2]===L.identifier?delete _.touch0:_.touch1&&_.touch1[2]===L.identifier&&delete _.touch1;if(_.touch1&&!_.touch0&&(_.touch0=_.touch1,delete _.touch1),_.touch0)_.touch0[1]=this.__zoom.invert(_.touch0[0]);else if(_.end(),_.taps===2&&(L=Xe(L,this),Math.hypot(d[0]-L[0],d[1]-L[1])<S)){var C=Le(this).on("dblclick.zoom");C&&C.apply(this,arguments)}}}return A.wheelDelta=function(p){return arguments.length?(o=typeof p=="function"?p:Sn(+p),A):o},A.filter=function(p){return arguments.length?(e=typeof p=="function"?p:Sn(!!p),A):e},A.touchable=function(p){return arguments.length?(r=typeof p=="function"?p:Sn(!!p),A):r},A.extent=function(p){return arguments.length?(t=typeof p=="function"?p:Sn([[+p[0][0],+p[0][1]],[+p[1][0],+p[1][1]]]),A):t},A.scaleExtent=function(p){return arguments.length?(i[0]=+p[0],i[1]=+p[1],A):[i[0],i[1]]},A.translateExtent=function(p){return arguments.length?(a[0][0]=+p[0][0],a[1][0]=+p[1][0],a[0][1]=+p[0][1],a[1][1]=+p[1][1],A):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},A.constrain=function(p){return arguments.length?(n=p,A):n},A.duration=function(p){return arguments.length?(s=+p,A):s},A.interpolate=function(p){return arguments.length?(l=p,A):l},A.on=function(){var p=u.on.apply(u,arguments);return p===u?A:p},A.clickDistance=function(p){return arguments.length?(N=(p=+p)*p,A):Math.sqrt(N)},A.tapDistance=function(p){return arguments.length?(S=+p,A):S},A}var re=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(re||{}),po=(e=>(e.Partial="partial",e.Full="full",e))(po||{}),bt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(bt||{}),at=(e=>(e.Strict="strict",e.Loose="loose",e))(at||{}),go=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(go||{}),Ut=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Ut||{}),Hr=(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))(Hr||{});const Ru=["INPUT","SELECT","TEXTAREA"],Bu=typeof document<"u"?document:null;function vo(e){var t,n;const o=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,r=typeof o?.hasAttribute=="function"?o.hasAttribute("contenteditable"):!1,i=typeof o?.closest=="function"?o.closest(".nokey"):null;return Ru.includes(o?.nodeName)||r||!!i}function Vu(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function Lr(e,t,n,o){const r=t.replace("+",`
|
|
3
|
-
`).replace(`
|
|
4
|
-
|
|
5
|
-
`,`
|
|
6
|
-
+`).split(`
|
|
7
|
-
`).map(a=>a.trim().toLowerCase());if(r.length===1)return e.toLowerCase()===t.toLowerCase();o||n.add(e.toLowerCase());const i=r.every((a,s)=>n.has(a)&&Array.from(n.values())[s]===r[s]);return o&&n.delete(e.toLowerCase()),i}function Hu(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=Lu(n.code,e);return Array.isArray(e)?e.some(r=>Lr(n[o],r,t,n.type==="keyup")):Lr(n[o],e,t,n.type==="keyup")}}function Lu(e,t){return t.includes(e)?"code":"key"}function Zt(e,t){const n=pe(()=>ge(t?.target)??Bu),o=Je(ge(e)===!0);let r=!1;const i=new Set;let a=l(ge(e));_e(()=>ge(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&s(),a=l(u)},{immediate:!0}),Uo(["blur","contextmenu"],s),Zo((...u)=>a(...u),u=>{var c,d;const g=ge(t?.actInsideInputWithModifier)??!0,f=ge(t?.preventDefault)??!1;if(r=Vu(u),(!r||r&&!g)&&vo(u))return;const N=((d=(c=u.composedPath)==null?void 0:c.call(u))==null?void 0:d[0])||u.target,S=N?.nodeName==="BUTTON"||N?.nodeName==="A";!f&&(r||!S)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),Zo((...u)=>a(...u),u=>{const c=ge(t?.actInsideInputWithModifier)??!0;if(o.value){if((!r||r&&!c)&&vo(u))return;r=!1,o.value=!1}},{eventName:"keyup",target:n});function s(){r=!1,i.clear(),o.value=ge(e)===!0}function l(u){return u===null?(s(),()=>!1):typeof u=="boolean"?(s(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?Hu(u,i):u}return o}const Fr="vue-flow__node-desc",Gr="vue-flow__edge-desc",Fu="vue-flow__aria-live",Yr=["Enter"," ","Escape"],Dt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function kn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Cn(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),o=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*o)}function $n(e){return{width:e.offsetWidth,height:e.offsetHeight}}function xt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Xr(e,t){return{x:xt(e.x,t[0][0],t[1][0]),y:xt(e.y,t[0][1],t[1][1])}}function jr(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function st(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Et(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!st(e)}function Kt(e){return Et(e)&&"computedPosition"in e}function In(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Gu(e){return In(e.width)&&In(e.height)&&In(e.x)&&In(e.y)}function Yu(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:zt({width:0,height:0}),computedPosition:zt({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:Ie(e.data)?e.data:{},events:zt(Ie(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function Wr(e,t,n){var o,r;const i={id:e.id.toString(),type:e.type??t?.type??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(o=e.sourceHandle)==null?void 0:o.toString(),targetHandle:(r=e.targetHandle)==null?void 0:r.toString(),updatable:e.updatable??n?.updatable,selectable:e.selectable??n?.selectable,focusable:e.focusable??n?.focusable,data:Ie(e.data)?e.data:{},events:zt(Ie(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??i,e,{id:e.id.toString()})}function Ur(e,t,n,o){const r=typeof e=="string"?e:e.id,i=new Set,a=o==="source"?"target":"source";for(const s of n)s[a]===r&&i.add(s[o]);return t.filter(s=>i.has(s.id))}function Xu(...e){if(e.length===3){const[i,a,s]=e;return Ur(i,a,s,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>st(i)&&i.source===o).map(i=>n.find(a=>Et(a)&&a.id===i.target))}function ju(...e){if(e.length===3){const[i,a,s]=e;return Ur(i,a,s,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>st(i)&&i.target===o).map(i=>n.find(a=>Et(a)&&a.id===i.source))}function Zr({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Wu(e,t){return t.some(n=>st(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:o,zoom:r}){return{x:e*r+n,y:t*r+o}}function Jt({x:e,y:t},{x:n,y:o,zoom:r},i=!1,a=[1,1]){const s={x:(e-n)/r,y:(t-o)/r};return i?Dn(s,a):s}function Uu(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 Kr({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function Zu({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function qr(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const o=e[n];t=Uu(t,Kr({...o.computedPosition,...o.dimensions}))}return Zu(t)}function Jr(e,t,n={x:0,y:0,zoom:1},o=!1,r=!1){const i={...Jt(t,n),width:t.width/n.zoom,height:t.height/n.zoom},a=[];for(const s of e){const{dimensions:l,selectable:u=!0,hidden:c=!1}=s,d=l.width??s.width??null,g=l.height??s.height??null;if(r&&!u||c)continue;const f=Cn(i,kn(s)),b=d===null||g===null,N=o&&f>0,S=(d??0)*(g??0);(b||N||f>=S||s.dragging)&&a.push(s)}return a}function Qr(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const o of e)n.add(o.id);return t.filter(o=>n.has(o.source)||n.has(o.target))}function Ot(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 en(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function Ku(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=Ot(e,n),r=Ot(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=Ot(e.top??e.y??0,n),r=Ot(e.bottom??e.y??0,n),i=Ot(e.left??e.x??0,t),a=Ot(e.right??e.x??0,t);return{top:o,right:a,bottom:r,left:i,x:i+a,y:o+r}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function qu(e,t,n,o,r,i){const{x:a,y:s}=qt(e,{x:t,y:n,zoom:o}),{x:l,y:u}=qt({x:e.x+e.width,y:e.y+e.height},{x:t,y:n,zoom:o}),c=r-l,d=i-u;return{left:Math.floor(a),top:Math.floor(s),right:Math.floor(c),bottom:Math.floor(d)}}function ei(e,t,n,o,r,i=.1){const a=Ku(i,t,n),s=(t-a.x)/e.width,l=(n-a.y)/e.height,u=Math.min(s,l),c=xt(u,o,r),d=e.x+e.width/2,g=e.y+e.height/2,f=t/2-d*c,b=n/2-g*c,N=qu(e,f,b,c,t,n),S={left:Math.min(N.left-a.left,0),top:Math.min(N.top-a.top,0),right:Math.min(N.right-a.right,0),bottom:Math.min(N.bottom-a.bottom,0)};return{x:f-S.left+S.right,y:b-S.top+S.bottom,zoom:c}}function Ju(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function ti(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:ti(n,t):!1}function Qt(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function ni(e){const t=e.ctrlKey&&Mn()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function oi(e,t,n){return e<t?xt(Math.abs(e-t),1,t)/t:e>n?-xt(Math.abs(e-n),1,t)/t:0}function ri(e,t,n=15,o=40){const r=oi(e.x,o,t.width-o)*n,i=oi(e.y,o,t.height-o)*n;return[r,i]}function mo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,o=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||o>0||e.position.x<0||e.position.y<0){let r={};if(typeof t.style=="function"?r={...t.style(t)}:t.style&&(r={...t.style}),r.width=r.width??`${t.dimensions.width}px`,r.height=r.height??`${t.dimensions.height}px`,n>0)if(typeof r.width=="string"){const i=Number(r.width.replace("px",""));r.width=`${i+n}px`}else r.width+=n;if(o>0)if(typeof r.height=="string"){const i=Number(r.height.replace("px",""));r.height=`${i+o}px`}else r.height+=o;if(e.position.x<0){const i=Math.abs(e.position.x);if(t.position.x=t.position.x-i,typeof r.width=="string"){const a=Number(r.width.replace("px",""));r.width=`${a+i}px`}else r.width+=i;e.position.x=0}if(e.position.y<0){const i=Math.abs(e.position.y);if(t.position.y=t.position.y-i,typeof r.height=="string"){const a=Number(r.height.replace("px",""));r.height=`${a+i}px`}else r.height+=i;e.position.y=0}t.dimensions.width=Number(r.width.toString().replace("px","")),t.dimensions.height=Number(r.height.toString().replace("px","")),typeof t.style=="function"?t.style=i=>{const a=t.style;return{...a(i),...r}}:t.style={...t.style,...r}}}}function ii(e,t){var n,o;const r=e.filter(a=>a.type==="add"||a.type==="remove");for(const a of r)if(a.type==="add")t.findIndex(l=>l.id===a.item.id)===-1&&t.push(a.item);else if(a.type==="remove"){const s=t.findIndex(l=>l.id===a.id);s!==-1&&t.splice(s,1)}const i=t.map(a=>a.id);for(const a of t)for(const s of e)if(s.id===a.id)switch(s.type){case"select":a.selected=s.selected;break;case"position":if(Kt(a)&&(typeof s.position<"u"&&(a.position=s.position),typeof s.dragging<"u"&&(a.dragging=s.dragging),a.expandParent&&a.parentNode)){const l=t[i.indexOf(a.parentNode)];l&&Kt(l)&&mo(a,l)}break;case"dimensions":if(Kt(a)&&(typeof s.dimensions<"u"&&(a.dimensions=s.dimensions),typeof s.updateStyle<"u"&&s.updateStyle&&(a.style={...a.style||{},width:`${(n=s.dimensions)==null?void 0:n.width}px`,height:`${(o=s.dimensions)==null?void 0:o.height}px`}),typeof s.resizing<"u"&&(a.resizing=s.resizing),a.expandParent&&a.parentNode)){const l=t[i.indexOf(a.parentNode)];l&&Kt(l)&&(!!l.dimensions.width&&!!l.dimensions.height?mo(a,l):Ae(()=>{mo(a,l)}))}break}return t}function lt(e,t){return{id:e,type:"select",selected:t}}function ai(e){return{item:e,type:"add"}}function si(e){return{id:e,type:"remove"}}function li(e,t,n,o,r){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:r||null,type:"remove"}}function ut(e,t=new Set,n=!1){const o=[];for(const[r,i]of e){const a=t.has(r);!(i.selected===void 0&&!a)&&i.selected!==a&&(n&&(i.selected=a),o.push(lt(i.id,a)))}return o}const ui=()=>{};function ee(e){const t=new Set;let n=ui,o=()=>!1;const r=()=>t.size>0||o(),i=g=>{n=g},a=()=>{n=ui},s=g=>{o=g},l=()=>{o=()=>!1},u=g=>{t.delete(g)};return{on:g=>{t.add(g);const f=()=>u(g);return At(f),{off:f}},off:u,trigger:g=>{const f=[n];return r()?f.push(...t):e&&f.push(e),Promise.allSettled(f.map(b=>b(g)))},hasListeners:r,listeners:t,setEmitter:i,removeEmitter:a,setHasEmitListeners:s,removeHasEmitListeners:l}}function ci(e,t,n){let o=e;do{if(o&&o.matches(t))return!0;if(o===n)return!1;o=o.parentElement}while(o);return!1}function Qu(e,t,n,o){var r,i;const a=new Map;for(const[s,l]of e)(l.selected||l.id===o)&&(!l.parentNode||!ti(l,e))&&(l.draggable||t&&typeof l.draggable>"u")&&e.get(s)&&a.set(s,{id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((r=l.computedPosition)==null?void 0:r.x)||0,y:n.y-((i=l.computedPosition)==null?void 0:i.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(a.values())}function _o({id:e,dragItems:t,findNode:n}){const o=[];for(const r of t){const i=n(r.id);i&&o.push(i)}return[e?o.find(r=>r.id===e):o[0],o]}function di(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 ec(e,t,n){const[o,r,i,a]=typeof e!="string"?di(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+a,n.computedPosition.y+o],[n.computedPosition.x+n.dimensions.width-r,n.computedPosition.y+n.dimensions.height-i]]:!1}function tc(e,t,n,o){let r=e.extent||n;if((r==="parent"||!Array.isArray(r)&&r?.range==="parent")&&!e.expandParent)if(e.parentNode&&o&&e.dimensions.width&&e.dimensions.height){const i=ec(r,e,o);i&&(r=i)}else t(new Te($e.NODE_EXTENT_INVALID,e.id)),r=n;else if(Array.isArray(r)){const i=o?.computedPosition.x||0,a=o?.computedPosition.y||0;r=[[r[0][0]+i,r[0][1]+a],[r[1][0]+i,r[1][1]+a]]}else if(r!=="parent"&&r?.range&&Array.isArray(r.range)){const[i,a,s,l]=di(r.padding),u=o?.computedPosition.x||0,c=o?.computedPosition.y||0;r=[[r.range[0][0]+u+l,r.range[0][1]+c+i],[r.range[1][0]+u-a,r.range[1][1]+c-s]]}return r==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:r}function nc({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function yo(e,t,n,o,r){const i=nc(e.dimensions,tc(e,n,o,r)),a=Xr(t,i);return{position:{x:a.x-(r?.computedPosition.x||0),y:a.y-(r?.computedPosition.y||0)},computedPosition:a}}function Tt(e,t,n=re.Left,o=!1){const r=(t?.x??0)+e.computedPosition.x,i=(t?.y??0)+e.computedPosition.y,{width:a,height:s}=t??ac(e);if(o)return{x:r+a/2,y:i+s/2};switch(t?.position??n){case re.Top:return{x:r+a/2,y:i};case re.Right:return{x:r+a,y:i+s/2};case re.Bottom:return{x:r+a/2,y:i+s};case re.Left:return{x:r,y:i+s/2}}}function fi(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function oc({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:o,targetWidth:r,targetHeight:i,width:a,height:s,viewport:l}){const u={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+r),y2:Math.max(e.y+o,t.y+i)};u.x===u.x2&&(u.x2+=1),u.y===u.y2&&(u.y2+=1);const c=Kr({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:a/l.zoom,height:s/l.zoom}),d=Math.max(0,Math.min(c.x2,u.x2)-Math.max(c.x,u.x)),g=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*g)>0}function rc(e,t,n=!1){const o=typeof e.zIndex=="number";let r=o?e.zIndex:0;const i=t(e.source),a=t(e.target);return!i||!a?0:(n&&(r=o?e.zIndex:Math.max(i.computedPosition.z||0,a.computedPosition.z||0)),r)}var $e=(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))($e||{});const hi={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
|
|
8
|
-
Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
|
|
9
|
-
Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
|
|
10
|
-
Node: ${e}
|
|
11
|
-
Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
|
|
12
|
-
Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
|
|
13
|
-
Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
|
|
14
|
-
Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
|
|
15
|
-
Edge: ${e}
|
|
16
|
-
Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
|
|
17
|
-
Edge: ${e}
|
|
18
|
-
Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
|
|
19
|
-
Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
|
|
20
|
-
Edge: ${e}
|
|
21
|
-
Source: ${t}
|
|
22
|
-
Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
|
|
23
|
-
Edge: ${e}
|
|
24
|
-
Source: ${t}
|
|
25
|
-
Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
|
|
26
|
-
Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
|
|
27
|
-
Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Te extends Error{constructor(t,...n){var o;super((o=hi[t])==null?void 0:o.call(hi,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function wo(e){return"clientX"in e}function ic(e){return"sourceEvent"in e}function Ze(e,t){const n=wo(e);let o,r;return n?(o=e.clientX,r=e.clientY):"touches"in e&&e.touches.length>0?(o=e.touches[0].clientX,r=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(o=e.changedTouches[0].clientX,r=e.changedTouches[0].clientY):(o=0,r=0),{x:o-(t?.left??0),y:r-(t?.top??0)}}const Mn=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function ac(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 Dn(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const sc=()=>!0;function bo(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function lc(e,t,n){const o=[],r={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const i of t.values())Cn(r,kn(i))>0&&o.push(i);return o}const uc=250;function cc(e,t,n,o){var r,i;let a=[],s=Number.POSITIVE_INFINITY;const l=lc(e,n,t+uc);for(const u of l){const c=[...((r=u.handleBounds)==null?void 0:r.source)??[],...((i=u.handleBounds)==null?void 0:i.target)??[]];for(const d of c){if(o.nodeId===d.nodeId&&o.type===d.type&&o.id===d.id)continue;const{x:g,y:f}=Tt(u,d,d.position,!0),b=Math.sqrt((g-e.x)**2+(f-e.y)**2);b>t||(b<s?(a=[{...d,x:g,y:f}],s=b):b===s&&a.push({...d,x:g,y:f}))}}if(!a.length)return null;if(a.length>1){const u=o.type==="source"?"target":"source";return a.find(c=>c.type===u)??a[0]}return a[0]}function pi(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:s,flowId:l,isValidConnection:u=sc},c,d,g,f){const b=i==="target",N=t?a.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:S,y:A}=Ze(e),$=a.elementFromPoint(S,A),m=$?.classList.contains(`${s}-flow__handle`)?$:N,y={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){const V=gi(void 0,m),F=m.getAttribute("data-nodeid"),j=m.getAttribute("data-handleid"),X=m.classList.contains("connectable"),q=m.classList.contains("connectableend");if(!F||!V)return y;const P={source:b?F:o,sourceHandle:b?j:r,target:b?o:F,targetHandle:b?r:j};y.connection=P;const v=X&&q&&(n===at.Strict?b&&V==="source"||!b&&V==="target":F!==o||j!==r);y.isValid=v&&u(P,{nodes:d,edges:c,sourceNode:g(P.source),targetNode:g(P.target)}),y.toHandle=vi(F,V,j,f,n,!0)}return y}function gi(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function dc(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function fc(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function vi(e,t,n,o,r,i=!1){var a,s,l;const u=o.get(e);if(!u)return null;const c=r===at.Strict?(a=u.handleBounds)==null?void 0:a[t]:[...((s=u.handleBounds)==null?void 0:s.source)??[],...((l=u.handleBounds)==null?void 0:l.target)??[]],d=(n?c?.find(g=>g.id===n):c?.[0])??null;return d&&i?{...d,...Tt(u,d,d.position,!0)}:d}const xo={[re.Left]:re.Right,[re.Right]:re.Left,[re.Top]:re.Bottom,[re.Bottom]:re.Top},hc=["production","prod"];function en(e,...t){mi()&&console.warn(`[Vue Flow]: ${e}`,...t)}function mi(){return!hc.includes("production")}function _i(e,t,n,o,r){const i=t.querySelectorAll(`.vue-flow__handle.${e}`);return i?.length?Array.from(i).map(a=>{const s=a.getBoundingClientRect();return{id:a.getAttribute("data-handleid"),type:e,nodeId:r,position:a.getAttribute("data-handlepos"),x:(s.left-n.left)/o,y:(s.top-n.top)/o,...$n(a)}}):null}function Eo(e,t,n,o,r,i=!1,a){r.value=!1,e.selected?(i||e.selected&&t)&&(o([e]),Ae(()=>{a.blur()})):n([e])}function Ie(e){return typeof oe(e)<"u"}function pc(e,t,n,o){if(!e||!e.source||!e.target)return n(new Te($e.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let r;return st(e)?r=e:r={...e,id:Zr(e)},r=Wr(r,void 0,o),Wu(r,t)?!1:r}function gc(e,t,n,o,r){if(!t.source||!t.target)return r(new Te($e.EDGE_INVALID,e.id)),!1;if(!n)return r(new Te($e.EDGE_NOT_FOUND,e.id)),!1;const{id:i,...a}=e;return{...a,id:o?Zr(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function yi(e,t,n){const o={},r=[];for(let i=0;i<e.length;++i){const a=e[i];if(!Et(a)){n(new Te($e.NODE_INVALID,a?.id)||`[ID UNKNOWN|INDEX ${i}]`);continue}const s=Yu(a,t(a.id),a.parentNode);a.parentNode&&(o[a.parentNode]=!0),r[i]=s}for(const i of r){const a=t(i.parentNode)||r.find(s=>s.id===i.parentNode);i.parentNode&&!a&&n(new Te($e.NODE_MISSING_PARENT,i.id,i.parentNode)),(i.parentNode||o[i.id])&&(o[i.id]&&(i.isParent=!0),a&&(a.isParent=!0))}return r}function wi(e,t,n,o,r,i){let a=r;const s=o.get(a)||new Map;o.set(a,s.set(n,t)),a=`${r}-${e}`;const l=o.get(a)||new Map;if(o.set(a,l.set(n,t)),i){a=`${r}-${e}-${i}`;const u=o.get(a)||new Map;o.set(a,u.set(n,t))}}function No(e,t,n){e.clear();for(const o of n){const{source:r,target:i,sourceHandle:a=null,targetHandle:s=null}=o,l={edgeId:o.id,source:r,target:i,sourceHandle:a,targetHandle:s},u=`${r}-${a}--${i}-${s}`,c=`${i}-${s}--${r}-${a}`;wi("source",l,c,e,r,a),wi("target",l,u,e,i,s)}}function bi(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function So(e,t,n,o,r,i,a,s){const l=[];for(const u of e){const c=st(u)?u:pc(u,s,r,i);if(!c)continue;const d=n(c.source),g=n(c.target);if(!d||!g){r(new Te($e.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){r(new Te($e.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!g){r(new Te($e.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:s,nodes:a,sourceNode:d,targetNode:g})){r(new Te($e.EDGE_INVALID,c.id));continue}const f=o(c.id);l.push({...Wr(c,f,i),sourceNode:d,targetNode:g})}return l}const xi=Symbol("vueFlow"),Ei=Symbol("nodeId"),Ni=Symbol("nodeRef"),vc=Symbol("edgeId"),mc=Symbol("edgeRef"),On=Symbol("slots");function Si(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:o,noDragClassName:r,nodeLookup:i,nodeExtent:a,nodeDragThreshold:s,viewport:l,autoPanOnNodeDrag:u,autoPanSpeed:c,nodesDraggable:d,panBy:g,findNode:f,multiSelectionActive:b,nodesSelectionActive:N,selectNodesOnDrag:S,removeSelectedElements:A,addSelectedNodes:$,updateNodePositions:m,emits:y}=Ne(),{onStart:V,onDrag:F,onStop:j,onClick:X,el:q,disabled:P,id:x,selectable:v,dragHandle:T}=e,p=Je(!1);let I=[],_,M=null,z={x:void 0,y:void 0},H={x:0,y:0},L=null,C=!1,B=!1,Z=0,w=!1;const h=wc(),E=({x:Q,y:ce})=>{z={x:Q,y:ce};let O=!1;if(I=I.map(k=>{const R={x:Q-k.distance.x,y:ce-k.distance.y},{computedPosition:W}=yo(k,n.value?Dn(R,o.value):R,y.error,a.value,k.parentNode?f(k.parentNode):void 0);return O=O||k.position.x!==W.x||k.position.y!==W.y,k.position=W,k}),B=B||O,!!O&&(m(I,!0,!0),p.value=!0,L)){const[k,R]=_o({id:x,dragItems:I,findNode:f});F({event:L,node:k,nodes:R})}},D=()=>{if(!M)return;const[Q,ce]=ri(H,M,c.value);if(Q!==0||ce!==0){const O={x:(z.x??0)-Q/l.value.zoom,y:(z.y??0)-ce/l.value.zoom};g({x:Q,y:ce})&&E(O)}Z=requestAnimationFrame(D)},G=(Q,ce)=>{C=!0;const O=f(x);!S.value&&!b.value&&O&&(O.selected||A()),O&&ge(v)&&S.value&&Eo(O,b.value,$,A,N,!1,ce);const k=h(Q.sourceEvent);if(z=k,I=Qu(i.value,d.value,k,x),I.length){const[R,W]=_o({id:x,dragItems:I,findNode:f});V({event:Q.sourceEvent,node:R,nodes:W})}},U=(Q,ce)=>{var O;Q.sourceEvent.type==="touchmove"&&Q.sourceEvent.touches.length>1||(B=!1,s.value===0&&G(Q,ce),z=h(Q.sourceEvent),M=((O=t.value)==null?void 0:O.getBoundingClientRect())||null,H=Ze(Q.sourceEvent,M))},K=(Q,ce)=>{const O=h(Q.sourceEvent);if(!w&&C&&u.value&&(w=!0,D()),!C){const k=O.xSnapped-(z.x??0),R=O.ySnapped-(z.y??0);Math.sqrt(k*k+R*R)>s.value&&G(Q,ce)}(z.x!==O.xSnapped||z.y!==O.ySnapped)&&I.length&&C&&(L=Q.sourceEvent,H=Ze(Q.sourceEvent,M),E(O))},J=Q=>{let ce=!1;if(!C&&!p.value&&!b.value){const O=Q.sourceEvent,k=h(O),R=k.xSnapped-(z.x??0),W=k.ySnapped-(z.y??0),Y=Math.sqrt(R*R+W*W);Y!==0&&Y<=s.value&&(X?.(O),ce=!0)}if(I.length&&!ce){B&&(m(I,!1,!1),B=!1);const[O,k]=_o({id:x,dragItems:I,findNode:f});j({event:Q.sourceEvent,node:O,nodes:k})}I=[],p.value=!1,w=!1,C=!1,z={x:void 0,y:void 0},cancelAnimationFrame(Z)};return _e([()=>ge(P),q],([Q,ce],O,k)=>{if(ce){const R=Le(ce);Q||(_=Gs().on("start",W=>U(W,ce)).on("drag",W=>K(W,ce)).on("end",W=>J(W)).filter(W=>{const Y=W.target,te=ge(T);return!W.button&&(!r.value||!ci(Y,`.${r.value}`,ce)&&(!te||ci(Y,te,ce)))}),R.call(_)),k(()=>{R.on(".drag",null),_&&(_.on("start",null),_.on("drag",null),_.on("end",null))})}}),p}function _c(){return{doubleClick:ee(),click:ee(),mouseEnter:ee(),mouseMove:ee(),mouseLeave:ee(),contextMenu:ee(),updateStart:ee(),update:ee(),updateEnd:ee()}}function yc(e,t){const n=_c();return n.doubleClick.on(o=>{var r,i;t.edgeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.edgeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.edgeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.edgeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.edgeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.edgeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.updateStart.on(o=>{var r,i;t.edgeUpdateStart(o),(i=(r=e.events)==null?void 0:r.updateStart)==null||i.call(r,o)}),n.update.on(o=>{var r,i;t.edgeUpdate(o),(i=(r=e.events)==null?void 0:r.update)==null||i.call(r,o)}),n.updateEnd.on(o=>{var r,i;t.edgeUpdateEnd(o),(i=(r=e.events)==null?void 0:r.updateEnd)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function wc(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Ne();return r=>{var i;const a=((i=o.value)==null?void 0:i.getBoundingClientRect())??{left:0,top:0},s=ic(r)?r.sourceEvent:r,{x:l,y:u}=Ze(s,a),c=Jt({x:l,y:u},e.value),{x:d,y:g}=n.value?Dn(c,t.value):c;return{xSnapped:d,ySnapped:g,...c}}}function Tn(){return!0}function ki({handleId:e,nodeId:t,type:n,isValidConnection:o,edgeUpdaterType:r,onEdgeUpdate:i,onEdgeUpdateEnd:a}){const{id:s,vueFlowRef:l,connectionMode:u,connectionRadius:c,connectOnClick:d,connectionClickStartHandle:g,nodesConnectable:f,autoPanOnConnect:b,autoPanSpeed:N,findNode:S,panBy:A,startConnection:$,updateConnection:m,endConnection:y,emits:V,viewport:F,edges:j,nodes:X,isValidConnection:q,nodeLookup:P}=Ne();let x=null,v=!1,T=null;function p(_){var M;const z=ge(n)==="target",H=wo(_),L=jr(_.target),C=_.currentTarget;if(C&&(H&&_.button===0||!H)){let B=function(ae){O=Ze(ae,J),E=cc(Jt(O,F.value,!1,[1,1]),c.value,P.value,W),k||(R(),k=!0);const de=pi(ae,{handle:E,connectionMode:u.value,fromNodeId:ge(t),fromHandleId:ge(e),fromType:z?"target":"source",isValidConnection:h,doc:L,lib:"vue",flowId:s,nodeLookup:P.value},j.value,X.value,S,P.value);T=de.handleDomNode,x=de.connection,v=fc(!!E,de.isValid);const ve={...le,isValid:v,to:de.toHandle&&v?qt({x:de.toHandle.x,y:de.toHandle.y},F.value):O,toHandle:de.toHandle,toPosition:v&&de.toHandle?de.toHandle.position:xo[W.position],toNode:de.toHandle?P.value.get(de.toHandle.nodeId):null};if(v&&E&&le?.toHandle&&ve.toHandle&&le.toHandle.type===ve.toHandle.type&&le.toHandle.nodeId===ve.toHandle.nodeId&&le.toHandle.id===ve.toHandle.id&&le.to.x===ve.to.x&&le.to.y===ve.to.y)return;const we=E??de.toHandle;if(m(we&&v?qt({x:we.x,y:we.y},F.value):O,we,dc(!!we,v)),le=ve,!E&&!v&&!T)return bo(ce);x&&x.source!==x.target&&T&&(bo(ce),ce=T,T.classList.add("connecting","vue-flow__handle-connecting"),T.classList.toggle("valid",!!v),T.classList.toggle("vue-flow__handle-valid",!!v))},Z=function(ae){"touches"in ae&&ae.touches.length>0||((E||T)&&x&&v&&(i?i(ae,x):V.connect(x)),V.connectEnd(ae),r&&a?.(ae),bo(ce),cancelAnimationFrame(D),y(ae),k=!1,v=!1,x=null,T=null,L.removeEventListener("mousemove",B),L.removeEventListener("mouseup",Z),L.removeEventListener("touchmove",B),L.removeEventListener("touchend",Z))};const w=S(ge(t));let h=ge(o)||q.value||Tn;!h&&w&&(h=(z?w.isValidSourcePos:w.isValidTargetPos)||Tn);let E,D=0;const{x:G,y:U}=Ze(_),K=gi(ge(r),C),J=(M=l.value)==null?void 0:M.getBoundingClientRect();if(!J||!K)return;const Q=vi(ge(t),K,ge(e),P.value,u.value);if(!Q)return;let ce,O=Ze(_,J),k=!1;const R=()=>{if(!b.value)return;const[ae,de]=ri(O,J,N.value);A({x:ae,y:de}),D=requestAnimationFrame(R)},W={...Q,nodeId:ge(t),type:K,position:Q.position},Y=P.value.get(ge(t)),ne={inProgress:!0,isValid:null,from:Tt(Y,W,re.Left,!0),fromHandle:W,fromPosition:W.position,fromNode:Y,to:O,toHandle:null,toPosition:xo[W.position],toNode:null};$({nodeId:ge(t),id:ge(e),type:K,position:C?.getAttribute("data-handlepos")||re.Top,...O},{x:G-J.left,y:U-J.top}),V.connectStart({event:_,nodeId:ge(t),handleId:ge(e),handleType:K});let le=ne;L.addEventListener("mousemove",B),L.addEventListener("mouseup",Z),L.addEventListener("touchmove",B),L.addEventListener("touchend",Z)}}function I(_){var M,z;if(!d.value)return;const H=ge(n)==="target";if(!g.value){V.clickConnectStart({event:_,nodeId:ge(t),handleId:ge(e)}),$({nodeId:ge(t),type:ge(n),id:ge(e),position:re.Top,...Ze(_)},void 0,!0);return}let L=ge(o)||q.value||Tn;const C=S(ge(t));if(!L&&C&&(L=(H?C.isValidSourcePos:C.isValidTargetPos)||Tn),C&&(typeof C.connectable>"u"?f.value:C.connectable)===!1)return;const B=jr(_.target),Z=pi(_,{handle:{nodeId:ge(t),id:ge(e),type:ge(n),position:re.Top,...Ze(_)},connectionMode:u.value,fromNodeId:g.value.nodeId,fromHandleId:g.value.id??null,fromType:g.value.type,isValidConnection:L,doc:B,lib:"vue",flowId:s,nodeLookup:P.value},j.value,X.value,S,P.value),w=((M=Z.connection)==null?void 0:M.source)===((z=Z.connection)==null?void 0:z.target);Z.isValid&&Z.connection&&!w&&V.connect(Z.connection),V.clickConnectEnd(_),y(_,!0)}return{handlePointerDown:p,handleClick:I}}function bc(){return rt(Ei,"")}function Ci(e){const t=e??bc()??"",n=rt(Ni,Ee(null)),{findNode:o,edges:r,emits:i}=Ne(),a=o(t);return a||i.error(new Te($e.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:a,parentNode:pe(()=>o(a.parentNode)),connectedEdges:pe(()=>Qr([a],r.value))}}function xc(){return{doubleClick:ee(),click:ee(),mouseEnter:ee(),mouseMove:ee(),mouseLeave:ee(),contextMenu:ee(),dragStart:ee(),drag:ee(),dragStop:ee()}}function Ec(e,t){const n=xc();return n.doubleClick.on(o=>{var r,i;t.nodeDoubleClick(o),(i=(r=e.events)==null?void 0:r.doubleClick)==null||i.call(r,o)}),n.click.on(o=>{var r,i;t.nodeClick(o),(i=(r=e.events)==null?void 0:r.click)==null||i.call(r,o)}),n.mouseEnter.on(o=>{var r,i;t.nodeMouseEnter(o),(i=(r=e.events)==null?void 0:r.mouseEnter)==null||i.call(r,o)}),n.mouseMove.on(o=>{var r,i;t.nodeMouseMove(o),(i=(r=e.events)==null?void 0:r.mouseMove)==null||i.call(r,o)}),n.mouseLeave.on(o=>{var r,i;t.nodeMouseLeave(o),(i=(r=e.events)==null?void 0:r.mouseLeave)==null||i.call(r,o)}),n.contextMenu.on(o=>{var r,i;t.nodeContextMenu(o),(i=(r=e.events)==null?void 0:r.contextMenu)==null||i.call(r,o)}),n.dragStart.on(o=>{var r,i;t.nodeDragStart(o),(i=(r=e.events)==null?void 0:r.dragStart)==null||i.call(r,o)}),n.drag.on(o=>{var r,i;t.nodeDrag(o),(i=(r=e.events)==null?void 0:r.drag)==null||i.call(r,o)}),n.dragStop.on(o=>{var r,i;t.nodeDragStop(o),(i=(r=e.events)==null?void 0:r.dragStop)==null||i.call(r,o)}),Object.entries(n).reduce((o,[r,i])=>(o.emit[r]=i.trigger,o.on[r]=i.on,o),{emit:{},on:{}})}function $i(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:r,snapToGrid:i,nodesDraggable:a,emits:s}=Ne();return(l,u=!1)=>{const c=i.value?r.value[0]:5,d=i.value?r.value[1]:5,g=u?4:1,f=l.x*c*g,b=l.y*d*g,N=[];for(const S of e.value)if(S.draggable||a&&typeof S.draggable>"u"){const A={x:S.computedPosition.x+f,y:S.computedPosition.y+b},{position:$}=yo(S,A,s.error,t.value,S.parentNode?o(S.parentNode):void 0);N.push({id:S.id,position:$,from:S.position,distance:{x:l.x,y:l.y},dimensions:S.dimensions})}n(N,!0,!1)}}const Pn=.1,Nc=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function ct(){return en("Viewport not initialized yet."),Promise.resolve(!1)}const Sc={zoomIn:ct,zoomOut:ct,zoomTo:ct,fitView:ct,setCenter:ct,fitBounds:ct,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:ct,setTransform:ct,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function kc(e){function t(o,r){return new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?Ft:vn).scaleBy(ko(e.d3Selection,r?.duration,r?.ease,()=>{i(!0)}),o):i(!1)})}function n(o,r,i,a){return new Promise(s=>{var l;const{x:u,y:c}=Xr({x:-o,y:-r},e.translateExtent),d=Mt.translate(-u,-c).scale(i);e.d3Selection&&e.d3Zoom?(l=e.d3Zoom)==null||l.interpolate(a?.interpolate==="linear"?Ft:vn).transform(ko(e.d3Selection,a?.duration,a?.ease,()=>{s(!0)}),d):s(!1)})}return pe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:r=>t(1.2,r),zoomOut:r=>t(1/1.2,r),zoomTo:(r,i)=>new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(i?.interpolate==="linear"?Ft:vn).scaleTo(ko(e.d3Selection,i?.duration,i?.ease,()=>{a(!0)}),r):a(!1)}),setViewport:(r,i)=>n(r.x,r.y,r.zoom,i),setTransform:(r,i)=>n(r.x,r.y,r.zoom,i),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(r={padding:Pn,includeHiddenNodes:!1,duration:0})=>{var i,a;const s=[];for(const g of e.nodes)g.dimensions.width&&g.dimensions.height&&(r?.includeHiddenNodes||!g.hidden)&&(!((i=r.nodes)!=null&&i.length)||(a=r.nodes)!=null&&a.length&&r.nodes.includes(g.id))&&s.push(g);if(!s.length)return Promise.resolve(!1);const l=qr(s),{x:u,y:c,zoom:d}=ei(l,e.dimensions.width,e.dimensions.height,r.minZoom??e.minZoom,r.maxZoom??e.maxZoom,r.padding??Pn);return n(u,c,d,r)},setCenter:(r,i,a)=>{const s=typeof a?.zoom<"u"?a.zoom:e.maxZoom,l=e.dimensions.width/2-r*s,u=e.dimensions.height/2-i*s;return n(l,u,s,a)},fitBounds:(r,i={padding:Pn})=>{const{x:a,y:s,zoom:l}=ei(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,i.padding??Pn);return n(a,s,l,i)},project:r=>Jt(r,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:r=>{if(e.vueFlowRef){const{x:i,y:a}=e.vueFlowRef.getBoundingClientRect(),s={x:r.x-i,y:r.y-a};return Jt(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:r=>{if(e.vueFlowRef){const{x:i,y:a}=e.vueFlowRef.getBoundingClientRect(),s={x:r.x+i,y:r.y+a};return qt(s,e.viewport)}return{x:0,y:0}}}:Sc)}function ko(e,t=0,n=Nc,o=()=>{}){const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e}function Cc(e,t,n){const o=Fn(!0);return o.run(()=>{const r=()=>{o.run(()=>{let N,S,A=!!(n.nodes.value.length||n.edges.value.length);N=St([e.modelValue,()=>{var $,m;return(m=($=e.modelValue)==null?void 0:$.value)==null?void 0:m.length}],([$])=>{$&&Array.isArray($)&&(S?.pause(),n.setElements($),!S&&!A&&$.length?A=!0:S?.resume())}),S=St([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([$,m])=>{var y;(y=e.modelValue)!=null&&y.value&&Array.isArray(e.modelValue.value)&&(N?.pause(),e.modelValue.value=[...$,...m],Ae(()=>{N?.resume()}))},{immediate:A}),Pt(()=>{N?.stop(),S?.stop()})})},i=()=>{o.run(()=>{let N,S,A=!!n.nodes.value.length;N=St([e.nodes,()=>{var $,m;return(m=($=e.nodes)==null?void 0:$.value)==null?void 0:m.length}],([$])=>{$&&Array.isArray($)&&(S?.pause(),n.setNodes($),!S&&!A&&$.length?A=!0:S?.resume())}),S=St([n.nodes,()=>n.nodes.value.length],([$])=>{var m;(m=e.nodes)!=null&&m.value&&Array.isArray(e.nodes.value)&&(N?.pause(),e.nodes.value=[...$],Ae(()=>{N?.resume()}))},{immediate:A}),Pt(()=>{N?.stop(),S?.stop()})})},a=()=>{o.run(()=>{let N,S,A=!!n.edges.value.length;N=St([e.edges,()=>{var $,m;return(m=($=e.edges)==null?void 0:$.value)==null?void 0:m.length}],([$])=>{$&&Array.isArray($)&&(S?.pause(),n.setEdges($),!S&&!A&&$.length?A=!0:S?.resume())}),S=St([n.edges,()=>n.edges.value.length],([$])=>{var m;(m=e.edges)!=null&&m.value&&Array.isArray(e.edges.value)&&(N?.pause(),e.edges.value=[...$],Ae(()=>{N?.resume()}))},{immediate:A}),Pt(()=>{N?.stop(),S?.stop()})})},s=()=>{o.run(()=>{_e(()=>t.maxZoom,()=>{t.maxZoom&&Ie(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{o.run(()=>{_e(()=>t.minZoom,()=>{t.minZoom&&Ie(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{_e(()=>t.translateExtent,()=>{t.translateExtent&&Ie(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{_e(()=>t.nodeExtent,()=>{t.nodeExtent&&Ie(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{_e(()=>t.applyDefault,()=>{Ie(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},g=()=>{o.run(()=>{const N=async S=>{let A=S;typeof t.autoConnect=="function"&&(A=await t.autoConnect(S)),A!==!1&&n.addEdges([A])};_e(()=>t.autoConnect,()=>{Ie(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),_e(n.autoConnect,(S,A,$)=>{S?n.onConnect(N):n.hooks.value.connect.off(N),$(()=>{n.hooks.value.connect.off(N)})},{immediate:!0})})},f=()=>{const N=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const S of Object.keys(t)){const A=S;if(!N.includes(A)){const $=be(()=>t[A]),m=n[A];on(m)&&o.run(()=>{_e($,y=>{Ie(y)&&(m.value=y)},{immediate:!0})})}}};r(),i(),a(),l(),s(),u(),c(),d(),g(),f()}),()=>o.stop()}function $c(){return{edgesChange:ee(),nodesChange:ee(),nodeDoubleClick:ee(),nodeClick:ee(),nodeMouseEnter:ee(),nodeMouseMove:ee(),nodeMouseLeave:ee(),nodeContextMenu:ee(),nodeDragStart:ee(),nodeDrag:ee(),nodeDragStop:ee(),nodesInitialized:ee(),miniMapNodeClick:ee(),miniMapNodeDoubleClick:ee(),miniMapNodeMouseEnter:ee(),miniMapNodeMouseMove:ee(),miniMapNodeMouseLeave:ee(),connect:ee(),connectStart:ee(),connectEnd:ee(),clickConnectStart:ee(),clickConnectEnd:ee(),paneReady:ee(),init:ee(),move:ee(),moveStart:ee(),moveEnd:ee(),selectionDragStart:ee(),selectionDrag:ee(),selectionDragStop:ee(),selectionContextMenu:ee(),selectionStart:ee(),selectionEnd:ee(),viewportChangeStart:ee(),viewportChange:ee(),viewportChangeEnd:ee(),paneScroll:ee(),paneClick:ee(),paneContextMenu:ee(),paneMouseEnter:ee(),paneMouseMove:ee(),paneMouseLeave:ee(),edgeContextMenu:ee(),edgeMouseEnter:ee(),edgeMouseMove:ee(),edgeMouseLeave:ee(),edgeDoubleClick:ee(),edgeClick:ee(),edgeUpdateStart:ee(),edgeUpdate:ee(),edgeUpdateEnd:ee(),updateNodeInternals:ee(),error:ee(e=>en(e.message))}}function Ic(e,t){const n=gt();Po(()=>{for(const[r,i]of Object.entries(t.value)){const a=s=>{e(r,s)};i.setEmitter(a),At(i.removeEmitter),i.setHasEmitListeners(()=>o(r)),At(i.removeHasEmitListeners)}});function o(r){var i;const a=Mc(r);return!!((i=n?.vnode.props)==null?void 0:i[a])}}function Mc(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(r,i)=>i.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Ii(){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:po.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:bt.Bezier,style:{}},connectionMode:at.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:Mn()?"Meta":"Control",zoomActivationKeyCode:Mn()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:$c(),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 Dc=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function Oc(e,t,n){const o=kc(e),r=O=>{const k=O??[];e.hooks.updateNodeInternals.trigger(k)},i=O=>ju(O,e.nodes,e.edges),a=O=>Xu(O,e.nodes,e.edges),s=O=>Qr(O,e.edges),l=({id:O,type:k,nodeId:R})=>{var W;const Y=O?`-${k}-${O}`:`-${k}`;return Array.from(((W=e.connectionLookup.get(`${R}${Y}`))==null?void 0:W.values())??[])},u=O=>{if(O)return t.value.get(O)},c=O=>{if(O)return n.value.get(O)},d=(O,k,R)=>{var W,Y;const te=[];for(const ne of O){const le={id:ne.id,type:"position",dragging:R,from:ne.from};if(k&&(le.position=ne.position,ne.parentNode)){const ae=u(ne.parentNode);le.position={x:le.position.x-(((W=ae?.computedPosition)==null?void 0:W.x)??0),y:le.position.y-(((Y=ae?.computedPosition)==null?void 0:Y.y)??0)}}te.push(le)}te?.length&&e.hooks.nodesChange.trigger(te)},g=O=>{if(!e.vueFlowRef)return;const k=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!k)return;const R=window.getComputedStyle(k),{m22:W}=new window.DOMMatrixReadOnly(R.transform),Y=[];for(const te of O){const ne=te,le=u(ne.id);if(le){const ae=$n(ne.nodeElement);if(!!(ae.width&&ae.height&&(le.dimensions.width!==ae.width||le.dimensions.height!==ae.height||ne.forceUpdate))){const ve=ne.nodeElement.getBoundingClientRect();le.dimensions=ae,le.handleBounds.source=_i("source",ne.nodeElement,ve,W,le.id),le.handleBounds.target=_i("target",ne.nodeElement,ve,W,le.id),Y.push({id:le.id,type:"dimensions",dimensions:ae})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),Y.length&&e.hooks.nodesChange.trigger(Y)},f=(O,k)=>{const R=new Set,W=new Set;for(const ne of O)Et(ne)?R.add(ne.id):st(ne)&&W.add(ne.id);const Y=ut(t.value,R,!0),te=ut(n.value,W);if(e.multiSelectionActive){for(const ne of R)Y.push(lt(ne,k));for(const ne of W)te.push(lt(ne,k))}Y.length&&e.hooks.nodesChange.trigger(Y),te.length&&e.hooks.edgesChange.trigger(te)},b=O=>{if(e.multiSelectionActive){const k=O.map(R=>lt(R.id,!0));e.hooks.nodesChange.trigger(k);return}e.hooks.nodesChange.trigger(ut(t.value,new Set(O.map(k=>k.id)),!0)),e.hooks.edgesChange.trigger(ut(n.value))},N=O=>{if(e.multiSelectionActive){const k=O.map(R=>lt(R.id,!0));e.hooks.edgesChange.trigger(k);return}e.hooks.edgesChange.trigger(ut(n.value,new Set(O.map(k=>k.id)))),e.hooks.nodesChange.trigger(ut(t.value,new Set,!0))},S=O=>{f(O,!0)},A=O=>{const R=(O||e.nodes).map(W=>(W.selected=!1,lt(W.id,!1)));e.hooks.nodesChange.trigger(R)},$=O=>{const R=(O||e.edges).map(W=>(W.selected=!1,lt(W.id,!1)));e.hooks.edgesChange.trigger(R)},m=O=>{if(!O||!O.length)return f([],!1);const k=O.reduce((R,W)=>{const Y=lt(W.id,!1);return Et(W)?R.nodes.push(Y):R.edges.push(Y),R},{nodes:[],edges:[]});k.nodes.length&&e.hooks.nodesChange.trigger(k.nodes),k.edges.length&&e.hooks.edgesChange.trigger(k.edges)},y=O=>{var k;(k=e.d3Zoom)==null||k.scaleExtent([O,e.maxZoom]),e.minZoom=O},V=O=>{var k;(k=e.d3Zoom)==null||k.scaleExtent([e.minZoom,O]),e.maxZoom=O},F=O=>{var k;(k=e.d3Zoom)==null||k.translateExtent(O),e.translateExtent=O},j=O=>{e.nodeExtent=O,r()},X=O=>{var k;(k=e.d3Zoom)==null||k.clickDistance(O)},q=O=>{e.nodesDraggable=O,e.nodesConnectable=O,e.elementsSelectable=O},P=O=>{const k=O instanceof Function?O(e.nodes):O;!e.initialized&&!k.length||(e.nodes=yi(k,u,e.hooks.error.trigger))},x=O=>{const k=O instanceof Function?O(e.edges):O;if(!e.initialized&&!k.length)return;const R=So(k,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);No(e.connectionLookup,n.value,R),e.edges=R},v=O=>{const k=O instanceof Function?O([...e.nodes,...e.edges]):O;!e.initialized&&!k.length||(P(k.filter(Et)),x(k.filter(st)))},T=O=>{let k=O instanceof Function?O(e.nodes):O;k=Array.isArray(k)?k:[k];const R=yi(k,u,e.hooks.error.trigger),W=[];for(const Y of R)W.push(ai(Y));W.length&&e.hooks.nodesChange.trigger(W)},p=O=>{let k=O instanceof Function?O(e.edges):O;k=Array.isArray(k)?k:[k];const R=So(k,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),W=[];for(const Y of R)W.push(ai(Y));W.length&&e.hooks.edgesChange.trigger(W)},I=(O,k=!0,R=!1)=>{const W=O instanceof Function?O(e.nodes):O,Y=Array.isArray(W)?W:[W],te=[],ne=[];function le(de){const ve=s(de);for(const we of ve)(!Ie(we.deletable)||we.deletable)&&ne.push(li(we.id,we.source,we.target,we.sourceHandle,we.targetHandle))}function ae(de){const ve=[];for(const we of e.nodes)we.parentNode===de&&ve.push(we);if(ve.length){for(const we of ve)te.push(si(we.id));k&&le(ve);for(const we of ve)ae(we.id)}}for(const de of Y){const ve=typeof de=="string"?u(de):de;ve&&(Ie(ve.deletable)&&!ve.deletable||(te.push(si(ve.id)),k&&le([ve]),R&&ae(ve.id)))}ne.length&&e.hooks.edgesChange.trigger(ne),te.length&&e.hooks.nodesChange.trigger(te)},_=O=>{const k=O instanceof Function?O(e.edges):O,R=Array.isArray(k)?k:[k],W=[];for(const Y of R){const te=typeof Y=="string"?c(Y):Y;te&&(Ie(te.deletable)&&!te.deletable||W.push(li(typeof Y=="string"?Y:Y.id,te.source,te.target,te.sourceHandle,te.targetHandle)))}e.hooks.edgesChange.trigger(W)},M=(O,k,R=!0)=>{const W=c(O.id);if(!W)return!1;const Y=e.edges.indexOf(W),te=gc(O,k,W,R,e.hooks.error.trigger);if(te){const[ne]=So([te],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((le,ae)=>ae===Y?ne:le),No(e.connectionLookup,n.value,[ne]),ne}return!1},z=(O,k,R={replace:!1})=>{const W=c(O);if(!W)return;const Y=typeof k=="function"?k(W):k;W.data=R.replace?Y:{...W.data,...Y}},H=O=>ii(O,e.nodes),L=O=>{const k=ii(O,e.edges);return No(e.connectionLookup,n.value,k),k},C=(O,k,R={replace:!1})=>{const W=u(O);if(!W)return;const Y=typeof k=="function"?k(W):k;R.replace?e.nodes.splice(e.nodes.indexOf(W),1,Y):Object.assign(W,Y)},B=(O,k,R={replace:!1})=>{const W=u(O);if(!W)return;const Y=typeof k=="function"?k(W):k;W.data=R.replace?Y:{...W.data,...Y}},Z=(O,k,R=!1)=>{R?e.connectionClickStartHandle=O:e.connectionStartHandle=O,e.connectionEndHandle=null,e.connectionStatus=null,k&&(e.connectionPosition=k)},w=(O,k=null,R=null)=>{e.connectionStartHandle&&(e.connectionPosition=O,e.connectionEndHandle=k,e.connectionStatus=R)},h=(O,k)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,k?e.connectionClickStartHandle=null:e.connectionStartHandle=null},E=O=>{const k=Gu(O),R=k?null:Kt(O)?O:u(O.id);return!k&&!R?[null,null,k]:[k?O:kn(R),R,k]},D=(O,k=!0,R=e.nodes)=>{const[W,Y,te]=E(O);if(!W)return[];const ne=[];for(const le of R||e.nodes){if(!te&&(le.id===Y.id||!le.computedPosition))continue;const ae=kn(le),de=Cn(ae,W);(k&&de>0||de>=ae.width*ae.height||de>=Number(W.width)*Number(W.height))&&ne.push(le)}return ne},G=(O,k,R=!0)=>{const[W]=E(O);if(!W)return!1;const Y=Cn(W,k);return R&&Y>0||Y>=Number(W.width)*Number(W.height)},U=O=>{const{viewport:k,dimensions:R,d3Zoom:W,d3Selection:Y,translateExtent:te}=e;if(!W||!Y||!O.x&&!O.y)return!1;const ne=Mt.translate(k.x+O.x,k.y+O.y).scale(k.zoom),le=[[0,0],[R.width,R.height]],ae=W.constrain()(ne,le,te),de=e.viewport.x!==ae.x||e.viewport.y!==ae.y||e.viewport.zoom!==ae.k;return W.transform(Y,ae),de},K=O=>{const k=O instanceof Function?O(e):O,R=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ie(k.defaultEdgeOptions)&&(e.defaultEdgeOptions=k.defaultEdgeOptions);const W=k.modelValue||k.nodes||k.edges?[]:void 0;W&&(k.modelValue&&W.push(...k.modelValue),k.nodes&&W.push(...k.nodes),k.edges&&W.push(...k.edges),v(W));const Y=()=>{Ie(k.maxZoom)&&V(k.maxZoom),Ie(k.minZoom)&&y(k.minZoom),Ie(k.translateExtent)&&F(k.translateExtent)};for(const te of Object.keys(k)){const ne=te,le=k[ne];![...Dc,...R].includes(ne)&&Ie(le)&&(e[ne]=le)}jn(()=>e.d3Zoom).not.toBeNull().then(Y),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:g,setElements:v,setNodes:P,setEdges:x,addNodes:T,addEdges:p,removeNodes:I,removeEdges:_,findNode:u,findEdge:c,updateEdge:M,updateEdgeData:z,updateNode:C,updateNodeData:B,applyEdgeChanges:L,applyNodeChanges:H,addSelectedElements:S,addSelectedNodes:b,addSelectedEdges:N,setMinZoom:y,setMaxZoom:V,setTranslateExtent:F,setNodeExtent:j,setPaneClickDistance:X,removeSelectedElements:m,removeSelectedNodes:A,removeSelectedEdges:$,startConnection:Z,updateConnection:w,endConnection:h,setInteractive:q,setState:K,getIntersectingNodes:D,getIncomers:i,getOutgoers:a,getConnectedEdges:s,getHandleConnections:l,isNodeIntersecting:G,panBy:U,fitView:O=>o.value.fitView(O),zoomIn:O=>o.value.zoomIn(O),zoomOut:O=>o.value.zoomOut(O),zoomTo:(O,k)=>o.value.zoomTo(O,k),setViewport:(O,k)=>o.value.setViewport(O,k),setTransform:(O,k)=>o.value.setTransform(O,k),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(O,k,R)=>o.value.setCenter(O,k,R),fitBounds:(O,k)=>o.value.fitBounds(O,k),project:O=>o.value.project(O),screenToFlowCoordinate:O=>o.value.screenToFlowCoordinate(O),flowToScreenCoordinate:O=>o.value.flowToScreenCoordinate(O),toObject:()=>{const O=[],k=[];for(const R of e.nodes){const{computedPosition:W,handleBounds:Y,selected:te,dimensions:ne,isParent:le,resizing:ae,dragging:de,events:ve,...we}=R;O.push(we)}for(const R of e.edges){const{selected:W,sourceNode:Y,targetNode:te,events:ne,...le}=R;k.push(le)}return JSON.parse(JSON.stringify({nodes:O,edges:k,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:O=>new Promise(k=>{const{nodes:R,edges:W,position:Y,zoom:te,viewport:ne}=O;R&&P(R),W&&x(W);const[le,ae]=ne?.x&&ne?.y?[ne.x,ne.y]:Y??[null,null];if(le&&ae){const de=ne?.zoom||te||e.viewport.zoom;return jn(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:le,y:ae,zoom:de}).then(()=>{k(!0)})})}else k(!0)}),updateNodeInternals:r,viewportHelper:o,$reset:()=>{const O=Ii();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const k=Mt.translate(O.defaultViewport.x??0,O.defaultViewport.y??0).scale(xt(O.defaultViewport.zoom??1,O.minZoom,O.maxZoom)),R=e.viewportRef.getBoundingClientRect(),W=[[0,0],[R.width,R.height]],Y=e.d3Zoom.constrain()(k,W,O.translateExtent);e.d3Zoom.transform(e.d3Selection,Y)}K(O)},$destroy:()=>{}}}const Tc=["data-id","data-handleid","data-nodeid","data-handlepos"],dt=Se({...{name:"Handle",compatConfig:{MODE:3}},props:{id:{default:null},type:{},position:{default:()=>re.Top},isValidConnection:{type:Function},connectable:{type:[Boolean,Number,String,Function],default:void 0},connectableStart:{type:Boolean,default:!0},connectableEnd:{type:Boolean,default:!0}},setup(e,{expose:t}){const n=Oo(e,["position","connectable","connectableStart","connectableEnd","id"]),o=be(()=>n.type??"source"),r=be(()=>n.isValidConnection??null),{id:i,connectionStartHandle:a,connectionClickStartHandle:s,connectionEndHandle:l,vueFlowRef:u,nodesConnectable:c,noDragClassName:d,noPanClassName:g}=Ne(),{id:f,node:b,nodeEl:N,connectedEdges:S}=Ci(),A=Ee(),$=be(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),m=be(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),y=be(()=>{var x,v,T,p,I,_;return((x=a.value)==null?void 0:x.nodeId)===f&&((v=a.value)==null?void 0:v.id)===e.id&&((T=a.value)==null?void 0:T.type)===o.value||((p=l.value)==null?void 0:p.nodeId)===f&&((I=l.value)==null?void 0:I.id)===e.id&&((_=l.value)==null?void 0:_.type)===o.value}),V=be(()=>{var x,v,T;return((x=s.value)==null?void 0:x.nodeId)===f&&((v=s.value)==null?void 0:v.id)===e.id&&((T=s.value)==null?void 0:T.type)===o.value}),{handlePointerDown:F,handleClick:j}=ki({nodeId:f,handleId:e.id,isValidConnection:r,type:o}),X=pe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!S.value.some(x=>{const v=x[`${o.value}Handle`];return x[o.value]!==f?!1:v?v===e.id:!0}):typeof e.connectable=="number"?S.value.filter(x=>{const v=x[`${o.value}Handle`];return x[o.value]!==f?!1:v?v===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(b,S.value):Ie(e.connectable)?e.connectable:c.value);qe(()=>{var x;if(!b.dimensions.width||!b.dimensions.height)return;const v=(x=b.handleBounds[o.value])==null?void 0:x.find(H=>H.id===e.id);if(!u.value||v)return;const T=u.value.querySelector(".vue-flow__transformationpane");if(!N.value||!A.value||!T||!e.id)return;const p=N.value.getBoundingClientRect(),I=A.value.getBoundingClientRect(),_=window.getComputedStyle(T),{m22:M}=new window.DOMMatrixReadOnly(_.transform),z={id:e.id,position:e.position,x:(I.left-p.left)/M,y:(I.top-p.top)/M,type:o.value,nodeId:f,...$n(A.value)};b.handleBounds[o.value]=[...b.handleBounds[o.value]??[],z]});function q(x){const v=wo(x);X.value&&$.value&&(v&&x.button===0||!v)&&F(x)}function P(x){!f||!s.value&&!$.value||X.value&&j(x)}return t({handleClick:j,handlePointerDown:F,onClick:P,onPointerDown:q}),(x,v)=>(ie(),he("div",{ref_key:"handle",ref:A,"data-id":`${oe(i)}-${oe(f)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":oe(f),"data-handlepos":x.position,class:pt(["vue-flow__handle",[`vue-flow__handle-${x.position}`,`vue-flow__handle-${e.id}`,oe(d),oe(g),o.value,{connectable:X.value,connecting:V.value,connectablestart:$.value,connectableend:m.value,connectionindicator:X.value&&($.value&&!y.value||m.value&&y.value)}]]),onMousedown:q,onTouchstartPassive:q,onClick:P},[Ce(x.$slots,"default",{id:x.id})],42,Tc))}}),zn=function({sourcePosition:e=re.Bottom,targetPosition:t=re.Top,label:n,connectable:o=!0,isValidTargetPos:r,isValidSourcePos:i,data:a}){const s=a.label??n;return[ye(dt,{type:"target",position:t,connectable:o,isValidConnection:r}),typeof s!="string"&&s?ye(s):ye(Ve,[s]),ye(dt,{type:"source",position:e,connectable:o,isValidConnection:i})]};zn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],zn.inheritAttrs=!1,zn.compatConfig={MODE:3};const Pc=zn,An=function({targetPosition:e=re.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:r}){const i=r.label??t;return[ye(dt,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof i!="string"&&i?ye(i):ye(Ve,[i])]};An.props=["targetPosition","label","isValidTargetPos","connectable","data"],An.inheritAttrs=!1,An.compatConfig={MODE:3};const zc=An,Rn=function({sourcePosition:e=re.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:r}){const i=r.label??t;return[typeof i!="string"&&i?ye(i):ye(Ve,[i]),ye(dt,{type:"source",position:e,connectable:n,isValidConnection:o})]};Rn.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Rn.inheritAttrs=!1,Rn.compatConfig={MODE:3};const Ac=Rn,Rc=["transform"],Bc=["width","height","x","y","rx","ry"],Vc=["y"],Hc=Se({...{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),o=pe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);qe(r),_e([()=>e.x,()=>e.y,n,()=>e.label],r);function r(){if(!n.value)return;const i=n.value.getBBox();(i.width!==t.value.width||i.height!==t.value.height)&&(t.value=i)}return(i,a)=>(ie(),he("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[i.labelShowBg?(ie(),he("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*i.labelBgPadding[0]}px`,height:`${t.value.height+2*i.labelBgPadding[1]}px`,x:-i.labelBgPadding[0],y:-i.labelBgPadding[1],style:Re(i.labelBgStyle),rx:i.labelBgBorderRadius,ry:i.labelBgBorderRadius},null,12,Bc)):Oe("",!0),fe("text",Yn(i.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:i.labelStyle}),[Ce(i.$slots,"default",{},()=>[typeof i.label!="string"?(ie(),De(vt(i.label),{key:0})):(ie(),he(Ve,{key:1},[He(Pe(i.label),1)],64))])],16,Vc)],8,Rc))}}),Lc=["id","d","marker-end","marker-start"],Fc=["d","stroke-width"],Bn=Se({...{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),o=Ee(null),r=Ee(null),i=Bo();return t({pathEl:n,interactionEl:o,labelEl:r}),(a,s)=>(ie(),he(Ve,null,[fe("path",Yn(oe(i),{id:a.id,ref_key:"pathEl",ref:n,d:a.path,class:"vue-flow__edge-path","marker-end":a.markerEnd,"marker-start":a.markerStart}),null,16,Lc),a.interactionWidth?(ie(),he("path",{key:0,ref_key:"interactionEl",ref:o,fill:"none",d:a.path,"stroke-width":a.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Fc)):Oe("",!0),a.label&&a.labelX&&a.labelY?(ie(),De(Hc,{key:1,ref_key:"labelEl",ref:r,x:a.labelX,y:a.labelY,label:a.label,"label-show-bg":a.labelShowBg,"label-bg-style":a.labelBgStyle,"label-bg-padding":a.labelBgPadding,"label-bg-border-radius":a.labelBgBorderRadius,"label-style":a.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):Oe("",!0)],64))}});function Mi({sourceX:e,sourceY:t,targetX:n,targetY:o}){const r=Math.abs(n-e)/2,i=n<e?n+r:n-r,a=Math.abs(o-t)/2,s=o<t?o+a:o-a;return[i,s,r,a]}function Di({sourceX:e,sourceY:t,targetX:n,targetY:o,sourceControlX:r,sourceControlY:i,targetControlX:a,targetControlY:s}){const l=e*.125+r*.375+a*.375+n*.125,u=t*.125+i*.375+s*.375+o*.125,c=Math.abs(l-e),d=Math.abs(u-t);return[l,u,c,d]}function Vn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Oi({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){let a,s;switch(e){case re.Left:a=t-Vn(t-o,i),s=n;break;case re.Right:a=t+Vn(o-t,i),s=n;break;case re.Top:a=t,s=n-Vn(n-r,i);break;case re.Bottom:a=t,s=n+Vn(r-n,i);break}return[a,s]}function Ti(e){const{sourceX:t,sourceY:n,sourcePosition:o=re.Bottom,targetX:r,targetY:i,targetPosition:a=re.Top,curvature:s=.25}=e,[l,u]=Oi({pos:o,x1:t,y1:n,x2:r,y2:i,c:s}),[c,d]=Oi({pos:a,x1:r,y1:i,x2:t,y2:n,c:s}),[g,f,b,N]=Di({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:l,sourceControlY:u,targetControlX:c,targetControlY:d});return[`M${t},${n} C${l},${u} ${c},${d} ${r},${i}`,g,f,b,N]}function Pi({pos:e,x1:t,y1:n,x2:o,y2:r}){let i,a;switch(e){case re.Left:case re.Right:i=.5*(t+o),a=n;break;case re.Top:case re.Bottom:i=t,a=.5*(n+r);break}return[i,a]}function zi(e){const{sourceX:t,sourceY:n,sourcePosition:o=re.Bottom,targetX:r,targetY:i,targetPosition:a=re.Top}=e,[s,l]=Pi({pos:o,x1:t,y1:n,x2:r,y2:i}),[u,c]=Pi({pos:a,x1:r,y1:i,x2:t,y2:n}),[d,g,f,b]=Di({sourceX:t,sourceY:n,targetX:r,targetY:i,sourceControlX:s,sourceControlY:l,targetControlX:u,targetControlY:c});return[`M${t},${n} C${s},${l} ${u},${c} ${r},${i}`,d,g,f,b]}const Ai={[re.Left]:{x:-1,y:0},[re.Right]:{x:1,y:0},[re.Top]:{x:0,y:-1},[re.Bottom]:{x:0,y:1}};function Gc({source:e,sourcePosition:t=re.Bottom,target:n}){return t===re.Left||t===re.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1}}function Ri(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Yc({source:e,sourcePosition:t=re.Bottom,target:n,targetPosition:o=re.Top,center:r,offset:i}){const a=Ai[t],s=Ai[o],l={x:e.x+a.x*i,y:e.y+a.y*i},u={x:n.x+s.x*i,y:n.y+s.y*i},c=Gc({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",g=c[d];let f,b,N;const S={x:0,y:0},A={x:0,y:0},[$,m,y,V]=Mi({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){b=r.x??$,N=r.y??m;const j=[{x:b,y:l.y},{x:b,y:u.y}],X=[{x:l.x,y:N},{x:u.x,y:N}];a[d]===g?f=d==="x"?j:X:f=d==="x"?X:j}else{const j=[{x:l.x,y:u.y}],X=[{x:u.x,y:l.y}];if(d==="x"?f=a.x===g?X:j:f=a.y===g?j:X,t===o){const T=Math.abs(e[d]-n[d]);if(T<=i){const p=Math.min(i-1,i-T);a[d]===g?S[d]=(l[d]>e[d]?-1:1)*p:A[d]=(u[d]>n[d]?-1:1)*p}}if(t!==o){const T=d==="x"?"y":"x",p=a[d]===s[T],I=l[T]>u[T],_=l[T]<u[T];(a[d]===1&&(!p&&I||p&&_)||a[d]!==1&&(!p&&_||p&&I))&&(f=d==="x"?j:X)}const q={x:l.x+S.x,y:l.y+S.y},P={x:u.x+A.x,y:u.y+A.y},x=Math.max(Math.abs(q.x-f[0].x),Math.abs(P.x-f[0].x)),v=Math.max(Math.abs(q.y-f[0].y),Math.abs(P.y-f[0].y));x>=v?(b=(q.x+P.x)/2,N=f[0].y):(b=f[0].x,N=(q.y+P.y)/2)}return[[e,{x:l.x+S.x,y:l.y+S.y},...f,{x:u.x+A.x,y:u.y+A.y},n],b,N,y,V]}function Xc(e,t,n,o){const r=Math.min(Ri(e,t)/2,Ri(t,n)/2,o),{x:i,y:a}=t;if(e.x===i&&i===n.x||e.y===a&&a===n.y)return`L${i} ${a}`;if(e.y===a){const u=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${i+r*u},${a}Q ${i},${a} ${i},${a+r*c}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${i},${a+r*l}Q ${i},${a} ${i+r*s},${a}`}function Co(e){const{sourceX:t,sourceY:n,sourcePosition:o=re.Bottom,targetX:r,targetY:i,targetPosition:a=re.Top,borderRadius:s=5,centerX:l,centerY:u,offset:c=20}=e,[d,g,f,b,N]=Yc({source:{x:t,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:a,center:{x:l,y:u},offset:c});return[d.reduce((A,$,m)=>{let y;return m>0&&m<d.length-1?y=Xc(d[m-1],$,d[m+1],s):y=`${m===0?"M":"L"}${$.x} ${$.y}`,A+=y,A},""),g,f,b,N]}function jc(e){const{sourceX:t,sourceY:n,targetX:o,targetY:r}=e,[i,a,s,l]=Mi({sourceX:t,sourceY:n,targetX:o,targetY:r});return[`M ${t},${n}L ${o},${r}`,i,a,s,l]}const Wc=Se({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=jc(e);return ye(Bn,{path:n,labelX:o,labelY:r,...t,...e})}}}),Bi=Se({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Co({...e,sourcePosition:e.sourcePosition??re.Bottom,targetPosition:e.targetPosition??re.Top});return ye(Bn,{path:n,labelX:o,labelY:r,...t,...e})}}}),Uc=Se({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>ye(Bi,{...e,...t,borderRadius:0})}}),Zc=Se({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=Ti({...e,sourcePosition:e.sourcePosition??re.Bottom,targetPosition:e.targetPosition??re.Top});return ye(Bn,{path:n,labelX:o,labelY:r,...t,...e})}}}),Kc=Se({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,o,r]=zi({...e,sourcePosition:e.sourcePosition??re.Bottom,targetPosition:e.targetPosition??re.Top});return ye(Bn,{path:n,labelX:o,labelY:r,...t,...e})}}}),qc={input:Ac,default:Pc,output:zc},Jc={default:Zc,straight:Wc,step:Uc,smoothstep:Bi,simplebezier:Kc};function Qc(e,t,n){const o=pe(()=>N=>t.value.get(N)),r=pe(()=>N=>n.value.get(N)),i=pe(()=>{const N={...Jc,...e.edgeTypes},S=Object.keys(N);for(const A of e.edges)A.type&&!S.includes(A.type)&&(N[A.type]=A.type);return N}),a=pe(()=>{const N={...qc,...e.nodeTypes},S=Object.keys(N);for(const A of e.nodes)A.type&&!S.includes(A.type)&&(N[A.type]=A.type);return N}),s=pe(()=>e.onlyRenderVisibleElements?Jr(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),l=pe(()=>{if(e.onlyRenderVisibleElements){const N=[];for(const S of e.edges){const A=t.value.get(S.source),$=t.value.get(S.target);oc({sourcePos:A.computedPosition||{x:0,y:0},targetPos:$.computedPosition||{x:0,y:0},sourceWidth:A.dimensions.width,sourceHeight:A.dimensions.height,targetWidth:$.dimensions.width,targetHeight:$.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&N.push(S)}return N}return e.edges}),u=pe(()=>[...s.value,...l.value]),c=pe(()=>{const N=[];for(const S of e.nodes)S.selected&&N.push(S);return N}),d=pe(()=>{const N=[];for(const S of e.edges)S.selected&&N.push(S);return N}),g=pe(()=>[...c.value,...d.value]),f=pe(()=>{const N=[];for(const S of e.nodes)S.dimensions.width&&S.dimensions.height&&S.handleBounds!==void 0&&N.push(S);return N}),b=pe(()=>s.value.length>0&&f.value.length===s.value.length);return{getNode:o,getEdge:r,getElements:u,getEdgeTypes:i,getNodeTypes:a,getEdges:l,getNodes:s,getSelectedElements:g,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:f,areNodesInitialized:b}}class Nt{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=gt())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??Nt.instance;return Nt.instance=o??new Nt,n&&(n.config.globalProperties.$vueFlowStorage=Nt.instance),Nt.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Ii(),r=To(o),i={};for(const[g,f]of Object.entries(r.hooks)){const b=`on${g.charAt(0).toUpperCase()+g.slice(1)}`;i[b]=f.on}const a={};for(const[g,f]of Object.entries(r.hooks))a[g]=f.trigger;const s=pe(()=>{const g=new Map;for(const f of r.nodes)g.set(f.id,f);return g}),l=pe(()=>{const g=new Map;for(const f of r.edges)g.set(f.id,f);return g}),u=Qc(r,s,l),c=Oc(r,s,l);c.setState({...r,...n});const d={...i,...u,...c,...Ji(r),nodeLookup:s,edgeLookup:l,emits:a,id:t,vueFlowVersion:"1.48.2",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Ne(e){const t=Nt.getInstance(),n=Ln(),o=typeof e=="object",r=o?e:{id:e},i=r.id,a=i??n?.vueFlowId;let s;if(n){const l=rt(xi,null);typeof l<"u"&&l!==null&&(!a||l.id===a)&&(s=l)}if(s||a&&(s=t.get(a)),!s||a&&s.id!==a){const l=i??t.getId(),u=t.create(l,r);s=u,(n??Fn(!0)).run(()=>{_e(u.applyDefault,(d,g,f)=>{const b=S=>{u.applyNodeChanges(S)},N=S=>{u.applyEdgeChanges(S)};d?(u.onNodesChange(b),u.onEdgesChange(N)):(u.hooks.value.nodesChange.off(b),u.hooks.value.edgesChange.off(N)),f(()=>{u.hooks.value.nodesChange.off(b),u.hooks.value.edgesChange.off(N)})},{immediate:!0}),At(()=>{if(s){const d=t.get(s.id);d?d.$destroy():en(`No store instance found for id ${s.id} in storage.`)}})})}else o&&s.setState(r);if(n&&(ht(xi,s),n.vueFlowId=s.id),o){const l=gt();l?.type.name!=="VueFlow"&&s.emits.error(new Te($e.USEVUEFLOW_OPTIONS))}return s}function ed(e){const{emits:t,dimensions:n}=Ne();let o;qe(()=>{const r=()=>{var i,a;if(!e.value||!(((a=(i=e.value).checkVisibility)==null?void 0:a.call(i))??!0))return;const s=$n(e.value);(s.width===0||s.height===0)&&t.error(new Te($e.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:s.width||500,height:s.height||500}};r(),window.addEventListener("resize",r),e.value&&(o=new ResizeObserver(()=>r()),o.observe(e.value)),Gn(()=>{window.removeEventListener("resize",r),o&&e.value&&o.unobserve(e.value)})})}const td=Se({...{name:"UserSelection",compatConfig:{MODE:3}},props:{userSelectionRect:{}},setup(e){return(t,n)=>(ie(),he("div",{class:"vue-flow__selection vue-flow__container",style:Re({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),nd=["tabIndex"],od=Se({...{name:"NodesSelection",compatConfig:{MODE:3}},setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:r,disableKeyboardA11y:i,userSelectionActive:a}=Ne(),s=$i(),l=Ee(null),u=Si({el:l,onStart(b){t.selectionDragStart(b),t.nodeDragStart(b)},onDrag(b){t.selectionDrag(b),t.nodeDrag(b)},onStop(b){t.selectionDragStop(b),t.nodeDragStop(b)}});qe(()=>{var b;i.value||(b=l.value)==null||b.focus({preventScroll:!0})});const c=pe(()=>qr(o.value)),d=pe(()=>({width:`${c.value.width}px`,height:`${c.value.height}px`,top:`${c.value.y}px`,left:`${c.value.x}px`}));function g(b){t.selectionContextMenu({event:b,nodes:o.value})}function f(b){i.value||Dt[b.key]&&(b.preventDefault(),s({x:Dt[b.key].x,y:Dt[b.key].y},b.shiftKey))}return(b,N)=>!oe(a)&&c.value.width&&c.value.height?(ie(),he("div",{key:0,class:pt(["vue-flow__nodesselection vue-flow__container",oe(r)]),style:Re({transform:`translate(${oe(n).x}px,${oe(n).y}px) scale(${oe(n).zoom})`})},[fe("div",{ref_key:"el",ref:l,class:pt([{dragging:oe(u)},"vue-flow__nodesselection-rect"]),style:Re(d.value),tabIndex:oe(i)?void 0:-1,onContextmenu:g,onKeydown:f},null,46,nd)],6)):Oe("",!0)}});function rd(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const id=Se({...{name:"Pane",compatConfig:{MODE:3}},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:o,emits:r,userSelectionActive:i,removeSelectedElements:a,userSelectionRect:s,elementsSelectable:l,nodesSelectionActive:u,getSelectedEdges:c,getSelectedNodes:d,removeNodes:g,removeEdges:f,selectionMode:b,deleteKeyCode:N,multiSelectionKeyCode:S,multiSelectionActive:A,edgeLookup:$,nodeLookup:m,connectionLookup:y,defaultEdgeOptions:V,connectionStartHandle:F,panOnDrag:j}=Ne(),X=Je(null),q=Je(new Set),P=Je(new Set),x=Je(null),v=be(()=>l.value&&(e.isSelecting||i.value)),T=be(()=>F.value!==null);let p=!1,I=!1;const _=Zt(N,{actInsideInputWithModifier:!1}),M=Zt(S);_e(_,h=>{h&&(g(d.value),f(c.value),u.value=!1)}),_e(M,h=>{A.value=h});function z(h,E){return D=>{D.target===E&&h?.(D)}}function H(h){if(p||T.value){p=!1;return}r.paneClick(h),a(),u.value=!1}function L(h){var E;if(Array.isArray(j.value)&&((E=j.value)!=null&&E.includes(2))){h.preventDefault();return}r.paneContextMenu(h)}function C(h){r.paneScroll(h)}function B(h){var E,D,G;if(x.value=((E=t.value)==null?void 0:E.getBoundingClientRect())??null,!l.value||!e.isSelecting||h.button!==0||h.target!==X.value||!x.value)return;(G=(D=h.target)==null?void 0:D.setPointerCapture)==null||G.call(D,h.pointerId);const{x:U,y:K}=rd(h,x.value);I=!0,p=!1,a(),s.value={width:0,height:0,startX:U,startY:K,x:U,y:K},r.selectionStart(h)}function Z(h){var E;if(!x.value||!s.value)return;p=!0;const{x:D,y:G}=Ze(h,x.value),{startX:U=0,startY:K=0}=s.value,J={startX:U,startY:K,x:D<U?D:U,y:G<K?G:K,width:Math.abs(D-U),height:Math.abs(G-K)},Q=q.value,ce=P.value;q.value=new Set(Jr(n.value,J,o.value,b.value===po.Partial,!0).map(k=>k.id)),P.value=new Set;const O=((E=V.value)==null?void 0:E.selectable)??!0;for(const k of q.value){const R=y.value.get(k);if(R)for(const{edgeId:W}of R.values()){const Y=$.value.get(W);Y&&(Y.selectable??O)&&P.value.add(W)}}if(!bi(Q,q.value)){const k=ut(m.value,q.value,!0);r.nodesChange(k)}if(!bi(ce,P.value)){const k=ut($.value,P.value);r.edgesChange(k)}s.value=J,i.value=!0,u.value=!1}function w(h){var E;h.button!==0||!I||((E=h.target)==null||E.releasePointerCapture(h.pointerId),!i.value&&s.value&&h.target===X.value&&H(h),i.value=!1,s.value=null,u.value=q.value.size>0,r.selectionEnd(h),e.selectionKeyPressed&&(p=!1),I=!1)}return(h,E)=>(ie(),he("div",{ref_key:"container",ref:X,class:pt(["vue-flow__pane vue-flow__container",{selection:h.isSelecting}]),onClick:E[0]||(E[0]=D=>v.value?void 0:z(H,X.value)(D)),onContextmenu:E[1]||(E[1]=D=>z(L,X.value)(D)),onWheelPassive:E[2]||(E[2]=D=>z(C,X.value)(D)),onPointerenter:E[3]||(E[3]=D=>v.value?void 0:oe(r).paneMouseEnter(D)),onPointerdown:E[4]||(E[4]=D=>v.value?B(D):oe(r).paneMouseMove(D)),onPointermove:E[5]||(E[5]=D=>v.value?Z(D):oe(r).paneMouseMove(D)),onPointerup:E[6]||(E[6]=D=>v.value?w(D):void 0),onPointerleave:E[7]||(E[7]=D=>oe(r).paneMouseLeave(D))},[Ce(h.$slots,"default"),oe(i)&&oe(s)?(ie(),De(td,{key:0,"user-selection-rect":oe(s)},null,8,["user-selection-rect"])):Oe("",!0),oe(u)&&oe(d).length?(ie(),De(od,{key:1})):Oe("",!0)],34))}}),ad=Se({...{name:"Transform",compatConfig:{MODE:3}},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Ne(),r=pe(()=>n.value?!o.value:!1),i=pe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(a,s)=>(ie(),he("div",{class:"vue-flow__transformationpane vue-flow__container",style:Re({transform:i.value,opacity:r.value?0:void 0})},[Ce(a.$slots,"default")],4))}}),sd=Se({...{name:"Viewport",compatConfig:{MODE:3}},setup(e){const{minZoom:t,maxZoom:n,defaultViewport:o,translateExtent:r,zoomActivationKeyCode:i,selectionKeyCode:a,panActivationKeyCode:s,panOnScroll:l,panOnScrollMode:u,panOnScrollSpeed:c,panOnDrag:d,zoomOnDoubleClick:g,zoomOnPinch:f,zoomOnScroll:b,preventScrolling:N,noWheelClassName:S,noPanClassName:A,emits:$,connectionStartHandle:m,userSelectionActive:y,paneDragging:V,d3Zoom:F,d3Selection:j,d3ZoomHandler:X,viewport:q,viewportRef:P,paneClickDistance:x}=Ne();ed(P);const v=Je(!1),T=Je(!1);let p=null,I=!1,_=0,M={x:0,y:0,zoom:0};const z=Zt(s),H=Zt(a),L=Zt(i),C=be(()=>(!H.value||H.value&&a.value===!0)&&(z.value||d.value)),B=be(()=>z.value||l.value),Z=be(()=>a.value===!0&&C.value!==!0),w=be(()=>H.value&&a.value!==!0||y.value||Z.value),h=be(()=>m.value!==null);qe(()=>{if(!P.value){en("Viewport element is missing");return}const K=P.value,J=K.getBoundingClientRect(),Q=Au().clickDistance(x.value).scaleExtent([t.value,n.value]).translateExtent(r.value),ce=Le(K).call(Q),O=ce.on("wheel.zoom"),k=Mt.translate(o.value.x??0,o.value.y??0).scale(xt(o.value.zoom??1,t.value,n.value)),R=[[0,0],[J.width,J.height]],W=Q.constrain()(k,R,r.value);Q.transform(ce,W),Q.wheelDelta(ni),F.value=Q,j.value=ce,X.value=O,q.value={x:W.x,y:W.y,zoom:W.k},Q.on("start",Y=>{var te;if(!Y.sourceEvent)return null;_=Y.sourceEvent.button,v.value=!0;const ne=G(Y.transform);((te=Y.sourceEvent)==null?void 0:te.type)==="mousedown"&&(V.value=!0),M=ne,$.viewportChangeStart(ne),$.moveStart({event:Y,flowTransform:ne})}),Q.on("end",Y=>{if(!Y.sourceEvent)return null;if(v.value=!1,V.value=!1,E(C.value,_??0)&&!I&&$.paneContextMenu(Y.sourceEvent),I=!1,D(M,Y.transform)){const te=G(Y.transform);M=te,$.viewportChangeEnd(te),$.moveEnd({event:Y,flowTransform:te})}}),Q.filter(Y=>{var te;const ne=L.value||b.value,le=f.value&&Y.ctrlKey,ae=Y.button,de=Y.type==="wheel";if(ae===1&&Y.type==="mousedown"&&(U(Y,"vue-flow__node")||U(Y,"vue-flow__edge")))return!0;if(!C.value&&!ne&&!B.value&&!g.value&&!f.value||y.value||h.value&&!de||!g.value&&Y.type==="dblclick"||U(Y,S.value)&&de||U(Y,A.value)&&(!de||B.value&&de&&!L.value)||!f.value&&Y.ctrlKey&&de||!ne&&!B.value&&!le&&de)return!1;if(!f&&Y.type==="touchstart"&&((te=Y.touches)==null?void 0:te.length)>1)return Y.preventDefault(),!1;if(!C.value&&(Y.type==="mousedown"||Y.type==="touchstart")||Z.value&&Array.isArray(d.value)&&d.value.includes(0)&&ae===0||Array.isArray(d.value)&&!d.value.includes(ae)&&(Y.type==="mousedown"||Y.type==="touchstart"))return!1;const ve=Array.isArray(d.value)&&d.value.includes(ae)||a.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!ae||ae<=1;return(!Y.ctrlKey||z.value||de)&&ve}),_e([y,C],()=>{y.value&&!v.value?Q.on("zoom",null):y.value||Q.on("zoom",Y=>{q.value={x:Y.transform.x,y:Y.transform.y,zoom:Y.transform.k};const te=G(Y.transform);I=E(C.value,_??0),$.viewportChange(te),$.move({event:Y,flowTransform:te})})},{immediate:!0}),_e([y,B,u,L,f,N,S],()=>{B.value&&!L.value&&!y.value?ce.on("wheel.zoom",Y=>{if(U(Y,S.value))return!1;const te=L.value||b.value,ne=f.value&&Y.ctrlKey;if(!(!N.value||B.value||te||ne))return!1;Y.preventDefault(),Y.stopImmediatePropagation();const ae=ce.property("__zoom").k||1,de=Mn();if(!z.value&&Y.ctrlKey&&f.value&&de){const _h=Xe(Y),yh=ni(Y),wh=ae*2**yh;Q.scaleTo(ce,wh,_h,Y);return}const ve=Y.deltaMode===1?20:1;let we=u.value===Ut.Vertical?0:Y.deltaX*ve,ft=u.value===Ut.Horizontal?0:Y.deltaY*ve;!de&&Y.shiftKey&&u.value!==Ut.Vertical&&!we&&ft&&(we=ft,ft=0),Q.translateBy(ce,-(we/ae)*c.value,-(ft/ae)*c.value);const Ke=G(ce.property("__zoom"));p&&clearTimeout(p),T.value?($.move({event:Y,flowTransform:Ke}),$.viewportChange(Ke),p=setTimeout(()=>{$.moveEnd({event:Y,flowTransform:Ke}),$.viewportChangeEnd(Ke),T.value=!1},150)):(T.value=!0,$.moveStart({event:Y,flowTransform:Ke}),$.viewportChangeStart(Ke))},{passive:!1}):typeof O<"u"&&ce.on("wheel.zoom",function(Y,te){const ne=!N.value&&Y.type==="wheel"&&!Y.ctrlKey,le=L.value||b.value,ae=f.value&&Y.ctrlKey;if(!le&&!l.value&&!ae&&Y.type==="wheel"||ne||U(Y,S.value))return null;Y.preventDefault(),O.call(this,Y,te)},{passive:!1})},{immediate:!0})});function E(K,J){return J===2&&Array.isArray(K)&&K.includes(2)}function D(K,J){return K.x!==J.x&&!Number.isNaN(J.x)||K.y!==J.y&&!Number.isNaN(J.y)||K.zoom!==J.k&&!Number.isNaN(J.k)}function G(K){return{x:K.x,y:K.y,zoom:K.k}}function U(K,J){return K.target.closest(`.${J}`)}return(K,J)=>(ie(),he("div",{ref_key:"viewportRef",ref:P,class:"vue-flow__viewport vue-flow__container"},[ue(id,{"is-selecting":w.value,"selection-key-pressed":oe(H),class:pt({connecting:h.value,dragging:oe(V),draggable:oe(d)===!0||Array.isArray(oe(d))&&oe(d).includes(0)})},{default:me(()=>[ue(ad,null,{default:me(()=>[Ce(K.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),ld=["id"],ud=["id"],cd=["id"],dd=Se({...{name:"A11yDescriptions",compatConfig:{MODE:3}},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Ne();return(r,i)=>(ie(),he(Ve,null,[fe("div",{id:`${oe(Fr)}-${oe(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Pe(oe(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,ld),fe("div",{id:`${oe(Gr)}-${oe(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,ud),oe(n)?Oe("",!0):(ie(),he("div",{key:0,id:`${oe(Fu)}-${oe(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(oe(o)),9,cd))],64))}});function fd(){const e=Ne();_e(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function hd(e,t,n){return n===re.Left?e-t:n===re.Right?e+t:e}function pd(e,t,n){return n===re.Top?e-t:n===re.Bottom?e+t:e}const $o=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=re.Top,type:r}){return ye("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:hd(t,e,o),cy:pd(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};$o.props=["radius","centerX","centerY","position","type"],$o.compatConfig={MODE:3};const Vi=$o,gd=Se({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:o,edgeUpdaterRadius:r,emits:i,nodesSelectionActive:a,noPanClassName:s,getEdgeTypes:l,removeSelectedEdges:u,findEdge:c,findNode:d,isValidConnection:g,multiSelectionActive:f,disableKeyboardA11y:b,elementsSelectable:N,edgesUpdatable:S,edgesFocusable:A,hooks:$}=Ne(),m=pe(()=>c(e.id)),{emit:y,on:V}=yc(m.value,i),F=rt(On),j=gt(),X=Ee(!1),q=Ee(!1),P=Ee(""),x=Ee(null),v=Ee("source"),T=Ee(null),p=be(()=>typeof m.value.selectable>"u"?N.value:m.value.selectable),I=be(()=>typeof m.value.updatable>"u"?S.value:m.value.updatable),_=be(()=>typeof m.value.focusable>"u"?A.value:m.value.focusable);ht(vc,e.id),ht(mc,T);const M=pe(()=>m.value.class instanceof Function?m.value.class(m.value):m.value.class),z=pe(()=>m.value.style instanceof Function?m.value.style(m.value):m.value.style),H=pe(()=>{const k=m.value.type||"default",R=F?.[`edge-${k}`];if(R)return R;let W=m.value.template??l.value[k];if(typeof W=="string"&&j){const Y=Object.keys(j.appContext.components);Y&&Y.includes(k)&&(W=ke(k,!1))}return W&&typeof W!="string"?W:(i.error(new Te($e.EDGE_TYPE_MISSING,W)),!1)}),{handlePointerDown:L}=ki({nodeId:P,handleId:x,type:v,isValidConnection:g,edgeUpdaterType:v,onEdgeUpdate:Z,onEdgeUpdateEnd:w});return()=>{const k=d(m.value.source),R=d(m.value.target),W="pathOptions"in m.value?m.value.pathOptions:{};if(!k&&!R)return i.error(new Te($e.EDGE_SOURCE_TARGET_MISSING,m.value.id,m.value.source,m.value.target)),null;if(!k)return i.error(new Te($e.EDGE_SOURCE_MISSING,m.value.id,m.value.source)),null;if(!R)return i.error(new Te($e.EDGE_TARGET_MISSING,m.value.id,m.value.target)),null;if(!m.value||m.value.hidden||k.hidden||R.hidden)return null;let Y;o.value===at.Strict?Y=k.handleBounds.source:Y=[...k.handleBounds.source||[],...k.handleBounds.target||[]];const te=fi(Y,m.value.sourceHandle);let ne;o.value===at.Strict?ne=R.handleBounds.target:ne=[...R.handleBounds.target||[],...R.handleBounds.source||[]];const le=fi(ne,m.value.targetHandle),ae=te?.position||re.Bottom,de=le?.position||re.Top,{x:ve,y:we}=Tt(k,te,ae),{x:ft,y:Ke}=Tt(R,le,de);return m.value.sourceX=ve,m.value.sourceY=we,m.value.targetX=ft,m.value.targetY=Ke,ye("g",{ref:T,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${H.value===!1?"default":m.value.type||"default"}`,s.value,M.value,{updating:X.value,selected:m.value.selected,animated:m.value.animated,inactive:!p.value&&!$.value.edgeClick.hasListeners()}],tabIndex:_.value?0:void 0,"aria-label":m.value.ariaLabel===null?void 0:m.value.ariaLabel??`Edge from ${m.value.source} to ${m.value.target}`,"aria-describedby":_.value?`${Gr}-${t}`:void 0,"aria-roledescription":"edge",role:_.value?"group":"img",...m.value.domAttributes,onClick:E,onContextmenu:D,onDblclick:G,onMouseenter:U,onMousemove:K,onMouseleave:J,onKeyDown:_.value?O:void 0},[q.value?null:ye(H.value===!1?l.value.default:H.value,{id:e.id,sourceNode:k,targetNode:R,source:m.value.source,target:m.value.target,type:m.value.type,updatable:I.value,selected:m.value.selected,animated:m.value.animated,label:m.value.label,labelStyle:m.value.labelStyle,labelShowBg:m.value.labelShowBg,labelBgStyle:m.value.labelBgStyle,labelBgPadding:m.value.labelBgPadding,labelBgBorderRadius:m.value.labelBgBorderRadius,data:m.value.data,events:{...m.value.events,...V},style:z.value,markerStart:`url('#${Qt(m.value.markerStart,t)}')`,markerEnd:`url('#${Qt(m.value.markerEnd,t)}')`,sourcePosition:ae,targetPosition:de,sourceX:ve,sourceY:we,targetX:ft,targetY:Ke,sourceHandleId:m.value.sourceHandle,targetHandleId:m.value.targetHandle,interactionWidth:m.value.interactionWidth,...W}),[I.value==="source"||I.value===!0?[ye("g",{onMousedown:Q,onMouseenter:C,onMouseout:B},ye(Vi,{position:ae,centerX:ve,centerY:we,radius:r.value,type:"source","data-type":"source"}))]:null,I.value==="target"||I.value===!0?[ye("g",{onMousedown:ce,onMouseenter:C,onMouseout:B},ye(Vi,{position:de,centerX:ft,centerY:Ke,radius:r.value,type:"target","data-type":"target"}))]:null]])};function C(){X.value=!0}function B(){X.value=!1}function Z(k,R){y.update({event:k,edge:m.value,connection:R})}function w(k){y.updateEnd({event:k,edge:m.value}),q.value=!1}function h(k,R){k.button===0&&(q.value=!0,P.value=R?m.value.target:m.value.source,x.value=(R?m.value.targetHandle:m.value.sourceHandle)??null,v.value=R?"target":"source",y.updateStart({event:k,edge:m.value}),L(k))}function E(k){var R;const W={event:k,edge:m.value};p.value&&(a.value=!1,m.value.selected&&f.value?(u([m.value]),(R=T.value)==null||R.blur()):n([m.value])),y.click(W)}function D(k){y.contextMenu({event:k,edge:m.value})}function G(k){y.doubleClick({event:k,edge:m.value})}function U(k){y.mouseEnter({event:k,edge:m.value})}function K(k){y.mouseMove({event:k,edge:m.value})}function J(k){y.mouseLeave({event:k,edge:m.value})}function Q(k){h(k,!0)}function ce(k){h(k,!1)}function O(k){var R;!b.value&&Yr.includes(k.key)&&p.value&&(k.key==="Escape"?((R=T.value)==null||R.blur(),u([c(e.id)])):n([c(e.id)]))}}}),vd=Se({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:o,connectionEndHandle:r,connectionPosition:i,connectionLineType:a,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:u,viewport:c,findNode:d}=Ne(),g=(e=rt(On))==null?void 0:e["connection-line"],f=pe(()=>{var $;return d(($=o.value)==null?void 0:$.nodeId)}),b=pe(()=>{var $;return d(($=r.value)==null?void 0:$.nodeId)??null}),N=pe(()=>({x:(i.value.x-c.value.x)/c.value.zoom,y:(i.value.y-c.value.y)/c.value.zoom})),S=pe(()=>l.value.markerStart?`url(#${Qt(l.value.markerStart,t)})`:""),A=pe(()=>l.value.markerEnd?`url(#${Qt(l.value.markerEnd,t)})`:"");return()=>{var $,m,y;if(!f.value||!o.value)return null;const V=o.value.id,F=o.value.type,j=f.value.handleBounds;let X=j?.[F]??[];if(n.value===at.Loose){const z=j?.[F==="source"?"target":"source"]??[];X=[...X,...z]}if(!X)return null;const q=(V?X.find(z=>z.id===V):X[0])??null,P=q?.position??re.Top,{x,y:v}=Tt(f.value,q,P);let T=null;b.value&&(n.value===at.Strict?T=(($=b.value.handleBounds[F==="source"?"target":"source"])==null?void 0:$.find(z=>{var H;return z.id===((H=r.value)==null?void 0:H.id)}))||null:T=((m=[...b.value.handleBounds.source??[],...b.value.handleBounds.target??[]])==null?void 0:m.find(z=>{var H;return z.id===((H=r.value)==null?void 0:H.id)}))||null);const p=((y=r.value)==null?void 0:y.position)??(P?xo[P]:null);if(!P||!p)return null;const I=a.value??l.value.type??bt.Bezier;let _="";const M={sourceX:x,sourceY:v,sourcePosition:P,targetX:N.value.x,targetY:N.value.y,targetPosition:p};return I===bt.Bezier?[_]=Ti(M):I===bt.Step?[_]=Co({...M,borderRadius:0}):I===bt.SmoothStep?[_]=Co(M):I===bt.SimpleBezier?[_]=zi(M):_=`M${x},${v} ${N.value.x},${N.value.y}`,ye("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},ye("g",{class:"vue-flow__connection"},g?ye(g,{sourceX:x,sourceY:v,sourcePosition:P,targetX:N.value.x,targetY:N.value.y,targetPosition:p,sourceNode:f.value,sourceHandle:q,targetNode:b.value,targetHandle:T,markerEnd:A.value,markerStart:S.value,connectionStatus:u.value}):ye("path",{d:_,class:[l.value.class,u.value,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":A.value,"marker-start":S.value})))}}}),md=["id","markerWidth","markerHeight","markerUnits","orient"],_d=Se({...{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)=>(ie(),he("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===oe(go).ArrowClosed?(ie(),he("polyline",{key:0,style:Re({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)):Oe("",!0),t.type===oe(go).Arrow?(ie(),he("polyline",{key:1,style:Re({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Oe("",!0)],8,md))}}),yd={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},wd=Se({...{name:"MarkerDefinitions",compatConfig:{MODE:3}},setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:r}=Ne(),i=pe(()=>{const a=new Set,s=[],l=u=>{if(u){const c=Qt(u,t);a.has(c)||(typeof u=="object"?s.push({...u,id:c,color:u.color||r.value}):s.push({id:c,color:r.value,type:u}),a.add(c))}};for(const u of[o.value.markerEnd,o.value.markerStart])l(u);for(const u of n.value)for(const c of[u.markerStart,u.markerEnd])l(c);return s.sort((u,c)=>u.id.localeCompare(c.id))});return(a,s)=>(ie(),he("svg",yd,[fe("defs",null,[(ie(!0),he(Ve,null,nn(i.value,l=>(ie(),De(_d,{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))])]))}}),bd=Se({...{name:"Edges",compatConfig:{MODE:3}},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Ne();return(r,i)=>(ie(),he(Ve,null,[ue(wd),(ie(!0),he(Ve,null,nn(oe(n),a=>(ie(),he("svg",{key:a.id,class:"vue-flow__edges vue-flow__container",style:Re({zIndex:oe(rc)(a,oe(t),oe(o))})},[ue(oe(gd),{id:a.id},null,8,["id"])],4))),128)),ue(oe(vd))],64))}}),xd=Se({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:o,nodesSelectionActive:r,multiSelectionActive:i,emits:a,removeSelectedNodes:s,addSelectedNodes:l,updateNodeDimensions:u,onUpdateNodeInternals:c,getNodeTypes:d,nodeExtent:g,elevateNodesOnSelect:f,disableKeyboardA11y:b,ariaLiveMessage:N,snapToGrid:S,snapGrid:A,nodeDragThreshold:$,nodesDraggable:m,elementsSelectable:y,nodesConnectable:V,nodesFocusable:F,hooks:j}=Ne(),X=Ee(null);ht(Ni,X),ht(Ei,e.id);const q=rt(On),P=gt(),x=$i(),{node:v,parentNode:T}=Ci(e.id),{emit:p,on:I}=Ec(v,a),_=be(()=>typeof v.draggable>"u"?m.value:v.draggable),M=be(()=>typeof v.selectable>"u"?y.value:v.selectable),z=be(()=>typeof v.connectable>"u"?V.value:v.connectable),H=be(()=>typeof v.focusable>"u"?F.value:v.focusable),L=pe(()=>M.value||_.value||j.value.nodeClick.hasListeners()||j.value.nodeDoubleClick.hasListeners()||j.value.nodeMouseEnter.hasListeners()||j.value.nodeMouseMove.hasListeners()||j.value.nodeMouseLeave.hasListeners()),C=be(()=>!!v.dimensions.width&&!!v.dimensions.height),B=pe(()=>{const R=v.type||"default",W=q?.[`node-${R}`];if(W)return W;let Y=v.template||d.value[R];if(typeof Y=="string"&&P){const te=Object.keys(P.appContext.components);te&&te.includes(R)&&(Y=ke(R,!1))}return Y&&typeof Y!="string"?Y:(a.error(new Te($e.NODE_TYPE_MISSING,Y)),!1)}),Z=Si({id:e.id,el:X,disabled:()=>!_.value,selectable:M,dragHandle:()=>v.dragHandle,onStart(R){p.dragStart(R)},onDrag(R){p.drag(R)},onStop(R){p.dragStop(R)},onClick(R){O(R)}}),w=pe(()=>v.class instanceof Function?v.class(v):v.class),h=pe(()=>{const R=(v.style instanceof Function?v.style(v):v.style)||{},W=v.width instanceof Function?v.width(v):v.width,Y=v.height instanceof Function?v.height(v):v.height;return!R.width&&W&&(R.width=typeof W=="string"?W:`${W}px`),!R.height&&Y&&(R.height=typeof Y=="string"?Y:`${Y}px`),R}),E=be(()=>Number(v.zIndex??h.value.zIndex??0));return c(R=>{(R.includes(e.id)||!R.length)&&G()}),qe(()=>{_e(()=>v.hidden,(R=!1,W,Y)=>{!R&&X.value&&(e.resizeObserver.observe(X.value),Y(()=>{X.value&&e.resizeObserver.unobserve(X.value)}))},{immediate:!0,flush:"post"})}),_e([()=>v.type,()=>v.sourcePosition,()=>v.targetPosition],()=>{Ae(()=>{u([{id:e.id,nodeElement:X.value,forceUpdate:!0}])})}),_e([()=>v.position.x,()=>v.position.y,()=>{var R;return(R=T.value)==null?void 0:R.computedPosition.x},()=>{var R;return(R=T.value)==null?void 0:R.computedPosition.y},()=>{var R;return(R=T.value)==null?void 0:R.computedPosition.z},E,()=>v.selected,()=>v.dimensions.height,()=>v.dimensions.width,()=>{var R;return(R=T.value)==null?void 0:R.dimensions.height},()=>{var R;return(R=T.value)==null?void 0:R.dimensions.width}],([R,W,Y,te,ne,le])=>{const ae={x:R,y:W,z:le+(f.value&&v.selected?1e3:0)};typeof Y<"u"&&typeof te<"u"?v.computedPosition=Ju({x:Y,y:te,z:ne},ae):v.computedPosition=ae},{flush:"post",immediate:!0}),_e([()=>v.extent,g],([R,W],[Y,te])=>{(R!==Y||W!==te)&&D()}),v.extent==="parent"||typeof v.extent=="object"&&"range"in v.extent&&v.extent.range==="parent"?jn(()=>C).toBe(!0).then(D):D(),()=>v.hidden?null:ye("div",{ref:X,"data-id":v.id,class:["vue-flow__node",`vue-flow__node-${B.value===!1?"default":v.type||"default"}`,{[n.value]:_.value,dragging:Z?.value,draggable:_.value,selected:v.selected,selectable:M.value,parent:v.isParent},w.value],style:{visibility:C.value?"visible":"hidden",zIndex:v.computedPosition.z??E.value,transform:`translate(${v.computedPosition.x}px,${v.computedPosition.y}px)`,pointerEvents:L.value?"all":"none",...h.value},tabIndex:H.value?0:void 0,role:H.value?"group":void 0,"aria-describedby":b.value?void 0:`${Fr}-${t}`,"aria-label":v.ariaLabel,"aria-roledescription":"node",...v.domAttributes,onMouseenter:U,onMousemove:K,onMouseleave:J,onContextmenu:Q,onClick:O,onDblclick:ce,onKeydown:k},[ye(B.value===!1?d.value.default:B.value,{id:v.id,type:v.type,data:v.data,events:{...v.events,...I},selected:v.selected,resizing:v.resizing,dragging:Z.value,connectable:z.value,position:v.computedPosition,dimensions:v.dimensions,isValidTargetPos:v.isValidTargetPos,isValidSourcePos:v.isValidSourcePos,parent:v.parentNode,parentNodeId:v.parentNode,zIndex:v.computedPosition.z??E.value,targetPosition:v.targetPosition,sourcePosition:v.sourcePosition,label:v.label,dragHandle:v.dragHandle,onUpdateNodeInternals:G})]);function D(){const R=v.computedPosition,{computedPosition:W,position:Y}=yo(v,S.value?Dn(R,A.value):R,a.error,g.value,T.value);(v.computedPosition.x!==W.x||v.computedPosition.y!==W.y)&&(v.computedPosition={...v.computedPosition,...W}),(v.position.x!==Y.x||v.position.y!==Y.y)&&(v.position=Y)}function G(){X.value&&u([{id:e.id,nodeElement:X.value,forceUpdate:!0}])}function U(R){Z?.value||p.mouseEnter({event:R,node:v})}function K(R){Z?.value||p.mouseMove({event:R,node:v})}function J(R){Z?.value||p.mouseLeave({event:R,node:v})}function Q(R){return p.contextMenu({event:R,node:v})}function ce(R){return p.doubleClick({event:R,node:v})}function O(R){M.value&&(!o.value||!_.value||$.value>0)&&Eo(v,i.value,l,s,r,!1,X.value),p.click({event:R,node:v})}function k(R){if(!(vo(R)||b.value))if(Yr.includes(R.key)&&M.value){const W=R.key==="Escape";Eo(v,i.value,l,s,r,W,X.value)}else _.value&&v.selected&&Dt[R.key]&&(R.preventDefault(),N.value=`Moved selected node ${R.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~v.position.x}, y: ${~~v.position.y}`,x({x:Dt[R.key].x,y:Dt[R.key].y},R.shiftKey))}}});function Ed(e={includeHiddenNodes:!1}){const{nodes:t}=Ne();return pe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&(n?.handleBounds===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const Nd={class:"vue-flow__nodes vue-flow__container"},Sd=Se({...{name:"Nodes",compatConfig:{MODE:3}},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Ne(),r=Ed(),i=Ee();return _e(r,a=>{a&&Ae(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),qe(()=>{i.value=new ResizeObserver(a=>{const s=a.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));Ae(()=>n(s))})}),Gn(()=>{var a;return(a=i.value)==null?void 0:a.disconnect()}),(a,s)=>(ie(),he("div",Nd,[i.value?(ie(!0),he(Ve,{key:0},nn(oe(t),(l,u,c,d)=>{const g=[l.id];if(d&&d.key===l.id&&zo(d,g))return d;const f=(ie(),De(oe(xd),{id:l.id,key:l.id,"resize-observer":i.value},null,8,["id","resize-observer"]));return f.memo=g,f},s,0),128)):Oe("",!0)]))}});function kd(){const{emits:e}=Ne();qe(()=>{if(mi()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Te($e.MISSING_STYLES))}})}const Cd=fe("div",{class:"vue-flow__edge-labels"},null,-1),$d=Se({...{name:"VueFlow",compatConfig:{MODE:3}},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const o=e,r=Mo(),i=Wn(o,"modelValue",n),a=Wn(o,"nodes",n),s=Wn(o,"edges",n),l=Ne(o),u=Cc({modelValue:i,nodes:a,edges:s},o,l);return Ic(n,l.hooks),fd(),kd(),ht(On,r),Do(u),t(l),(c,d)=>(ie(),he("div",{ref:oe(l).vueFlowRef,class:"vue-flow"},[ue(sd,null,{default:me(()=>[ue(bd),Cd,ue(Sd),Ce(c.$slots,"zoom-pane")]),_:3}),Ce(c.$slots,"default"),ue(dd)],512))}}),Id=Se({...{name:"Panel",compatConfig:{MODE:3}},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ne(),o=pe(()=>`${t.position}`.split("-"));return(r,i)=>(ie(),he("div",{class:pt(["vue-flow__panel",o.value]),style:Re({pointerEvents:oe(n)?"none":"all"})},[Ce(r.$slots,"default")],6))}}),Md={name:"ControlButton",compatConfig:{MODE:3}},Dd=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Od={type:"button",class:"vue-flow__controls-button"};function Td(e,t,n,o,r,i){return ie(),he("button",Od,[Ce(e.$slots,"default")])}const tn=Dd(Md,[["render",Td]]),Pd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},zd=[fe("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function Ad(e,t){return ie(),he("svg",Pd,zd)}const Rd={render:Ad},Bd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Vd=[fe("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Hd(e,t){return ie(),he("svg",Bd,Vd)}const Ld={render:Hd},Fd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Gd=[fe("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 Yd(e,t){return ie(),he("svg",Fd,Gd)}const Xd={render:Yd},jd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Wd=[fe("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 Ud(e,t){return ie(),he("svg",jd,Wd)}const Zd={render:Ud},Kd={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},qd=[fe("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 Jd(e,t){return ie(),he("svg",Kd,qd)}const Qd={render:Jd},ef=Se({...{name:"Controls",compatConfig:{MODE:3}},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Hr.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:o,elementsSelectable:r,setInteractive:i,zoomIn:a,zoomOut:s,fitView:l,viewport:u,minZoom:c,maxZoom:d}=Ne(),g=be(()=>n.value||o.value||r.value),f=be(()=>u.value.zoom<=c.value),b=be(()=>u.value.zoom>=d.value);function N(){a(),t("zoomIn")}function S(){s(),t("zoomOut")}function A(){l(e.fitViewParams),t("fitView")}function $(){i(!g.value),t("interactionChange",!g.value)}return(m,y)=>(ie(),De(oe(Id),{class:"vue-flow__controls",position:m.position},{default:me(()=>[Ce(m.$slots,"top"),m.showZoom?(ie(),he(Ve,{key:0},[Ce(m.$slots,"control-zoom-in",{},()=>[ue(tn,{class:"vue-flow__controls-zoomin",disabled:b.value,onClick:N},{default:me(()=>[Ce(m.$slots,"icon-zoom-in",{},()=>[(ie(),De(vt(oe(Rd))))])]),_:3},8,["disabled"])]),Ce(m.$slots,"control-zoom-out",{},()=>[ue(tn,{class:"vue-flow__controls-zoomout",disabled:f.value,onClick:S},{default:me(()=>[Ce(m.$slots,"icon-zoom-out",{},()=>[(ie(),De(vt(oe(Ld))))])]),_:3},8,["disabled"])])],64)):Oe("",!0),m.showFitView?Ce(m.$slots,"control-fit-view",{key:1},()=>[ue(tn,{class:"vue-flow__controls-fitview",onClick:A},{default:me(()=>[Ce(m.$slots,"icon-fit-view",{},()=>[(ie(),De(vt(oe(Xd))))])]),_:3})]):Oe("",!0),m.showInteractive?Ce(m.$slots,"control-interactive",{key:2},()=>[m.showInteractive?(ie(),De(tn,{key:0,class:"vue-flow__controls-interactive",onClick:$},{default:me(()=>[g.value?Ce(m.$slots,"icon-unlock",{key:0},()=>[(ie(),De(vt(oe(Qd))))]):Oe("",!0),g.value?Oe("",!0):Ce(m.$slots,"icon-lock",{key:1},()=>[(ie(),De(vt(oe(Zd))))])]),_:3})):Oe("",!0)]):Oe("",!0),Ce(m.$slots,"default")]),_:3},8,["position"]))}});var ot=(e=>(e.Lines="lines",e.Dots="dots",e))(ot||{});const Hi=function({dimensions:e,size:t,color:n}){return ye("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Li=function({radius:e,color:t}){return ye("circle",{cx:e,cy:e,r:e,fill:t})};ot.Lines+"",ot.Dots+"";const tf={[ot.Dots]:"#81818a",[ot.Lines]:"#eee"},nf=["id","x","y","width","height","patternTransform"],of={key:2,height:"100",width:"100"},rf=["fill"],af=["x","y","fill"],sf=Se({...{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(),o=pe(()=>{const a=n.value.zoom,[s,l]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],u=[s*a||1,l*a||1],c=e.size*a,[d,g]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],f=[d*a||1+u[0]/2,g*a||1+u[1]/2];return{scaledGap:u,offset:f,size:c}}),r=be(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),i=be(()=>e.color||e.patternColor||tf[e.variant||ot.Dots]);return(a,s)=>(ie(),he("svg",{class:"vue-flow__background vue-flow__container",style:Re({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[Ce(a.$slots,"pattern-container",{id:r.value},()=>[fe("pattern",{id:r.value,x:oe(n).x%o.value.scaledGap[0],y:oe(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[Ce(a.$slots,"pattern",{},()=>[a.variant===oe(ot).Lines?(ie(),De(oe(Hi),{key:0,size:a.lineWidth,color:i.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===oe(ot).Dots?(ie(),De(oe(Li),{key:1,color:i.value,radius:o.value.size/2},null,8,["color","radius"])):Oe("",!0),a.bgColor?(ie(),he("svg",of,[fe("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,rf)])):Oe("",!0)])],8,nf)]),fe("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,af),Ce(a.$slots,"default",{id:r.value})],4))}}),lf={name:"DetailsTable",components:{RawBuffer:Go},mixins:[Fo],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,o])=>!e.includes(n)).map(([n,o])=>({key:this.formatKey(n),value:this.formatValue(o)}))},buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},methods:{pause:function(){this.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)}}},uf={class:"details-table"},cf={class:"text-wrap"},df={key:1,class:"d-flex justify-center align-center pa-4"};function ff(e,t,n,o,r,i){const a=ke("v-btn"),s=ke("v-spacer"),l=ke("v-card-title"),u=ke("v-data-table"),c=ke("v-progress-circular"),d=ke("v-col"),g=ke("raw-buffer"),f=ke("v-row"),b=ke("v-card-text"),N=ke("v-card");return ie(),De(N,{"max-height":"80vh",class:"d-flex flex-column"},{default:me(()=>[ue(l,{class:"d-flex align-center flex-shrink-0"},{default:me(()=>[He(Pe(n.mode)+" Properties: "+Pe(i.shownDetails.name)+" ",1),ue(a,{icon:i.buttonIcon,variant:"text","data-test":"pause",onClick:i.pause},null,8,["icon","onClick"]),ue(s),ue(a,{icon:"mdi-close",variant:"text","data-test":"close",onClick:i.closeClick},null,8,["onClick"])]),_:1}),ue(b,{class:"overflow-y-auto flex-grow-1 pa-0"},{default:me(()=>[fe("div",uf,[ue(f,null,{default:me(()=>[ue(d,{cols:"4"},{default:me(()=>[i.shownDetails?(ie(),De(u,{key:0,headers:r.headers,items:i.detailsItems,"items-per-page":-1,"hide-default-footer":"",density:"compact",class:"details-table"},{"item.value":me(({item:S})=>[fe("span",cf,Pe(S.value),1)]),_:1},8,["headers","items"])):(ie(),he("div",df,[ue(c,{indeterminate:"",color:"primary"})]))]),_:1}),ue(d,{cols:"8"},{default:me(()=>[fe("div",null,Pe(i.upperData.label)+": "+Pe(i.upperData.time),1),ue(g,{modelValue:i.upperData.data,"onUpdate:modelValue":t[0]||(t[0]=S=>i.upperData.data=S)},null,8,["modelValue"]),fe("div",null,Pe(i.lowerData.label)+": "+Pe(i.lowerData.time),1),ue(g,{modelValue:i.lowerData.data,"onUpdate:modelValue":t[1]||(t[1]=S=>i.lowerData.data=S)},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1})}const hf=it(lf,[["render",ff],["__scopeId","data-v-06ee5ec0"]]),pf={name:"InterfaceNode",components:{Handle:dt},props:{data:{type:Object,required:!0}},data(){return{}},computed:{interfaceStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},gf={class:"node-label"};function vf(e,t,n,o,r,i){const a=ke("v-icon"),s=ke("Handle");return ie(),he("div",{class:"interface-node",style:Re(i.interfaceStyle)},[ue(a,{color:"#1d85e1"},{default:me(()=>[...t[0]||(t[0]=[He("mdi-swap-horizontal-bold",-1)])]),_:1}),fe("div",gf,Pe(n.data.label),1),t[1]||(t[1]=fe("div",{class:"node-label"},"Interface",-1)),ue(s,{id:"interface__cmd__input",type:"target",position:"left",style:{top:"112px"}}),ue(s,{id:"interface__tlm__input",type:"target",position:"left",style:{top:"162px"}}),ue(s,{id:"interface__cmd__output",type:"source",position:"right",style:{top:"112px"}}),ue(s,{id:"interface__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=fe("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=fe("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[4]||(t[4]=fe("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[5]||(t[5]=fe("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],4)}const mf=it(pf,[["render",vf],["__scopeId","data-v-31945a3b"]]),_f={name:"RouterNode",components:{Handle:dt},props:{data:{type:Object,required:!0}},data(){return{}},computed:{routerStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},yf={class:"node-label"};function wf(e,t,n,o,r,i){const a=ke("v-icon"),s=ke("Handle");return ie(),he("div",{class:"router-node",style:Re(i.routerStyle)},[ue(a,{color:"#ba1de1"},{default:me(()=>[...t[0]||(t[0]=[He("mdi-call-split",-1)])]),_:1}),fe("div",yf,Pe(n.data.label),1),t[1]||(t[1]=fe("div",{class:"node-label"},"Router",-1)),ue(s,{id:"router__cmd__input",type:"target",position:"left",style:{top:"112px"}}),ue(s,{id:"router__tlm__input",type:"target",position:"left",style:{top:"162px"}}),ue(s,{id:"router__cmd__output",type:"source",position:"right",style:{top:"112px"}}),ue(s,{id:"router__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=fe("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=fe("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[4]||(t[4]=fe("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[5]||(t[5]=fe("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],4)}const bf=it(_f,[["render",wf],["__scopeId","data-v-b1fbfb62"]]),xf={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},Ef={class:"cosmos-node"},Nf={class:"node-label"};function Sf(e,t,n,o,r,i){const a=ke("Handle"),s=ke("v-icon");return ie(),he("div",Ef,[ue(a,{id:"cosmos__cmd",type:"target",position:"right",style:{top:"114px"}}),ue(a,{id:"cosmos__tlm",type:"target",position:"right",style:{top:"164px"}}),t[1]||(t[1]=fe("div",{style:{position:"absolute",top:"104px",right:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=fe("div",{style:{position:"absolute",top:"154px",right:"8px",color:"black"}}," TLM ",-1)),ue(s,{color:"#10b981"},{default:me(()=>[...t[0]||(t[0]=[He("mdi-rocket-launch",-1)])]),_:1}),fe("div",Nf,Pe(n.data.label),1),t[3]||(t[3]=fe("div",{class:"node-label"},"Processing",-1))])}const kf=it(xf,[["render",Sf],["__scopeId","data-v-c2b5368b"]]),Cf={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},$f={class:"target-node"},If={class:"node-label"};function Mf(e,t,n,o,r,i){const a=ke("Handle"),s=ke("v-icon");return ie(),he("div",$f,[ue(a,{id:"target__cmd",type:"target",position:"left",style:{top:"114px"}}),ue(a,{id:"target__tlm",type:"target",position:"left",style:{top:"164px"}}),t[1]||(t[1]=fe("div",{style:{position:"absolute",top:"104px",left:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=fe("div",{style:{position:"absolute",top:"154px",left:"8px",color:"black"}}," TLM ",-1)),ue(s,{color:"#10b981"},{default:me(()=>[...t[0]||(t[0]=[He("mdi-target",-1)])]),_:1}),fe("div",If,Pe(n.data.label),1),t[3]||(t[3]=fe("div",{class:"node-label"},"Target",-1))])}const Df=it(Cf,[["render",Mf],["__scopeId","data-v-125c8608"]]),Of={name:"WriteProtocolNode",props:{data:{type:Object,required:!0}}},Tf={class:"write-protocol-node"},Pf={class:"protocol-label"};function zf(e,t,n,o,r,i){const a=ke("v-icon");return ie(),he("div",Tf,[ue(a,{color:"#f97316",size:"small"},{default:me(()=>[...t[0]||(t[0]=[He("mdi-arrow-right-bold",-1)])]),_:1}),fe("div",Pf,Pe(n.data.label),1)])}const Af=it(Of,[["render",zf],["__scopeId","data-v-8e435f75"]]),Rf={name:"ReadProtocolNode",props:{data:{type:Object,required:!0}}},Bf={class:"read-protocol-node"},Vf={class:"protocol-label"};function Hf(e,t,n,o,r,i){const a=ke("v-icon");return ie(),he("div",Bf,[ue(a,{color:"#06b6d4",size:"small"},{default:me(()=>[...t[0]||(t[0]=[He("mdi-arrow-left-bold",-1)])]),_:1}),fe("div",Vf,Pe(n.data.label),1)])}const Lf=it(Rf,[["render",Hf],["__scopeId","data-v-791bf23d"]]);var xe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ye=xe((e,t)=>{var n=Object.defineProperty,o=(T,p,I)=>p in T?n(T,p,{enumerable:!0,configurable:!0,writable:!0,value:I}):T[p]=I,r=(T,p)=>()=>(p||T((p={exports:{}}).exports,p),p.exports),i=(T,p,I)=>o(T,typeof p!="symbol"?p+"":p,I),a=r((T,p)=>{var I="\0",_="\0",M="",z=class{constructor(w){i(this,"_isDirected",!0),i(this,"_isMultigraph",!1),i(this,"_isCompound",!1),i(this,"_label"),i(this,"_defaultNodeLabelFn",()=>{}),i(this,"_defaultEdgeLabelFn",()=>{}),i(this,"_nodes",{}),i(this,"_in",{}),i(this,"_preds",{}),i(this,"_out",{}),i(this,"_sucs",{}),i(this,"_edgeObjs",{}),i(this,"_edgeLabels",{}),i(this,"_nodeCount",0),i(this,"_edgeCount",0),i(this,"_parent"),i(this,"_children"),w&&(this._isDirected=Object.hasOwn(w,"directed")?w.directed:!0,this._isMultigraph=Object.hasOwn(w,"multigraph")?w.multigraph:!1,this._isCompound=Object.hasOwn(w,"compound")?w.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[_]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(w){return this._label=w,this}graph(){return this._label}setDefaultNodeLabel(w){return this._defaultNodeLabelFn=w,typeof w!="function"&&(this._defaultNodeLabelFn=()=>w),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var w=this;return this.nodes().filter(h=>Object.keys(w._in[h]).length===0)}sinks(){var w=this;return this.nodes().filter(h=>Object.keys(w._out[h]).length===0)}setNodes(w,h){var E=arguments,D=this;return w.forEach(function(G){E.length>1?D.setNode(G,h):D.setNode(G)}),this}setNode(w,h){return Object.hasOwn(this._nodes,w)?(arguments.length>1&&(this._nodes[w]=h),this):(this._nodes[w]=arguments.length>1?h:this._defaultNodeLabelFn(w),this._isCompound&&(this._parent[w]=_,this._children[w]={},this._children[_][w]=!0),this._in[w]={},this._preds[w]={},this._out[w]={},this._sucs[w]={},++this._nodeCount,this)}node(w){return this._nodes[w]}hasNode(w){return Object.hasOwn(this._nodes,w)}removeNode(w){var h=this;if(Object.hasOwn(this._nodes,w)){var E=D=>h.removeEdge(h._edgeObjs[D]);delete this._nodes[w],this._isCompound&&(this._removeFromParentsChildList(w),delete this._parent[w],this.children(w).forEach(function(D){h.setParent(D)}),delete this._children[w]),Object.keys(this._in[w]).forEach(E),delete this._in[w],delete this._preds[w],Object.keys(this._out[w]).forEach(E),delete this._out[w],delete this._sucs[w],--this._nodeCount}return this}setParent(w,h){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(h===void 0)h=_;else{h+="";for(var E=h;E!==void 0;E=this.parent(E))if(E===w)throw new Error("Setting "+h+" as parent of "+w+" would create a cycle");this.setNode(h)}return this.setNode(w),this._removeFromParentsChildList(w),this._parent[w]=h,this._children[h][w]=!0,this}_removeFromParentsChildList(w){delete this._children[this._parent[w]][w]}parent(w){if(this._isCompound){var h=this._parent[w];if(h!==_)return h}}children(w=_){if(this._isCompound){var h=this._children[w];if(h)return Object.keys(h)}else{if(w===_)return this.nodes();if(this.hasNode(w))return[]}}predecessors(w){var h=this._preds[w];if(h)return Object.keys(h)}successors(w){var h=this._sucs[w];if(h)return Object.keys(h)}neighbors(w){var h=this.predecessors(w);if(h){let D=new Set(h);for(var E of this.successors(w))D.add(E);return Array.from(D.values())}}isLeaf(w){var h;return this.isDirected()?h=this.successors(w):h=this.neighbors(w),h.length===0}filterNodes(w){var h=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});h.setGraph(this.graph());var E=this;Object.entries(this._nodes).forEach(function([U,K]){w(U)&&h.setNode(U,K)}),Object.values(this._edgeObjs).forEach(function(U){h.hasNode(U.v)&&h.hasNode(U.w)&&h.setEdge(U,E.edge(U))});var D={};function G(U){var K=E.parent(U);return K===void 0||h.hasNode(K)?(D[U]=K,K):K in D?D[K]:G(K)}return this._isCompound&&h.nodes().forEach(U=>h.setParent(U,G(U))),h}setDefaultEdgeLabel(w){return this._defaultEdgeLabelFn=w,typeof w!="function"&&(this._defaultEdgeLabelFn=()=>w),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(w,h){var E=this,D=arguments;return w.reduce(function(G,U){return D.length>1?E.setEdge(G,U,h):E.setEdge(G,U),U}),this}setEdge(){var w,h,E,D,G=!1,U=arguments[0];typeof U=="object"&&U!==null&&"v"in U?(w=U.v,h=U.w,E=U.name,arguments.length===2&&(D=arguments[1],G=!0)):(w=U,h=arguments[1],E=arguments[3],arguments.length>2&&(D=arguments[2],G=!0)),w=""+w,h=""+h,E!==void 0&&(E=""+E);var K=C(this._isDirected,w,h,E);if(Object.hasOwn(this._edgeLabels,K))return G&&(this._edgeLabels[K]=D),this;if(E!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(w),this.setNode(h),this._edgeLabels[K]=G?D:this._defaultEdgeLabelFn(w,h,E);var J=B(this._isDirected,w,h,E);return w=J.v,h=J.w,Object.freeze(J),this._edgeObjs[K]=J,H(this._preds[h],w),H(this._sucs[w],h),this._in[h][K]=J,this._out[w][K]=J,this._edgeCount++,this}edge(w,h,E){var D=arguments.length===1?Z(this._isDirected,arguments[0]):C(this._isDirected,w,h,E);return this._edgeLabels[D]}edgeAsObj(){let w=this.edge(...arguments);return typeof w!="object"?{label:w}:w}hasEdge(w,h,E){var D=arguments.length===1?Z(this._isDirected,arguments[0]):C(this._isDirected,w,h,E);return Object.hasOwn(this._edgeLabels,D)}removeEdge(w,h,E){var D=arguments.length===1?Z(this._isDirected,arguments[0]):C(this._isDirected,w,h,E),G=this._edgeObjs[D];return G&&(w=G.v,h=G.w,delete this._edgeLabels[D],delete this._edgeObjs[D],L(this._preds[h],w),L(this._sucs[w],h),delete this._in[h][D],delete this._out[w][D],this._edgeCount--),this}inEdges(w,h){return this.isDirected()?this.filterEdges(this._in[w],w,h):this.nodeEdges(w,h)}outEdges(w,h){return this.isDirected()?this.filterEdges(this._out[w],w,h):this.nodeEdges(w,h)}nodeEdges(w,h){if(w in this._nodes)return this.filterEdges({...this._in[w],...this._out[w]},w,h)}filterEdges(w,h,E){if(w){var D=Object.values(w);return E?D.filter(function(G){return G.v===h&&G.w===E||G.v===E&&G.w===h}):D}}};function H(w,h){w[h]?w[h]++:w[h]=1}function L(w,h){--w[h]||delete w[h]}function C(w,h,E,D){var G=""+h,U=""+E;if(!w&&G>U){var K=G;G=U,U=K}return G+M+U+M+(D===void 0?I:D)}function B(w,h,E,D){var G=""+h,U=""+E;if(!w&&G>U){var K=G;G=U,U=K}var J={v:G,w:U};return D&&(J.name=D),J}function Z(w,h){return C(w,h.v,h.w,h.name)}p.exports=z}),s=r((T,p)=>{p.exports="3.0.2"}),l=r((T,p)=>{p.exports={Graph:a(),version:s()}}),u=r((T,p)=>{var I=a();p.exports={write:_,read:H};function _(L){var C={options:{directed:L.isDirected(),multigraph:L.isMultigraph(),compound:L.isCompound()},nodes:M(L),edges:z(L)};return L.graph()!==void 0&&(C.value=structuredClone(L.graph())),C}function M(L){return L.nodes().map(function(C){var B=L.node(C),Z=L.parent(C),w={v:C};return B!==void 0&&(w.value=B),Z!==void 0&&(w.parent=Z),w})}function z(L){return L.edges().map(function(C){var B=L.edge(C),Z={v:C.v,w:C.w};return C.name!==void 0&&(Z.name=C.name),B!==void 0&&(Z.value=B),Z})}function H(L){var C=new I(L.options).setGraph(L.value);return L.nodes.forEach(function(B){C.setNode(B.v,B.value),B.parent&&C.setParent(B.v,B.parent)}),L.edges.forEach(function(B){C.setEdge({v:B.v,w:B.w,name:B.name},B.value)}),C}}),c=r((T,p)=>{p.exports=_;var I=()=>1;function _(z,H,L,C){return M(z,String(H),L||I,C||function(B){return z.outEdges(B)})}function M(z,H,L,C){var B={},Z=!0,w=0,h=z.nodes(),E=function(K){var J=L(K);B[K.v].distance+J<B[K.w].distance&&(B[K.w]={distance:B[K.v].distance+J,predecessor:K.v},Z=!0)},D=function(){h.forEach(function(K){C(K).forEach(function(J){var Q=J.v===K?J.v:J.w,ce=Q===J.v?J.w:J.v;E({v:Q,w:ce})})})};h.forEach(function(K){var J=K===H?0:Number.POSITIVE_INFINITY;B[K]={distance:J}});for(var G=h.length,U=1;U<G&&(Z=!1,w++,D(),!!Z);U++);if(w===G-1&&(Z=!1,D(),Z))throw new Error("The graph contains a negative weight cycle");return B}}),d=r((T,p)=>{p.exports=I;function I(_){var M={},z=[],H;function L(C){Object.hasOwn(M,C)||(M[C]=!0,H.push(C),_.successors(C).forEach(L),_.predecessors(C).forEach(L))}return _.nodes().forEach(function(C){H=[],L(C),H.length&&z.push(H)}),z}}),g=r((T,p)=>{var I=class{constructor(){i(this,"_arr",[]),i(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(_){return _.key})}has(_){return Object.hasOwn(this._keyIndices,_)}priority(_){var M=this._keyIndices[_];if(M!==void 0)return this._arr[M].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(_,M){var z=this._keyIndices;if(_=String(_),!Object.hasOwn(z,_)){var H=this._arr,L=H.length;return z[_]=L,H.push({key:_,priority:M}),this._decrease(L),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var _=this._arr.pop();return delete this._keyIndices[_.key],this._heapify(0),_.key}decrease(_,M){var z=this._keyIndices[_];if(M>this._arr[z].priority)throw new Error("New priority is greater than current priority. Key: "+_+" Old: "+this._arr[z].priority+" New: "+M);this._arr[z].priority=M,this._decrease(z)}_heapify(_){var M=this._arr,z=2*_,H=z+1,L=_;z<M.length&&(L=M[z].priority<M[L].priority?z:L,H<M.length&&(L=M[H].priority<M[L].priority?H:L),L!==_&&(this._swap(_,L),this._heapify(L)))}_decrease(_){for(var M=this._arr,z=M[_].priority,H;_!==0&&(H=_>>1,!(M[H].priority<z));)this._swap(_,H),_=H}_swap(_,M){var z=this._arr,H=this._keyIndices,L=z[_],C=z[M];z[_]=C,z[M]=L,H[C.key]=_,H[L.key]=M}};p.exports=I}),f=r((T,p)=>{var I=g();p.exports=M;var _=()=>1;function M(H,L,C,B){var Z=function(w){return H.outEdges(w)};return z(H,String(L),C||_,B||Z)}function z(H,L,C,B){var Z={},w=new I,h,E,D=function(G){var U=G.v!==h?G.v:G.w,K=Z[U],J=C(G),Q=E.distance+J;if(J<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+G+" Weight: "+J);Q<K.distance&&(K.distance=Q,K.predecessor=h,w.decrease(U,Q))};for(H.nodes().forEach(function(G){var U=G===L?0:Number.POSITIVE_INFINITY;Z[G]={distance:U},w.add(G,U)});w.size()>0&&(h=w.removeMin(),E=Z[h],E.distance!==Number.POSITIVE_INFINITY);)B(h).forEach(D);return Z}}),b=r((T,p)=>{var I=f();p.exports=_;function _(M,z,H){return M.nodes().reduce(function(L,C){return L[C]=I(M,C,z,H),L},{})}}),N=r((T,p)=>{p.exports=I;function I(M,z,H){if(M[z].predecessor!==void 0)throw new Error("Invalid source vertex");if(M[H].predecessor===void 0&&H!==z)throw new Error("Invalid destination vertex");return{weight:M[H].distance,path:_(M,z,H)}}function _(M,z,H){for(var L=[],C=H;C!==z;)L.push(C),C=M[C].predecessor;return L.push(z),L.reverse()}}),S=r((T,p)=>{p.exports=I;function I(_){var M=0,z=[],H={},L=[];function C(B){var Z=H[B]={onStack:!0,lowlink:M,index:M++};if(z.push(B),_.successors(B).forEach(function(E){Object.hasOwn(H,E)?H[E].onStack&&(Z.lowlink=Math.min(Z.lowlink,H[E].index)):(C(E),Z.lowlink=Math.min(Z.lowlink,H[E].lowlink))}),Z.lowlink===Z.index){var w=[],h;do h=z.pop(),H[h].onStack=!1,w.push(h);while(B!==h);L.push(w)}}return _.nodes().forEach(function(B){Object.hasOwn(H,B)||C(B)}),L}}),A=r((T,p)=>{var I=S();p.exports=_;function _(M){return I(M).filter(function(z){return z.length>1||z.length===1&&M.hasEdge(z[0],z[0])})}}),$=r((T,p)=>{p.exports=_;var I=()=>1;function _(z,H,L){return M(z,H||I,L||function(C){return z.outEdges(C)})}function M(z,H,L){var C={},B=z.nodes();return B.forEach(function(Z){C[Z]={},C[Z][Z]={distance:0},B.forEach(function(w){Z!==w&&(C[Z][w]={distance:Number.POSITIVE_INFINITY})}),L(Z).forEach(function(w){var h=w.v===Z?w.w:w.v,E=H(w);C[Z][h]={distance:E,predecessor:Z}})}),B.forEach(function(Z){var w=C[Z];B.forEach(function(h){var E=C[h];B.forEach(function(D){var G=E[Z],U=w[D],K=E[D],J=G.distance+U.distance;J<K.distance&&(K.distance=J,K.predecessor=U.predecessor)})})}),C}}),m=r((T,p)=>{function I(M){var z={},H={},L=[];function C(B){if(Object.hasOwn(H,B))throw new _;Object.hasOwn(z,B)||(H[B]=!0,z[B]=!0,M.predecessors(B).forEach(C),delete H[B],L.push(B))}if(M.sinks().forEach(C),Object.keys(z).length!==M.nodeCount())throw new _;return L}var _=class extends Error{constructor(){super(...arguments)}};p.exports=I,I.CycleException=_}),y=r((T,p)=>{var I=m();p.exports=_;function _(M){try{I(M)}catch(z){if(z instanceof I.CycleException)return!1;throw z}return!0}}),V=r((T,p)=>{p.exports=I;function I(M,z,H,L,C){Array.isArray(z)||(z=[z]);var B=(M.isDirected()?M.successors:M.neighbors).bind(M),Z={};return z.forEach(function(w){if(!M.hasNode(w))throw new Error("Graph does not have node: "+w);C=_(M,w,H==="post",Z,B,L,C)}),C}function _(M,z,H,L,C,B,Z){return Object.hasOwn(L,z)||(L[z]=!0,H||(Z=B(Z,z)),C(z).forEach(function(w){Z=_(M,w,H,L,C,B,Z)}),H&&(Z=B(Z,z))),Z}}),F=r((T,p)=>{var I=V();p.exports=_;function _(M,z,H){return I(M,z,H,function(L,C){return L.push(C),L},[])}}),j=r((T,p)=>{var I=F();p.exports=_;function _(M,z){return I(M,z,"post")}}),X=r((T,p)=>{var I=F();p.exports=_;function _(M,z){return I(M,z,"pre")}}),q=r((T,p)=>{var I=a(),_=g();p.exports=M;function M(z,H){var L=new I,C={},B=new _,Z;function w(E){var D=E.v===Z?E.w:E.v,G=B.priority(D);if(G!==void 0){var U=H(E);U<G&&(C[D]=Z,B.decrease(D,U))}}if(z.nodeCount()===0)return L;z.nodes().forEach(function(E){B.add(E,Number.POSITIVE_INFINITY),L.setNode(E)}),B.decrease(z.nodes()[0],0);for(var h=!1;B.size()>0;){if(Z=B.removeMin(),Object.hasOwn(C,Z))L.setEdge(Z,C[Z]);else{if(h)throw new Error("Input graph is not connected: "+z);h=!0}z.nodeEdges(Z).forEach(w)}return L}}),P=r((T,p)=>{var I=f(),_=c();p.exports=M;function M(H,L,C,B){return z(H,L,C,B||function(Z){return H.outEdges(Z)})}function z(H,L,C,B){if(C===void 0)return I(H,L,C,B);for(var Z=!1,w=H.nodes(),h=0;h<w.length;h++){for(var E=B(w[h]),D=0;D<E.length;D++){var G=E[D],U=G.v===w[h]?G.v:G.w,K=U===G.v?G.w:G.v;C({v:U,w:K})<0&&(Z=!0)}if(Z)return _(H,L,C,B)}return I(H,L,C,B)}}),x=r((T,p)=>{p.exports={bellmanFord:c(),components:d(),dijkstra:f(),dijkstraAll:b(),extractPath:N(),findCycles:A(),floydWarshall:$(),isAcyclic:y(),postorder:j(),preorder:X(),prim:q(),shortestPaths:P(),reduce:V(),tarjan:S(),topsort:m()}}),v=l();t.exports={Graph:v.Graph,json:u(),alg:x(),version:v.version}}),Ff=xe((e,t)=>{var n=class{constructor(){let i={};i._next=i._prev=i,this._sentinel=i}dequeue(){let i=this._sentinel,a=i._prev;if(a!==i)return o(a),a}enqueue(i){let a=this._sentinel;i._prev&&i._next&&o(i),i._next=a._next,a._next._prev=i,a._next=i,i._prev=a}toString(){let i=[],a=this._sentinel,s=a._prev;for(;s!==a;)i.push(JSON.stringify(s,r)),s=s._prev;return"["+i.join(", ")+"]"}};function o(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function r(i,a){if(i!=="_next"&&i!=="_prev")return a}t.exports=n}),Gf=xe((e,t)=>{var n=Ye().Graph,o=Ff();t.exports=i;var r=()=>1;function i(d,g){if(d.nodeCount()<=1)return[];let f=l(d,g||r);return a(f.graph,f.buckets,f.zeroIdx).flatMap(b=>d.outEdges(b.v,b.w))}function a(d,g,f){let b=[],N=g[g.length-1],S=g[0],A;for(;d.nodeCount();){for(;A=S.dequeue();)s(d,g,f,A);for(;A=N.dequeue();)s(d,g,f,A);if(d.nodeCount()){for(let $=g.length-2;$>0;--$)if(A=g[$].dequeue(),A){b=b.concat(s(d,g,f,A,!0));break}}}return b}function s(d,g,f,b,N){let S=N?[]:void 0;return d.inEdges(b.v).forEach(A=>{let $=d.edge(A),m=d.node(A.v);N&&S.push({v:A.v,w:A.w}),m.out-=$,u(g,f,m)}),d.outEdges(b.v).forEach(A=>{let $=d.edge(A),m=A.w,y=d.node(m);y.in-=$,u(g,f,y)}),d.removeNode(b.v),S}function l(d,g){let f=new n,b=0,N=0;d.nodes().forEach($=>{f.setNode($,{v:$,in:0,out:0})}),d.edges().forEach($=>{let m=f.edge($.v,$.w)||0,y=g($),V=m+y;f.setEdge($.v,$.w,V),N=Math.max(N,f.node($.v).out+=y),b=Math.max(b,f.node($.w).in+=y)});let S=c(N+b+3).map(()=>new o),A=b+1;return f.nodes().forEach($=>{u(S,A,f.node($))}),{graph:f,buckets:S,zeroIdx:A}}function u(d,g,f){f.out?f.in?d[f.out-f.in+g].enqueue(f):d[d.length-1].enqueue(f):d[0].enqueue(f)}function c(d){let g=[];for(let f=0;f<d;f++)g.push(f);return g}}),Me=xe((e,t)=>{var n=Ye().Graph;t.exports={addBorderNode:g,addDummyNode:o,applyWithChunking:N,asNonCompoundGraph:i,buildLayerMatrix:u,intersectRect:l,mapValues:X,maxRank:S,normalizeRanks:c,notime:m,partition:A,pick:j,predecessorWeights:s,range:F,removeEmptyRanks:d,simplify:r,successorWeights:a,time:$,uniqueId:V,zipObject:q};function o(P,x,v,T){for(var p=T;P.hasNode(p);)p=V(T);return v.dummy=x,P.setNode(p,v),p}function r(P){let x=new n().setGraph(P.graph());return P.nodes().forEach(v=>x.setNode(v,P.node(v))),P.edges().forEach(v=>{let T=x.edge(v.v,v.w)||{weight:0,minlen:1},p=P.edge(v);x.setEdge(v.v,v.w,{weight:T.weight+p.weight,minlen:Math.max(T.minlen,p.minlen)})}),x}function i(P){let x=new n({multigraph:P.isMultigraph()}).setGraph(P.graph());return P.nodes().forEach(v=>{P.children(v).length||x.setNode(v,P.node(v))}),P.edges().forEach(v=>{x.setEdge(v,P.edge(v))}),x}function a(P){let x=P.nodes().map(v=>{let T={};return P.outEdges(v).forEach(p=>{T[p.w]=(T[p.w]||0)+P.edge(p).weight}),T});return q(P.nodes(),x)}function s(P){let x=P.nodes().map(v=>{let T={};return P.inEdges(v).forEach(p=>{T[p.v]=(T[p.v]||0)+P.edge(p).weight}),T});return q(P.nodes(),x)}function l(P,x){let v=P.x,T=P.y,p=x.x-v,I=x.y-T,_=P.width/2,M=P.height/2;if(!p&&!I)throw new Error("Not possible to find intersection inside of the rectangle");let z,H;return Math.abs(I)*_>Math.abs(p)*M?(I<0&&(M=-M),z=M*p/I,H=M):(p<0&&(_=-_),z=_,H=_*I/p),{x:v+z,y:T+H}}function u(P){let x=F(S(P)+1).map(()=>[]);return P.nodes().forEach(v=>{let T=P.node(v),p=T.rank;p!==void 0&&(x[p][T.order]=v)}),x}function c(P){let x=P.nodes().map(T=>{let p=P.node(T).rank;return p===void 0?Number.MAX_VALUE:p}),v=N(Math.min,x);P.nodes().forEach(T=>{let p=P.node(T);Object.hasOwn(p,"rank")&&(p.rank-=v)})}function d(P){let x=P.nodes().map(_=>P.node(_).rank).filter(_=>_!==void 0),v=N(Math.min,x),T=[];P.nodes().forEach(_=>{let M=P.node(_).rank-v;T[M]||(T[M]=[]),T[M].push(_)});let p=0,I=P.graph().nodeRankFactor;Array.from(T).forEach((_,M)=>{_===void 0&&M%I!==0?--p:_!==void 0&&p&&_.forEach(z=>P.node(z).rank+=p)})}function g(P,x,v,T){let p={width:0,height:0};return arguments.length>=4&&(p.rank=v,p.order=T),o(P,"border",p,x)}function f(P,x=b){let v=[];for(let T=0;T<P.length;T+=x){let p=P.slice(T,T+x);v.push(p)}return v}var b=65535;function N(P,x){if(x.length>b){let v=f(x);return P.apply(null,v.map(T=>P.apply(null,T)))}else return P.apply(null,x)}function S(P){let x=P.nodes().map(v=>{let T=P.node(v).rank;return T===void 0?Number.MIN_VALUE:T});return N(Math.max,x)}function A(P,x){let v={lhs:[],rhs:[]};return P.forEach(T=>{x(T)?v.lhs.push(T):v.rhs.push(T)}),v}function $(P,x){let v=Date.now();try{return x()}finally{console.log(P+" time: "+(Date.now()-v)+"ms")}}function m(P,x){return x()}var y=0;function V(P){var x=++y;return P+(""+x)}function F(P,x,v=1){x==null&&(x=P,P=0);let T=I=>I<x;v<0&&(T=I=>x<I);let p=[];for(let I=P;T(I);I+=v)p.push(I);return p}function j(P,x){let v={};for(let T of x)P[T]!==void 0&&(v[T]=P[T]);return v}function X(P,x){let v=x;return typeof x=="string"&&(v=T=>T[x]),Object.entries(P).reduce((T,[p,I])=>(T[p]=v(I,p),T),{})}function q(P,x){return P.reduce((v,T,p)=>(v[T]=x[p],v),{})}}),Yf=xe((e,t)=>{var n=Gf(),o=Me().uniqueId;t.exports={run:r,undo:a};function r(s){(s.graph().acyclicer==="greedy"?n(s,l(s)):i(s)).forEach(u=>{let c=s.edge(u);s.removeEdge(u),c.forwardName=u.name,c.reversed=!0,s.setEdge(u.w,u.v,c,o("rev"))});function l(u){return c=>u.edge(c).weight}}function i(s){let l=[],u={},c={};function d(g){Object.hasOwn(c,g)||(c[g]=!0,u[g]=!0,s.outEdges(g).forEach(f=>{Object.hasOwn(u,f.w)?l.push(f):d(f.w)}),delete u[g])}return s.nodes().forEach(d),l}function a(s){s.edges().forEach(l=>{let u=s.edge(l);if(u.reversed){s.removeEdge(l);let c=u.forwardName;delete u.reversed,delete u.forwardName,s.setEdge(l.w,l.v,u,c)}})}}),Xf=xe((e,t)=>{var n=Me();t.exports={run:o,undo:i};function o(a){a.graph().dummyChains=[],a.edges().forEach(s=>r(a,s))}function r(a,s){let l=s.v,u=a.node(l).rank,c=s.w,d=a.node(c).rank,g=s.name,f=a.edge(s),b=f.labelRank;if(d===u+1)return;a.removeEdge(s);let N,S,A;for(A=0,++u;u<d;++A,++u)f.points=[],S={width:0,height:0,edgeLabel:f,edgeObj:s,rank:u},N=n.addDummyNode(a,"edge",S,"_d"),u===b&&(S.width=f.width,S.height=f.height,S.dummy="edge-label",S.labelpos=f.labelpos),a.setEdge(l,N,{weight:f.weight},g),A===0&&a.graph().dummyChains.push(N),l=N;a.setEdge(l,c,{weight:f.weight},g)}function i(a){a.graph().dummyChains.forEach(s=>{let l=a.node(s),u=l.edgeLabel,c;for(a.setEdge(l.edgeObj,u);l.dummy;)c=a.successors(s)[0],a.removeNode(s),u.points.push({x:l.x,y:l.y}),l.dummy==="edge-label"&&(u.x=l.x,u.y=l.y,u.width=l.width,u.height=l.height),s=c,l=a.node(s)})}}),Hn=xe((e,t)=>{var{applyWithChunking:n}=Me();t.exports={longestPath:o,slack:r};function o(i){var a={};function s(l){var u=i.node(l);if(Object.hasOwn(a,l))return u.rank;a[l]=!0;let c=i.outEdges(l).map(g=>g==null?Number.POSITIVE_INFINITY:s(g.w)-i.edge(g).minlen);var d=n(Math.min,c);return d===Number.POSITIVE_INFINITY&&(d=0),u.rank=d}i.sources().forEach(s)}function r(i,a){return i.node(a.w).rank-i.node(a.v).rank-i.edge(a).minlen}}),Fi=xe((e,t)=>{var n=Ye().Graph,o=Hn().slack;t.exports=r;function r(l){var u=new n({directed:!1}),c=l.nodes()[0],d=l.nodeCount();u.setNode(c,{});for(var g,f;i(u,l)<d;)g=a(u,l),f=u.hasNode(g.v)?o(l,g):-o(l,g),s(u,l,f);return u}function i(l,u){function c(d){u.nodeEdges(d).forEach(g=>{var f=g.v,b=d===f?g.w:f;!l.hasNode(b)&&!o(u,g)&&(l.setNode(b,{}),l.setEdge(d,b,{}),c(b))})}return l.nodes().forEach(c),l.nodeCount()}function a(l,u){return u.edges().reduce((c,d)=>{let g=Number.POSITIVE_INFINITY;return l.hasNode(d.v)!==l.hasNode(d.w)&&(g=o(u,d)),g<c[0]?[g,d]:c},[Number.POSITIVE_INFINITY,null])[1]}function s(l,u,c){l.nodes().forEach(d=>u.node(d).rank+=c)}}),jf=xe((e,t)=>{var n=Fi(),o=Hn().slack,r=Hn().longestPath,i=Ye().alg.preorder,a=Ye().alg.postorder,s=Me().simplify;t.exports=l,l.initLowLimValues=g,l.initCutValues=u,l.calcCutValue=d,l.leaveEdge=b,l.enterEdge=N,l.exchangeEdges=S;function l(y){y=s(y),r(y);var V=n(y);g(V),u(V,y);for(var F,j;F=b(V);)j=N(V,y,F),S(V,y,F,j)}function u(y,V){var F=a(y,y.nodes());F=F.slice(0,F.length-1),F.forEach(j=>c(y,V,j))}function c(y,V,F){var j=y.node(F),X=j.parent;y.edge(F,X).cutvalue=d(y,V,F)}function d(y,V,F){var j=y.node(F),X=j.parent,q=!0,P=V.edge(F,X),x=0;return P||(q=!1,P=V.edge(X,F)),x=P.weight,V.nodeEdges(F).forEach(v=>{var T=v.v===F,p=T?v.w:v.v;if(p!==X){var I=T===q,_=V.edge(v).weight;if(x+=I?_:-_,$(y,F,p)){var M=y.edge(F,p).cutvalue;x+=I?-M:M}}}),x}function g(y,V){arguments.length<2&&(V=y.nodes()[0]),f(y,{},1,V)}function f(y,V,F,j,X){var q=F,P=y.node(j);return V[j]=!0,y.neighbors(j).forEach(x=>{Object.hasOwn(V,x)||(F=f(y,V,F,x,j))}),P.low=q,P.lim=F++,X?P.parent=X:delete P.parent,F}function b(y){return y.edges().find(V=>y.edge(V).cutvalue<0)}function N(y,V,F){var j=F.v,X=F.w;V.hasEdge(j,X)||(j=F.w,X=F.v);var q=y.node(j),P=y.node(X),x=q,v=!1;q.lim>P.lim&&(x=P,v=!0);var T=V.edges().filter(p=>v===m(y,y.node(p.v),x)&&v!==m(y,y.node(p.w),x));return T.reduce((p,I)=>o(V,I)<o(V,p)?I:p)}function S(y,V,F,j){var X=F.v,q=F.w;y.removeEdge(X,q),y.setEdge(j.v,j.w,{}),g(y),u(y,V),A(y,V)}function A(y,V){var F=y.nodes().find(X=>!V.node(X).parent),j=i(y,F);j=j.slice(1),j.forEach(X=>{var q=y.node(X).parent,P=V.edge(X,q),x=!1;P||(P=V.edge(q,X),x=!0),V.node(X).rank=V.node(q).rank+(x?P.minlen:-P.minlen)})}function $(y,V,F){return y.hasEdge(V,F)}function m(y,V,F){return F.low<=V.lim&&V.lim<=F.lim}}),Wf=xe((e,t)=>{var n=Hn(),o=n.longestPath,r=Fi(),i=jf();t.exports=a;function a(c){var d=c.graph().ranker;if(d instanceof Function)return d(c);switch(c.graph().ranker){case"network-simplex":u(c);break;case"tight-tree":l(c);break;case"longest-path":s(c);break;case"none":break;default:u(c)}}var s=o;function l(c){o(c),r(c)}function u(c){i(c)}}),Uf=xe((e,t)=>{t.exports=n;function n(i){let a=r(i);i.graph().dummyChains.forEach(s=>{let l=i.node(s),u=l.edgeObj,c=o(i,a,u.v,u.w),d=c.path,g=c.lca,f=0,b=d[f],N=!0;for(;s!==u.w;){if(l=i.node(s),N){for(;(b=d[f])!==g&&i.node(b).maxRank<l.rank;)f++;b===g&&(N=!1)}if(!N){for(;f<d.length-1&&i.node(b=d[f+1]).minRank<=l.rank;)f++;b=d[f]}i.setParent(s,b),s=i.successors(s)[0]}})}function o(i,a,s,l){let u=[],c=[],d=Math.min(a[s].low,a[l].low),g=Math.max(a[s].lim,a[l].lim),f,b;f=s;do f=i.parent(f),u.push(f);while(f&&(a[f].low>d||g>a[f].lim));for(b=f,f=l;(f=i.parent(f))!==b;)c.push(f);return{path:u.concat(c.reverse()),lca:b}}function r(i){let a={},s=0;function l(u){let c=s;i.children(u).forEach(l),a[u]={low:c,lim:s++}}return i.children().forEach(l),a}}),Zf=xe((e,t)=>{var n=Me();t.exports={run:o,cleanup:s};function o(l){let u=n.addDummyNode(l,"root",{},"_root"),c=i(l),d=Object.values(c),g=n.applyWithChunking(Math.max,d)-1,f=2*g+1;l.graph().nestingRoot=u,l.edges().forEach(N=>l.edge(N).minlen*=f);let b=a(l)+1;l.children().forEach(N=>r(l,u,f,b,g,c,N)),l.graph().nodeRankFactor=f}function r(l,u,c,d,g,f,b){let N=l.children(b);if(!N.length){b!==u&&l.setEdge(u,b,{weight:0,minlen:c});return}let S=n.addBorderNode(l,"_bt"),A=n.addBorderNode(l,"_bb"),$=l.node(b);l.setParent(S,b),$.borderTop=S,l.setParent(A,b),$.borderBottom=A,N.forEach(m=>{r(l,u,c,d,g,f,m);let y=l.node(m),V=y.borderTop?y.borderTop:m,F=y.borderBottom?y.borderBottom:m,j=y.borderTop?d:2*d,X=V!==F?1:g-f[b]+1;l.setEdge(S,V,{weight:j,minlen:X,nestingEdge:!0}),l.setEdge(F,A,{weight:j,minlen:X,nestingEdge:!0})}),l.parent(b)||l.setEdge(u,S,{weight:0,minlen:g+f[b]})}function i(l){var u={};function c(d,g){var f=l.children(d);f&&f.length&&f.forEach(b=>c(b,g+1)),u[d]=g}return l.children().forEach(d=>c(d,1)),u}function a(l){return l.edges().reduce((u,c)=>u+l.edge(c).weight,0)}function s(l){var u=l.graph();l.removeNode(u.nestingRoot),delete u.nestingRoot,l.edges().forEach(c=>{var d=l.edge(c);d.nestingEdge&&l.removeEdge(c)})}}),Kf=xe((e,t)=>{var n=Me();t.exports=o;function o(i){function a(s){let l=i.children(s),u=i.node(s);if(l.length&&l.forEach(a),Object.hasOwn(u,"minRank")){u.borderLeft=[],u.borderRight=[];for(let c=u.minRank,d=u.maxRank+1;c<d;++c)r(i,"borderLeft","_bl",s,u,c),r(i,"borderRight","_br",s,u,c)}}i.children().forEach(a)}function r(i,a,s,l,u,c){let d={width:0,height:0,rank:c,borderType:a},g=u[a][c-1],f=n.addDummyNode(i,"border",d,s);u[a][c]=f,i.setParent(f,l),g&&i.setEdge(g,f,{weight:1})}}),qf=xe((e,t)=>{t.exports={adjust:n,undo:o};function n(c){let d=c.graph().rankdir.toLowerCase();(d==="lr"||d==="rl")&&r(c)}function o(c){let d=c.graph().rankdir.toLowerCase();(d==="bt"||d==="rl")&&a(c),(d==="lr"||d==="rl")&&(l(c),r(c))}function r(c){c.nodes().forEach(d=>i(c.node(d))),c.edges().forEach(d=>i(c.edge(d)))}function i(c){let d=c.width;c.width=c.height,c.height=d}function a(c){c.nodes().forEach(d=>s(c.node(d))),c.edges().forEach(d=>{let g=c.edge(d);g.points.forEach(s),Object.hasOwn(g,"y")&&s(g)})}function s(c){c.y=-c.y}function l(c){c.nodes().forEach(d=>u(c.node(d))),c.edges().forEach(d=>{let g=c.edge(d);g.points.forEach(u),Object.hasOwn(g,"x")&&u(g)})}function u(c){let d=c.x;c.x=c.y,c.y=d}}),Jf=xe((e,t)=>{var n=Me();t.exports=o;function o(r){let i={},a=r.nodes().filter(d=>!r.children(d).length),s=a.map(d=>r.node(d).rank),l=n.applyWithChunking(Math.max,s),u=n.range(l+1).map(()=>[]);function c(d){if(i[d])return;i[d]=!0;let g=r.node(d);u[g.rank].push(d),r.successors(d).forEach(c)}return a.sort((d,g)=>r.node(d).rank-r.node(g).rank).forEach(c),u}}),Qf=xe((e,t)=>{var n=Me().zipObject;t.exports=o;function o(i,a){let s=0;for(let l=1;l<a.length;++l)s+=r(i,a[l-1],a[l]);return s}function r(i,a,s){let l=n(s,s.map((b,N)=>N)),u=a.flatMap(b=>i.outEdges(b).map(N=>({pos:l[N.w],weight:i.edge(N).weight})).sort((N,S)=>N.pos-S.pos)),c=1;for(;c<s.length;)c<<=1;let d=2*c-1;c-=1;let g=new Array(d).fill(0),f=0;return u.forEach(b=>{let N=b.pos+c;g[N]+=b.weight;let S=0;for(;N>0;)N%2&&(S+=g[N+1]),N=N-1>>1,g[N]+=b.weight;f+=b.weight*S}),f}}),eh=xe((e,t)=>{t.exports=n;function n(o,r=[]){return r.map(i=>{let a=o.inEdges(i);if(a.length){let s=a.reduce((l,u)=>{let c=o.edge(u),d=o.node(u.v);return{sum:l.sum+c.weight*d.order,weight:l.weight+c.weight}},{sum:0,weight:0});return{v:i,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:i}})}}),th=xe((e,t)=>{var n=Me();t.exports=o;function o(a,s){let l={};a.forEach((c,d)=>{let g=l[c.v]={indegree:0,in:[],out:[],vs:[c.v],i:d};c.barycenter!==void 0&&(g.barycenter=c.barycenter,g.weight=c.weight)}),s.edges().forEach(c=>{let d=l[c.v],g=l[c.w];d!==void 0&&g!==void 0&&(g.indegree++,d.out.push(l[c.w]))});let u=Object.values(l).filter(c=>!c.indegree);return r(u)}function r(a){let s=[];function l(c){return d=>{d.merged||(d.barycenter===void 0||c.barycenter===void 0||d.barycenter>=c.barycenter)&&i(c,d)}}function u(c){return d=>{d.in.push(c),--d.indegree===0&&a.push(d)}}for(;a.length;){let c=a.pop();s.push(c),c.in.reverse().forEach(l(c)),c.out.forEach(u(c))}return s.filter(c=>!c.merged).map(c=>n.pick(c,["vs","i","barycenter","weight"]))}function i(a,s){let l=0,u=0;a.weight&&(l+=a.barycenter*a.weight,u+=a.weight),s.weight&&(l+=s.barycenter*s.weight,u+=s.weight),a.vs=s.vs.concat(a.vs),a.barycenter=l/u,a.weight=u,a.i=Math.min(s.i,a.i),s.merged=!0}}),nh=xe((e,t)=>{var n=Me();t.exports=o;function o(a,s){let l=n.partition(a,S=>Object.hasOwn(S,"barycenter")),u=l.lhs,c=l.rhs.sort((S,A)=>A.i-S.i),d=[],g=0,f=0,b=0;u.sort(i(!!s)),b=r(d,c,b),u.forEach(S=>{b+=S.vs.length,d.push(S.vs),g+=S.barycenter*S.weight,f+=S.weight,b=r(d,c,b)});let N={vs:d.flat(!0)};return f&&(N.barycenter=g/f,N.weight=f),N}function r(a,s,l){let u;for(;s.length&&(u=s[s.length-1]).i<=l;)s.pop(),a.push(u.vs),l++;return l}function i(a){return(s,l)=>s.barycenter<l.barycenter?-1:s.barycenter>l.barycenter?1:a?l.i-s.i:s.i-l.i}}),oh=xe((e,t)=>{var n=eh(),o=th(),r=nh();t.exports=i;function i(l,u,c,d){let g=l.children(u),f=l.node(u),b=f?f.borderLeft:void 0,N=f?f.borderRight:void 0,S={};b&&(g=g.filter(y=>y!==b&&y!==N));let A=n(l,g);A.forEach(y=>{if(l.children(y.v).length){let V=i(l,y.v,c,d);S[y.v]=V,Object.hasOwn(V,"barycenter")&&s(y,V)}});let $=o(A,c);a($,S);let m=r($,d);if(b&&(m.vs=[b,m.vs,N].flat(!0),l.predecessors(b).length)){let y=l.node(l.predecessors(b)[0]),V=l.node(l.predecessors(N)[0]);Object.hasOwn(m,"barycenter")||(m.barycenter=0,m.weight=0),m.barycenter=(m.barycenter*m.weight+y.order+V.order)/(m.weight+2),m.weight+=2}return m}function a(l,u){l.forEach(c=>{c.vs=c.vs.flatMap(d=>u[d]?u[d].vs:d)})}function s(l,u){l.barycenter!==void 0?(l.barycenter=(l.barycenter*l.weight+u.barycenter*u.weight)/(l.weight+u.weight),l.weight+=u.weight):(l.barycenter=u.barycenter,l.weight=u.weight)}}),rh=xe((e,t)=>{var n=Ye().Graph,o=Me();t.exports=r;function r(a,s,l,u){u||(u=a.nodes());let c=i(a),d=new n({compound:!0}).setGraph({root:c}).setDefaultNodeLabel(g=>a.node(g));return u.forEach(g=>{let f=a.node(g),b=a.parent(g);(f.rank===s||f.minRank<=s&&s<=f.maxRank)&&(d.setNode(g),d.setParent(g,b||c),a[l](g).forEach(N=>{let S=N.v===g?N.w:N.v,A=d.edge(S,g),$=A!==void 0?A.weight:0;d.setEdge(S,g,{weight:a.edge(N).weight+$})}),Object.hasOwn(f,"minRank")&&d.setNode(g,{borderLeft:f.borderLeft[s],borderRight:f.borderRight[s]}))}),d}function i(a){for(var s;a.hasNode(s=o.uniqueId("_root")););return s}}),ih=xe((e,t)=>{t.exports=n;function n(o,r,i){let a={},s;i.forEach(l=>{let u=o.parent(l),c,d;for(;u;){if(c=o.parent(u),c?(d=a[c],a[c]=u):(d=s,s=u),d&&d!==u){r.setEdge(d,u);return}u=c}})}}),ah=xe((e,t)=>{var n=Jf(),o=Qf(),r=oh(),i=rh(),a=ih(),s=Ye().Graph,l=Me();t.exports=u;function u(f,b={}){if(typeof b.customOrder=="function"){b.customOrder(f,u);return}let N=l.maxRank(f),S=c(f,l.range(1,N+1),"inEdges"),A=c(f,l.range(N-1,-1,-1),"outEdges"),$=n(f);if(g(f,$),b.disableOptimalOrderHeuristic)return;let m=Number.POSITIVE_INFINITY,y,V=b.constraints||[];for(let F=0,j=0;j<4;++F,++j){d(F%2?S:A,F%4>=2,V),$=l.buildLayerMatrix(f);let X=o(f,$);X<m?(j=0,y=Object.assign({},$),m=X):X===m&&(y=structuredClone($))}g(f,y)}function c(f,b,N){let S=new Map,A=($,m)=>{S.has($)||S.set($,[]),S.get($).push(m)};for(let $ of f.nodes()){let m=f.node($);if(typeof m.rank=="number"&&A(m.rank,$),typeof m.minRank=="number"&&typeof m.maxRank=="number")for(let y=m.minRank;y<=m.maxRank;y++)y!==m.rank&&A(y,$)}return b.map(function($){return i(f,$,N,S.get($)||[])})}function d(f,b,N){let S=new s;f.forEach(function(A){N.forEach(y=>S.setEdge(y.left,y.right));let $=A.graph().root,m=r(A,$,S,b);m.vs.forEach((y,V)=>A.node(y).order=V),a(A,S,m.vs)})}function g(f,b){Object.values(b).forEach(N=>N.forEach((S,A)=>f.node(S).order=A))}}),sh=xe((e,t)=>{var n=Ye().Graph,o=Me();t.exports={positionX:N,findType1Conflicts:r,findType2Conflicts:i,addConflict:s,hasConflict:l,verticalAlignment:u,horizontalCompaction:c,alignCoordinates:f,findSmallestWidthAlignment:g,balance:b};function r($,m){let y={};function V(F,j){let X=0,q=0,P=F.length,x=j[j.length-1];return j.forEach((v,T)=>{let p=a($,v),I=p?$.node(p).order:P;(p||v===x)&&(j.slice(q,T+1).forEach(_=>{$.predecessors(_).forEach(M=>{let z=$.node(M),H=z.order;(H<X||I<H)&&!(z.dummy&&$.node(_).dummy)&&s(y,M,_)})}),q=T+1,X=I)}),j}return m.length&&m.reduce(V),y}function i($,m){let y={};function V(j,X,q,P,x){let v;o.range(X,q).forEach(T=>{v=j[T],$.node(v).dummy&&$.predecessors(v).forEach(p=>{let I=$.node(p);I.dummy&&(I.order<P||I.order>x)&&s(y,p,v)})})}function F(j,X){let q=-1,P,x=0;return X.forEach((v,T)=>{if($.node(v).dummy==="border"){let p=$.predecessors(v);p.length&&(P=$.node(p[0]).order,V(X,x,T,q,P),x=T,q=P)}V(X,x,X.length,P,j.length)}),X}return m.length&&m.reduce(F),y}function a($,m){if($.node(m).dummy)return $.predecessors(m).find(y=>$.node(y).dummy)}function s($,m,y){if(m>y){let F=m;m=y,y=F}let V=$[m];V||($[m]=V={}),V[y]=!0}function l($,m,y){if(m>y){let V=m;m=y,y=V}return!!$[m]&&Object.hasOwn($[m],y)}function u($,m,y,V){let F={},j={},X={};return m.forEach(q=>{q.forEach((P,x)=>{F[P]=P,j[P]=P,X[P]=x})}),m.forEach(q=>{let P=-1;q.forEach(x=>{let v=V(x);if(v.length){v=v.sort((p,I)=>X[p]-X[I]);let T=(v.length-1)/2;for(let p=Math.floor(T),I=Math.ceil(T);p<=I;++p){let _=v[p];j[x]===x&&P<X[_]&&!l(y,x,_)&&(j[_]=x,j[x]=F[x]=F[_],P=X[_])}}})}),{root:F,align:j}}function c($,m,y,V,F){let j={},X=d($,m,y,F),q=F?"borderLeft":"borderRight";function P(T,p){let I=X.nodes().slice(),_={},M=I.pop();for(;M;){if(_[M])T(M);else{_[M]=!0,I.push(M);for(let z of p(M))I.push(z)}M=I.pop()}}function x(T){j[T]=X.inEdges(T).reduce((p,I)=>Math.max(p,j[I.v]+X.edge(I)),0)}function v(T){let p=X.outEdges(T).reduce((_,M)=>Math.min(_,j[M.w]-X.edge(M)),Number.POSITIVE_INFINITY),I=$.node(T);p!==Number.POSITIVE_INFINITY&&I.borderType!==q&&(j[T]=Math.max(j[T],p))}return P(x,X.predecessors.bind(X)),P(v,X.successors.bind(X)),Object.keys(V).forEach(T=>j[T]=j[y[T]]),j}function d($,m,y,V){let F=new n,j=$.graph(),X=S(j.nodesep,j.edgesep,V);return m.forEach(q=>{let P;q.forEach(x=>{let v=y[x];if(F.setNode(v),P){var T=y[P],p=F.edge(T,v);F.setEdge(T,v,Math.max(X($,x,P),p||0))}P=x})}),F}function g($,m){return Object.values(m).reduce((y,V)=>{let F=Number.NEGATIVE_INFINITY,j=Number.POSITIVE_INFINITY;Object.entries(V).forEach(([q,P])=>{let x=A($,q)/2;F=Math.max(P+x,F),j=Math.min(P-x,j)});let X=F-j;return X<y[0]&&(y=[X,V]),y},[Number.POSITIVE_INFINITY,null])[1]}function f($,m){let y=Object.values(m),V=o.applyWithChunking(Math.min,y),F=o.applyWithChunking(Math.max,y);["u","d"].forEach(j=>{["l","r"].forEach(X=>{let q=j+X,P=$[q];if(P===m)return;let x=Object.values(P),v=V-o.applyWithChunking(Math.min,x);X!=="l"&&(v=F-o.applyWithChunking(Math.max,x)),v&&($[q]=o.mapValues(P,T=>T+v))})})}function b($,m){return o.mapValues($.ul,(y,V)=>{if(m)return $[m.toLowerCase()][V];{let F=Object.values($).map(j=>j[V]).sort((j,X)=>j-X);return(F[1]+F[2])/2}})}function N($){let m=o.buildLayerMatrix($),y=Object.assign(r($,m),i($,m)),V={},F;["u","d"].forEach(X=>{F=X==="u"?m:Object.values(m).reverse(),["l","r"].forEach(q=>{q==="r"&&(F=F.map(T=>Object.values(T).reverse()));let P=(X==="u"?$.predecessors:$.successors).bind($),x=u($,F,y,P),v=c($,F,x.root,x.align,q==="r");q==="r"&&(v=o.mapValues(v,T=>-T)),V[X+q]=v})});let j=g($,V);return f(V,j),b(V,$.graph().align)}function S($,m,y){return(V,F,j)=>{let X=V.node(F),q=V.node(j),P=0,x;if(P+=X.width/2,Object.hasOwn(X,"labelpos"))switch(X.labelpos.toLowerCase()){case"l":x=-X.width/2;break;case"r":x=X.width/2;break}if(x&&(P+=y?x:-x),x=0,P+=(X.dummy?m:$)/2,P+=(q.dummy?m:$)/2,P+=q.width/2,Object.hasOwn(q,"labelpos"))switch(q.labelpos.toLowerCase()){case"l":x=q.width/2;break;case"r":x=-q.width/2;break}return x&&(P+=y?x:-x),x=0,P}}function A($,m){return $.node(m).width}}),lh=xe((e,t)=>{var n=Me(),o=sh().positionX;t.exports=r;function r(a){a=n.asNonCompoundGraph(a),i(a),Object.entries(o(a)).forEach(([s,l])=>a.node(s).x=l)}function i(a){let s=n.buildLayerMatrix(a),l=a.graph().ranksep,u=a.graph().rankalign,c=0;s.forEach(d=>{let g=d.reduce((f,b)=>{let N=a.node(b).height;return f>N?f:N},0);d.forEach(f=>{let b=a.node(f);u==="top"?b.y=c+b.height/2:u==="bottom"?b.y=c+g-b.height/2:b.y=c+g/2}),c+=g+l})}}),uh=xe((e,t)=>{var n=Yf(),o=Xf(),r=Wf(),i=Me().normalizeRanks,a=Uf(),s=Me().removeEmptyRanks,l=Zf(),u=Kf(),c=qf(),d=ah(),g=lh(),f=Me(),b=Ye().Graph;t.exports=N;function N(h,E={}){let D=E.debugTiming?f.time:f.notime;return D("layout",()=>{let G=D(" buildLayoutGraph",()=>P(h));return D(" runLayout",()=>S(G,D,E)),D(" updateInputGraph",()=>A(h,G)),G})}function S(h,E,D){E(" makeSpaceForEdgeLabels",()=>x(h)),E(" removeSelfEdges",()=>L(h)),E(" acyclic",()=>n.run(h)),E(" nestingGraph.run",()=>l.run(h)),E(" rank",()=>r(f.asNonCompoundGraph(h))),E(" injectEdgeLabelProxies",()=>v(h)),E(" removeEmptyRanks",()=>s(h)),E(" nestingGraph.cleanup",()=>l.cleanup(h)),E(" normalizeRanks",()=>i(h)),E(" assignRankMinMax",()=>T(h)),E(" removeEdgeLabelProxies",()=>p(h)),E(" normalize.run",()=>o.run(h)),E(" parentDummyChains",()=>a(h)),E(" addBorderSegments",()=>u(h)),E(" order",()=>d(h,D)),E(" insertSelfEdges",()=>C(h)),E(" adjustCoordinateSystem",()=>c.adjust(h)),E(" position",()=>g(h)),E(" positionSelfEdges",()=>B(h)),E(" removeBorderNodes",()=>H(h)),E(" normalize.undo",()=>o.undo(h)),E(" fixupEdgeLabelCoords",()=>M(h)),E(" undoCoordinateSystem",()=>c.undo(h)),E(" translateGraph",()=>I(h)),E(" assignNodeIntersects",()=>_(h)),E(" reversePoints",()=>z(h)),E(" acyclic.undo",()=>n.undo(h))}function A(h,E){h.nodes().forEach(D=>{let G=h.node(D),U=E.node(D);G&&(G.x=U.x,G.y=U.y,G.order=U.order,G.rank=U.rank,E.children(D).length&&(G.width=U.width,G.height=U.height))}),h.edges().forEach(D=>{let G=h.edge(D),U=E.edge(D);G.points=U.points,Object.hasOwn(U,"x")&&(G.x=U.x,G.y=U.y)}),h.graph().width=E.graph().width,h.graph().height=E.graph().height}var $=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb",rankalign:"center"},y=["acyclicer","ranker","rankdir","align","rankalign"],V=["width","height","rank"],F={width:0,height:0},j=["minlen","weight","width","height","labeloffset"],X={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},q=["labelpos"];function P(h){let E=new b({multigraph:!0,compound:!0}),D=w(h.graph());return E.setGraph(Object.assign({},m,Z(D,$),f.pick(D,y))),h.nodes().forEach(G=>{let U=w(h.node(G)),K=Z(U,V);Object.keys(F).forEach(J=>{K[J]===void 0&&(K[J]=F[J])}),E.setNode(G,K),E.setParent(G,h.parent(G))}),h.edges().forEach(G=>{let U=w(h.edge(G));E.setEdge(G,Object.assign({},X,Z(U,j),f.pick(U,q)))}),E}function x(h){let E=h.graph();E.ranksep/=2,h.edges().forEach(D=>{let G=h.edge(D);G.minlen*=2,G.labelpos.toLowerCase()!=="c"&&(E.rankdir==="TB"||E.rankdir==="BT"?G.width+=G.labeloffset:G.height+=G.labeloffset)})}function v(h){h.edges().forEach(E=>{let D=h.edge(E);if(D.width&&D.height){let G=h.node(E.v),U={rank:(h.node(E.w).rank-G.rank)/2+G.rank,e:E};f.addDummyNode(h,"edge-proxy",U,"_ep")}})}function T(h){let E=0;h.nodes().forEach(D=>{let G=h.node(D);G.borderTop&&(G.minRank=h.node(G.borderTop).rank,G.maxRank=h.node(G.borderBottom).rank,E=Math.max(E,G.maxRank))}),h.graph().maxRank=E}function p(h){h.nodes().forEach(E=>{let D=h.node(E);D.dummy==="edge-proxy"&&(h.edge(D.e).labelRank=D.rank,h.removeNode(E))})}function I(h){let E=Number.POSITIVE_INFINITY,D=0,G=Number.POSITIVE_INFINITY,U=0,K=h.graph(),J=K.marginx||0,Q=K.marginy||0;function ce(O){let k=O.x,R=O.y,W=O.width,Y=O.height;E=Math.min(E,k-W/2),D=Math.max(D,k+W/2),G=Math.min(G,R-Y/2),U=Math.max(U,R+Y/2)}h.nodes().forEach(O=>ce(h.node(O))),h.edges().forEach(O=>{let k=h.edge(O);Object.hasOwn(k,"x")&&ce(k)}),E-=J,G-=Q,h.nodes().forEach(O=>{let k=h.node(O);k.x-=E,k.y-=G}),h.edges().forEach(O=>{let k=h.edge(O);k.points.forEach(R=>{R.x-=E,R.y-=G}),Object.hasOwn(k,"x")&&(k.x-=E),Object.hasOwn(k,"y")&&(k.y-=G)}),K.width=D-E+J,K.height=U-G+Q}function _(h){h.edges().forEach(E=>{let D=h.edge(E),G=h.node(E.v),U=h.node(E.w),K,J;D.points?(K=D.points[0],J=D.points[D.points.length-1]):(D.points=[],K=U,J=G),D.points.unshift(f.intersectRect(G,K)),D.points.push(f.intersectRect(U,J))})}function M(h){h.edges().forEach(E=>{let D=h.edge(E);if(Object.hasOwn(D,"x"))switch((D.labelpos==="l"||D.labelpos==="r")&&(D.width-=D.labeloffset),D.labelpos){case"l":D.x-=D.width/2+D.labeloffset;break;case"r":D.x+=D.width/2+D.labeloffset;break}})}function z(h){h.edges().forEach(E=>{let D=h.edge(E);D.reversed&&D.points.reverse()})}function H(h){h.nodes().forEach(E=>{if(h.children(E).length){let D=h.node(E),G=h.node(D.borderTop),U=h.node(D.borderBottom),K=h.node(D.borderLeft[D.borderLeft.length-1]),J=h.node(D.borderRight[D.borderRight.length-1]);D.width=Math.abs(J.x-K.x),D.height=Math.abs(U.y-G.y),D.x=K.x+D.width/2,D.y=G.y+D.height/2}}),h.nodes().forEach(E=>{h.node(E).dummy==="border"&&h.removeNode(E)})}function L(h){h.edges().forEach(E=>{if(E.v===E.w){var D=h.node(E.v);D.selfEdges||(D.selfEdges=[]),D.selfEdges.push({e:E,label:h.edge(E)}),h.removeEdge(E)}})}function C(h){var E=f.buildLayerMatrix(h);E.forEach(D=>{var G=0;D.forEach((U,K)=>{var J=h.node(U);J.order=K+G,(J.selfEdges||[]).forEach(Q=>{f.addDummyNode(h,"selfedge",{width:Q.label.width,height:Q.label.height,rank:J.rank,order:K+ ++G,e:Q.e,label:Q.label},"_se")}),delete J.selfEdges})})}function B(h){h.nodes().forEach(E=>{var D=h.node(E);if(D.dummy==="selfedge"){var G=h.node(D.e.v),U=G.x+G.width/2,K=G.y,J=D.x-U,Q=G.height/2;h.setEdge(D.e,D.label),h.removeNode(E),D.label.points=[{x:U+2*J/3,y:K-Q},{x:U+5*J/6,y:K-Q},{x:U+J,y:K},{x:U+5*J/6,y:K+Q},{x:U+2*J/3,y:K+Q}],D.label.x=D.x,D.label.y=D.y}})}function Z(h,E){return f.mapValues(f.pick(h,E),Number)}function w(h){var E={};return h&&Object.entries(h).forEach(([D,G])=>{typeof D=="string"&&(D=D.toLowerCase()),E[D]=G}),E}}),ch=xe((e,t)=>{var n=Me(),o=Ye().Graph;t.exports={debugOrdering:r};function r(i){let a=n.buildLayerMatrix(i),s=new o({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(l=>{s.setNode(l,{label:l}),s.setParent(l,"layer"+i.node(l).rank)}),i.edges().forEach(l=>s.setEdge(l.v,l.w,{},l.name)),a.forEach((l,u)=>{let c="layer"+u;s.setNode(c,{rank:"same"}),l.reduce((d,g)=>(s.setEdge(d,g,{style:"invis"}),g))}),s}}),dh=xe((e,t)=>{t.exports="2.0.4"}),fh=xe((e,t)=>{t.exports={graphlib:Ye(),layout:uh(),debug:ch(),util:{time:Me().time,notime:Me().notime},version:dh()}});const Io=fh();function hh(){const{findNode:e}=Ne(),t=Ee(new Io.graphlib.Graph),n=Ee("LR");function o(r,i,a){const s=new Io.graphlib.Graph;t.value=s,s.setDefaultEdgeLabel(()=>({}));const l=a==="LR";s.setGraph({rankdir:a}),n.value=a;for(const u of r){const c=e(u.id);s.setNode(u.id,{width:c.dimensions.width,height:c.dimensions.height})}for(const u of i)s.setEdge(u.source,u.target);return s.graph().ranksep=200,Io.layout(s),r.map(u=>{const c=s.node(u.id);return u.type=="cosmos"||u.type=="interface"||u.type=="router"||u.type=="target"?{...u,targetPosition:l?re.Left:re.Top,sourcePosition:l?re.Right:re.Bottom,position:{x:c.x,y:c.y}}:u})}return{graph:t,layout:o,previousDirection:n}}const ph={class:"interface-flow-chart"},gh={class:"docs-overlay"},vh={href:"/tools/staticdocs/docs/tools/cmd-tlm-server#data-flows-tab",target:"_blank",class:"docs-link"},mh={key:1,class:"empty-state"},Jh=Gi("_",{__name:"InterfaceFlowChart",props:{interfaceDetails:{type:Array,default:()=>[]},routerDetails:{type:Array,default:()=>[]}},setup(e){const{layout:t}=hh(),{onConnect:n,addEdges:o,onNodesChange:r,applyNodeChanges:i,onEdgesChange:a,applyEdgeChanges:s,fitView:l,findNode:u,getViewport:c,setViewport:d}=Ne(),g=rt("dialog"),f=new Yo,b=e,N=Ee([]),S=Ee([]);let A=!1,$=!1;async function m(x,v=!1){(A||v)&&(N.value=t(N.value,S.value,x),A=!1,$=!1,Ae(()=>{l()}))}n(x=>{let v=x.source.startsWith("interface__"),T=x.target.startsWith("interface__"),p=x.source.startsWith("router__"),I=x.target.startsWith("router__"),_=x.source.startsWith("cosmos__"),M=x.target.startsWith("cosmos__"),z=x.source.startsWith("target__"),H=x.target.startsWith("target__"),L=x.sourceHandle.split("__")[1],C=x.targetHandle.split("__")[1];if(L!==C||v&&T||p&&I||p&&T||v&&I||_&&M||z&&H||_&&H||z&&M)return;let B="";_&&(B=B+`cosmos__${x.source.split("__")[1]}`),M&&(B=B+`cosmos__${x.target.split("__")[1]}`),B.length==0&&(v&&(B=B+`interface__${x.source.split("__")[1]}`),T&&(B=B+`interface__${x.target.split("__")[1]}`),p&&(B=B+`router__${x.source.split("__")[1]}`),I&&(B=B+`router__${x.target.split("__")[1]}`)),B.startsWith("cosmos__")&&(v&&(B=B+`__interface__${x.source.split("__")[1]}`),T&&(B=B+`__interface__${x.target.split("__")[1]}`),p&&(B=B+`__router__${x.source.split("__")[1]}`),I&&(B=B+`__router__${x.target.split("__")[1]}`)),z&&(B=B+`__target__${x.source.split("__")[1]}`),H&&(B=B+`__target__${x.target.split("__")[1]}`),B=B+`__${L}`,x.id=B;let Z=!1;if(S.value.forEach(K=>{if(K.id===B){Z=!0;return}}),Z)return;let w="",h="",E="",D=B.split("__"),G=D[0],U=D[4];G==="cosmos"?(h=D[1],w=D[2],E=D[3],U=="cmd"?(x.type="default",x.label="CMD Enable",x.markerStart={type:"arrowclosed"}):(x.type="default",x.label="Tlm Enable",x.markerEnd={type:"arrowclosed"}),w==="interface"?f.interface_target_enable(E,h,U==="cmd",U==="tlm").then(K=>{o(x),S.value.push(x)}):f.router_target_enable(E,h,U==="cmd",U==="tlm").then(K=>{o(x),S.value.push(x)})):(w=D[0],E=D[1],h=D[3],U=="cmd"?(x.type="default",x.label="CMD Map",x.markerStart={type:"arrowclosed"}):(x.type="default",x.label="Tlm Map",x.markerEnd={type:"arrowclosed"}),w==="interface"?g.confirm(`${x.label} target ${h} to interface ${E}? Note this will cause the interface to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{f.map_target_to_interface(h,E,U==="cmd",U==="tlm",!1).then(K=>{o(x),S.value.push(x)})}):g.confirm(`${x.label} target ${h} to router ${E}? Note this will cause the router to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{f.map_target_to_router(h,E,U==="cmd",U==="tlm",!1).then(K=>{o(x),S.value.push(x)})}))}),r(async x=>{const v=[];for(const T of x)T.type!=="remove"&&v.push(T),T.type==="dimensions"&&$&&(A=!0,Ae(()=>{m("LR")}));i(v)}),a(async x=>{const v=[];for(const T of x)if(T.type!=="remove")v.push(T);else{let p="",I="",_="",M="",z="",H=T.id.split("__"),L=H[0],C=H[4];L==="cosmos"?(_=H[1],M=H[2],z=H[3],p=`Disable ${_} ${C} with ${M} ${z}?`,I="Disable"):(M=H[0],z=H[1],_=H[3],p=`Unmap ${_} ${C} with ${M} ${z}? Note this will cause the ${M} to restart.`,I="Unmap"),g.confirm(p,{okText:I,cancelText:"Cancel"}).then(()=>{L=="cosmos"?M=="interface"?f.interface_target_disable(z,_,C==="cmd",C==="tlm").then(B=>{s([T]),S.value.forEach((Z,w)=>{if(Z.id===T.id){S.value.splice(w,1);return}})}):f.router_target_disable(z,_,C==="cmd",C==="tlm").then(B=>{s([T]),S.value.forEach((Z,w)=>{if(Z.id===T.id){S.value.splice(w,1);return}})}):M=="interface"?f.unmap_target_from_interface(_,z,C==="cmd",C==="tlm").then(B=>{s([T]),S.value.forEach((Z,w)=>{if(Z.id===T.id){S.value.splice(w,1);return}})}):f.unmap_target_from_router(_,z,C==="cmd",C==="tlm").then(B=>{s([T]),S.value.forEach((Z,w)=>{if(Z.id===T.id){S.value.splice(w,1);return}})})})}s(v)});const y=Ee(!1),V=Ee(null),F=Ee(null),j=Ee(null),X=Ee(null);function q(x){x.node.type==="interface"?(V.value="Interface",F.value=b.interfaceDetails[x.node.data.label],j.value=null,X.value=null,y.value=!0):x.node.type=="router"?(V.value="Router",F.value=b.routerDetails[x.node.data.label],j.value=null,X.value=null,y.value=!0):(x.node.type==="read-protocol"||x.node.type=="write-protocol")&&(x.node.data.interface?(V.value="Interface",F.value=b.interfaceDetails[x.node.data.interface]):(V.value="Router",F.value=b.routerDetails[x.node.data.router]),j.value=null,X.value=x.node.data.index,y.value=!0)}function P(){const x=new Set(N.value.map(C=>C.id)),v=new Map,T=x.size>0?c():null;N.value.forEach(C=>{const B=u(C.id);B&&v.set(C.id,{x:B.position.x,y:B.position.y})}),N.value=[],S.value=[];const p=[];let I=b.interfaceDetails||{};for(const C in I){(b.interfaceDetails[C].cmd_target_names||[]).forEach(w=>{p.includes(w)||p.push(w);const h={id:`interface__${C}__target__${w}__cmd`,source:`interface__${C}`,target:`target__${w}`,sourceHandle:"interface__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};S.value.push(h)});for(const[w,h]of Object.entries(b.interfaceDetails[C].cmd_target_enabled)){if(w==="UNKNOWN"||!h)continue;const E={id:`cosmos__${w}__interface__${C}__cmd`,target:`interface__${C}`,source:`cosmos__${w}`,sourceHandle:"cosmos__cmd",targetHandle:"interface__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};S.value.push(E)}(b.interfaceDetails[C].tlm_target_names||[]).forEach(w=>{p.includes(w)||p.push(w);const h={id:`interface__${C}__target__${w}__tlm`,source:`interface__${C}`,target:`target__${w}`,sourceHandle:"interface__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};S.value.push(h)});for(const[w,h]of Object.entries(b.interfaceDetails[C].tlm_target_enabled)){if(w==="UNKNOWN"||!h)continue;const E={id:`cosmos__${w}__interface__${C}__tlm`,target:`interface__${C}`,source:`cosmos__${w}`,sourceHandle:"cosmos__tlm",targetHandle:"interface__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};S.value.push(E)}}let _=b.routerDetails||{};for(const C in _){(b.routerDetails[C].cmd_target_names||[]).forEach(w=>{p.includes(w)||p.push(w);const h={id:`router__${C}__target__${w}__cmd`,source:`router__${C}`,target:`target__${w}`,sourceHandle:"router__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};S.value.push(h)});for(const[w,h]of Object.entries(b.routerDetails[C].cmd_target_enabled)){if(w==="UNKNOWN"||!h)continue;const E={id:`cosmos__${w}__router__${C}__cmd`,target:`router__${C}`,source:`cosmos__${w}`,sourceHandle:"cosmos__cmd",targetHandle:"router__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};S.value.push(E)}(b.routerDetails[C].tlm_target_names||[]).forEach(w=>{p.includes(w)||p.push(w);const h={id:`router__${C}__target__${w}__tlm`,source:`router__${C}`,target:`target__${w}`,sourceHandle:"router__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};S.value.push(h)});for(const[w,h]of Object.entries(b.routerDetails[C].tlm_target_enabled)){if(w==="UNKNOWN"||!h)continue;const E={id:`cosmos__${w}__router__${C}__tlm`,target:`router__${C}`,source:`cosmos__${w}`,sourceHandle:"cosmos__tlm",targetHandle:"router__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};S.value.push(E)}}p.forEach((C,B)=>{let Z,w;Z=0,w=B*250;const h={id:`cosmos__${C}`,type:"cosmos",position:{x:Z,y:w},data:{label:C},draggable:!0};N.value.push(h)});let M=0,z=200;for(const C in I){let B=b.interfaceDetails[C].write_protocols||[],Z=b.interfaceDetails[C].read_protocols||[];const w=Math.max(B.length,Z.length,1),h=Math.max(200,80+w*70);h>z&&(z=h);const E=200,D={id:`interface__${C}`,type:"interface",position:{x:400,y:(E+50)*M},data:{label:C,width:h,height:E},draggable:!0};N.value.push(D),M+=1;const G=50;B.forEach((U,K)=>{let J=U.name;U.name.slice(-8)==="Protocol"&&(J=U.name.slice(0,-8));const Q={id:`write-protocol__interface__${C}__${K}`,type:"write-protocol",position:{x:G+K*70,y:98},data:{index:K,interface:C,label:J},draggable:!1,parentNode:`interface__${C}`,extent:"parent"};N.value.push(Q)}),Z.forEach((U,K)=>{let J=U.name;U.name.slice(-8)==="Protocol"&&(J=U.name.slice(0,-8));const Q={id:`read-protocol__interface__${C}__${K}`,type:"read-protocol",position:{x:G+K*70,y:148},data:{index:K,interface:C,label:J},draggable:!1,parentNode:`interface__${C}`,extent:"parent"};N.value.push(Q)})}for(const C in _){let B=b.routerDetails[C].write_protocols||[],Z=b.routerDetails[C].read_protocols||[];const w=Math.max(B.length,Z.length,1),h=Math.max(200,80+w*70);h>z&&(z=h);const E=200,D={id:`router__${C}`,type:"router",position:{x:400,y:(E+50)*M},data:{label:C,width:h,height:E},draggable:!0};N.value.push(D),M+=1;const G=50;B.forEach((U,K)=>{let J=U.name;U.name.slice(-8)==="Protocol"&&(J=U.name.slice(0,-8));const Q={id:`write-protocol__router__${C}__${K}`,type:"write-protocol",position:{x:G+K*70,y:98},data:{index:K,router:C,label:J},draggable:!1,parentNode:`router__${C}`,extent:"parent"};N.value.push(Q)}),Z.forEach((U,K)=>{let J=U.name;U.name.slice(-8)==="Protocol"&&(J=U.name.slice(0,-8));const Q={id:`read-protocol__router__${C}__${K}`,type:"read-protocol",position:{x:G+K*70,y:148},data:{index:K,router:C,label:J},draggable:!1,parentNode:`router__${C}`,extent:"parent"};N.value.push(Q)})}p.forEach((C,B)=>{let Z,w;Z=400+z+200,w=B*250;const h={id:`target__${C}`,type:"target",position:{x:Z,y:w},data:{label:C},draggable:!0};N.value.push(h)});const H=new Set(N.value.map(C=>C.id));x.size===0||x.size!==H.size||[...H].some(C=>!x.has(C))||[...x].some(C=>!H.has(C))?($=!0,A=!0):$||(N.value=N.value.map(C=>{const B=v.get(C.id);return B?{...C,position:B}:C}),T&&Ae(()=>{d(T)}))}return _e(()=>b.interfaceDetails,async()=>{b.interfaceDetails!==null&&P()},{immediate:!0}),_e(()=>b.routerDetails,async()=>{b.routerDetails!==null&&P()},{immediate:!0}),(x,v)=>{const T=ke("v-icon"),p=ke("v-dialog");return ie(),he("div",ph,[N.value.length>0?(ie(),De(oe($d),{key:0,nodes:N.value,edges:S.value,"max-zoom":4,"min-zoom":.01,class:"vue-flow-container","elevate-edges-on-select":"","apply-default":!1,onNodeClick:q},{"node-interface":me(({data:I})=>[ue(mf,{data:I},null,8,["data"])]),"node-router":me(({data:I})=>[ue(bf,{data:I},null,8,["data"])]),"node-target":me(({data:I})=>[ue(Df,{data:I},null,8,["data"])]),"node-cosmos":me(I=>[ue(kf,Ho(Lo(I)),null,16)]),"node-write-protocol":me(({data:I})=>[ue(Af,{data:I},null,8,["data"])]),"node-read-protocol":me(({data:I})=>[ue(Lf,{data:I},null,8,["data"])]),default:me(()=>[ue(oe(sf),{"pattern-color":"#aaa",gap:16}),fe("div",gh,[fe("a",vh,[ue(T,{size:"small",class:"mr-1"},{default:me(()=>[...v[3]||(v[3]=[He("mdi-file-document-outline",-1)])]),_:1}),v[4]||(v[4]=He(" Docs ",-1))])]),ue(oe(ef),null,{default:me(()=>[ue(oe(tn),{title:"Reset",onClick:v[0]||(v[0]=I=>m("LR",!0))},{default:me(()=>[...v[5]||(v[5]=[fe("svg",{width:"16",height:"16",viewBox:"0 0 32 32"},[fe("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"])):(ie(),he("div",mh,[ue(T,{size:"large",color:"grey"},{default:me(()=>[...v[6]||(v[6]=[He("mdi-lan-disconnect",-1)])]),_:1}),v[7]||(v[7]=fe("div",{class:"text-grey mt-2"},"Nothing to show",-1))])),ue(p,{modelValue:y.value,"onUpdate:modelValue":v[2]||(v[2]=I=>y.value=I),"max-width":"80vw","max-height":"80vh"},{default:me(()=>[ue(hf,{mode:V.value,details:F.value,"read-protocol-index":X.value,"write-protocol-index":j.value,onClose:v[1]||(v[1]=I=>y.value=!1)},null,8,["mode","details","read-protocol-index","write-protocol-index"])]),_:1},8,["modelValue"])])}}})})}}));
|