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.
Files changed (109) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdtlmserver/ArrayWidget-DMSm_P6c-694a5d20f37aee56e971.js +2 -0
  3. data/tools/cmdtlmserver/{ArrayplotWidget-D5McM1rY-661317b5b349b1b727fe.js → ArrayplotWidget-fdXLhGAl-ee49423a88f0830f3d10.js} +1 -1
  4. data/tools/cmdtlmserver/{BarColumn-BtP1cQcf-6f53f3bdb97d0372645c.js → BarColumn-Bb305iCi-1d6370d3a5948e7070fb.js} +1 -1
  5. data/tools/cmdtlmserver/{BlockWidget-BKMse4hP-e7b70e89c2c39484d29d.js → BlockWidget-Do3W6tZh-0465ab5ccbba95c9cd95.js} +2 -2
  6. data/tools/cmdtlmserver/{ButtonWidget-BLNVL46w-4fa94ac0c43974482184.js → ButtonWidget-DukCQt0F-73553c5eb8665f5a122c.js} +2 -2
  7. data/tools/cmdtlmserver/CanvasWidget-BRdVWln5-ecfd6c23ebdef1641cbe.js +1 -0
  8. data/tools/cmdtlmserver/CanvasdotWidget-DV8PeDWz-9ea509837174f807accc.js +1 -0
  9. data/tools/cmdtlmserver/{CanvasimageWidget-B_JxCI_f-179f2f4699c4f93fb1ac.js → CanvasimageWidget-Czbq1GuF-f6237d2815bb4fb67627.js} +1 -1
  10. data/tools/cmdtlmserver/{CanvasimagevalueWidget-DwHIZzWo-fa3bbe0b2469593b289f.js → CanvasimagevalueWidget-DKt5JgEt-4d4748409b4390fd9317.js} +1 -1
  11. data/tools/cmdtlmserver/CanvaslabelWidget-DW2I1ra1-21be90e9689988d7cc0b.js +1 -0
  12. data/tools/cmdtlmserver/CanvaslabelvalueWidget-BhzvZVfD-98ba8f4d0b737ae50149.js +1 -0
  13. data/tools/cmdtlmserver/CanvaslineWidget-DsjY37tp-333343a7e55e7ced336a.js +1 -0
  14. data/tools/cmdtlmserver/{CanvaslinevalueWidget-DOrasE2j-5aeac7a23e9ec28f1941.js → CanvaslinevalueWidget-ihI97G8T-a999105fab2c48e7d5a3.js} +1 -1
  15. data/tools/cmdtlmserver/{CheckbuttonWidget-A07FryqU-9bc4830f39e3e35cffea.js → CheckbuttonWidget-B778Z-Zo-929c0f581f4e6fc8bb9b.js} +1 -1
  16. data/tools/cmdtlmserver/{CmdPacketsTab-29efedd4eb266ffd883d.js → CmdPacketsTab-ab63982334bccb674566.js} +1 -1
  17. data/tools/cmdtlmserver/{CmdTlmServer-68fb807aab8083098b67.js → CmdTlmServer-dbb3257de023db2ad7db.js} +2 -2
  18. data/tools/cmdtlmserver/{ComboboxWidget-xayce-aY-d54dfbc883dfdf372900.js → ComboboxWidget-CuuvOL9K-580e3a816c2a39c9dc31.js} +1 -1
  19. data/tools/cmdtlmserver/DataFlowsTab-651405c9f3cd11ec53ae.js +1 -0
  20. data/tools/cmdtlmserver/{DateWidget-DrYZJta_-df3b233595a6940ec169.js → DateWidget-COvQTAeo-8e7e5760cca1eca77fb7.js} +1 -1
  21. data/tools/cmdtlmserver/{DetailsDialog-CFCaJZWz-61ed81a308d60ab11b8c.js → DetailsDialog-DE7lK17G-f251b58f150be03f9878.js} +1 -1
  22. data/tools/cmdtlmserver/{DynamicWidget-BuSbQVhf-436ffdc664ae0abbc2a8.js → DynamicWidget-BuSbQVhf-d28b4dd265895ced834e.js} +1 -1
  23. data/tools/cmdtlmserver/{FilechecksumWidget-CTf0XGST-5f2822d0fdc84e064b12.js → FilechecksumWidget-DRnOt_UE-e8bcb330e9f8161abcb5.js} +1 -1
  24. data/tools/cmdtlmserver/{FiledisplayWidget-DLJuesmU-a0cbb5edf12ec790c493.js → FiledisplayWidget-26R46EjS-50600e2205e679c6e7a3.js} +1 -1
  25. data/tools/cmdtlmserver/{FormatvalueWidget-DODmUWPH-d4135b59235d1671b11e.js → FormatvalueWidget-BxyscMJc-deb6fbbd21db3f9b9533.js} +1 -1
  26. data/tools/cmdtlmserver/Graph-BKw7xw1a-cafa3fdb6d474421c777.js +1 -0
  27. data/tools/cmdtlmserver/{GraphWidget-Rc-fnHCt-d92fb66d84483c5f50e6.js → GraphWidget-Cs9mvqUu-bb3bb075fd0ea3764beb.js} +1 -1
  28. data/tools/cmdtlmserver/{HorizontalWidget-CZqN6UYp-557a5be1a4e9ef13130c.js → HorizontalWidget-fWLFj7Kg-87dfe4a783ca9d8718a3.js} +1 -1
  29. data/tools/cmdtlmserver/{HorizontalboxWidget-BV7cyhwN-3fc1020bf4c46eac17df.js → HorizontalboxWidget-DEaXhKEz-3cc78a62e93fced5cc2d.js} +1 -1
  30. data/tools/cmdtlmserver/HorizontallineWidget-Bvu1QP3S-1c0a38d8daf4285046b0.js +1 -0
  31. data/tools/cmdtlmserver/{IframeWidget-BdOS5sm_-a1e455a7259e516c2b17.js → IframeWidget-B143k4lo-211336261edc12558ba4.js} +1 -1
  32. data/tools/cmdtlmserver/{ImageLoader-CnlQ4xLd-bd0a13b3fb8316bd8bb5.js → ImageLoader-BCpmQHIl-e1f186d47f7443384752.js} +1 -1
  33. data/tools/cmdtlmserver/{ImageviewerWidget-DoJBe5eZ-e46493a5012e67584e5f.js → ImageviewerWidget-CLrvr6dw-dbefc7bb490747b4d32b.js} +1 -1
  34. data/tools/cmdtlmserver/InterfaceFlowChart-87892813bbc3da7dd816.js +27 -0
  35. data/tools/cmdtlmserver/{InterfacesTab-f5079d4a00c1e263ec24.js → InterfacesTab-c3d2cc4844087b3f946d.js} +1 -1
  36. data/tools/cmdtlmserver/{LabelWidget-DYwcB_S4-bfd0d30d820aa90fe748.js → LabelWidget-CA1bTX2B-2c9d603681176335c5dd.js} +1 -1
  37. data/tools/cmdtlmserver/LabelledWidget-BDhvr03J-fe41df86dd3cc7e1d625.js +1 -0
  38. data/tools/cmdtlmserver/{LabelprogressbarWidget-CRnteLAo-069c89074f9e19d3642a.js → LabelprogressbarWidget-g7A5CE8S-17fe760704ac3e7697ad.js} +1 -1
  39. data/tools/cmdtlmserver/LabelsparklineWidget-B27xXxWg-960e3827bda04825c04a.js +1 -0
  40. data/tools/cmdtlmserver/LabelvalueWidget-DFn8o6LC-382c91895aa50abef201.js +1 -0
  41. data/tools/cmdtlmserver/{LabelvaluedescWidget-D5aDNr1o-d885dad7c04bba26bbef.js → LabelvaluedescWidget-BQpaxFaB-abcd49094e4d21057a3d.js} +1 -1
  42. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-C-z96q8z-1f5e8f4cf393ac65098f.js +1 -0
  43. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D2TMEv9O-11b6844f84b58504c3aa.js +1 -0
  44. data/tools/cmdtlmserver/LabelvaluerangebarWidget-D99dZCjz-2c72dd417308f8cf3b83.js +1 -0
  45. data/tools/cmdtlmserver/{Layout-BBLYT0gE-d91dd5314e4c36560e3b.js → Layout--_zNJWnw-9367ae190fb0e9bf1b84.js} +1 -1
  46. data/tools/cmdtlmserver/{LedWidget-CL2dOxb7-cbd3cd315cc75f862cc6.js → LedWidget-D2uxHxe3-22c8c1f89536f753f5e6.js} +1 -1
  47. data/tools/cmdtlmserver/{LimitsBar-59_qNqi8-4ba4250a900c9205310f.js → LimitsBar-DN1s8-MS-d3248be80e3262273e82.js} +1 -1
  48. data/tools/cmdtlmserver/{LimitsbarWidget-C0N2611W-cf022e4fd099879650b8.js → LimitsbarWidget-Cqhh7LKU-7f40da6484ccbe5da287.js} +1 -1
  49. data/tools/cmdtlmserver/{LimitscolorWidget-GfNCPo3i-0af98b4d40d5ce8c611b.js → LimitscolorWidget-haGB4RbY-ddf6b0791eb1be4ac6c5.js} +1 -1
  50. data/tools/cmdtlmserver/{LimitscolumnWidget-ut6NX68S-e246ad5cdeca74da2b62.js → LimitscolumnWidget-B1GdmlR_-86b9a2cc5c084b705674.js} +1 -1
  51. data/tools/cmdtlmserver/LinegraphWidget-COSOQ0uM-a5300046319a8e9bc2ac.js +1 -0
  52. data/tools/cmdtlmserver/{MatrixbycolumnsWidget-Cni63alW-06f4eae845e32a592cc2.js → MatrixbycolumnsWidget-coHlLETG-e799eaa675cfbf970ed5.js} +1 -1
  53. data/tools/cmdtlmserver/{OpenC3TimePicker-WVlNQdKk-1a6b624566a48500e00e.js → OpenC3TimePicker-B8Vu9GBz-89d21b420245131e470d.js} +1 -1
  54. data/tools/cmdtlmserver/{ProgressbarWidget-BWqCsk87-c8a5376745686c565b34.js → ProgressbarWidget-D_yFssIZ-2510755cf05a8167431f.js} +1 -1
  55. data/tools/cmdtlmserver/{RadiobuttonWidget-Dza2r34f-fb046e28929024f575af.js → RadiobuttonWidget-DL0jVTcb-101358296cb6f3e5ac75.js} +1 -1
  56. data/tools/cmdtlmserver/{RadiogroupWidget-DWmZMNmr-a1a0acab00cb25d11721.js → RadiogroupWidget-2-td69IA-98144436c4729f2db047.js} +1 -1
  57. data/tools/cmdtlmserver/{RangebarWidget-DsGCC1x7-f1d7ac55319f5d4530fd.js → RangebarWidget-i2mlnxys-3ecd19c88b6a2f13fc7a.js} +1 -1
  58. data/tools/cmdtlmserver/{RawBuffer-b57ec55fa04e3c02535c.js → RawBuffer-5a59e58e37f6021cf46c.js} +1 -1
  59. data/tools/cmdtlmserver/{RawDialog-042f9b067cb7fafa6742.js → RawDialog-3a0c000973893535a456.js} +1 -1
  60. data/tools/cmdtlmserver/{RollupWidget-DGElKXm3-4ddc608ad8cdf780c40d.js → RollupWidget-BEJ2Icg1-416b8d9160f2a81fd538.js} +1 -1
  61. data/tools/cmdtlmserver/{RoutersTab-f2b5a2e96c0205b9f30f.js → RoutersTab-7710ec67843901567d25.js} +1 -1
  62. data/tools/cmdtlmserver/{ScrollwindowWidget-BvKT59rV-e5bef711a079588548b8.js → ScrollwindowWidget-BU1cRpL8-d99f9e1c5467abc7ed03.js} +1 -1
  63. data/tools/cmdtlmserver/{SignalWidget-DRAFunW0-8f14111de3f274530506.js → SignalWidget-hiTkeem9-9efe6cdd22515ebf8555.js} +1 -1
  64. data/tools/cmdtlmserver/SpacerWidget-CBmzzS_X-e8f51b2251bb08fed6b0.js +1 -0
  65. data/tools/cmdtlmserver/{SparklineWidget-SBWjRrqq-6fedc7c3fb077a93841a.js → SparklineWidget-CizRh6QR-92a3ebcc84a5687d3b93.js} +1 -1
  66. data/tools/cmdtlmserver/{StatusTab-0dcb827cc6ba6b4248ea.js → StatusTab-efcdd278c79f71b06e9b.js} +1 -1
  67. data/tools/cmdtlmserver/{TabbookWidget-7l6fPoRA-13daf0b5a570cb171f15.js → TabbookWidget-CvL3Ozmx-19c91b22633cf0927a1e.js} +1 -1
  68. data/tools/cmdtlmserver/{TargetsTab-b949468238e2c47f586b.js → TargetsTab-326711a03f6c9686634d.js} +1 -1
  69. data/tools/cmdtlmserver/{TextboxWidget-Qb0TNt4Y-ce1afdf7e1d90cc64e61.js → TextboxWidget-BtEwXzDO-52792ac2b6593c85c776.js} +1 -1
  70. data/tools/cmdtlmserver/{TextfieldWidget-DcSGRfnF-a7809cd7d5a664b4c0c9.js → TextfieldWidget-BDbb57HP-7306fcc70fc27079b1d3.js} +1 -1
  71. data/tools/cmdtlmserver/TimeWidget-DzD8U8l8-db805689f0b8dbaab9f7.js +1 -0
  72. data/tools/cmdtlmserver/{TitleWidget-C8b9Vp5r-99cf2b02c10b64dca183.js → TitleWidget-CL53vf14-c0987297e98b6c858650.js} +1 -1
  73. data/tools/cmdtlmserver/{TlmPacketsTab-92fafc983fc6f8605eeb.js → TlmPacketsTab-91250bba537c7eb02f7c.js} +1 -1
  74. data/tools/cmdtlmserver/{Updater-1bff129cf4c5b566e4b7.js → Updater-af04370b0601580396d1.js} +1 -1
  75. data/tools/cmdtlmserver/{VWidget-BgNciXK1-381c03faa8917b011e04.js → VWidget-5qOYva88-5dc877752d53235d987d.js} +1 -1
  76. data/tools/cmdtlmserver/{ValueWidget-B1OvCmXK-d45771e1052030d4b9e4.js → ValueWidget-CAkuc_w_-0721aa9556f274d056ba.js} +1 -1
  77. data/tools/cmdtlmserver/ValuelimitsbarWidget-Y8sO05E1-f729f6e347b2f5825407.js +1 -0
  78. data/tools/cmdtlmserver/ValuelimitscolumnWidget-iOjB_fCj-ae174dd346919467bac7.js +1 -0
  79. data/tools/cmdtlmserver/{ValuerangebarWidget-DjL4ze3d-329b4ba511bfe843e5bf.js → ValuerangebarWidget-DsCoeAm6-7804711bfe999dad21a6.js} +1 -1
  80. data/tools/cmdtlmserver/{VerticalWidget-V5-vGq7l-6bba1f8b9fdc94e4a2ce.js → VerticalWidget-C6O0dhRU-a30bbb27eaa68c233c89.js} +1 -1
  81. data/tools/cmdtlmserver/{VerticalboxWidget-OigMLjH8-639722d4c54c41938b65.js → VerticalboxWidget-B-CoqRJG-ba12b0177fbcd7fb76e1.js} +1 -1
  82. data/tools/cmdtlmserver/{Widget-BiaunQ83-9db8c69b1fa2fb12a253.js → Widget-CtYQauzA-69fc956797d4c4719727.js} +1 -1
  83. data/tools/cmdtlmserver/main-78902a467d9f5f7771dd.js +1499 -0
  84. data/tools/cmdtlmserver/main.js +1 -1
  85. data/tools/cmdtlmserver/services-fee3a04fec3ff6af8998.js +10 -0
  86. metadata +84 -84
  87. data/tools/cmdtlmserver/ArrayWidget-CmKZQfWB-4e00489b0264cc8dfcda.js +0 -2
  88. data/tools/cmdtlmserver/CanvasWidget-1jy1JskS-78487686081412e10916.js +0 -1
  89. data/tools/cmdtlmserver/CanvasdotWidget-DxuFGoWt-ea33615de6d5602f32e1.js +0 -1
  90. data/tools/cmdtlmserver/CanvaslabelWidget-Tt4dmAOI-037604d1b61d1b57a8fc.js +0 -1
  91. data/tools/cmdtlmserver/CanvaslabelvalueWidget-D1-kZsi--a596451eb90fe438480e.js +0 -1
  92. data/tools/cmdtlmserver/CanvaslineWidget-Din8LMyF-158bc2b4a39a4fae162f.js +0 -1
  93. data/tools/cmdtlmserver/DataFlowsTab-9e1ffcf4185c68ec95a6.js +0 -1
  94. data/tools/cmdtlmserver/Graph-Cwghj5Pc-afbf017b53a9be5d0b91.js +0 -1
  95. data/tools/cmdtlmserver/HorizontallineWidget-ChDLR_8D-0f9378586bac8a1d8808.js +0 -1
  96. data/tools/cmdtlmserver/InterfaceFlowChart-9fa028bf5a66351fbb3a.js +0 -27
  97. data/tools/cmdtlmserver/LabelledWidget-D4N2gPxJ-c27ae58bf9e701fbf918.js +0 -1
  98. data/tools/cmdtlmserver/LabelsparklineWidget-Bbjjio1S-bf6b2a25eadb7c67c730.js +0 -1
  99. data/tools/cmdtlmserver/LabelvalueWidget-Bc6HtTMO-8b6fcee12793b61c878d.js +0 -1
  100. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-CMnJoNKz-8c2102326e38b64f5171.js +0 -1
  101. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-R5ofG4q1-5433c80ce010ca8d2b43.js +0 -1
  102. data/tools/cmdtlmserver/LabelvaluerangebarWidget-Qa3R2_4p-607724fcdde23b68bae1.js +0 -1
  103. data/tools/cmdtlmserver/LinegraphWidget-DaCyvdnI-4710a406ea75b58d5243.js +0 -1
  104. data/tools/cmdtlmserver/SpacerWidget-CUGpXBpA-6d23529747e319872c99.js +0 -1
  105. data/tools/cmdtlmserver/TimeWidget-aoMkDgRR-4cd49c22b8d67f43d653.js +0 -1
  106. data/tools/cmdtlmserver/ValuelimitsbarWidget-CUd9P_Xg-6791295e417059d96249.js +0 -1
  107. data/tools/cmdtlmserver/ValuelimitscolumnWidget-CbThSMma-cb2bb07907eb435bb5b5.js +0 -1
  108. data/tools/cmdtlmserver/main-d0fabc4d2acb27d40bfd.js +0 -1498
  109. data/tools/cmdtlmserver/services-156f0e34dd9a9852f2e9.js +0 -10
@@ -0,0 +1,27 @@
1
+ System.register(["vue","./Updater-af04370b0601580396d1.js","./RawBuffer-5a59e58e37f6021cf46c.js","./main-78902a467d9f5f7771dd.js","./services-fee3a04fec3ff6af8998.js"],(function(ja,Sv){"use strict";var Kn,ot,qn,_e,ft,Ne,qo,Jo,Q,ce,K,ie,me,ke,Qo,be,xe,fe,Ke,ht,gt,er,At,Oe,tr,qe,ue,Be,ln,ze,Jn,nr,Ie,Me,Te,un,or,rr,pe,Se,ye,ir,Qn,pt,Re,Bt,ar,sr,lr,ur,cr,rt,dr;return{setters:[ne=>{Kn=ne.getCurrentScope,ot=ne.inject,qn=ne.effectScope,_e=ne.watch,ft=ne.provide,Ne=ne.defineComponent,qo=ne.useSlots,Jo=ne.onUnmounted,Q=ne.openBlock,ce=ne.createElementBlock,K=ne.unref,ie=ne.createVNode,me=ne.withCtx,ke=ne.renderSlot,Qo=ne.createPropsRestProxy,be=ne.toRef,xe=ne.ref,fe=ne.computed,Ke=ne.onMounted,ht=ne.normalizeClass,gt=ne.getCurrentInstance,er=ne.reactive,At=ne.onScopeDispose,Oe=ne.nextTick,tr=ne.onBeforeMount,qe=ne.shallowRef,ue=ne.createElementVNode,Be=ne.Fragment,ln=ne.renderList,ze=ne.normalizeStyle,Jn=ne.onBeforeUnmount,nr=ne.isMemoSame,Ie=ne.createBlock,Me=ne.createCommentVNode,Te=ne.toDisplayString,un=ne.isRef,or=ne.toRefs,rr=ne.customRef,pe=ne.toValue,Se=ne.resolveComponent,ye=ne.h,ir=ne.useAttrs,Qn=ne.mergeProps,pt=ne.resolveDynamicComponent,Re=ne.createTextVNode,Bt=ne.markRaw,ar=ne.readonly,sr=ne.normalizeProps,lr=ne.guardReactiveProps},ne=>{ur=ne.U},ne=>{cr=ne.R},ne=>{rt=ne._},ne=>{dr=ne.h}],execute:(function(){var ne=document.createElement("style");ne.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(ne);function Rt(e){return Kn()?(At(e),!0):!1}function Je(e){return typeof e=="function"?e():K(e)}const Za=typeof window<"u"&&typeof document<"u",Ka=e=>typeof e<"u",qa=Object.prototype.toString,Ja=e=>qa.call(e)==="[object Object]",Qa=()=>{};function es(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 fr=e=>e();function ts(e=fr){const t=xe(!0);function n(){t.value=!1}function o(){t.value=!0}const r=(...i)=>{t.value&&e(...i)};return{isActive:ar(t),pause:n,resume:o,eventFilter:r}}function hr(e,t=!1,n="Timeout"){return new Promise((o,r)=>{setTimeout(t?()=>r(n):o,e)})}function ns(e,t,n={}){const{eventFilter:o=fr,...r}=n;return _e(e,es(o,t),r)}function St(e,t,n={}){const{eventFilter:o,...r}=n,{eventFilter:i,pause:a,resume:s,isActive:l}=ts(o);return{stop:ns(e,t,{...r,eventFilter:i}),pause:a,resume:s,isActive:l}}function os(e,t={}){if(!un(e))return or(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const o in e.value)n[o]=rr(()=>({get(){return e.value[o]},set(r){var i;if((i=Je(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 eo(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:_,throwOnTimeout:v}={}){let y=null;const M=[new Promise(w=>{y=_e(e,k=>{d(k)!==t&&(y?.(),w(k))},{flush:f,deep:h,immediate:!0})})];return _!=null&&M.push(hr(_,v).then(()=>Je(e)).finally(()=>y?.())),Promise.race(M)}function o(d,f){if(!un(d))return n(k=>k===d,f);const{flush:h="sync",deep:_=!1,timeout:v,throwOnTimeout:y}=f??{};let S=null;const w=[new Promise(k=>{S=_e([e,d],([H,Y])=>{t!==(H===Y)&&(S?.(),k(H))},{flush:h,deep:_,immediate:!0})})];return v!=null&&w.push(hr(v,y).then(()=>Je(e)).finally(()=>(S?.(),Je(e)))),Promise.race(w)}function r(d){return n(f=>!!f,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,f){return n(h=>{const _=Array.from(h);return _.includes(d)||_.includes(Je(d))},f)}function u(d){return c(1,d)}function c(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(Je(e))?{toMatch:n,toContains:l,changed:u,changedTimes:c,get not(){return eo(e,!t)}}:{toMatch:n,toBe:o,toBeTruthy:r,toBeNull:i,toBeNaN:s,toBeUndefined:a,changed:u,changedTimes:c,get not(){return eo(e,!t)}}}function to(e){return eo(e)}function rs(e){var t;const n=Je(e);return(t=n?.$el)!=null?t:n}const gr=Za?window:void 0;function pr(...e){let t,n,o,r;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,o,r]=e,t=gr):[t,n,o,r]=e,!t)return Qa;Array.isArray(n)||(n=[n]),Array.isArray(o)||(o=[o]);const i=[],a=()=>{i.forEach(c=>c()),i.length=0},s=(c,d,f,h)=>(c.addEventListener(d,f,h),()=>c.removeEventListener(d,f,h)),l=_e(()=>[rs(t),Je(r)],([c,d])=>{if(a(),!c)return;const f=Ja(d)?{...d}:d;i.push(...n.flatMap(h=>o.map(_=>s(c,h,_,f))))},{immediate:!0,flush:"post"}),u=()=>{l(),a()};return Rt(u),u}function is(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function vr(...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=gr,eventName:i="keydown",passive:a=!1,dedupe:s=!1}=o,l=is(t);return pr(r,i,c=>{c.repeat&&Je(s)||l(c)&&n(c)},a)}function as(e){return JSON.parse(JSON.stringify(e))}function no(e,t,n,o={}){var r,i,a;const{clone:s=!1,passive:l=!1,eventName:u,deep:c=!1,defaultValue:d,shouldEmit:f}=o,h=gt(),_=n||h?.emit||((r=h?.$emit)==null?void 0:r.bind(h))||((a=(i=h?.proxy)==null?void 0:i.$emit)==null?void 0:a.bind(h?.proxy));let v=u;t||(t="modelValue"),v=v||`update:${t.toString()}`;const y=w=>s?typeof s=="function"?s(w):as(w):w,S=()=>Ka(e[t])?y(e[t]):d,M=w=>{f?f(w)&&_(v,w):_(v,w)};if(l){const w=S(),k=xe(w);let H=!1;return _e(()=>e[t],Y=>{H||(H=!0,k.value=y(Y),Oe(()=>H=!1))}),_e(k,Y=>{!H&&(Y!==e[t]||c)&&M(Y)},{deep:c}),k}else return fe({get(){return S()},set(w){M(w)}})}var ss={value:()=>{}};function cn(){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 dn(n)}function dn(e){this._=e}function ls(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}})}dn.prototype=cn.prototype={constructor:dn,on:function(e,t){var n=this._,o=ls(e+"",n),r,i=-1,a=o.length;if(arguments.length<2){for(;++i<a;)if((r=(e=o[i]).type)&&(r=us(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]=mr(n[r],e.name,t);else if(t==null)for(r in n)n[r]=mr(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 dn(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 us(e,t){for(var n=0,o=e.length,r;n<o;++n)if((r=e[n]).name===t)return r.value}function mr(e,t,n){for(var o=0,r=e.length;o<r;++o)if(e[o].name===t){e[o]=ss,e=e.slice(0,o).concat(e.slice(o+1));break}return n!=null&&e.push({name:t,value:n}),e}var oo="http://www.w3.org/1999/xhtml";const _r={svg:"http://www.w3.org/2000/svg",xhtml:oo,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fn(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),_r.hasOwnProperty(t)?{space:_r[t],local:e}:e}function cs(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===oo&&t.documentElement.namespaceURI===oo?t.createElement(e):t.createElementNS(n,e)}}function ds(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function yr(e){var t=fn(e);return(t.local?ds:cs)(t)}function fs(){}function ro(e){return e==null?fs:function(){return this.querySelector(e)}}function hs(e){typeof e!="function"&&(e=ro(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 Ae(o,this._parents)}function gs(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function ps(){return[]}function wr(e){return e==null?ps:function(){return this.querySelectorAll(e)}}function vs(e){return function(){return gs(e.apply(this,arguments))}}function ms(e){typeof e=="function"?e=vs(e):e=wr(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 Ae(o,r)}function br(e){return function(){return this.matches(e)}}function xr(e){return function(t){return t.matches(e)}}var _s=Array.prototype.find;function ys(e){return function(){return _s.call(this.children,e)}}function ws(){return this.firstElementChild}function bs(e){return this.select(e==null?ws:ys(typeof e=="function"?e:xr(e)))}var xs=Array.prototype.filter;function Es(){return Array.from(this.children)}function Ns(e){return function(){return xs.call(this.children,e)}}function Ss(e){return this.selectAll(e==null?Es:Ns(typeof e=="function"?e:xr(e)))}function ks(e){typeof e!="function"&&(e=br(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 Ae(o,this._parents)}function Er(e){return new Array(e.length)}function $s(){return new Ae(this._enter||this._groups.map(Er),this._parents)}function hn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hn.prototype={constructor:hn,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 Cs(e){return function(){return e}}function Is(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 hn(e,i[a]);for(;a<l;++a)(s=t[a])&&(r[a]=s)}function Ms(e,t,n,o,r,i,a){var s,l,u=new Map,c=t.length,d=i.length,f=new Array(c),h;for(s=0;s<c;++s)(l=t[s])&&(f[s]=h=a.call(l,l.__data__,s,t)+"",u.has(h)?r[s]=l:u.set(h,l));for(s=0;s<d;++s)h=a.call(e,i[s],s,i)+"",(l=u.get(h))?(o[s]=l,l.__data__=i[s],u.delete(h)):n[s]=new hn(e,i[s]);for(s=0;s<c;++s)(l=t[s])&&u.get(f[s])===l&&(r[s]=l)}function Ds(e){return e.__data__}function Ts(e,t){if(!arguments.length)return Array.from(this,Ds);var n=t?Ms:Is,o=this._parents,r=this._groups;typeof e!="function"&&(e=Cs(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],f=d.length,h=Ps(e.call(c,c&&c.__data__,u,o)),_=h.length,v=s[u]=new Array(_),y=a[u]=new Array(_),S=l[u]=new Array(f);n(c,d,v,y,S,h,t);for(var M=0,w=0,k,H;M<_;++M)if(k=v[M]){for(M>=w&&(w=M+1);!(H=y[w])&&++w<_;);k._next=H||null}}return a=new Ae(a,o),a._enter=s,a._exit=l,a}function Ps(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function Os(){return new Ae(this._exit||this._groups.map(Er),this._parents)}function zs(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 As(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,f=s[l]=new Array(d),h,_=0;_<d;++_)(h=u[_]||c[_])&&(f[_]=h);for(;l<r;++l)s[l]=n[l];return new Ae(s,this._parents)}function Bs(){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 Rs(e){e||(e=Vs);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,o=n.length,r=new Array(o),i=0;i<o;++i){for(var 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 Ae(r,this._parents).order()}function Vs(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Hs(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Ls(){return Array.from(this)}function Fs(){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 Ys(){let e=0;for(const t of this)++e;return e}function Gs(){return!this.node()}function Xs(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 Us(e){return function(){this.removeAttribute(e)}}function Ws(e){return function(){this.removeAttributeNS(e.space,e.local)}}function js(e,t){return function(){this.setAttribute(e,t)}}function Zs(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ks(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function qs(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 Js(e,t){var n=fn(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?Ws:Us:typeof t=="function"?n.local?qs:Ks:n.local?Zs:js)(n,t))}function Nr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Qs(e){return function(){this.style.removeProperty(e)}}function el(e,t,n){return function(){this.style.setProperty(e,t,n)}}function tl(e,t,n){return function(){var o=t.apply(this,arguments);o==null?this.style.removeProperty(e):this.style.setProperty(e,o,n)}}function nl(e,t,n){return arguments.length>1?this.each((t==null?Qs:typeof t=="function"?tl:el)(e,t,n??"")):kt(this.node(),e)}function kt(e,t){return e.style.getPropertyValue(t)||Nr(e).getComputedStyle(e,null).getPropertyValue(t)}function ol(e){return function(){delete this[e]}}function rl(e,t){return function(){this[e]=t}}function il(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function al(e,t){return arguments.length>1?this.each((t==null?ol:typeof t=="function"?il:rl)(e,t)):this.node()[e]}function Sr(e){return e.trim().split(/^|\s+/)}function io(e){return e.classList||new kr(e)}function kr(e){this._node=e,this._names=Sr(e.getAttribute("class")||"")}kr.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 $r(e,t){for(var n=io(e),o=-1,r=t.length;++o<r;)n.add(t[o])}function Cr(e,t){for(var n=io(e),o=-1,r=t.length;++o<r;)n.remove(t[o])}function sl(e){return function(){$r(this,e)}}function ll(e){return function(){Cr(this,e)}}function ul(e,t){return function(){(t.apply(this,arguments)?$r:Cr)(this,e)}}function cl(e,t){var n=Sr(e+"");if(arguments.length<2){for(var o=io(this.node()),r=-1,i=n.length;++r<i;)if(!o.contains(n[r]))return!1;return!0}return this.each((typeof t=="function"?ul:t?sl:ll)(n,t))}function dl(){this.textContent=""}function fl(e){return function(){this.textContent=e}}function hl(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function gl(e){return arguments.length?this.each(e==null?dl:(typeof e=="function"?hl:fl)(e)):this.node().textContent}function pl(){this.innerHTML=""}function vl(e){return function(){this.innerHTML=e}}function ml(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function _l(e){return arguments.length?this.each(e==null?pl:(typeof e=="function"?ml:vl)(e)):this.node().innerHTML}function yl(){this.nextSibling&&this.parentNode.appendChild(this)}function wl(){return this.each(yl)}function bl(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function xl(){return this.each(bl)}function El(e){var t=typeof e=="function"?e:yr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Nl(){return null}function Sl(e,t){var n=typeof e=="function"?e:yr(e),o=t==null?Nl:typeof t=="function"?t:ro(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),o.apply(this,arguments)||null)})}function kl(){var e=this.parentNode;e&&e.removeChild(this)}function $l(){return this.each(kl)}function Cl(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Il(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ml(e){return this.select(e?Il:Cl)}function Dl(e){return arguments.length?this.property("__data__",e):this.node().__data__}function Tl(e){return function(t){e.call(this,t,this.__data__)}}function Pl(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 Ol(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 zl(e,t,n){return function(){var o=this.__on,r,i=Tl(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 Al(e,t,n){var o=Pl(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?zl:Ol,r=0;r<i;++r)this.each(s(o[r],t,n));return this}function Ir(e,t,n){var o=Nr(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 Bl(e,t){return function(){return Ir(this,e,t)}}function Rl(e,t){return function(){return Ir(this,e,t.apply(this,arguments))}}function Vl(e,t){return this.each((typeof t=="function"?Rl:Bl)(e,t))}function*Hl(){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 Mr=[null];function Ae(e,t){this._groups=e,this._parents=t}function Vt(){return new Ae([[document.documentElement]],Mr)}function Ll(){return this}Ae.prototype=Vt.prototype={constructor:Ae,select:hs,selectAll:ms,selectChild:bs,selectChildren:Ss,filter:ks,data:Ts,enter:$s,exit:Os,join:zs,merge:As,selection:Ll,order:Bs,sort:Rs,call:Hs,nodes:Ls,node:Fs,size:Ys,empty:Gs,each:Xs,attr:Js,style:nl,property:al,classed:cl,text:gl,html:_l,raise:wl,lower:xl,append:El,insert:Sl,remove:$l,clone:Ml,datum:Dl,on:Al,dispatch:Vl,[Symbol.iterator]:Hl};function He(e){return typeof e=="string"?new Ae([[document.querySelector(e)]],[document.documentElement]):new Ae([[e]],Mr)}function Fl(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Ye(e,t){if(e=Fl(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 Yl={passive:!1},Ht={capture:!0,passive:!1};function ao(e){e.stopImmediatePropagation()}function $t(e){e.preventDefault(),e.stopImmediatePropagation()}function Dr(e){var t=e.document.documentElement,n=He(e).on("dragstart.drag",$t,Ht);"onselectstart"in t?n.on("selectstart.drag",$t,Ht):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Tr(e,t){var n=e.document.documentElement,o=He(e).on("dragstart.drag",null);t&&(o.on("click.drag",$t,Ht),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in n?o.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const gn=e=>()=>e;function so(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}})}so.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Gl(e){return!e.ctrlKey&&!e.button}function Xl(){return this.parentNode}function Ul(e,t){return t??{x:e.x,y:e.y}}function Wl(){return navigator.maxTouchPoints||"ontouchstart"in this}function jl(){var e=Gl,t=Xl,n=Ul,o=Wl,r={},i=cn("start","drag","end"),a=0,s,l,u,c,d=0;function f(k){k.on("mousedown.drag",h).filter(o).on("touchstart.drag",y).on("touchmove.drag",S,Yl).on("touchend.drag touchcancel.drag",M).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(k,H){if(!(c||!e.call(this,k,H))){var Y=w(this,t.call(this,k,H),k,H,"mouse");Y&&(He(k.view).on("mousemove.drag",_,Ht).on("mouseup.drag",v,Ht),Dr(k.view),ao(k),u=!1,s=k.clientX,l=k.clientY,Y("start",k))}}function _(k){if($t(k),!u){var H=k.clientX-s,Y=k.clientY-l;u=H*H+Y*Y>d}r.mouse("drag",k)}function v(k){He(k.view).on("mousemove.drag mouseup.drag",null),Tr(k.view,u),$t(k),r.mouse("end",k)}function y(k,H){if(e.call(this,k,H)){var Y=k.changedTouches,X=t.call(this,k,H),F=Y.length,ae,q;for(ae=0;ae<F;++ae)(q=w(this,X,k,H,Y[ae].identifier,Y[ae]))&&(ao(k),q("start",k,Y[ae]))}}function S(k){var H=k.changedTouches,Y=H.length,X,F;for(X=0;X<Y;++X)(F=r[H[X].identifier])&&($t(k),F("drag",k,H[X]))}function M(k){var H=k.changedTouches,Y=H.length,X,F;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),X=0;X<Y;++X)(F=r[H[X].identifier])&&(ao(k),F("end",k,H[X]))}function w(k,H,Y,X,F,ae){var q=i.copy(),C=Ye(ae||Y,H),b,V,p;if((p=n.call(k,new so("beforestart",{sourceEvent:Y,target:f,identifier:F,active:a,x:C[0],y:C[1],dx:0,dy:0,dispatch:q}),X))!=null)return b=p.x-C[0]||0,V=p.y-C[1]||0,function D(E,T,O){var B=C,L;switch(E){case"start":r[F]=D,L=a++;break;case"end":delete r[F],--a;case"drag":C=Ye(O||T,H),L=a;break}q.call(E,k,new so(E,{sourceEvent:T,subject:p,target:f,identifier:F,active:L,x:C[0]+b,y:C[1]+V,dx:C[0]-B[0],dy:C[1]-B[1],dispatch:q}),X)}}return f.filter=function(k){return arguments.length?(e=typeof k=="function"?k:gn(!!k),f):e},f.container=function(k){return arguments.length?(t=typeof k=="function"?k:gn(k),f):t},f.subject=function(k){return arguments.length?(n=typeof k=="function"?k:gn(k),f):n},f.touchable=function(k){return arguments.length?(o=typeof k=="function"?k:gn(!!k),f):o},f.on=function(){var k=i.on.apply(i,arguments);return k===i?f:k},f.clickDistance=function(k){return arguments.length?(d=(k=+k)*k,f):Math.sqrt(d)},f}function lo(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Pr(e,t){var n=Object.create(e.prototype);for(var o in t)n[o]=t[o];return n}function Lt(){}var Ft=.7,pn=1/Ft,Ct="\\s*([+-]?\\d+)\\s*",Yt="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ge="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Zl=/^#([0-9a-f]{3,8})$/,Kl=new RegExp(`^rgb\\(${Ct},${Ct},${Ct}\\)$`),ql=new RegExp(`^rgb\\(${Ge},${Ge},${Ge}\\)$`),Jl=new RegExp(`^rgba\\(${Ct},${Ct},${Ct},${Yt}\\)$`),Ql=new RegExp(`^rgba\\(${Ge},${Ge},${Ge},${Yt}\\)$`),eu=new RegExp(`^hsl\\(${Yt},${Ge},${Ge}\\)$`),tu=new RegExp(`^hsla\\(${Yt},${Ge},${Ge},${Yt}\\)$`),Or={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};lo(Lt,vt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:zr,formatHex:zr,formatHex8:nu,formatHsl:ou,formatRgb:Ar,toString:Ar});function zr(){return this.rgb().formatHex()}function nu(){return this.rgb().formatHex8()}function ou(){return Lr(this).formatHsl()}function Ar(){return this.rgb().formatRgb()}function vt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Zl.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?Br(t):n===3?new Pe(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?vn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?vn(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=Kl.exec(e))?new Pe(t[1],t[2],t[3],1):(t=ql.exec(e))?new Pe(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Jl.exec(e))?vn(t[1],t[2],t[3],t[4]):(t=Ql.exec(e))?vn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eu.exec(e))?Hr(t[1],t[2]/100,t[3]/100,1):(t=tu.exec(e))?Hr(t[1],t[2]/100,t[3]/100,t[4]):Or.hasOwnProperty(e)?Br(Or[e]):e==="transparent"?new Pe(NaN,NaN,NaN,0):null}function Br(e){return new Pe(e>>16&255,e>>8&255,e&255,1)}function vn(e,t,n,o){return o<=0&&(e=t=n=NaN),new Pe(e,t,n,o)}function ru(e){return e instanceof Lt||(e=vt(e)),e?(e=e.rgb(),new Pe(e.r,e.g,e.b,e.opacity)):new Pe}function uo(e,t,n,o){return arguments.length===1?ru(e):new Pe(e,t,n,o??1)}function Pe(e,t,n,o){this.r=+e,this.g=+t,this.b=+n,this.opacity=+o}lo(Pe,uo,Pr(Lt,{brighter(e){return e=e==null?pn:Math.pow(pn,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Ft:Math.pow(Ft,e),new Pe(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Pe(mt(this.r),mt(this.g),mt(this.b),mn(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:Rr,formatHex:Rr,formatHex8:iu,formatRgb:Vr,toString:Vr}));function Rr(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}`}function iu(){return`#${_t(this.r)}${_t(this.g)}${_t(this.b)}${_t((isNaN(this.opacity)?1:this.opacity)*255)}`}function Vr(){const e=mn(this.opacity);return`${e===1?"rgb(":"rgba("}${mt(this.r)}, ${mt(this.g)}, ${mt(this.b)}${e===1?")":`, ${e})`}`}function mn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function mt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function _t(e){return e=mt(e),(e<16?"0":"")+e.toString(16)}function Hr(e,t,n,o){return o<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Le(e,t,n,o)}function Lr(e){if(e instanceof Le)return new Le(e.h,e.s,e.l,e.opacity);if(e instanceof Lt||(e=vt(e)),!e)return new Le;if(e instanceof Le)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 Le(a,s,l,e.opacity)}function au(e,t,n,o){return arguments.length===1?Lr(e):new Le(e,t,n,o??1)}function Le(e,t,n,o){this.h=+e,this.s=+t,this.l=+n,this.opacity=+o}lo(Le,au,Pr(Lt,{brighter(e){return e=e==null?pn:Math.pow(pn,e),new Le(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Ft:Math.pow(Ft,e),new Le(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 Pe(co(e>=240?e-240:e+120,r,o),co(e,r,o),co(e<120?e+240:e-120,r,o),this.opacity)},clamp(){return new Le(Fr(this.h),_n(this.s),_n(this.l),mn(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=mn(this.opacity);return`${e===1?"hsl(":"hsla("}${Fr(this.h)}, ${_n(this.s)*100}%, ${_n(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Fr(e){return e=(e||0)%360,e<0?e+360:e}function _n(e){return Math.max(0,Math.min(1,e||0))}function co(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 fo=e=>()=>e;function su(e,t){return function(n){return e+n*t}}function lu(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 uu(e){return(e=+e)==1?Yr:function(t,n){return n-t?lu(t,n,e):fo(isNaN(t)?n:t)}}function Yr(e,t){var n=t-e;return n?su(e,n):fo(isNaN(e)?t:e)}const yn=(function e(t){var n=uu(t);function o(r,i){var a=n((r=uo(r)).r,(i=uo(i)).r),s=n(r.g,i.g),l=n(r.b,i.b),u=Yr(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 cu(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 du(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function fu(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]=Gt(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 hu(e,t){var n=new Date;return e=+e,t=+t,function(o){return n.setTime(e*(1-o)+t*o),n}}function Xe(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function gu(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]=Gt(e[r],t[r]):o[r]=t[r];return function(i){for(r in n)o[r]=n[r](i);return o}}var ho=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,go=new RegExp(ho.source,"g");function pu(e){return function(){return e}}function vu(e){return function(t){return e(t)+""}}function Gr(e,t){var n=ho.lastIndex=go.lastIndex=0,o,r,i,a=-1,s=[],l=[];for(e=e+"",t=t+"";(o=ho.exec(e))&&(r=go.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:Xe(o,r)})),n=go.lastIndex;return n<t.length&&(i=t.slice(n),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?vu(l[0].x):pu(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 Gt(e,t){var n=typeof t,o;return t==null||n==="boolean"?fo(t):(n==="number"?Xe:n==="string"?(o=vt(t))?(t=o,yn):Gr:t instanceof vt?yn:t instanceof Date?hu:du(t)?cu:Array.isArray(t)?fu:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?gu:Xe)(e,t)}var Xr=180/Math.PI,po={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ur(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)*Xr,skewX:Math.atan(l)*Xr,scaleX:a,scaleY:s}}var wn;function mu(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?po:Ur(t.a,t.b,t.c,t.d,t.e,t.f)}function _u(e){return e==null||(wn||(wn=document.createElementNS("http://www.w3.org/2000/svg","g")),wn.setAttribute("transform",e),!(e=wn.transform.baseVal.consolidate()))?po:(e=e.matrix,Ur(e.a,e.b,e.c,e.d,e.e,e.f))}function Wr(e,t,n,o){function r(u){return u.length?u.pop()+" ":""}function i(u,c,d,f,h,_){if(u!==d||c!==f){var v=h.push("translate(",null,t,null,n);_.push({i:v-4,x:Xe(u,d)},{i:v-2,x:Xe(c,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function a(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(r(d)+"rotate(",null,o)-2,x:Xe(u,c)})):c&&d.push(r(d)+"rotate("+c+o)}function s(u,c,d,f){u!==c?f.push({i:d.push(r(d)+"skewX(",null,o)-2,x:Xe(u,c)}):c&&d.push(r(d)+"skewX("+c+o)}function l(u,c,d,f,h,_){if(u!==d||c!==f){var v=h.push(r(h)+"scale(",null,",",null,")");_.push({i:v-4,x:Xe(u,d)},{i:v-2,x:Xe(c,f)})}else(d!==1||f!==1)&&h.push(r(h)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,d,f),a(u.rotate,c.rotate,d,f),s(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(h){for(var _=-1,v=f.length,y;++_<v;)d[(y=f[_]).i]=y.x(h);return d.join("")}}}var yu=Wr(mu,"px, ","px)","deg)"),wu=Wr(_u,", ",")",")"),bu=1e-12;function jr(e){return((e=Math.exp(e))+1/e)/2}function xu(e){return((e=Math.exp(e))-1/e)/2}function Eu(e){return((e=Math.exp(2*e))-1)/(e+1)}const bn=(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],f=a[2],h=c-s,_=d-l,v=h*h+_*_,y,S;if(v<bu)S=Math.log(f/u)/t,y=function(X){return[s+X*h,l+X*_,u*Math.exp(t*X*S)]};else{var M=Math.sqrt(v),w=(f*f-u*u+o*v)/(2*u*n*M),k=(f*f-u*u-o*v)/(2*f*n*M),H=Math.log(Math.sqrt(w*w+1)-w),Y=Math.log(Math.sqrt(k*k+1)-k);S=(Y-H)/t,y=function(X){var F=X*S,ae=jr(H),q=u/(n*M)*(ae*Eu(t*F+H)-xu(H));return[s+q*h,l+q*_,u*ae/jr(t*F+H)]}}return y.duration=S*1e3*t/Math.SQRT2,y}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,Xt=0,Ut=0,Zr=1e3,xn,Wt,En=0,yt=0,Nn=0,jt=typeof performance=="object"&&performance.now?performance:Date,Kr=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function vo(){return yt||(Kr(Nu),yt=jt.now()+Nn)}function Nu(){yt=0}function Sn(){this._call=this._time=this._next=null}Sn.prototype=qr.prototype={constructor:Sn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?vo():+n)+(t==null?0:+t),!this._next&&Wt!==this&&(Wt?Wt._next=this:xn=this,Wt=this),this._call=e,this._time=n,mo()},stop:function(){this._call&&(this._call=null,this._time=1/0,mo())}};function qr(e,t,n){var o=new Sn;return o.restart(e,t,n),o}function Su(){vo(),++It;for(var e=xn,t;e;)(t=yt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--It}function Jr(){yt=(En=jt.now())+Nn,It=Xt=0;try{Su()}finally{It=0,$u(),yt=0}}function ku(){var e=jt.now(),t=e-En;t>Zr&&(Nn-=t,En=e)}function $u(){for(var e,t=xn,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:xn=n);Wt=e,mo(o)}function mo(e){if(!It){Xt&&(Xt=clearTimeout(Xt));var t=e-yt;t>24?(e<1/0&&(Xt=setTimeout(Jr,e-jt.now()-Nn)),Ut&&(Ut=clearInterval(Ut))):(Ut||(En=jt.now(),Ut=setInterval(ku,Zr)),It=1,Kr(Jr))}}function Qr(e,t,n){var o=new Sn;return t=t==null?0:+t,o.restart(r=>{o.stop(),e(r+t)},t,n),o}var Cu=cn("start","end","cancel","interrupt"),Iu=[],ei=0,ti=1,_o=2,kn=3,ni=4,yo=5,$n=6;function Cn(e,t,n,o,r,i){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;Mu(e,n,{name:t,index:o,group:r,on:Cu,tween:Iu,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:ei})}function wo(e,t){var n=Fe(e,t);if(n.state>ei)throw new Error("too late; already scheduled");return n}function Ue(e,t){var n=Fe(e,t);if(n.state>kn)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Mu(e,t,n){var o=e.__transition,r;o[t]=n,n.timer=qr(i,0,n.time);function i(u){n.state=ti,n.timer.restart(a,n.delay,n.time),n.delay<=u&&a(u-n.delay)}function a(u){var c,d,f,h;if(n.state!==ti)return l();for(c in o)if(h=o[c],h.name===n.name){if(h.state===kn)return Qr(a);h.state===ni?(h.state=$n,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete o[c]):+c<t&&(h.state=$n,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete o[c])}if(Qr(function(){n.state===kn&&(n.state=ni,n.timer.restart(s,n.delay,n.time),s(u))}),n.state=_o,n.on.call("start",e,e.__data__,n.index,n.group),n.state===_o){for(n.state=kn,r=new Array(f=n.tween.length),c=0,d=-1;c<f;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(r[++d]=h);r.length=d+1}}function s(u){for(var c=u<n.duration?n.ease.call(null,u/n.duration):(n.timer.restart(l),n.state=yo,1),d=-1,f=r.length;++d<f;)r[d].call(e,c);n.state===yo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=$n,n.timer.stop(),delete o[t];for(var u in o)return;delete e.__transition}}function In(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>_o&&o.state<yo,o.state=$n,o.timer.stop(),o.on.call(r?"interrupt":"cancel",e,e.__data__,o.index,o.group),delete n[a]}i&&delete e.__transition}}function Du(e){return this.each(function(){In(this,e)})}function Tu(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 Pu(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 Ou(e,t){var n=this._id;if(e+="",arguments.length<2){for(var o=Fe(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?Tu:Pu)(n,e,t))}function bo(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 Fe(r,o).value[t]}}function oi(e,t){var n;return(typeof t=="number"?Xe:t instanceof vt?yn:(n=vt(t))?(t=n,yn):Gr)(e,t)}function zu(e){return function(){this.removeAttribute(e)}}function Au(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Bu(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 Ru(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 Vu(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 Hu(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 Lu(e,t){var n=fn(e),o=n==="transform"?wu:oi;return this.attrTween(e,typeof t=="function"?(n.local?Hu:Vu)(n,o,bo(this,"attr."+e,t)):t==null?(n.local?Au:zu)(n):(n.local?Ru:Bu)(n,o,t))}function Fu(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Yu(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Gu(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Yu(e,i)),n}return r._value=t,r}function Xu(e,t){var n,o;function r(){var i=t.apply(this,arguments);return i!==o&&(n=(o=i)&&Fu(e,i)),n}return r._value=t,r}function Uu(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=fn(e);return this.tween(n,(o.local?Gu:Xu)(o,t))}function Wu(e,t){return function(){wo(this,e).delay=+t.apply(this,arguments)}}function ju(e,t){return t=+t,function(){wo(this,e).delay=t}}function Zu(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Wu:ju)(t,e)):Fe(this.node(),t).delay}function Ku(e,t){return function(){Ue(this,e).duration=+t.apply(this,arguments)}}function qu(e,t){return t=+t,function(){Ue(this,e).duration=t}}function Ju(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Ku:qu)(t,e)):Fe(this.node(),t).duration}function Qu(e,t){if(typeof t!="function")throw new Error;return function(){Ue(this,e).ease=t}}function ec(e){var t=this._id;return arguments.length?this.each(Qu(t,e)):Fe(this.node(),t).ease}function tc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ue(this,e).ease=n}}function nc(e){if(typeof e!="function")throw new Error;return this.each(tc(this._id,e))}function oc(e){typeof e!="function"&&(e=br(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 Qe(o,this._parents,this._name,this._id)}function rc(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),f,h=0;h<c;++h)(f=l[h]||u[h])&&(d[h]=f);for(;s<o;++s)a[s]=t[s];return new Qe(a,this._parents,this._name,this._id)}function ic(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 ac(e,t,n){var o,r,i=ic(t)?wo:Ue;return function(){var a=i(this,e),s=a.on;s!==o&&(r=(o=s).copy()).on(t,n),a.on=r}}function sc(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(ac(n,e,t))}function lc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function uc(){return this.on("end.remove",lc(this._id))}function cc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=ro(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,f=0;f<l;++f)(c=s[f])&&(d=e.call(c,c.__data__,f,s))&&("__data__"in c&&(d.__data__=c.__data__),u[f]=d,Cn(u[f],t,n,f,u,Fe(c,n)));return new Qe(i,this._parents,t,n)}function dc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=wr(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 f=e.call(c,c.__data__,d,l),h,_=Fe(c,n),v=0,y=f.length;v<y;++v)(h=f[v])&&Cn(h,t,n,v,f,_);i.push(f),a.push(c)}return new Qe(i,a,t,n)}var fc=Vt.prototype.constructor;function hc(){return new fc(this._groups,this._parents)}function gc(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 ri(e){return function(){this.style.removeProperty(e)}}function pc(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 vc(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 mc(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=ri(t)):void 0;(u!==n||r!==c)&&(o=(n=u).copy()).on(a,r=c),l.on=o}}function _c(e,t,n){var o=(e+="")=="transform"?yu:oi;return t==null?this.styleTween(e,gc(e,o)).on("end.style."+e,ri(e)):typeof t=="function"?this.styleTween(e,vc(e,o,bo(this,"style."+e,t))).each(mc(this._id,e)):this.styleTween(e,pc(e,o,t),n).on("end.style."+e,null)}function yc(e,t,n){return function(o){this.style.setProperty(e,t.call(this,o),n)}}function wc(e,t,n){var o,r;function i(){var a=t.apply(this,arguments);return a!==r&&(o=(r=a)&&yc(e,a,n)),o}return i._value=t,i}function bc(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,wc(e,t,n??""))}function xc(e){return function(){this.textContent=e}}function Ec(e){return function(){var t=e(this);this.textContent=t??""}}function Nc(e){return this.tween("text",typeof e=="function"?Ec(bo(this,"text",e)):xc(e==null?"":e+""))}function Sc(e){return function(t){this.textContent=e.call(this,t)}}function kc(e){var t,n;function o(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&Sc(r)),t}return o._value=e,o}function $c(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,kc(e))}function Cc(){for(var e=this._name,t=this._id,n=ii(),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=Fe(l,t);Cn(l,e,n,u,a,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Qe(o,this._parents,e,n)}function Ic(){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 Mc=0;function Qe(e,t,n,o){this._groups=e,this._parents=t,this._name=n,this._id=o}function ii(){return++Mc}var et=Vt.prototype;Qe.prototype={constructor:Qe,select:cc,selectAll:dc,selectChild:et.selectChild,selectChildren:et.selectChildren,filter:oc,merge:rc,selection:hc,transition:Cc,call:et.call,nodes:et.nodes,node:et.node,size:et.size,empty:et.empty,each:et.each,on:sc,attr:Lu,attrTween:Uu,style:_c,styleTween:bc,text:Nc,textTween:$c,remove:uc,tween:Ou,delay:Zu,duration:Ju,ease:ec,easeVarying:nc,end:Ic,[Symbol.iterator]:et[Symbol.iterator]};function Dc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Tc={time:null,delay:0,duration:250,ease:Dc};function Pc(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 Oc(e){var t,n;e instanceof Qe?(t=e._id,e=e._name):(t=ii(),(n=Tc).time=vo(),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])&&Cn(l,e,t,u,a,n||Pc(l,t));return new Qe(o,this._parents,e,t)}Vt.prototype.interrupt=Du,Vt.prototype.transition=Oc;const Mn=e=>()=>e;function zc(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 tt(e,t,n){this.k=e,this.x=t,this.y=n}tt.prototype={constructor:tt,scale:function(e){return e===1?this:new tt(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new tt(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 tt(1,0,0);tt.prototype;function xo(e){e.stopImmediatePropagation()}function Zt(e){e.preventDefault(),e.stopImmediatePropagation()}function Ac(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Bc(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function ai(){return this.__zoom||Mt}function Rc(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function Vc(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hc(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 Lc(){var e=Ac,t=Bc,n=Hc,o=Rc,r=Vc,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],s=250,l=bn,u=cn("start","zoom","end"),c,d,f,h=500,_=150,v=0,y=10;function S(p){p.property("__zoom",ai).on("wheel.zoom",F,{passive:!1}).on("mousedown.zoom",ae).on("dblclick.zoom",q).filter(r).on("touchstart.zoom",C).on("touchmove.zoom",b).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(p,D,E,T){var O=p.selection?p.selection():p;O.property("__zoom",ai),p!==O?H(p,D,E,T):O.interrupt().each(function(){Y(this,arguments).event(T).start().zoom(null,typeof D=="function"?D.apply(this,arguments):D).end()})},S.scaleBy=function(p,D,E,T){S.scaleTo(p,function(){var O=this.__zoom.k,B=typeof D=="function"?D.apply(this,arguments):D;return O*B},E,T)},S.scaleTo=function(p,D,E,T){S.transform(p,function(){var O=t.apply(this,arguments),B=this.__zoom,L=E==null?k(O):typeof E=="function"?E.apply(this,arguments):E,I=B.invert(L),P=typeof D=="function"?D.apply(this,arguments):D;return n(w(M(B,P),L,I),O,a)},E,T)},S.translateBy=function(p,D,E,T){S.transform(p,function(){return n(this.__zoom.translate(typeof D=="function"?D.apply(this,arguments):D,typeof E=="function"?E.apply(this,arguments):E),t.apply(this,arguments),a)},null,T)},S.translateTo=function(p,D,E,T,O){S.transform(p,function(){var B=t.apply(this,arguments),L=this.__zoom,I=T==null?k(B):typeof T=="function"?T.apply(this,arguments):T;return n(Mt.translate(I[0],I[1]).scale(L.k).translate(typeof D=="function"?-D.apply(this,arguments):-D,typeof E=="function"?-E.apply(this,arguments):-E),B,a)},T,O)};function M(p,D){return D=Math.max(i[0],Math.min(i[1],D)),D===p.k?p:new tt(D,p.x,p.y)}function w(p,D,E){var T=D[0]-E[0]*p.k,O=D[1]-E[1]*p.k;return T===p.x&&O===p.y?p:new tt(p.k,T,O)}function k(p){return[(+p[0][0]+ +p[1][0])/2,(+p[0][1]+ +p[1][1])/2]}function H(p,D,E,T){p.on("start.zoom",function(){Y(this,arguments).event(T).start()}).on("interrupt.zoom end.zoom",function(){Y(this,arguments).event(T).end()}).tween("zoom",function(){var O=this,B=arguments,L=Y(O,B).event(T),I=t.apply(O,B),P=E==null?k(I):typeof E=="function"?E.apply(O,B):E,j=Math.max(I[1][0]-I[0][0],I[1][1]-I[0][1]),A=O.__zoom,z=typeof D=="function"?D.apply(O,B):D,R=l(A.invert(P).concat(j/A.k),z.invert(P).concat(j/z.k));return function(W){if(W===1)W=z;else{var ge=R(W),se=j/ge[2];W=new tt(se,P[0]-ge[0]*se,P[1]-ge[1]*se)}L.zoom(null,W)}})}function Y(p,D,E){return!E&&p.__zooming||new X(p,D)}function X(p,D){this.that=p,this.args=D,this.active=0,this.sourceEvent=null,this.extent=t.apply(p,D),this.taps=0}X.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,D){return this.mouse&&p!=="mouse"&&(this.mouse[1]=D.invert(this.mouse[0])),this.touch0&&p!=="touch"&&(this.touch0[1]=D.invert(this.touch0[0])),this.touch1&&p!=="touch"&&(this.touch1[1]=D.invert(this.touch1[0])),this.that.__zoom=D,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(p){var D=He(this.that).datum();u.call(p,this.that,new zc(p,{sourceEvent:this.sourceEvent,target:S,transform:this.that.__zoom,dispatch:u}),D)}};function F(p,...D){if(!e.apply(this,arguments))return;var E=Y(this,D).event(p),T=this.__zoom,O=Math.max(i[0],Math.min(i[1],T.k*Math.pow(2,o.apply(this,arguments)))),B=Ye(p);if(E.wheel)(E.mouse[0][0]!==B[0]||E.mouse[0][1]!==B[1])&&(E.mouse[1]=T.invert(E.mouse[0]=B)),clearTimeout(E.wheel);else{if(T.k===O)return;E.mouse=[B,T.invert(B)],In(this),E.start()}Zt(p),E.wheel=setTimeout(L,_),E.zoom("mouse",n(w(M(T,O),E.mouse[0],E.mouse[1]),E.extent,a));function L(){E.wheel=null,E.end()}}function ae(p,...D){if(f||!e.apply(this,arguments))return;var E=p.currentTarget,T=Y(this,D,!0).event(p),O=He(p.view).on("mousemove.zoom",P,!0).on("mouseup.zoom",j,!0),B=Ye(p,E),L=p.clientX,I=p.clientY;Dr(p.view),xo(p),T.mouse=[B,this.__zoom.invert(B)],In(this),T.start();function P(A){if(Zt(A),!T.moved){var z=A.clientX-L,R=A.clientY-I;T.moved=z*z+R*R>v}T.event(A).zoom("mouse",n(w(T.that.__zoom,T.mouse[0]=Ye(A,E),T.mouse[1]),T.extent,a))}function j(A){O.on("mousemove.zoom mouseup.zoom",null),Tr(A.view,T.moved),Zt(A),T.event(A).end()}}function q(p,...D){if(e.apply(this,arguments)){var E=this.__zoom,T=Ye(p.changedTouches?p.changedTouches[0]:p,this),O=E.invert(T),B=E.k*(p.shiftKey?.5:2),L=n(w(M(E,B),T,O),t.apply(this,D),a);Zt(p),s>0?He(this).transition().duration(s).call(H,L,T,p):He(this).call(S.transform,L,T,p)}}function C(p,...D){if(e.apply(this,arguments)){var E=p.touches,T=E.length,O=Y(this,D,p.changedTouches.length===T).event(p),B,L,I,P;for(xo(p),L=0;L<T;++L)I=E[L],P=Ye(I,this),P=[P,this.__zoom.invert(P),I.identifier],O.touch0?!O.touch1&&O.touch0[2]!==P[2]&&(O.touch1=P,O.taps=0):(O.touch0=P,B=!0,O.taps=1+!!c);c&&(c=clearTimeout(c)),B&&(O.taps<2&&(d=P[0],c=setTimeout(function(){c=null},h)),In(this),O.start())}}function b(p,...D){if(this.__zooming){var E=Y(this,D).event(p),T=p.changedTouches,O=T.length,B,L,I,P;for(Zt(p),B=0;B<O;++B)L=T[B],I=Ye(L,this),E.touch0&&E.touch0[2]===L.identifier?E.touch0[0]=I:E.touch1&&E.touch1[2]===L.identifier&&(E.touch1[0]=I);if(L=E.that.__zoom,E.touch1){var j=E.touch0[0],A=E.touch0[1],z=E.touch1[0],R=E.touch1[1],W=(W=z[0]-j[0])*W+(W=z[1]-j[1])*W,ge=(ge=R[0]-A[0])*ge+(ge=R[1]-A[1])*ge;L=M(L,Math.sqrt(W/ge)),I=[(j[0]+z[0])/2,(j[1]+z[1])/2],P=[(A[0]+R[0])/2,(A[1]+R[1])/2]}else if(E.touch0)I=E.touch0[0],P=E.touch0[1];else return;E.zoom("touch",n(w(L,I,P),E.extent,a))}}function V(p,...D){if(this.__zooming){var E=Y(this,D).event(p),T=p.changedTouches,O=T.length,B,L;for(xo(p),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),B=0;B<O;++B)L=T[B],E.touch0&&E.touch0[2]===L.identifier?delete E.touch0:E.touch1&&E.touch1[2]===L.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(L=Ye(L,this),Math.hypot(d[0]-L[0],d[1]-L[1])<y)){var I=He(this).on("dblclick.zoom");I&&I.apply(this,arguments)}}}return S.wheelDelta=function(p){return arguments.length?(o=typeof p=="function"?p:Mn(+p),S):o},S.filter=function(p){return arguments.length?(e=typeof p=="function"?p:Mn(!!p),S):e},S.touchable=function(p){return arguments.length?(r=typeof p=="function"?p:Mn(!!p),S):r},S.extent=function(p){return arguments.length?(t=typeof p=="function"?p:Mn([[+p[0][0],+p[0][1]],[+p[1][0],+p[1][1]]]),S):t},S.scaleExtent=function(p){return arguments.length?(i[0]=+p[0],i[1]=+p[1],S):[i[0],i[1]]},S.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],S):[[a[0][0],a[0][1]],[a[1][0],a[1][1]]]},S.constrain=function(p){return arguments.length?(n=p,S):n},S.duration=function(p){return arguments.length?(s=+p,S):s},S.interpolate=function(p){return arguments.length?(l=p,S):l},S.on=function(){var p=u.on.apply(u,arguments);return p===u?S:p},S.clickDistance=function(p){return arguments.length?(v=(p=+p)*p,S):Math.sqrt(v)},S.tapDistance=function(p){return arguments.length?(y=+p,S):y},S}var J=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(J||{}),Eo=(e=>(e.Partial="partial",e.Full="full",e))(Eo||{}),wt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(wt||{}),it=(e=>(e.Strict="strict",e.Loose="loose",e))(it||{}),No=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(No||{}),Kt=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Kt||{}),si=(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))(si||{});const Fc=["INPUT","SELECT","TEXTAREA"],Yc=typeof document<"u"?document:null;function So(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 Fc.includes(o?.nodeName)||r||!!i}function Gc(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function li(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 Xc(e,t){return n=>{if(!n.code&&!n.key)return!1;const o=Uc(n.code,e);return Array.isArray(e)?e.some(r=>li(n[o],r,t,n.type==="keyup")):li(n[o],e,t,n.type==="keyup")}}function Uc(e,t){return t.includes(e)?"code":"key"}function qt(e,t){const n=fe(()=>pe(t?.target)??Yc),o=qe(pe(e)===!0);let r=!1;const i=new Set;let a=l(pe(e));_e(()=>pe(e),(u,c)=>{typeof c=="boolean"&&typeof u!="boolean"&&s(),a=l(u)},{immediate:!0}),pr(["blur","contextmenu"],s),vr((...u)=>a(...u),u=>{var c,d;const f=pe(t?.actInsideInputWithModifier)??!0,h=pe(t?.preventDefault)??!1;if(r=Gc(u),(!r||r&&!f)&&So(u))return;const v=((d=(c=u.composedPath)==null?void 0:c.call(u))==null?void 0:d[0])||u.target,y=v?.nodeName==="BUTTON"||v?.nodeName==="A";!h&&(r||!y)&&u.preventDefault(),o.value=!0},{eventName:"keydown",target:n}),vr((...u)=>a(...u),u=>{const c=pe(t?.actInsideInputWithModifier)??!0;if(o.value){if((!r||r&&!c)&&So(u))return;r=!1,o.value=!1}},{eventName:"keyup",target:n});function s(){r=!1,i.clear(),o.value=pe(e)===!0}function l(u){return u===null?(s(),()=>!1):typeof u=="boolean"?(s(),o.value=u,()=>!1):Array.isArray(u)||typeof u=="string"?Xc(u,i):u}return o}const ui="vue-flow__node-desc",ci="vue-flow__edge-desc",Wc="vue-flow__aria-live",di=["Enter"," ","Escape"],Dt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Dn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function Tn(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 Pn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function bt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function fi(e,t){return{x:bt(e.x,t[0][0],t[1][0]),y:bt(e.y,t[0][1],t[1][1])}}function hi(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function at(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function xt(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!at(e)}function Jt(e){return xt(e)&&"computedPosition"in e}function On(e){return!Number.isNaN(e)&&Number.isFinite(e)}function jc(e){return On(e.width)&&On(e.height)&&On(e.x)&&On(e.y)}function Zc(e,t,n){const o={id:e.id.toString(),type:e.type??"default",dimensions:Bt({width:0,height:0}),computedPosition:Bt({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:Ce(e.data)?e.data:{},events:Bt(Ce(e.events)?e.events:{})};return Object.assign(t??o,e,{id:e.id.toString(),parentNode:n})}function gi(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:Ce(e.data)?e.data:{},events:Bt(Ce(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??n?.interactionWidth,...n??{}};return Object.assign(t??i,e,{id:e.id.toString()})}function pi(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 Kc(...e){if(e.length===3){const[i,a,s]=e;return pi(i,a,s,"target")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>at(i)&&i.source===o).map(i=>n.find(a=>xt(a)&&a.id===i.target))}function qc(...e){if(e.length===3){const[i,a,s]=e;return pi(i,a,s,"source")}const[t,n]=e,o=typeof t=="string"?t:t.id;return n.filter(i=>at(i)&&i.target===o).map(i=>n.find(a=>xt(a)&&a.id===i.source))}function vi({source:e,sourceHandle:t,target:n,targetHandle:o}){return`vueflow__edge-${e}${t??""}-${n}${o??""}`}function Jc(e,t){return t.some(n=>at(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function Qt({x:e,y:t},{x:n,y:o,zoom:r}){return{x:e*r+n,y:t*r+o}}function en({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?An(s,a):s}function Qc(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 mi({x:e,y:t,width:n,height:o}){return{x:e,y:t,x2:e+n,y2:t+o}}function ed({x:e,y:t,x2:n,y2:o}){return{x:e,y:t,width:n-e,height:o-t}}function _i(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=Qc(t,mi({...o.computedPosition,...o.dimensions}))}return ed(t)}function yi(e,t,n={x:0,y:0,zoom:1},o=!1,r=!1){const i={...en(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,f=l.height??s.height??null;if(r&&!u||c)continue;const h=Tn(i,Dn(s)),_=d===null||f===null,v=o&&h>0,y=(d??0)*(f??0);(_||v||h>=y||s.dragging)&&a.push(s)}return a}function wi(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 Tt(e,t){if(typeof e=="number")return Math.floor((t-t/(1+e))*.5);if(typeof e=="string"&&e.endsWith("px")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(n)}if(typeof e=="string"&&e.endsWith("%")){const n=Number.parseFloat(e);if(!Number.isNaN(n))return Math.floor(t*n*.01)}return nn(`The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function td(e,t,n){if(typeof e=="string"||typeof e=="number"){const o=Tt(e,n),r=Tt(e,t);return{top:o,right:r,bottom:o,left:r,x:r*2,y:o*2}}if(typeof e=="object"){const o=Tt(e.top??e.y??0,n),r=Tt(e.bottom??e.y??0,n),i=Tt(e.left??e.x??0,t),a=Tt(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 nd(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 bi(e,t,n,o,r,i=.1){const a=td(i,t,n),s=(t-a.x)/e.width,l=(n-a.y)/e.height,u=Math.min(s,l),c=bt(u,o,r),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*c,_=n/2-f*c,v=nd(e,h,_,c,t,n),y={left:Math.min(v.left-a.left,0),top:Math.min(v.top-a.top,0),right:Math.min(v.right-a.right,0),bottom:Math.min(v.bottom-a.bottom,0)};return{x:h-y.left+y.right,y:_-y.top+y.bottom,zoom:c}}function od(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function xi(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:xi(n,t):!1}function tn(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(o=>`${o}=${e[o]}`).join("&")}`}function Ei(e){const t=e.ctrlKey&&zn()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Ni(e,t,n){return e<t?bt(Math.abs(e-t),1,t)/t:e>n?-bt(Math.abs(e-n),1,t)/t:0}function Si(e,t,n=15,o=40){const r=Ni(e.x,o,t.width-o)*n,i=Ni(e.y,o,t.height-o)*n;return[r,i]}function ko(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 ki(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(Jt(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&&Jt(l)&&ko(a,l)}break;case"dimensions":if(Jt(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&&Jt(l)&&(!!l.dimensions.width&&!!l.dimensions.height?ko(a,l):Oe(()=>{ko(a,l)}))}break}return t}function st(e,t){return{id:e,type:"select",selected:t}}function $i(e){return{item:e,type:"add"}}function Ci(e){return{id:e,type:"remove"}}function Ii(e,t,n,o,r){return{id:e,source:t,target:n,sourceHandle:o||null,targetHandle:r||null,type:"remove"}}function lt(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(st(i.id,a)))}return o}const Mi=()=>{};function G(e){const t=new Set;let n=Mi,o=()=>!1;const r=()=>t.size>0||o(),i=f=>{n=f},a=()=>{n=Mi},s=f=>{o=f},l=()=>{o=()=>!1},u=f=>{t.delete(f)};return{on:f=>{t.add(f);const h=()=>u(f);return Rt(h),{off:h}},off:u,trigger:f=>{const h=[n];return r()?h.push(...t):e&&h.push(e),Promise.allSettled(h.map(_=>_(f)))},hasListeners:r,listeners:t,setEmitter:i,removeEmitter:a,setHasEmitListeners:s,removeHasEmitListeners:l}}function Di(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 rd(e,t,n,o){var r,i;const a=new Map;for(const[s,l]of e)(l.selected||l.id===o)&&(!l.parentNode||!xi(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 Ti(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 id(e,t,n){const[o,r,i,a]=typeof e!="string"?Ti(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 ad(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=id(r,e,o);i&&(r=i)}else t(new De($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]=Ti(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 sd({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function Co(e,t,n,o,r){const i=sd(e.dimensions,ad(e,n,o,r)),a=fi(t,i);return{position:{x:a.x-(r?.computedPosition.x||0),y:a.y-(r?.computedPosition.y||0)},computedPosition:a}}function Pt(e,t,n=J.Left,o=!1){const r=(t?.x??0)+e.computedPosition.x,i=(t?.y??0)+e.computedPosition.y,{width:a,height:s}=t??dd(e);if(o)return{x:r+a/2,y:i+s/2};switch(t?.position??n){case J.Top:return{x:r+a/2,y:i};case J.Right:return{x:r+a,y:i+s/2};case J.Bottom:return{x:r+a/2,y:i+s};case J.Left:return{x:r,y:i+s/2}}}function Pi(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function ld({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=mi({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)),f=Math.max(0,Math.min(c.y2,u.y2)-Math.max(c.y,u.y));return Math.ceil(d*f)>0}function ud(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 Oi={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 De extends Error{constructor(t,...n){var o;super((o=Oi[t])==null?void 0:o.call(Oi,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function Io(e){return"clientX"in e}function cd(e){return"sourceEvent"in e}function We(e,t){const n=Io(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 zn=()=>{var e;return typeof navigator<"u"&&((e=navigator?.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function dd(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 An(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const fd=()=>!0;function Mo(e){e?.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function hd(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())Tn(r,Dn(i))>0&&o.push(i);return o}const gd=250;function pd(e,t,n,o){var r,i;let a=[],s=Number.POSITIVE_INFINITY;const l=hd(e,n,t+gd);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:f,y:h}=Pt(u,d,d.position,!0),_=Math.sqrt((f-e.x)**2+(h-e.y)**2);_>t||(_<s?(a=[{...d,x:f,y:h}],s=_):_===s&&a.push({...d,x:f,y:h}))}}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 zi(e,{handle:t,connectionMode:n,fromNodeId:o,fromHandleId:r,fromType:i,doc:a,lib:s,flowId:l,isValidConnection:u=fd},c,d,f,h){const _=i==="target",v=t?a.querySelector(`.${s}-flow__handle[data-id="${l}-${t?.nodeId}-${t?.id}-${t?.type}"]`):null,{x:y,y:S}=We(e),M=a.elementFromPoint(y,S),w=M?.classList.contains(`${s}-flow__handle`)?M:v,k={handleDomNode:w,isValid:!1,connection:null,toHandle:null};if(w){const H=Ai(void 0,w),Y=w.getAttribute("data-nodeid"),X=w.getAttribute("data-handleid"),F=w.classList.contains("connectable"),ae=w.classList.contains("connectableend");if(!Y||!H)return k;const q={source:_?Y:o,sourceHandle:_?X:r,target:_?o:Y,targetHandle:_?r:X};k.connection=q;const b=F&&ae&&(n===it.Strict?_&&H==="source"||!_&&H==="target":Y!==o||X!==r);k.isValid=b&&u(q,{nodes:d,edges:c,sourceNode:f(q.source),targetNode:f(q.target)}),k.toHandle=Bi(Y,H,X,h,n,!0)}return k}function Ai(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function vd(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function md(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function Bi(e,t,n,o,r,i=!1){var a,s,l;const u=o.get(e);if(!u)return null;const c=r===it.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(f=>f.id===n):c?.[0])??null;return d&&i?{...d,...Pt(u,d,d.position,!0)}:d}const Do={[J.Left]:J.Right,[J.Right]:J.Left,[J.Top]:J.Bottom,[J.Bottom]:J.Top},_d=["production","prod"];function nn(e,...t){Ri()&&console.warn(`[Vue Flow]: ${e}`,...t)}function Ri(){return!_d.includes("production")}function Vi(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,...Pn(a)}}):null}function To(e,t,n,o,r,i=!1,a){r.value=!1,e.selected?(i||e.selected&&t)&&(o([e]),Oe(()=>{a.blur()})):n([e])}function Ce(e){return typeof K(e)<"u"}function yd(e,t,n,o){if(!e||!e.source||!e.target)return n(new De($e.EDGE_INVALID,e?.id??"[ID UNKNOWN]")),!1;let r;return at(e)?r=e:r={...e,id:vi(e)},r=gi(r,void 0,o),Jc(r,t)?!1:r}function wd(e,t,n,o,r){if(!t.source||!t.target)return r(new De($e.EDGE_INVALID,e.id)),!1;if(!n)return r(new De($e.EDGE_NOT_FOUND,e.id)),!1;const{id:i,...a}=e;return{...a,id:o?vi(t):i,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function Hi(e,t,n){const o={},r=[];for(let i=0;i<e.length;++i){const a=e[i];if(!xt(a)){n(new De($e.NODE_INVALID,a?.id)||`[ID UNKNOWN|INDEX ${i}]`);continue}const s=Zc(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 De($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 Li(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 Po(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}`;Li("source",l,c,e,r,a),Li("target",l,u,e,i,s)}}function Fi(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function Oo(e,t,n,o,r,i,a,s){const l=[];for(const u of e){const c=at(u)?u:yd(u,s,r,i);if(!c)continue;const d=n(c.source),f=n(c.target);if(!d||!f){r(new De($e.EDGE_SOURCE_TARGET_MISSING,c.id,c.source,c.target));continue}if(!d){r(new De($e.EDGE_SOURCE_MISSING,c.id,c.source));continue}if(!f){r(new De($e.EDGE_TARGET_MISSING,c.id,c.target));continue}if(t&&!t(c,{edges:s,nodes:a,sourceNode:d,targetNode:f})){r(new De($e.EDGE_INVALID,c.id));continue}const h=o(c.id);l.push({...gi(c,h,i),sourceNode:d,targetNode:f})}return l}const Yi=Symbol("vueFlow"),Gi=Symbol("nodeId"),Xi=Symbol("nodeRef"),bd=Symbol("edgeId"),xd=Symbol("edgeRef"),Bn=Symbol("slots");function Ui(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:f,findNode:h,multiSelectionActive:_,nodesSelectionActive:v,selectNodesOnDrag:y,removeSelectedElements:S,addSelectedNodes:M,updateNodePositions:w,emits:k}=Ee(),{onStart:H,onDrag:Y,onStop:X,onClick:F,el:ae,disabled:q,id:C,selectable:b,dragHandle:V}=e,p=qe(!1);let D=[],E,T=null,O={x:void 0,y:void 0},B={x:0,y:0},L=null,I=!1,P=!1,j=0,A=!1;const z=Sd(),R=({x:oe,y:de})=>{O={x:oe,y:de};let m=!1;if(D=D.map(g=>{const x={x:oe-g.distance.x,y:de-g.distance.y},{computedPosition:$}=Co(g,n.value?An(x,o.value):x,k.error,a.value,g.parentNode?h(g.parentNode):void 0);return m=m||g.position.x!==$.x||g.position.y!==$.y,g.position=$,g}),P=P||m,!!m&&(w(D,!0,!0),p.value=!0,L)){const[g,x]=$o({id:C,dragItems:D,findNode:h});Y({event:L,node:g,nodes:x})}},W=()=>{if(!T)return;const[oe,de]=Si(B,T,c.value);if(oe!==0||de!==0){const m={x:(O.x??0)-oe/l.value.zoom,y:(O.y??0)-de/l.value.zoom};f({x:oe,y:de})&&R(m)}j=requestAnimationFrame(W)},ge=(oe,de)=>{I=!0;const m=h(C);!y.value&&!_.value&&m&&(m.selected||S()),m&&pe(b)&&y.value&&To(m,_.value,M,S,v,!1,de);const g=z(oe.sourceEvent);if(O=g,D=rd(i.value,d.value,g,C),D.length){const[x,$]=$o({id:C,dragItems:D,findNode:h});H({event:oe.sourceEvent,node:x,nodes:$})}},se=(oe,de)=>{var m;oe.sourceEvent.type==="touchmove"&&oe.sourceEvent.touches.length>1||(P=!1,s.value===0&&ge(oe,de),O=z(oe.sourceEvent),T=((m=t.value)==null?void 0:m.getBoundingClientRect())||null,B=We(oe.sourceEvent,T))},ee=(oe,de)=>{const m=z(oe.sourceEvent);if(!A&&I&&u.value&&(A=!0,W()),!I){const g=m.xSnapped-(O.x??0),x=m.ySnapped-(O.y??0);Math.sqrt(g*g+x*x)>s.value&&ge(oe,de)}(O.x!==m.xSnapped||O.y!==m.ySnapped)&&D.length&&I&&(L=oe.sourceEvent,B=We(oe.sourceEvent,T),R(m))},he=oe=>{let de=!1;if(!I&&!p.value&&!_.value){const m=oe.sourceEvent,g=z(m),x=g.xSnapped-(O.x??0),$=g.ySnapped-(O.y??0),N=Math.sqrt(x*x+$*$);N!==0&&N<=s.value&&(F?.(m),de=!0)}if(D.length&&!de){P&&(w(D,!1,!1),P=!1);const[m,g]=$o({id:C,dragItems:D,findNode:h});X({event:oe.sourceEvent,node:m,nodes:g})}D=[],p.value=!1,A=!1,I=!1,O={x:void 0,y:void 0},cancelAnimationFrame(j)};return _e([()=>pe(q),ae],([oe,de],m,g)=>{if(de){const x=He(de);oe||(E=jl().on("start",$=>se($,de)).on("drag",$=>ee($,de)).on("end",$=>he($)).filter($=>{const N=$.target,U=pe(V);return!$.button&&(!r.value||!Di(N,`.${r.value}`,de)&&(!U||Di(N,U,de)))}),x.call(E)),g(()=>{x.on(".drag",null),E&&(E.on("start",null),E.on("drag",null),E.on("end",null))})}}),p}function Ed(){return{doubleClick:G(),click:G(),mouseEnter:G(),mouseMove:G(),mouseLeave:G(),contextMenu:G(),updateStart:G(),update:G(),updateEnd:G()}}function Nd(e,t){const n=Ed();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 Sd(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:o}=Ee();return r=>{var i;const a=((i=o.value)==null?void 0:i.getBoundingClientRect())??{left:0,top:0},s=cd(r)?r.sourceEvent:r,{x:l,y:u}=We(s,a),c=en({x:l,y:u},e.value),{x:d,y:f}=n.value?An(c,t.value):c;return{xSnapped:d,ySnapped:f,...c}}}function Rn(){return!0}function Wi({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:f,nodesConnectable:h,autoPanOnConnect:_,autoPanSpeed:v,findNode:y,panBy:S,startConnection:M,updateConnection:w,endConnection:k,emits:H,viewport:Y,edges:X,nodes:F,isValidConnection:ae,nodeLookup:q}=Ee();let C=null,b=!1,V=null;function p(E){var T;const O=pe(n)==="target",B=Io(E),L=hi(E.target),I=E.currentTarget;if(I&&(B&&E.button===0||!B)){let P=function(te){m=We(te,he),R=pd(en(m,Y.value,!1,[1,1]),c.value,q.value,$),g||(x(),g=!0);const le=zi(te,{handle:R,connectionMode:u.value,fromNodeId:pe(t),fromHandleId:pe(e),fromType:O?"target":"source",isValidConnection:z,doc:L,lib:"vue",flowId:s,nodeLookup:q.value},X.value,F.value,y,q.value);V=le.handleDomNode,C=le.connection,b=md(!!R,le.isValid);const ve={...re,isValid:b,to:le.toHandle&&b?Qt({x:le.toHandle.x,y:le.toHandle.y},Y.value):m,toHandle:le.toHandle,toPosition:b&&le.toHandle?le.toHandle.position:Do[$.position],toNode:le.toHandle?q.value.get(le.toHandle.nodeId):null};if(b&&R&&re?.toHandle&&ve.toHandle&&re.toHandle.type===ve.toHandle.type&&re.toHandle.nodeId===ve.toHandle.nodeId&&re.toHandle.id===ve.toHandle.id&&re.to.x===ve.to.x&&re.to.y===ve.to.y)return;const we=R??le.toHandle;if(w(we&&b?Qt({x:we.x,y:we.y},Y.value):m,we,vd(!!we,b)),re=ve,!R&&!b&&!V)return Mo(de);C&&C.source!==C.target&&V&&(Mo(de),de=V,V.classList.add("connecting","vue-flow__handle-connecting"),V.classList.toggle("valid",!!b),V.classList.toggle("vue-flow__handle-valid",!!b))},j=function(te){"touches"in te&&te.touches.length>0||((R||V)&&C&&b&&(i?i(te,C):H.connect(C)),H.connectEnd(te),r&&a?.(te),Mo(de),cancelAnimationFrame(W),k(te),g=!1,b=!1,C=null,V=null,L.removeEventListener("mousemove",P),L.removeEventListener("mouseup",j),L.removeEventListener("touchmove",P),L.removeEventListener("touchend",j))};const A=y(pe(t));let z=pe(o)||ae.value||Rn;!z&&A&&(z=(O?A.isValidSourcePos:A.isValidTargetPos)||Rn);let R,W=0;const{x:ge,y:se}=We(E),ee=Ai(pe(r),I),he=(T=l.value)==null?void 0:T.getBoundingClientRect();if(!he||!ee)return;const oe=Bi(pe(t),ee,pe(e),q.value,u.value);if(!oe)return;let de,m=We(E,he),g=!1;const x=()=>{if(!_.value)return;const[te,le]=Si(m,he,v.value);S({x:te,y:le}),W=requestAnimationFrame(x)},$={...oe,nodeId:pe(t),type:ee,position:oe.position},N=q.value.get(pe(t)),Z={inProgress:!0,isValid:null,from:Pt(N,$,J.Left,!0),fromHandle:$,fromPosition:$.position,fromNode:N,to:m,toHandle:null,toPosition:Do[$.position],toNode:null};M({nodeId:pe(t),id:pe(e),type:ee,position:I?.getAttribute("data-handlepos")||J.Top,...m},{x:ge-he.left,y:se-he.top}),H.connectStart({event:E,nodeId:pe(t),handleId:pe(e),handleType:ee});let re=Z;L.addEventListener("mousemove",P),L.addEventListener("mouseup",j),L.addEventListener("touchmove",P),L.addEventListener("touchend",j)}}function D(E){var T,O;if(!d.value)return;const B=pe(n)==="target";if(!f.value){H.clickConnectStart({event:E,nodeId:pe(t),handleId:pe(e)}),M({nodeId:pe(t),type:pe(n),id:pe(e),position:J.Top,...We(E)},void 0,!0);return}let L=pe(o)||ae.value||Rn;const I=y(pe(t));if(!L&&I&&(L=(B?I.isValidSourcePos:I.isValidTargetPos)||Rn),I&&(typeof I.connectable>"u"?h.value:I.connectable)===!1)return;const P=hi(E.target),j=zi(E,{handle:{nodeId:pe(t),id:pe(e),type:pe(n),position:J.Top,...We(E)},connectionMode:u.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:L,doc:P,lib:"vue",flowId:s,nodeLookup:q.value},X.value,F.value,y,q.value),A=((T=j.connection)==null?void 0:T.source)===((O=j.connection)==null?void 0:O.target);j.isValid&&j.connection&&!A&&H.connect(j.connection),H.clickConnectEnd(E),k(E,!0)}return{handlePointerDown:p,handleClick:D}}function kd(){return ot(Gi,"")}function ji(e){const t=e??kd()??"",n=ot(Xi,xe(null)),{findNode:o,edges:r,emits:i}=Ee(),a=o(t);return a||i.error(new De($e.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:a,parentNode:fe(()=>o(a.parentNode)),connectedEdges:fe(()=>wi([a],r.value))}}function $d(){return{doubleClick:G(),click:G(),mouseEnter:G(),mouseMove:G(),mouseLeave:G(),contextMenu:G(),dragStart:G(),drag:G(),dragStop:G()}}function Cd(e,t){const n=$d();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 Zi(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:o,snapGrid:r,snapToGrid:i,nodesDraggable:a,emits:s}=Ee();return(l,u=!1)=>{const c=i.value?r.value[0]:5,d=i.value?r.value[1]:5,f=u?4:1,h=l.x*c*f,_=l.y*d*f,v=[];for(const y of e.value)if(y.draggable||a&&typeof y.draggable>"u"){const S={x:y.computedPosition.x+h,y:y.computedPosition.y+_},{position:M}=Co(y,S,s.error,t.value,y.parentNode?o(y.parentNode):void 0);v.push({id:y.id,position:M,from:y.position,distance:{x:l.x,y:l.y},dimensions:y.dimensions})}n(v,!0,!1)}}const Vn=.1,Id=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function ut(){return nn("Viewport not initialized yet."),Promise.resolve(!1)}const Md={zoomIn:ut,zoomOut:ut,zoomTo:ut,fitView:ut,setCenter:ut,fitBounds:ut,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:ut,setTransform:ut,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function Dd(e){function t(o,r){return new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate(r?.interpolate==="linear"?Gt:bn).scaleBy(zo(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}=fi({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"?Gt:bn).transform(zo(e.d3Selection,a?.duration,a?.ease,()=>{s(!0)}),d):s(!1)})}return fe(()=>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"?Gt:bn).scaleTo(zo(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:Vn,includeHiddenNodes:!1,duration:0})=>{var i,a;const s=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&(r?.includeHiddenNodes||!f.hidden)&&(!((i=r.nodes)!=null&&i.length)||(a=r.nodes)!=null&&a.length&&r.nodes.includes(f.id))&&s.push(f);if(!s.length)return Promise.resolve(!1);const l=_i(s),{x:u,y:c,zoom:d}=bi(l,e.dimensions.width,e.dimensions.height,r.minZoom??e.minZoom,r.maxZoom??e.maxZoom,r.padding??Vn);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:Vn})=>{const{x:a,y:s,zoom:l}=bi(r,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,i.padding??Vn);return n(a,s,l,i)},project:r=>en(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 en(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}}}:Md)}function zo(e,t=0,n=Id,o=()=>{}){const r=typeof t=="number"&&t>0;return r||o(),r?e.transition().duration(t).ease(n).on("end",o):e}function Td(e,t,n){const o=qn(!0);return o.run(()=>{const r=()=>{o.run(()=>{let v,y,S=!!(n.nodes.value.length||n.edges.value.length);v=St([e.modelValue,()=>{var M,w;return(w=(M=e.modelValue)==null?void 0:M.value)==null?void 0:w.length}],([M])=>{M&&Array.isArray(M)&&(y?.pause(),n.setElements(M),!y&&!S&&M.length?S=!0:y?.resume())}),y=St([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([M,w])=>{var k;(k=e.modelValue)!=null&&k.value&&Array.isArray(e.modelValue.value)&&(v?.pause(),e.modelValue.value=[...M,...w],Oe(()=>{v?.resume()}))},{immediate:S}),At(()=>{v?.stop(),y?.stop()})})},i=()=>{o.run(()=>{let v,y,S=!!n.nodes.value.length;v=St([e.nodes,()=>{var M,w;return(w=(M=e.nodes)==null?void 0:M.value)==null?void 0:w.length}],([M])=>{M&&Array.isArray(M)&&(y?.pause(),n.setNodes(M),!y&&!S&&M.length?S=!0:y?.resume())}),y=St([n.nodes,()=>n.nodes.value.length],([M])=>{var w;(w=e.nodes)!=null&&w.value&&Array.isArray(e.nodes.value)&&(v?.pause(),e.nodes.value=[...M],Oe(()=>{v?.resume()}))},{immediate:S}),At(()=>{v?.stop(),y?.stop()})})},a=()=>{o.run(()=>{let v,y,S=!!n.edges.value.length;v=St([e.edges,()=>{var M,w;return(w=(M=e.edges)==null?void 0:M.value)==null?void 0:w.length}],([M])=>{M&&Array.isArray(M)&&(y?.pause(),n.setEdges(M),!y&&!S&&M.length?S=!0:y?.resume())}),y=St([n.edges,()=>n.edges.value.length],([M])=>{var w;(w=e.edges)!=null&&w.value&&Array.isArray(e.edges.value)&&(v?.pause(),e.edges.value=[...M],Oe(()=>{v?.resume()}))},{immediate:S}),At(()=>{v?.stop(),y?.stop()})})},s=()=>{o.run(()=>{_e(()=>t.maxZoom,()=>{t.maxZoom&&Ce(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{o.run(()=>{_e(()=>t.minZoom,()=>{t.minZoom&&Ce(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},u=()=>{o.run(()=>{_e(()=>t.translateExtent,()=>{t.translateExtent&&Ce(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},c=()=>{o.run(()=>{_e(()=>t.nodeExtent,()=>{t.nodeExtent&&Ce(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{o.run(()=>{_e(()=>t.applyDefault,()=>{Ce(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{o.run(()=>{const v=async y=>{let S=y;typeof t.autoConnect=="function"&&(S=await t.autoConnect(y)),S!==!1&&n.addEdges([S])};_e(()=>t.autoConnect,()=>{Ce(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),_e(n.autoConnect,(y,S,M)=>{y?n.onConnect(v):n.hooks.value.connect.off(v),M(()=>{n.hooks.value.connect.off(v)})},{immediate:!0})})},h=()=>{const v=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const y of Object.keys(t)){const S=y;if(!v.includes(S)){const M=be(()=>t[S]),w=n[S];un(w)&&o.run(()=>{_e(M,k=>{Ce(k)&&(w.value=k)},{immediate:!0})})}}};r(),i(),a(),l(),s(),u(),c(),d(),f(),h()}),()=>o.stop()}function Pd(){return{edgesChange:G(),nodesChange:G(),nodeDoubleClick:G(),nodeClick:G(),nodeMouseEnter:G(),nodeMouseMove:G(),nodeMouseLeave:G(),nodeContextMenu:G(),nodeDragStart:G(),nodeDrag:G(),nodeDragStop:G(),nodesInitialized:G(),miniMapNodeClick:G(),miniMapNodeDoubleClick:G(),miniMapNodeMouseEnter:G(),miniMapNodeMouseMove:G(),miniMapNodeMouseLeave:G(),connect:G(),connectStart:G(),connectEnd:G(),clickConnectStart:G(),clickConnectEnd:G(),paneReady:G(),init:G(),move:G(),moveStart:G(),moveEnd:G(),selectionDragStart:G(),selectionDrag:G(),selectionDragStop:G(),selectionContextMenu:G(),selectionStart:G(),selectionEnd:G(),viewportChangeStart:G(),viewportChange:G(),viewportChangeEnd:G(),paneScroll:G(),paneClick:G(),paneContextMenu:G(),paneMouseEnter:G(),paneMouseMove:G(),paneMouseLeave:G(),edgeContextMenu:G(),edgeMouseEnter:G(),edgeMouseMove:G(),edgeMouseLeave:G(),edgeDoubleClick:G(),edgeClick:G(),edgeUpdateStart:G(),edgeUpdate:G(),edgeUpdateEnd:G(),updateNodeInternals:G(),error:G(e=>nn(e.message))}}function Od(e,t){const n=gt();tr(()=>{for(const[r,i]of Object.entries(t.value)){const a=s=>{e(r,s)};i.setEmitter(a),Rt(i.removeEmitter),i.setHasEmitListeners(()=>o(r)),Rt(i.removeHasEmitListeners)}});function o(r){var i;const a=zd(r);return!!((i=n?.vnode.props)==null?void 0:i[a])}}function zd(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(r,i)=>i.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Ki(){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:Eo.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Kt.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:wt.Bezier,style:{}},connectionMode:it.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:zn()?"Meta":"Control",zoomActivationKeyCode:zn()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:Pd(),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 Ad=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function Bd(e,t,n){const o=Dd(e),r=m=>{const g=m??[];e.hooks.updateNodeInternals.trigger(g)},i=m=>qc(m,e.nodes,e.edges),a=m=>Kc(m,e.nodes,e.edges),s=m=>wi(m,e.edges),l=({id:m,type:g,nodeId:x})=>{var $;const N=m?`-${g}-${m}`:`-${g}`;return Array.from((($=e.connectionLookup.get(`${x}${N}`))==null?void 0:$.values())??[])},u=m=>{if(m)return t.value.get(m)},c=m=>{if(m)return n.value.get(m)},d=(m,g,x)=>{var $,N;const U=[];for(const Z of m){const re={id:Z.id,type:"position",dragging:x,from:Z.from};if(g&&(re.position=Z.position,Z.parentNode)){const te=u(Z.parentNode);re.position={x:re.position.x-((($=te?.computedPosition)==null?void 0:$.x)??0),y:re.position.y-(((N=te?.computedPosition)==null?void 0:N.y)??0)}}U.push(re)}U?.length&&e.hooks.nodesChange.trigger(U)},f=m=>{if(!e.vueFlowRef)return;const g=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!g)return;const x=window.getComputedStyle(g),{m22:$}=new window.DOMMatrixReadOnly(x.transform),N=[];for(const U of m){const Z=U,re=u(Z.id);if(re){const te=Pn(Z.nodeElement);if(!!(te.width&&te.height&&(re.dimensions.width!==te.width||re.dimensions.height!==te.height||Z.forceUpdate))){const ve=Z.nodeElement.getBoundingClientRect();re.dimensions=te,re.handleBounds.source=Vi("source",Z.nodeElement,ve,$,re.id),re.handleBounds.target=Vi("target",Z.nodeElement,ve,$,re.id),N.push({id:re.id,type:"dimensions",dimensions:te})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&o.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),N.length&&e.hooks.nodesChange.trigger(N)},h=(m,g)=>{const x=new Set,$=new Set;for(const Z of m)xt(Z)?x.add(Z.id):at(Z)&&$.add(Z.id);const N=lt(t.value,x,!0),U=lt(n.value,$);if(e.multiSelectionActive){for(const Z of x)N.push(st(Z,g));for(const Z of $)U.push(st(Z,g))}N.length&&e.hooks.nodesChange.trigger(N),U.length&&e.hooks.edgesChange.trigger(U)},_=m=>{if(e.multiSelectionActive){const g=m.map(x=>st(x.id,!0));e.hooks.nodesChange.trigger(g);return}e.hooks.nodesChange.trigger(lt(t.value,new Set(m.map(g=>g.id)),!0)),e.hooks.edgesChange.trigger(lt(n.value))},v=m=>{if(e.multiSelectionActive){const g=m.map(x=>st(x.id,!0));e.hooks.edgesChange.trigger(g);return}e.hooks.edgesChange.trigger(lt(n.value,new Set(m.map(g=>g.id)))),e.hooks.nodesChange.trigger(lt(t.value,new Set,!0))},y=m=>{h(m,!0)},S=m=>{const x=(m||e.nodes).map($=>($.selected=!1,st($.id,!1)));e.hooks.nodesChange.trigger(x)},M=m=>{const x=(m||e.edges).map($=>($.selected=!1,st($.id,!1)));e.hooks.edgesChange.trigger(x)},w=m=>{if(!m||!m.length)return h([],!1);const g=m.reduce((x,$)=>{const N=st($.id,!1);return xt($)?x.nodes.push(N):x.edges.push(N),x},{nodes:[],edges:[]});g.nodes.length&&e.hooks.nodesChange.trigger(g.nodes),g.edges.length&&e.hooks.edgesChange.trigger(g.edges)},k=m=>{var g;(g=e.d3Zoom)==null||g.scaleExtent([m,e.maxZoom]),e.minZoom=m},H=m=>{var g;(g=e.d3Zoom)==null||g.scaleExtent([e.minZoom,m]),e.maxZoom=m},Y=m=>{var g;(g=e.d3Zoom)==null||g.translateExtent(m),e.translateExtent=m},X=m=>{e.nodeExtent=m,r()},F=m=>{var g;(g=e.d3Zoom)==null||g.clickDistance(m)},ae=m=>{e.nodesDraggable=m,e.nodesConnectable=m,e.elementsSelectable=m},q=m=>{const g=m instanceof Function?m(e.nodes):m;!e.initialized&&!g.length||(e.nodes=Hi(g,u,e.hooks.error.trigger))},C=m=>{const g=m instanceof Function?m(e.edges):m;if(!e.initialized&&!g.length)return;const x=Oo(g,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);Po(e.connectionLookup,n.value,x),e.edges=x},b=m=>{const g=m instanceof Function?m([...e.nodes,...e.edges]):m;!e.initialized&&!g.length||(q(g.filter(xt)),C(g.filter(at)))},V=m=>{let g=m instanceof Function?m(e.nodes):m;g=Array.isArray(g)?g:[g];const x=Hi(g,u,e.hooks.error.trigger),$=[];for(const N of x)$.push($i(N));$.length&&e.hooks.nodesChange.trigger($)},p=m=>{let g=m instanceof Function?m(e.edges):m;g=Array.isArray(g)?g:[g];const x=Oo(g,e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),$=[];for(const N of x)$.push($i(N));$.length&&e.hooks.edgesChange.trigger($)},D=(m,g=!0,x=!1)=>{const $=m instanceof Function?m(e.nodes):m,N=Array.isArray($)?$:[$],U=[],Z=[];function re(le){const ve=s(le);for(const we of ve)(!Ce(we.deletable)||we.deletable)&&Z.push(Ii(we.id,we.source,we.target,we.sourceHandle,we.targetHandle))}function te(le){const ve=[];for(const we of e.nodes)we.parentNode===le&&ve.push(we);if(ve.length){for(const we of ve)U.push(Ci(we.id));g&&re(ve);for(const we of ve)te(we.id)}}for(const le of N){const ve=typeof le=="string"?u(le):le;ve&&(Ce(ve.deletable)&&!ve.deletable||(U.push(Ci(ve.id)),g&&re([ve]),x&&te(ve.id)))}Z.length&&e.hooks.edgesChange.trigger(Z),U.length&&e.hooks.nodesChange.trigger(U)},E=m=>{const g=m instanceof Function?m(e.edges):m,x=Array.isArray(g)?g:[g],$=[];for(const N of x){const U=typeof N=="string"?c(N):N;U&&(Ce(U.deletable)&&!U.deletable||$.push(Ii(typeof N=="string"?N:N.id,U.source,U.target,U.sourceHandle,U.targetHandle)))}e.hooks.edgesChange.trigger($)},T=(m,g,x=!0)=>{const $=c(m.id);if(!$)return!1;const N=e.edges.indexOf($),U=wd(m,g,$,x,e.hooks.error.trigger);if(U){const[Z]=Oo([U],e.isValidConnection,u,c,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((re,te)=>te===N?Z:re),Po(e.connectionLookup,n.value,[Z]),Z}return!1},O=(m,g,x={replace:!1})=>{const $=c(m);if(!$)return;const N=typeof g=="function"?g($):g;$.data=x.replace?N:{...$.data,...N}},B=m=>ki(m,e.nodes),L=m=>{const g=ki(m,e.edges);return Po(e.connectionLookup,n.value,g),g},I=(m,g,x={replace:!1})=>{const $=u(m);if(!$)return;const N=typeof g=="function"?g($):g;x.replace?e.nodes.splice(e.nodes.indexOf($),1,N):Object.assign($,N)},P=(m,g,x={replace:!1})=>{const $=u(m);if(!$)return;const N=typeof g=="function"?g($):g;$.data=x.replace?N:{...$.data,...N}},j=(m,g,x=!1)=>{x?e.connectionClickStartHandle=m:e.connectionStartHandle=m,e.connectionEndHandle=null,e.connectionStatus=null,g&&(e.connectionPosition=g)},A=(m,g=null,x=null)=>{e.connectionStartHandle&&(e.connectionPosition=m,e.connectionEndHandle=g,e.connectionStatus=x)},z=(m,g)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,g?e.connectionClickStartHandle=null:e.connectionStartHandle=null},R=m=>{const g=jc(m),x=g?null:Jt(m)?m:u(m.id);return!g&&!x?[null,null,g]:[g?m:Dn(x),x,g]},W=(m,g=!0,x=e.nodes)=>{const[$,N,U]=R(m);if(!$)return[];const Z=[];for(const re of x||e.nodes){if(!U&&(re.id===N.id||!re.computedPosition))continue;const te=Dn(re),le=Tn(te,$);(g&&le>0||le>=te.width*te.height||le>=Number($.width)*Number($.height))&&Z.push(re)}return Z},ge=(m,g,x=!0)=>{const[$]=R(m);if(!$)return!1;const N=Tn($,g);return x&&N>0||N>=Number($.width)*Number($.height)},se=m=>{const{viewport:g,dimensions:x,d3Zoom:$,d3Selection:N,translateExtent:U}=e;if(!$||!N||!m.x&&!m.y)return!1;const Z=Mt.translate(g.x+m.x,g.y+m.y).scale(g.zoom),re=[[0,0],[x.width,x.height]],te=$.constrain()(Z,re,U),le=e.viewport.x!==te.x||e.viewport.y!==te.y||e.viewport.zoom!==te.k;return $.transform(N,te),le},ee=m=>{const g=m instanceof Function?m(e):m,x=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];Ce(g.defaultEdgeOptions)&&(e.defaultEdgeOptions=g.defaultEdgeOptions);const $=g.modelValue||g.nodes||g.edges?[]:void 0;$&&(g.modelValue&&$.push(...g.modelValue),g.nodes&&$.push(...g.nodes),g.edges&&$.push(...g.edges),b($));const N=()=>{Ce(g.maxZoom)&&H(g.maxZoom),Ce(g.minZoom)&&k(g.minZoom),Ce(g.translateExtent)&&Y(g.translateExtent)};for(const U of Object.keys(g)){const Z=U,re=g[Z];![...Ad,...x].includes(Z)&&Ce(re)&&(e[Z]=re)}to(()=>e.d3Zoom).not.toBeNull().then(N),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:b,setNodes:q,setEdges:C,addNodes:V,addEdges:p,removeNodes:D,removeEdges:E,findNode:u,findEdge:c,updateEdge:T,updateEdgeData:O,updateNode:I,updateNodeData:P,applyEdgeChanges:L,applyNodeChanges:B,addSelectedElements:y,addSelectedNodes:_,addSelectedEdges:v,setMinZoom:k,setMaxZoom:H,setTranslateExtent:Y,setNodeExtent:X,setPaneClickDistance:F,removeSelectedElements:w,removeSelectedNodes:S,removeSelectedEdges:M,startConnection:j,updateConnection:A,endConnection:z,setInteractive:ae,setState:ee,getIntersectingNodes:W,getIncomers:i,getOutgoers:a,getConnectedEdges:s,getHandleConnections:l,isNodeIntersecting:ge,panBy:se,fitView:m=>o.value.fitView(m),zoomIn:m=>o.value.zoomIn(m),zoomOut:m=>o.value.zoomOut(m),zoomTo:(m,g)=>o.value.zoomTo(m,g),setViewport:(m,g)=>o.value.setViewport(m,g),setTransform:(m,g)=>o.value.setTransform(m,g),getViewport:()=>o.value.getViewport(),getTransform:()=>o.value.getTransform(),setCenter:(m,g,x)=>o.value.setCenter(m,g,x),fitBounds:(m,g)=>o.value.fitBounds(m,g),project:m=>o.value.project(m),screenToFlowCoordinate:m=>o.value.screenToFlowCoordinate(m),flowToScreenCoordinate:m=>o.value.flowToScreenCoordinate(m),toObject:()=>{const m=[],g=[];for(const x of e.nodes){const{computedPosition:$,handleBounds:N,selected:U,dimensions:Z,isParent:re,resizing:te,dragging:le,events:ve,...we}=x;m.push(we)}for(const x of e.edges){const{selected:$,sourceNode:N,targetNode:U,events:Z,...re}=x;g.push(re)}return JSON.parse(JSON.stringify({nodes:m,edges:g,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:m=>new Promise(g=>{const{nodes:x,edges:$,position:N,zoom:U,viewport:Z}=m;x&&q(x),$&&C($);const[re,te]=Z?.x&&Z?.y?[Z.x,Z.y]:N??[null,null];if(re&&te){const le=Z?.zoom||U||e.viewport.zoom;return to(()=>o.value.viewportInitialized).toBe(!0).then(()=>{o.value.setViewport({x:re,y:te,zoom:le}).then(()=>{g(!0)})})}else g(!0)}),updateNodeInternals:r,viewportHelper:o,$reset:()=>{const m=Ki();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const g=Mt.translate(m.defaultViewport.x??0,m.defaultViewport.y??0).scale(bt(m.defaultViewport.zoom??1,m.minZoom,m.maxZoom)),x=e.viewportRef.getBoundingClientRect(),$=[[0,0],[x.width,x.height]],N=e.d3Zoom.constrain()(g,$,m.translateExtent);e.d3Zoom.transform(e.d3Selection,N)}ee(m)},$destroy:()=>{}}}const Rd=["data-id","data-handleid","data-nodeid","data-handlepos"],ct=Ne({...{name:"Handle",compatConfig:{MODE:3}},props:{id:{default:null},type:{},position:{default:()=>J.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=Qo(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:f}=Ee(),{id:h,node:_,nodeEl:v,connectedEdges:y}=ji(),S=xe(),M=be(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),w=be(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),k=be(()=>{var C,b,V,p,D,E;return((C=a.value)==null?void 0:C.nodeId)===h&&((b=a.value)==null?void 0:b.id)===e.id&&((V=a.value)==null?void 0:V.type)===o.value||((p=l.value)==null?void 0:p.nodeId)===h&&((D=l.value)==null?void 0:D.id)===e.id&&((E=l.value)==null?void 0:E.type)===o.value}),H=be(()=>{var C,b,V;return((C=s.value)==null?void 0:C.nodeId)===h&&((b=s.value)==null?void 0:b.id)===e.id&&((V=s.value)==null?void 0:V.type)===o.value}),{handlePointerDown:Y,handleClick:X}=Wi({nodeId:h,handleId:e.id,isValidConnection:r,type:o}),F=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!y.value.some(C=>{const b=C[`${o.value}Handle`];return C[o.value]!==h?!1:b?b===e.id:!0}):typeof e.connectable=="number"?y.value.filter(C=>{const b=C[`${o.value}Handle`];return C[o.value]!==h?!1:b?b===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(_,y.value):Ce(e.connectable)?e.connectable:c.value);Ke(()=>{var C;if(!_.dimensions.width||!_.dimensions.height)return;const b=(C=_.handleBounds[o.value])==null?void 0:C.find(B=>B.id===e.id);if(!u.value||b)return;const V=u.value.querySelector(".vue-flow__transformationpane");if(!v.value||!S.value||!V||!e.id)return;const p=v.value.getBoundingClientRect(),D=S.value.getBoundingClientRect(),E=window.getComputedStyle(V),{m22:T}=new window.DOMMatrixReadOnly(E.transform),O={id:e.id,position:e.position,x:(D.left-p.left)/T,y:(D.top-p.top)/T,type:o.value,nodeId:h,...Pn(S.value)};_.handleBounds[o.value]=[..._.handleBounds[o.value]??[],O]});function ae(C){const b=Io(C);F.value&&M.value&&(b&&C.button===0||!b)&&Y(C)}function q(C){!h||!s.value&&!M.value||F.value&&X(C)}return t({handleClick:X,handlePointerDown:Y,onClick:q,onPointerDown:ae}),(C,b)=>(Q(),ce("div",{ref_key:"handle",ref:S,"data-id":`${K(i)}-${K(h)}-${e.id}-${o.value}`,"data-handleid":e.id,"data-nodeid":K(h),"data-handlepos":C.position,class:ht(["vue-flow__handle",[`vue-flow__handle-${C.position}`,`vue-flow__handle-${e.id}`,K(d),K(f),o.value,{connectable:F.value,connecting:H.value,connectablestart:M.value,connectableend:w.value,connectionindicator:F.value&&(M.value&&!k.value||w.value&&k.value)}]]),onMousedown:ae,onTouchstartPassive:ae,onClick:q},[ke(C.$slots,"default",{id:C.id})],42,Rd))}}),Hn=function({sourcePosition:e=J.Bottom,targetPosition:t=J.Top,label:n,connectable:o=!0,isValidTargetPos:r,isValidSourcePos:i,data:a}){const s=a.label??n;return[ye(ct,{type:"target",position:t,connectable:o,isValidConnection:r}),typeof s!="string"&&s?ye(s):ye(Be,[s]),ye(ct,{type:"source",position:e,connectable:o,isValidConnection:i})]};Hn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Hn.inheritAttrs=!1,Hn.compatConfig={MODE:3};const Vd=Hn,Ln=function({targetPosition:e=J.Top,label:t,connectable:n=!0,isValidTargetPos:o,data:r}){const i=r.label??t;return[ye(ct,{type:"target",position:e,connectable:n,isValidConnection:o}),typeof i!="string"&&i?ye(i):ye(Be,[i])]};Ln.props=["targetPosition","label","isValidTargetPos","connectable","data"],Ln.inheritAttrs=!1,Ln.compatConfig={MODE:3};const Hd=Ln,Fn=function({sourcePosition:e=J.Bottom,label:t,connectable:n=!0,isValidSourcePos:o,data:r}){const i=r.label??t;return[typeof i!="string"&&i?ye(i):ye(Be,[i]),ye(ct,{type:"source",position:e,connectable:n,isValidConnection:o})]};Fn.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Fn.inheritAttrs=!1,Fn.compatConfig={MODE:3};const Ld=Fn,Fd=["transform"],Yd=["width","height","x","y","rx","ry"],Gd=["y"],Xd=Ne({...{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=xe({x:0,y:0,width:0,height:0}),n=xe(null),o=fe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Ke(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)=>(Q(),ce("g",{transform:o.value,class:"vue-flow__edge-textwrapper"},[i.labelShowBg?(Q(),ce("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:ze(i.labelBgStyle),rx:i.labelBgBorderRadius,ry:i.labelBgBorderRadius},null,12,Yd)):Me("",!0),ue("text",Qn(i.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:i.labelStyle}),[ke(i.$slots,"default",{},()=>[typeof i.label!="string"?(Q(),Ie(pt(i.label),{key:0})):(Q(),ce(Be,{key:1},[Re(Te(i.label),1)],64))])],16,Gd)],8,Fd))}}),Ud=["id","d","marker-end","marker-start"],Wd=["d","stroke-width"],Yn=Ne({...{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=xe(null),o=xe(null),r=xe(null),i=ir();return t({pathEl:n,interactionEl:o,labelEl:r}),(a,s)=>(Q(),ce(Be,null,[ue("path",Qn(K(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,Ud),a.interactionWidth?(Q(),ce("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,Wd)):Me("",!0),a.label&&a.labelX&&a.labelY?(Q(),Ie(Xd,{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"])):Me("",!0)],64))}});function qi({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 Ji({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 Gn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Qi({pos:e,x1:t,y1:n,x2:o,y2:r,c:i}){let a,s;switch(e){case J.Left:a=t-Gn(t-o,i),s=n;break;case J.Right:a=t+Gn(o-t,i),s=n;break;case J.Top:a=t,s=n-Gn(n-r,i);break;case J.Bottom:a=t,s=n+Gn(r-n,i);break}return[a,s]}function ea(e){const{sourceX:t,sourceY:n,sourcePosition:o=J.Bottom,targetX:r,targetY:i,targetPosition:a=J.Top,curvature:s=.25}=e,[l,u]=Qi({pos:o,x1:t,y1:n,x2:r,y2:i,c:s}),[c,d]=Qi({pos:a,x1:r,y1:i,x2:t,y2:n,c:s}),[f,h,_,v]=Ji({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}`,f,h,_,v]}function ta({pos:e,x1:t,y1:n,x2:o,y2:r}){let i,a;switch(e){case J.Left:case J.Right:i=.5*(t+o),a=n;break;case J.Top:case J.Bottom:i=t,a=.5*(n+r);break}return[i,a]}function na(e){const{sourceX:t,sourceY:n,sourcePosition:o=J.Bottom,targetX:r,targetY:i,targetPosition:a=J.Top}=e,[s,l]=ta({pos:o,x1:t,y1:n,x2:r,y2:i}),[u,c]=ta({pos:a,x1:r,y1:i,x2:t,y2:n}),[d,f,h,_]=Ji({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,f,h,_]}const oa={[J.Left]:{x:-1,y:0},[J.Right]:{x:1,y:0},[J.Top]:{x:0,y:-1},[J.Bottom]:{x:0,y:1}};function jd({source:e,sourcePosition:t=J.Bottom,target:n}){return t===J.Left||t===J.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 ra(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Zd({source:e,sourcePosition:t=J.Bottom,target:n,targetPosition:o=J.Top,center:r,offset:i}){const a=oa[t],s=oa[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=jd({source:l,sourcePosition:t,target:u}),d=c.x!==0?"x":"y",f=c[d];let h,_,v;const y={x:0,y:0},S={x:0,y:0},[M,w,k,H]=qi({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(a[d]*s[d]===-1){_=r.x??M,v=r.y??w;const X=[{x:_,y:l.y},{x:_,y:u.y}],F=[{x:l.x,y:v},{x:u.x,y:v}];a[d]===f?h=d==="x"?X:F:h=d==="x"?F:X}else{const X=[{x:l.x,y:u.y}],F=[{x:u.x,y:l.y}];if(d==="x"?h=a.x===f?F:X:h=a.y===f?X:F,t===o){const V=Math.abs(e[d]-n[d]);if(V<=i){const p=Math.min(i-1,i-V);a[d]===f?y[d]=(l[d]>e[d]?-1:1)*p:S[d]=(u[d]>n[d]?-1:1)*p}}if(t!==o){const V=d==="x"?"y":"x",p=a[d]===s[V],D=l[V]>u[V],E=l[V]<u[V];(a[d]===1&&(!p&&D||p&&E)||a[d]!==1&&(!p&&E||p&&D))&&(h=d==="x"?X:F)}const ae={x:l.x+y.x,y:l.y+y.y},q={x:u.x+S.x,y:u.y+S.y},C=Math.max(Math.abs(ae.x-h[0].x),Math.abs(q.x-h[0].x)),b=Math.max(Math.abs(ae.y-h[0].y),Math.abs(q.y-h[0].y));C>=b?(_=(ae.x+q.x)/2,v=h[0].y):(_=h[0].x,v=(ae.y+q.y)/2)}return[[e,{x:l.x+y.x,y:l.y+y.y},...h,{x:u.x+S.x,y:u.y+S.y},n],_,v,k,H]}function Kd(e,t,n,o){const r=Math.min(ra(e,t)/2,ra(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 Ao(e){const{sourceX:t,sourceY:n,sourcePosition:o=J.Bottom,targetX:r,targetY:i,targetPosition:a=J.Top,borderRadius:s=5,centerX:l,centerY:u,offset:c=20}=e,[d,f,h,_,v]=Zd({source:{x:t,y:n},sourcePosition:o,target:{x:r,y:i},targetPosition:a,center:{x:l,y:u},offset:c});return[d.reduce((S,M,w)=>{let k;return w>0&&w<d.length-1?k=Kd(d[w-1],M,d[w+1],s):k=`${w===0?"M":"L"}${M.x} ${M.y}`,S+=k,S},""),f,h,_,v]}function qd(e){const{sourceX:t,sourceY:n,targetX:o,targetY:r}=e,[i,a,s,l]=qi({sourceX:t,sourceY:n,targetX:o,targetY:r});return[`M ${t},${n}L ${o},${r}`,i,a,s,l]}const Jd=Ne({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]=qd(e);return ye(Yn,{path:n,labelX:o,labelY:r,...t,...e})}}}),ia=Ne({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]=Ao({...e,sourcePosition:e.sourcePosition??J.Bottom,targetPosition:e.targetPosition??J.Top});return ye(Yn,{path:n,labelX:o,labelY:r,...t,...e})}}}),Qd=Ne({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>ye(ia,{...e,...t,borderRadius:0})}}),ef=Ne({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]=ea({...e,sourcePosition:e.sourcePosition??J.Bottom,targetPosition:e.targetPosition??J.Top});return ye(Yn,{path:n,labelX:o,labelY:r,...t,...e})}}}),tf=Ne({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]=na({...e,sourcePosition:e.sourcePosition??J.Bottom,targetPosition:e.targetPosition??J.Top});return ye(Yn,{path:n,labelX:o,labelY:r,...t,...e})}}}),nf={input:Ld,default:Vd,output:Hd},of={default:ef,straight:Jd,step:Qd,smoothstep:ia,simplebezier:tf};function rf(e,t,n){const o=fe(()=>v=>t.value.get(v)),r=fe(()=>v=>n.value.get(v)),i=fe(()=>{const v={...of,...e.edgeTypes},y=Object.keys(v);for(const S of e.edges)S.type&&!y.includes(S.type)&&(v[S.type]=S.type);return v}),a=fe(()=>{const v={...nf,...e.nodeTypes},y=Object.keys(v);for(const S of e.nodes)S.type&&!y.includes(S.type)&&(v[S.type]=S.type);return v}),s=fe(()=>e.onlyRenderVisibleElements?yi(e.nodes,{x:0,y:0,width:e.dimensions.width,height:e.dimensions.height},e.viewport,!0):e.nodes),l=fe(()=>{if(e.onlyRenderVisibleElements){const v=[];for(const y of e.edges){const S=t.value.get(y.source),M=t.value.get(y.target);ld({sourcePos:S.computedPosition||{x:0,y:0},targetPos:M.computedPosition||{x:0,y:0},sourceWidth:S.dimensions.width,sourceHeight:S.dimensions.height,targetWidth:M.dimensions.width,targetHeight:M.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&v.push(y)}return v}return e.edges}),u=fe(()=>[...s.value,...l.value]),c=fe(()=>{const v=[];for(const y of e.nodes)y.selected&&v.push(y);return v}),d=fe(()=>{const v=[];for(const y of e.edges)y.selected&&v.push(y);return v}),f=fe(()=>[...c.value,...d.value]),h=fe(()=>{const v=[];for(const y of e.nodes)y.dimensions.width&&y.dimensions.height&&y.handleBounds!==void 0&&v.push(y);return v}),_=fe(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:o,getEdge:r,getElements:u,getEdgeTypes:i,getNodeTypes:a,getEdges:l,getNodes:s,getSelectedElements:f,getSelectedNodes:c,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:_}}class Et{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=gt())==null?void 0:t.appContext.app,o=n?.config.globalProperties.$vueFlowStorage??Et.instance;return Et.instance=o??new Et,n&&(n.config.globalProperties.$vueFlowStorage=Et.instance),Et.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const o=Ki(),r=er(o),i={};for(const[f,h]of Object.entries(r.hooks)){const _=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;i[_]=h.on}const a={};for(const[f,h]of Object.entries(r.hooks))a[f]=h.trigger;const s=fe(()=>{const f=new Map;for(const h of r.nodes)f.set(h.id,h);return f}),l=fe(()=>{const f=new Map;for(const h of r.edges)f.set(h.id,h);return f}),u=rf(r,s,l),c=Bd(r,s,l);c.setState({...r,...n});const d={...i,...u,...c,...os(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 Ee(e){const t=Et.getInstance(),n=Kn(),o=typeof e=="object",r=o?e:{id:e},i=r.id,a=i??n?.vueFlowId;let s;if(n){const l=ot(Yi,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??qn(!0)).run(()=>{_e(u.applyDefault,(d,f,h)=>{const _=y=>{u.applyNodeChanges(y)},v=y=>{u.applyEdgeChanges(y)};d?(u.onNodesChange(_),u.onEdgesChange(v)):(u.hooks.value.nodesChange.off(_),u.hooks.value.edgesChange.off(v)),h(()=>{u.hooks.value.nodesChange.off(_),u.hooks.value.edgesChange.off(v)})},{immediate:!0}),Rt(()=>{if(s){const d=t.get(s.id);d?d.$destroy():nn(`No store instance found for id ${s.id} in storage.`)}})})}else o&&s.setState(r);if(n&&(ft(Yi,s),n.vueFlowId=s.id),o){const l=gt();l?.type.name!=="VueFlow"&&s.emits.error(new De($e.USEVUEFLOW_OPTIONS))}return s}function af(e){const{emits:t,dimensions:n}=Ee();let o;Ke(()=>{const r=()=>{var i,a;if(!e.value||!(((a=(i=e.value).checkVisibility)==null?void 0:a.call(i))??!0))return;const s=Pn(e.value);(s.width===0||s.height===0)&&t.error(new De($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)),Jn(()=>{window.removeEventListener("resize",r),o&&e.value&&o.unobserve(e.value)})})}const sf=Ne({...{name:"UserSelection",compatConfig:{MODE:3}},props:{userSelectionRect:{}},setup(e){return(t,n)=>(Q(),ce("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),lf=["tabIndex"],uf=Ne({...{name:"NodesSelection",compatConfig:{MODE:3}},setup(e){const{emits:t,viewport:n,getSelectedNodes:o,noPanClassName:r,disableKeyboardA11y:i,userSelectionActive:a}=Ee(),s=Zi(),l=xe(null),u=Ui({el:l,onStart(_){t.selectionDragStart(_),t.nodeDragStart(_)},onDrag(_){t.selectionDrag(_),t.nodeDrag(_)},onStop(_){t.selectionDragStop(_),t.nodeDragStop(_)}});Ke(()=>{var _;i.value||(_=l.value)==null||_.focus({preventScroll:!0})});const c=fe(()=>_i(o.value)),d=fe(()=>({width:`${c.value.width}px`,height:`${c.value.height}px`,top:`${c.value.y}px`,left:`${c.value.x}px`}));function f(_){t.selectionContextMenu({event:_,nodes:o.value})}function h(_){i.value||Dt[_.key]&&(_.preventDefault(),s({x:Dt[_.key].x,y:Dt[_.key].y},_.shiftKey))}return(_,v)=>!K(a)&&c.value.width&&c.value.height?(Q(),ce("div",{key:0,class:ht(["vue-flow__nodesselection vue-flow__container",K(r)]),style:ze({transform:`translate(${K(n).x}px,${K(n).y}px) scale(${K(n).zoom})`})},[ue("div",{ref_key:"el",ref:l,class:ht([{dragging:K(u)},"vue-flow__nodesselection-rect"]),style:ze(d.value),tabIndex:K(i)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,lf)],6)):Me("",!0)}});function cf(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const df=Ne({...{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:f,removeEdges:h,selectionMode:_,deleteKeyCode:v,multiSelectionKeyCode:y,multiSelectionActive:S,edgeLookup:M,nodeLookup:w,connectionLookup:k,defaultEdgeOptions:H,connectionStartHandle:Y,panOnDrag:X}=Ee(),F=qe(null),ae=qe(new Set),q=qe(new Set),C=qe(null),b=be(()=>l.value&&(e.isSelecting||i.value)),V=be(()=>Y.value!==null);let p=!1,D=!1;const E=qt(v,{actInsideInputWithModifier:!1}),T=qt(y);_e(E,z=>{z&&(f(d.value),h(c.value),u.value=!1)}),_e(T,z=>{S.value=z});function O(z,R){return W=>{W.target===R&&z?.(W)}}function B(z){if(p||V.value){p=!1;return}r.paneClick(z),a(),u.value=!1}function L(z){var R;if(Array.isArray(X.value)&&((R=X.value)!=null&&R.includes(2))){z.preventDefault();return}r.paneContextMenu(z)}function I(z){r.paneScroll(z)}function P(z){var R,W,ge;if(C.value=((R=t.value)==null?void 0:R.getBoundingClientRect())??null,!l.value||!e.isSelecting||z.button!==0||z.target!==F.value||!C.value)return;(ge=(W=z.target)==null?void 0:W.setPointerCapture)==null||ge.call(W,z.pointerId);const{x:se,y:ee}=cf(z,C.value);D=!0,p=!1,a(),s.value={width:0,height:0,startX:se,startY:ee,x:se,y:ee},r.selectionStart(z)}function j(z){var R;if(!C.value||!s.value)return;p=!0;const{x:W,y:ge}=We(z,C.value),{startX:se=0,startY:ee=0}=s.value,he={startX:se,startY:ee,x:W<se?W:se,y:ge<ee?ge:ee,width:Math.abs(W-se),height:Math.abs(ge-ee)},oe=ae.value,de=q.value;ae.value=new Set(yi(n.value,he,o.value,_.value===Eo.Partial,!0).map(g=>g.id)),q.value=new Set;const m=((R=H.value)==null?void 0:R.selectable)??!0;for(const g of ae.value){const x=k.value.get(g);if(x)for(const{edgeId:$}of x.values()){const N=M.value.get($);N&&(N.selectable??m)&&q.value.add($)}}if(!Fi(oe,ae.value)){const g=lt(w.value,ae.value,!0);r.nodesChange(g)}if(!Fi(de,q.value)){const g=lt(M.value,q.value);r.edgesChange(g)}s.value=he,i.value=!0,u.value=!1}function A(z){var R;z.button!==0||!D||((R=z.target)==null||R.releasePointerCapture(z.pointerId),!i.value&&s.value&&z.target===F.value&&B(z),i.value=!1,s.value=null,u.value=ae.value.size>0,r.selectionEnd(z),e.selectionKeyPressed&&(p=!1),D=!1)}return(z,R)=>(Q(),ce("div",{ref_key:"container",ref:F,class:ht(["vue-flow__pane vue-flow__container",{selection:z.isSelecting}]),onClick:R[0]||(R[0]=W=>b.value?void 0:O(B,F.value)(W)),onContextmenu:R[1]||(R[1]=W=>O(L,F.value)(W)),onWheelPassive:R[2]||(R[2]=W=>O(I,F.value)(W)),onPointerenter:R[3]||(R[3]=W=>b.value?void 0:K(r).paneMouseEnter(W)),onPointerdown:R[4]||(R[4]=W=>b.value?P(W):K(r).paneMouseMove(W)),onPointermove:R[5]||(R[5]=W=>b.value?j(W):K(r).paneMouseMove(W)),onPointerup:R[6]||(R[6]=W=>b.value?A(W):void 0),onPointerleave:R[7]||(R[7]=W=>K(r).paneMouseLeave(W))},[ke(z.$slots,"default"),K(i)&&K(s)?(Q(),Ie(sf,{key:0,"user-selection-rect":K(s)},null,8,["user-selection-rect"])):Me("",!0),K(u)&&K(d).length?(Q(),Ie(uf,{key:1})):Me("",!0)],34))}}),ff=Ne({...{name:"Transform",compatConfig:{MODE:3}},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:o}=Ee(),r=fe(()=>n.value?!o.value:!1),i=fe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(a,s)=>(Q(),ce("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:i.value,opacity:r.value?0:void 0})},[ke(a.$slots,"default")],4))}}),hf=Ne({...{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:f,zoomOnPinch:h,zoomOnScroll:_,preventScrolling:v,noWheelClassName:y,noPanClassName:S,emits:M,connectionStartHandle:w,userSelectionActive:k,paneDragging:H,d3Zoom:Y,d3Selection:X,d3ZoomHandler:F,viewport:ae,viewportRef:q,paneClickDistance:C}=Ee();af(q);const b=qe(!1),V=qe(!1);let p=null,D=!1,E=0,T={x:0,y:0,zoom:0};const O=qt(s),B=qt(a),L=qt(i),I=be(()=>(!B.value||B.value&&a.value===!0)&&(O.value||d.value)),P=be(()=>O.value||l.value),j=be(()=>a.value===!0&&I.value!==!0),A=be(()=>B.value&&a.value!==!0||k.value||j.value),z=be(()=>w.value!==null);Ke(()=>{if(!q.value){nn("Viewport element is missing");return}const ee=q.value,he=ee.getBoundingClientRect(),oe=Lc().clickDistance(C.value).scaleExtent([t.value,n.value]).translateExtent(r.value),de=He(ee).call(oe),m=de.on("wheel.zoom"),g=Mt.translate(o.value.x??0,o.value.y??0).scale(bt(o.value.zoom??1,t.value,n.value)),x=[[0,0],[he.width,he.height]],$=oe.constrain()(g,x,r.value);oe.transform(de,$),oe.wheelDelta(Ei),Y.value=oe,X.value=de,F.value=m,ae.value={x:$.x,y:$.y,zoom:$.k},oe.on("start",N=>{var U;if(!N.sourceEvent)return null;E=N.sourceEvent.button,b.value=!0;const Z=ge(N.transform);((U=N.sourceEvent)==null?void 0:U.type)==="mousedown"&&(H.value=!0),T=Z,M.viewportChangeStart(Z),M.moveStart({event:N,flowTransform:Z})}),oe.on("end",N=>{if(!N.sourceEvent)return null;if(b.value=!1,H.value=!1,R(I.value,E??0)&&!D&&M.paneContextMenu(N.sourceEvent),D=!1,W(T,N.transform)){const U=ge(N.transform);T=U,M.viewportChangeEnd(U),M.moveEnd({event:N,flowTransform:U})}}),oe.filter(N=>{var U;const Z=L.value||_.value,re=h.value&&N.ctrlKey,te=N.button,le=N.type==="wheel";if(te===1&&N.type==="mousedown"&&(se(N,"vue-flow__node")||se(N,"vue-flow__edge")))return!0;if(!I.value&&!Z&&!P.value&&!f.value&&!h.value||k.value||z.value&&!le||!f.value&&N.type==="dblclick"||se(N,y.value)&&le||se(N,S.value)&&(!le||P.value&&le&&!L.value)||!h.value&&N.ctrlKey&&le||!Z&&!P.value&&!re&&le)return!1;if(!h&&N.type==="touchstart"&&((U=N.touches)==null?void 0:U.length)>1)return N.preventDefault(),!1;if(!I.value&&(N.type==="mousedown"||N.type==="touchstart")||j.value&&Array.isArray(d.value)&&d.value.includes(0)&&te===0||Array.isArray(d.value)&&!d.value.includes(te)&&(N.type==="mousedown"||N.type==="touchstart"))return!1;const ve=Array.isArray(d.value)&&d.value.includes(te)||a.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!te||te<=1;return(!N.ctrlKey||O.value||le)&&ve}),_e([k,I],()=>{k.value&&!b.value?oe.on("zoom",null):k.value||oe.on("zoom",N=>{ae.value={x:N.transform.x,y:N.transform.y,zoom:N.transform.k};const U=ge(N.transform);D=R(I.value,E??0),M.viewportChange(U),M.move({event:N,flowTransform:U})})},{immediate:!0}),_e([k,P,u,L,h,v,y],()=>{P.value&&!L.value&&!k.value?de.on("wheel.zoom",N=>{if(se(N,y.value))return!1;const U=L.value||_.value,Z=h.value&&N.ctrlKey;if(!(!v.value||P.value||U||Z))return!1;N.preventDefault(),N.stopImmediatePropagation();const te=de.property("__zoom").k||1,le=zn();if(!O.value&&N.ctrlKey&&h.value&&le){const xv=Ye(N),Ev=Ei(N),Nv=te*2**Ev;oe.scaleTo(de,Nv,xv,N);return}const ve=N.deltaMode===1?20:1;let we=u.value===Kt.Vertical?0:N.deltaX*ve,dt=u.value===Kt.Horizontal?0:N.deltaY*ve;!le&&N.shiftKey&&u.value!==Kt.Vertical&&!we&&dt&&(we=dt,dt=0),oe.translateBy(de,-(we/te)*c.value,-(dt/te)*c.value);const Ze=ge(de.property("__zoom"));p&&clearTimeout(p),V.value?(M.move({event:N,flowTransform:Ze}),M.viewportChange(Ze),p=setTimeout(()=>{M.moveEnd({event:N,flowTransform:Ze}),M.viewportChangeEnd(Ze),V.value=!1},150)):(V.value=!0,M.moveStart({event:N,flowTransform:Ze}),M.viewportChangeStart(Ze))},{passive:!1}):typeof m<"u"&&de.on("wheel.zoom",function(N,U){const Z=!v.value&&N.type==="wheel"&&!N.ctrlKey,re=L.value||_.value,te=h.value&&N.ctrlKey;if(!re&&!l.value&&!te&&N.type==="wheel"||Z||se(N,y.value))return null;N.preventDefault(),m.call(this,N,U)},{passive:!1})},{immediate:!0})});function R(ee,he){return he===2&&Array.isArray(ee)&&ee.includes(2)}function W(ee,he){return ee.x!==he.x&&!Number.isNaN(he.x)||ee.y!==he.y&&!Number.isNaN(he.y)||ee.zoom!==he.k&&!Number.isNaN(he.k)}function ge(ee){return{x:ee.x,y:ee.y,zoom:ee.k}}function se(ee,he){return ee.target.closest(`.${he}`)}return(ee,he)=>(Q(),ce("div",{ref_key:"viewportRef",ref:q,class:"vue-flow__viewport vue-flow__container"},[ie(df,{"is-selecting":A.value,"selection-key-pressed":K(B),class:ht({connecting:z.value,dragging:K(H),draggable:K(d)===!0||Array.isArray(K(d))&&K(d).includes(0)})},{default:me(()=>[ie(ff,null,{default:me(()=>[ke(ee.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),gf=["id"],pf=["id"],vf=["id"],mf=Ne({...{name:"A11yDescriptions",compatConfig:{MODE:3}},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:o}=Ee();return(r,i)=>(Q(),ce(Be,null,[ue("div",{id:`${K(ui)}-${K(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Te(K(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,gf),ue("div",{id:`${K(ci)}-${K(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,pf),K(n)?Me("",!0):(Q(),ce("div",{key:0,id:`${K(Wc)}-${K(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Te(K(o)),9,vf))],64))}});function _f(){const e=Ee();_e(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function yf(e,t,n){return n===J.Left?e-t:n===J.Right?e+t:e}function wf(e,t,n){return n===J.Top?e-t:n===J.Bottom?e+t:e}const Bo=function({radius:e=10,centerX:t=0,centerY:n=0,position:o=J.Top,type:r}){return ye("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${r}`,cx:yf(t,e,o),cy:wf(n,e,o),r:e,stroke:"transparent",fill:"transparent"})};Bo.props=["radius","centerX","centerY","position","type"],Bo.compatConfig={MODE:3};const aa=Bo,bf=Ne({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:f,multiSelectionActive:h,disableKeyboardA11y:_,elementsSelectable:v,edgesUpdatable:y,edgesFocusable:S,hooks:M}=Ee(),w=fe(()=>c(e.id)),{emit:k,on:H}=Nd(w.value,i),Y=ot(Bn),X=gt(),F=xe(!1),ae=xe(!1),q=xe(""),C=xe(null),b=xe("source"),V=xe(null),p=be(()=>typeof w.value.selectable>"u"?v.value:w.value.selectable),D=be(()=>typeof w.value.updatable>"u"?y.value:w.value.updatable),E=be(()=>typeof w.value.focusable>"u"?S.value:w.value.focusable);ft(bd,e.id),ft(xd,V);const T=fe(()=>w.value.class instanceof Function?w.value.class(w.value):w.value.class),O=fe(()=>w.value.style instanceof Function?w.value.style(w.value):w.value.style),B=fe(()=>{const g=w.value.type||"default",x=Y?.[`edge-${g}`];if(x)return x;let $=w.value.template??l.value[g];if(typeof $=="string"&&X){const N=Object.keys(X.appContext.components);N&&N.includes(g)&&($=Se(g,!1))}return $&&typeof $!="string"?$:(i.error(new De($e.EDGE_TYPE_MISSING,$)),!1)}),{handlePointerDown:L}=Wi({nodeId:q,handleId:C,type:b,isValidConnection:f,edgeUpdaterType:b,onEdgeUpdate:j,onEdgeUpdateEnd:A});return()=>{const g=d(w.value.source),x=d(w.value.target),$="pathOptions"in w.value?w.value.pathOptions:{};if(!g&&!x)return i.error(new De($e.EDGE_SOURCE_TARGET_MISSING,w.value.id,w.value.source,w.value.target)),null;if(!g)return i.error(new De($e.EDGE_SOURCE_MISSING,w.value.id,w.value.source)),null;if(!x)return i.error(new De($e.EDGE_TARGET_MISSING,w.value.id,w.value.target)),null;if(!w.value||w.value.hidden||g.hidden||x.hidden)return null;let N;o.value===it.Strict?N=g.handleBounds.source:N=[...g.handleBounds.source||[],...g.handleBounds.target||[]];const U=Pi(N,w.value.sourceHandle);let Z;o.value===it.Strict?Z=x.handleBounds.target:Z=[...x.handleBounds.target||[],...x.handleBounds.source||[]];const re=Pi(Z,w.value.targetHandle),te=U?.position||J.Bottom,le=re?.position||J.Top,{x:ve,y:we}=Pt(g,U,te),{x:dt,y:Ze}=Pt(x,re,le);return w.value.sourceX=ve,w.value.sourceY=we,w.value.targetX=dt,w.value.targetY=Ze,ye("g",{ref:V,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${B.value===!1?"default":w.value.type||"default"}`,s.value,T.value,{updating:F.value,selected:w.value.selected,animated:w.value.animated,inactive:!p.value&&!M.value.edgeClick.hasListeners()}],tabIndex:E.value?0:void 0,"aria-label":w.value.ariaLabel===null?void 0:w.value.ariaLabel??`Edge from ${w.value.source} to ${w.value.target}`,"aria-describedby":E.value?`${ci}-${t}`:void 0,"aria-roledescription":"edge",role:E.value?"group":"img",...w.value.domAttributes,onClick:R,onContextmenu:W,onDblclick:ge,onMouseenter:se,onMousemove:ee,onMouseleave:he,onKeyDown:E.value?m:void 0},[ae.value?null:ye(B.value===!1?l.value.default:B.value,{id:e.id,sourceNode:g,targetNode:x,source:w.value.source,target:w.value.target,type:w.value.type,updatable:D.value,selected:w.value.selected,animated:w.value.animated,label:w.value.label,labelStyle:w.value.labelStyle,labelShowBg:w.value.labelShowBg,labelBgStyle:w.value.labelBgStyle,labelBgPadding:w.value.labelBgPadding,labelBgBorderRadius:w.value.labelBgBorderRadius,data:w.value.data,events:{...w.value.events,...H},style:O.value,markerStart:`url('#${tn(w.value.markerStart,t)}')`,markerEnd:`url('#${tn(w.value.markerEnd,t)}')`,sourcePosition:te,targetPosition:le,sourceX:ve,sourceY:we,targetX:dt,targetY:Ze,sourceHandleId:w.value.sourceHandle,targetHandleId:w.value.targetHandle,interactionWidth:w.value.interactionWidth,...$}),[D.value==="source"||D.value===!0?[ye("g",{onMousedown:oe,onMouseenter:I,onMouseout:P},ye(aa,{position:te,centerX:ve,centerY:we,radius:r.value,type:"source","data-type":"source"}))]:null,D.value==="target"||D.value===!0?[ye("g",{onMousedown:de,onMouseenter:I,onMouseout:P},ye(aa,{position:le,centerX:dt,centerY:Ze,radius:r.value,type:"target","data-type":"target"}))]:null]])};function I(){F.value=!0}function P(){F.value=!1}function j(g,x){k.update({event:g,edge:w.value,connection:x})}function A(g){k.updateEnd({event:g,edge:w.value}),ae.value=!1}function z(g,x){g.button===0&&(ae.value=!0,q.value=x?w.value.target:w.value.source,C.value=(x?w.value.targetHandle:w.value.sourceHandle)??null,b.value=x?"target":"source",k.updateStart({event:g,edge:w.value}),L(g))}function R(g){var x;const $={event:g,edge:w.value};p.value&&(a.value=!1,w.value.selected&&h.value?(u([w.value]),(x=V.value)==null||x.blur()):n([w.value])),k.click($)}function W(g){k.contextMenu({event:g,edge:w.value})}function ge(g){k.doubleClick({event:g,edge:w.value})}function se(g){k.mouseEnter({event:g,edge:w.value})}function ee(g){k.mouseMove({event:g,edge:w.value})}function he(g){k.mouseLeave({event:g,edge:w.value})}function oe(g){z(g,!0)}function de(g){z(g,!1)}function m(g){var x;!_.value&&di.includes(g.key)&&p.value&&(g.key==="Escape"?((x=V.value)==null||x.blur(),u([c(e.id)])):n([c(e.id)]))}}}),xf=Ne({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}=Ee(),f=(e=ot(Bn))==null?void 0:e["connection-line"],h=fe(()=>{var M;return d((M=o.value)==null?void 0:M.nodeId)}),_=fe(()=>{var M;return d((M=r.value)==null?void 0:M.nodeId)??null}),v=fe(()=>({x:(i.value.x-c.value.x)/c.value.zoom,y:(i.value.y-c.value.y)/c.value.zoom})),y=fe(()=>l.value.markerStart?`url(#${tn(l.value.markerStart,t)})`:""),S=fe(()=>l.value.markerEnd?`url(#${tn(l.value.markerEnd,t)})`:"");return()=>{var M,w,k;if(!h.value||!o.value)return null;const H=o.value.id,Y=o.value.type,X=h.value.handleBounds;let F=X?.[Y]??[];if(n.value===it.Loose){const O=X?.[Y==="source"?"target":"source"]??[];F=[...F,...O]}if(!F)return null;const ae=(H?F.find(O=>O.id===H):F[0])??null,q=ae?.position??J.Top,{x:C,y:b}=Pt(h.value,ae,q);let V=null;_.value&&(n.value===it.Strict?V=((M=_.value.handleBounds[Y==="source"?"target":"source"])==null?void 0:M.find(O=>{var B;return O.id===((B=r.value)==null?void 0:B.id)}))||null:V=((w=[..._.value.handleBounds.source??[],..._.value.handleBounds.target??[]])==null?void 0:w.find(O=>{var B;return O.id===((B=r.value)==null?void 0:B.id)}))||null);const p=((k=r.value)==null?void 0:k.position)??(q?Do[q]:null);if(!q||!p)return null;const D=a.value??l.value.type??wt.Bezier;let E="";const T={sourceX:C,sourceY:b,sourcePosition:q,targetX:v.value.x,targetY:v.value.y,targetPosition:p};return D===wt.Bezier?[E]=ea(T):D===wt.Step?[E]=Ao({...T,borderRadius:0}):D===wt.SmoothStep?[E]=Ao(T):D===wt.SimpleBezier?[E]=na(T):E=`M${C},${b} ${v.value.x},${v.value.y}`,ye("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},ye("g",{class:"vue-flow__connection"},f?ye(f,{sourceX:C,sourceY:b,sourcePosition:q,targetX:v.value.x,targetY:v.value.y,targetPosition:p,sourceNode:h.value,sourceHandle:ae,targetNode:_.value,targetHandle:V,markerEnd:S.value,markerStart:y.value,connectionStatus:u.value}):ye("path",{d:E,class:[l.value.class,u.value,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":S.value,"marker-start":y.value})))}}}),Ef=["id","markerWidth","markerHeight","markerUnits","orient"],Nf=Ne({...{name:"MarkerType",compatConfig:{MODE:3}},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(Q(),ce("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===K(No).ArrowClosed?(Q(),ce("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):Me("",!0),t.type===K(No).Arrow?(Q(),ce("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):Me("",!0)],8,Ef))}}),Sf={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},kf=Ne({...{name:"MarkerDefinitions",compatConfig:{MODE:3}},setup(e){const{id:t,edges:n,connectionLineOptions:o,defaultMarkerColor:r}=Ee(),i=fe(()=>{const a=new Set,s=[],l=u=>{if(u){const c=tn(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)=>(Q(),ce("svg",Sf,[ue("defs",null,[(Q(!0),ce(Be,null,ln(i.value,l=>(Q(),Ie(Nf,{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))])]))}}),$f=Ne({...{name:"Edges",compatConfig:{MODE:3}},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:o}=Ee();return(r,i)=>(Q(),ce(Be,null,[ie(kf),(Q(!0),ce(Be,null,ln(K(n),a=>(Q(),ce("svg",{key:a.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:K(ud)(a,K(t),K(o))})},[ie(K(bf),{id:a.id},null,8,["id"])],4))),128)),ie(K(xf))],64))}}),Cf=Ne({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:f,elevateNodesOnSelect:h,disableKeyboardA11y:_,ariaLiveMessage:v,snapToGrid:y,snapGrid:S,nodeDragThreshold:M,nodesDraggable:w,elementsSelectable:k,nodesConnectable:H,nodesFocusable:Y,hooks:X}=Ee(),F=xe(null);ft(Xi,F),ft(Gi,e.id);const ae=ot(Bn),q=gt(),C=Zi(),{node:b,parentNode:V}=ji(e.id),{emit:p,on:D}=Cd(b,a),E=be(()=>typeof b.draggable>"u"?w.value:b.draggable),T=be(()=>typeof b.selectable>"u"?k.value:b.selectable),O=be(()=>typeof b.connectable>"u"?H.value:b.connectable),B=be(()=>typeof b.focusable>"u"?Y.value:b.focusable),L=fe(()=>T.value||E.value||X.value.nodeClick.hasListeners()||X.value.nodeDoubleClick.hasListeners()||X.value.nodeMouseEnter.hasListeners()||X.value.nodeMouseMove.hasListeners()||X.value.nodeMouseLeave.hasListeners()),I=be(()=>!!b.dimensions.width&&!!b.dimensions.height),P=fe(()=>{const x=b.type||"default",$=ae?.[`node-${x}`];if($)return $;let N=b.template||d.value[x];if(typeof N=="string"&&q){const U=Object.keys(q.appContext.components);U&&U.includes(x)&&(N=Se(x,!1))}return N&&typeof N!="string"?N:(a.error(new De($e.NODE_TYPE_MISSING,N)),!1)}),j=Ui({id:e.id,el:F,disabled:()=>!E.value,selectable:T,dragHandle:()=>b.dragHandle,onStart(x){p.dragStart(x)},onDrag(x){p.drag(x)},onStop(x){p.dragStop(x)},onClick(x){m(x)}}),A=fe(()=>b.class instanceof Function?b.class(b):b.class),z=fe(()=>{const x=(b.style instanceof Function?b.style(b):b.style)||{},$=b.width instanceof Function?b.width(b):b.width,N=b.height instanceof Function?b.height(b):b.height;return!x.width&&$&&(x.width=typeof $=="string"?$:`${$}px`),!x.height&&N&&(x.height=typeof N=="string"?N:`${N}px`),x}),R=be(()=>Number(b.zIndex??z.value.zIndex??0));return c(x=>{(x.includes(e.id)||!x.length)&&ge()}),Ke(()=>{_e(()=>b.hidden,(x=!1,$,N)=>{!x&&F.value&&(e.resizeObserver.observe(F.value),N(()=>{F.value&&e.resizeObserver.unobserve(F.value)}))},{immediate:!0,flush:"post"})}),_e([()=>b.type,()=>b.sourcePosition,()=>b.targetPosition],()=>{Oe(()=>{u([{id:e.id,nodeElement:F.value,forceUpdate:!0}])})}),_e([()=>b.position.x,()=>b.position.y,()=>{var x;return(x=V.value)==null?void 0:x.computedPosition.x},()=>{var x;return(x=V.value)==null?void 0:x.computedPosition.y},()=>{var x;return(x=V.value)==null?void 0:x.computedPosition.z},R,()=>b.selected,()=>b.dimensions.height,()=>b.dimensions.width,()=>{var x;return(x=V.value)==null?void 0:x.dimensions.height},()=>{var x;return(x=V.value)==null?void 0:x.dimensions.width}],([x,$,N,U,Z,re])=>{const te={x,y:$,z:re+(h.value&&b.selected?1e3:0)};typeof N<"u"&&typeof U<"u"?b.computedPosition=od({x:N,y:U,z:Z},te):b.computedPosition=te},{flush:"post",immediate:!0}),_e([()=>b.extent,f],([x,$],[N,U])=>{(x!==N||$!==U)&&W()}),b.extent==="parent"||typeof b.extent=="object"&&"range"in b.extent&&b.extent.range==="parent"?to(()=>I).toBe(!0).then(W):W(),()=>b.hidden?null:ye("div",{ref:F,"data-id":b.id,class:["vue-flow__node",`vue-flow__node-${P.value===!1?"default":b.type||"default"}`,{[n.value]:E.value,dragging:j?.value,draggable:E.value,selected:b.selected,selectable:T.value,parent:b.isParent},A.value],style:{visibility:I.value?"visible":"hidden",zIndex:b.computedPosition.z??R.value,transform:`translate(${b.computedPosition.x}px,${b.computedPosition.y}px)`,pointerEvents:L.value?"all":"none",...z.value},tabIndex:B.value?0:void 0,role:B.value?"group":void 0,"aria-describedby":_.value?void 0:`${ui}-${t}`,"aria-label":b.ariaLabel,"aria-roledescription":"node",...b.domAttributes,onMouseenter:se,onMousemove:ee,onMouseleave:he,onContextmenu:oe,onClick:m,onDblclick:de,onKeydown:g},[ye(P.value===!1?d.value.default:P.value,{id:b.id,type:b.type,data:b.data,events:{...b.events,...D},selected:b.selected,resizing:b.resizing,dragging:j.value,connectable:O.value,position:b.computedPosition,dimensions:b.dimensions,isValidTargetPos:b.isValidTargetPos,isValidSourcePos:b.isValidSourcePos,parent:b.parentNode,parentNodeId:b.parentNode,zIndex:b.computedPosition.z??R.value,targetPosition:b.targetPosition,sourcePosition:b.sourcePosition,label:b.label,dragHandle:b.dragHandle,onUpdateNodeInternals:ge})]);function W(){const x=b.computedPosition,{computedPosition:$,position:N}=Co(b,y.value?An(x,S.value):x,a.error,f.value,V.value);(b.computedPosition.x!==$.x||b.computedPosition.y!==$.y)&&(b.computedPosition={...b.computedPosition,...$}),(b.position.x!==N.x||b.position.y!==N.y)&&(b.position=N)}function ge(){F.value&&u([{id:e.id,nodeElement:F.value,forceUpdate:!0}])}function se(x){j?.value||p.mouseEnter({event:x,node:b})}function ee(x){j?.value||p.mouseMove({event:x,node:b})}function he(x){j?.value||p.mouseLeave({event:x,node:b})}function oe(x){return p.contextMenu({event:x,node:b})}function de(x){return p.doubleClick({event:x,node:b})}function m(x){T.value&&(!o.value||!E.value||M.value>0)&&To(b,i.value,l,s,r,!1,F.value),p.click({event:x,node:b})}function g(x){if(!(So(x)||_.value))if(di.includes(x.key)&&T.value){const $=x.key==="Escape";To(b,i.value,l,s,r,$,F.value)}else E.value&&b.selected&&Dt[x.key]&&(x.preventDefault(),v.value=`Moved selected node ${x.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~b.position.x}, y: ${~~b.position.y}`,C({x:Dt[x.key].x,y:Dt[x.key].y},x.shiftKey))}}});function If(e={includeHiddenNodes:!1}){const{nodes:t}=Ee();return fe(()=>{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 Mf={class:"vue-flow__nodes vue-flow__container"},Df=Ne({...{name:"Nodes",compatConfig:{MODE:3}},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:o}=Ee(),r=If(),i=xe();return _e(r,a=>{a&&Oe(()=>{o.nodesInitialized(t.value)})},{immediate:!0}),Ke(()=>{i.value=new ResizeObserver(a=>{const s=a.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));Oe(()=>n(s))})}),Jn(()=>{var a;return(a=i.value)==null?void 0:a.disconnect()}),(a,s)=>(Q(),ce("div",Mf,[i.value?(Q(!0),ce(Be,{key:0},ln(K(t),(l,u,c,d)=>{const f=[l.id];if(d&&d.key===l.id&&nr(d,f))return d;const h=(Q(),Ie(K(Cf),{id:l.id,key:l.id,"resize-observer":i.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):Me("",!0)]))}});function Tf(){const{emits:e}=Ee();Ke(()=>{if(Ri()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new De($e.MISSING_STYLES))}})}const Pf=ue("div",{class:"vue-flow__edge-labels"},null,-1),Of=Ne({...{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=qo(),i=no(o,"modelValue",n),a=no(o,"nodes",n),s=no(o,"edges",n),l=Ee(o),u=Td({modelValue:i,nodes:a,edges:s},o,l);return Od(n,l.hooks),_f(),Tf(),ft(Bn,r),Jo(u),t(l),(c,d)=>(Q(),ce("div",{ref:K(l).vueFlowRef,class:"vue-flow"},[ie(hf,null,{default:me(()=>[ie($f),Pf,ie(Df),ke(c.$slots,"zoom-pane")]),_:3}),ke(c.$slots,"default"),ie(mf)],512))}}),zf=Ne({...{name:"Panel",compatConfig:{MODE:3}},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ee(),o=fe(()=>`${t.position}`.split("-"));return(r,i)=>(Q(),ce("div",{class:ht(["vue-flow__panel",o.value]),style:ze({pointerEvents:K(n)?"none":"all"})},[ke(r.$slots,"default")],6))}}),Af={name:"ControlButton",compatConfig:{MODE:3}},Bf=(e,t)=>{const n=e.__vccOpts||e;for(const[o,r]of t)n[o]=r;return n},Rf={type:"button",class:"vue-flow__controls-button"};function Vf(e,t,n,o,r,i){return Q(),ce("button",Rf,[ke(e.$slots,"default")])}const on=Bf(Af,[["render",Vf]]),Hf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},Lf=[ue("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function Ff(e,t){return Q(),ce("svg",Hf,Lf)}const Yf={render:Ff},Gf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Xf=[ue("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Uf(e,t){return Q(),ce("svg",Gf,Xf)}const Wf={render:Uf},jf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Zf=[ue("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 Kf(e,t){return Q(),ce("svg",jf,Zf)}const qf={render:Kf},Jf={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Qf=[ue("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 eh(e,t){return Q(),ce("svg",Jf,Qf)}const th={render:eh},nh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},oh=[ue("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 rh(e,t){return Q(),ce("svg",nh,oh)}const ih={render:rh},ah=Ne({...{name:"Controls",compatConfig:{MODE:3}},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>si.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}=Ee(),f=be(()=>n.value||o.value||r.value),h=be(()=>u.value.zoom<=c.value),_=be(()=>u.value.zoom>=d.value);function v(){a(),t("zoomIn")}function y(){s(),t("zoomOut")}function S(){l(e.fitViewParams),t("fitView")}function M(){i(!f.value),t("interactionChange",!f.value)}return(w,k)=>(Q(),Ie(K(zf),{class:"vue-flow__controls",position:w.position},{default:me(()=>[ke(w.$slots,"top"),w.showZoom?(Q(),ce(Be,{key:0},[ke(w.$slots,"control-zoom-in",{},()=>[ie(on,{class:"vue-flow__controls-zoomin",disabled:_.value,onClick:v},{default:me(()=>[ke(w.$slots,"icon-zoom-in",{},()=>[(Q(),Ie(pt(K(Yf))))])]),_:3},8,["disabled"])]),ke(w.$slots,"control-zoom-out",{},()=>[ie(on,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:y},{default:me(()=>[ke(w.$slots,"icon-zoom-out",{},()=>[(Q(),Ie(pt(K(Wf))))])]),_:3},8,["disabled"])])],64)):Me("",!0),w.showFitView?ke(w.$slots,"control-fit-view",{key:1},()=>[ie(on,{class:"vue-flow__controls-fitview",onClick:S},{default:me(()=>[ke(w.$slots,"icon-fit-view",{},()=>[(Q(),Ie(pt(K(qf))))])]),_:3})]):Me("",!0),w.showInteractive?ke(w.$slots,"control-interactive",{key:2},()=>[w.showInteractive?(Q(),Ie(on,{key:0,class:"vue-flow__controls-interactive",onClick:M},{default:me(()=>[f.value?ke(w.$slots,"icon-unlock",{key:0},()=>[(Q(),Ie(pt(K(ih))))]):Me("",!0),f.value?Me("",!0):ke(w.$slots,"icon-lock",{key:1},()=>[(Q(),Ie(pt(K(th))))])]),_:3})):Me("",!0)]):Me("",!0),ke(w.$slots,"default")]),_:3},8,["position"]))}});var nt=(e=>(e.Lines="lines",e.Dots="dots",e))(nt||{});const sa=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]}`})},la=function({radius:e,color:t}){return ye("circle",{cx:e,cy:e,r:e,fill:t})};nt.Lines+"",nt.Dots+"";const sh={[nt.Dots]:"#81818a",[nt.Lines]:"#eee"},lh=["id","x","y","width","height","patternTransform"],uh={key:2,height:"100",width:"100"},ch=["fill"],dh=["x","y","fill"],fh=Ne({...{name:"Background",compatConfig:{MODE:3}},props:{id:{},variant:{default:()=>nt.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}=Ee(),o=fe(()=>{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,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*a||1+u[0]/2,f*a||1+u[1]/2];return{scaledGap:u,offset:h,size:c}}),r=be(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),i=be(()=>e.color||e.patternColor||sh[e.variant||nt.Dots]);return(a,s)=>(Q(),ce("svg",{class:"vue-flow__background vue-flow__container",style:ze({height:`${a.height>100?100:a.height}%`,width:`${a.width>100?100:a.width}%`})},[ke(a.$slots,"pattern-container",{id:r.value},()=>[ue("pattern",{id:r.value,x:K(n).x%o.value.scaledGap[0],y:K(n).y%o.value.scaledGap[1],width:o.value.scaledGap[0],height:o.value.scaledGap[1],patternTransform:`translate(-${o.value.offset[0]},-${o.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[ke(a.$slots,"pattern",{},()=>[a.variant===K(nt).Lines?(Q(),Ie(K(sa),{key:0,size:a.lineWidth,color:i.value,dimensions:o.value.scaledGap},null,8,["size","color","dimensions"])):a.variant===K(nt).Dots?(Q(),Ie(K(la),{key:1,color:i.value,radius:o.value.size/2},null,8,["color","radius"])):Me("",!0),a.bgColor?(Q(),ce("svg",uh,[ue("rect",{width:"100%",height:"100%",fill:a.bgColor},null,8,ch)])):Me("",!0)])],8,lh)]),ue("rect",{x:a.x,y:a.y,width:"100%",height:"100%",fill:`url(#${r.value})`},null,8,dh),ke(a.$slots,"default",{id:r.value})],4))}}),hh={name:"DetailsTable",components:{RawBuffer:cr},mixins:[ur],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)}}},gh={class:"details-table"},ph={class:"text-wrap"},vh={key:1,class:"d-flex justify-center align-center pa-4"};function mh(e,t,n,o,r,i){const a=Se("v-btn"),s=Se("v-spacer"),l=Se("v-card-title"),u=Se("v-data-table"),c=Se("v-progress-circular"),d=Se("v-col"),f=Se("raw-buffer"),h=Se("v-row"),_=Se("v-card-text"),v=Se("v-card");return Q(),Ie(v,{"max-height":"80vh",class:"d-flex flex-column"},{default:me(()=>[ie(l,{class:"d-flex align-center flex-shrink-0"},{default:me(()=>[Re(Te(n.mode)+" Properties: "+Te(i.shownDetails.name)+" ",1),ie(a,{icon:i.buttonIcon,variant:"text","data-test":"pause",onClick:i.pause},null,8,["icon","onClick"]),ie(s),ie(a,{icon:"mdi-close",variant:"text","data-test":"close",onClick:i.closeClick},null,8,["onClick"])]),_:1}),ie(_,{class:"overflow-y-auto flex-grow-1 pa-0"},{default:me(()=>[ue("div",gh,[ie(h,null,{default:me(()=>[ie(d,{cols:"4"},{default:me(()=>[i.shownDetails?(Q(),Ie(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:y})=>[ue("span",ph,Te(y.value),1)]),_:1},8,["headers","items"])):(Q(),ce("div",vh,[ie(c,{indeterminate:"",color:"primary"})]))]),_:1}),ie(d,{cols:"8"},{default:me(()=>[ue("div",null,Te(i.upperData.label)+": "+Te(i.upperData.time),1),ie(f,{modelValue:i.upperData.data,"onUpdate:modelValue":t[0]||(t[0]=y=>i.upperData.data=y)},null,8,["modelValue"]),ue("div",null,Te(i.lowerData.label)+": "+Te(i.lowerData.time),1),ie(f,{modelValue:i.lowerData.data,"onUpdate:modelValue":t[1]||(t[1]=y=>i.lowerData.data=y)},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1})}const _h=rt(hh,[["render",mh],["__scopeId","data-v-06ee5ec0"]]),yh={name:"InterfaceNode",components:{Handle:ct},props:{data:{type:Object,required:!0}},data(){return{}},computed:{interfaceStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},wh={class:"node-label"};function bh(e,t,n,o,r,i){const a=Se("v-icon"),s=Se("Handle");return Q(),ce("div",{class:"interface-node",style:ze(i.interfaceStyle)},[ie(a,{color:"#1d85e1"},{default:me(()=>[...t[0]||(t[0]=[Re("mdi-swap-horizontal-bold",-1)])]),_:1}),ue("div",wh,Te(n.data.label),1),t[1]||(t[1]=ue("div",{class:"node-label"},"Interface",-1)),ie(s,{id:"interface__cmd__input",type:"target",position:"left",style:{top:"112px"}}),ie(s,{id:"interface__tlm__input",type:"target",position:"left",style:{top:"162px"}}),ie(s,{id:"interface__cmd__output",type:"source",position:"right",style:{top:"112px"}}),ie(s,{id:"interface__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=ue("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[4]||(t[4]=ue("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[5]||(t[5]=ue("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],4)}const xh=rt(yh,[["render",bh],["__scopeId","data-v-31945a3b"]]),Eh={name:"RouterNode",components:{Handle:ct},props:{data:{type:Object,required:!0}},data(){return{}},computed:{routerStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}}},Nh={class:"node-label"};function Sh(e,t,n,o,r,i){const a=Se("v-icon"),s=Se("Handle");return Q(),ce("div",{class:"router-node",style:ze(i.routerStyle)},[ie(a,{color:"#ba1de1"},{default:me(()=>[...t[0]||(t[0]=[Re("mdi-call-split",-1)])]),_:1}),ue("div",Nh,Te(n.data.label),1),t[1]||(t[1]=ue("div",{class:"node-label"},"Router",-1)),ie(s,{id:"router__cmd__input",type:"target",position:"left",style:{top:"112px"}}),ie(s,{id:"router__tlm__input",type:"target",position:"left",style:{top:"162px"}}),ie(s,{id:"router__cmd__output",type:"source",position:"right",style:{top:"112px"}}),ie(s,{id:"router__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"102px",left:"8px",color:"black"}}," CMD ",-1)),t[3]||(t[3]=ue("div",{style:{position:"absolute",top:"152px",left:"8px",color:"black"}}," TLM ",-1)),t[4]||(t[4]=ue("div",{style:{position:"absolute",top:"102px",right:"8px",color:"black"}}," CMD ",-1)),t[5]||(t[5]=ue("div",{style:{position:"absolute",top:"152px",right:"8px",color:"black"}}," TLM ",-1))],4)}const kh=rt(Eh,[["render",Sh],["__scopeId","data-v-b1fbfb62"]]),$h={name:"TargetNode",components:{Handle:ct},props:{data:{type:Object,required:!0}}},Ch={class:"cosmos-node"},Ih={class:"node-label"};function Mh(e,t,n,o,r,i){const a=Se("Handle"),s=Se("v-icon");return Q(),ce("div",Ch,[ie(a,{id:"cosmos__cmd",type:"target",position:"right",style:{top:"114px"}}),ie(a,{id:"cosmos__tlm",type:"target",position:"right",style:{top:"164px"}}),t[1]||(t[1]=ue("div",{style:{position:"absolute",top:"104px",right:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"154px",right:"8px",color:"black"}}," TLM ",-1)),ie(s,{color:"#10b981"},{default:me(()=>[...t[0]||(t[0]=[Re("mdi-rocket-launch",-1)])]),_:1}),ue("div",Ih,Te(n.data.label),1),t[3]||(t[3]=ue("div",{class:"node-label"},"Processing",-1))])}const Dh=rt($h,[["render",Mh],["__scopeId","data-v-c2b5368b"]]),Th={name:"TargetNode",components:{Handle:ct},props:{data:{type:Object,required:!0}}},Ph={class:"target-node"},Oh={class:"node-label"};function zh(e,t,n,o,r,i){const a=Se("Handle"),s=Se("v-icon");return Q(),ce("div",Ph,[ie(a,{id:"target__cmd",type:"target",position:"left",style:{top:"114px"}}),ie(a,{id:"target__tlm",type:"target",position:"left",style:{top:"164px"}}),t[1]||(t[1]=ue("div",{style:{position:"absolute",top:"104px",left:"8px",color:"black"}}," CMD ",-1)),t[2]||(t[2]=ue("div",{style:{position:"absolute",top:"154px",left:"8px",color:"black"}}," TLM ",-1)),ie(s,{color:"#10b981"},{default:me(()=>[...t[0]||(t[0]=[Re("mdi-target",-1)])]),_:1}),ue("div",Oh,Te(n.data.label),1),t[3]||(t[3]=ue("div",{class:"node-label"},"Target",-1))])}const Ah=rt(Th,[["render",zh],["__scopeId","data-v-125c8608"]]),Bh={name:"WriteProtocolNode",props:{data:{type:Object,required:!0}}},Rh={class:"write-protocol-node"},Vh={class:"protocol-label"};function Hh(e,t,n,o,r,i){const a=Se("v-icon");return Q(),ce("div",Rh,[ie(a,{color:"#f97316",size:"small"},{default:me(()=>[...t[0]||(t[0]=[Re("mdi-arrow-right-bold",-1)])]),_:1}),ue("div",Vh,Te(n.data.label),1)])}const Lh=rt(Bh,[["render",Hh],["__scopeId","data-v-8e435f75"]]),Fh={name:"ReadProtocolNode",props:{data:{type:Object,required:!0}}},Yh={class:"read-protocol-node"},Gh={class:"protocol-label"};function Xh(e,t,n,o,r,i){const a=Se("v-icon");return Q(),ce("div",Yh,[ie(a,{color:"#06b6d4",size:"small"},{default:me(()=>[...t[0]||(t[0]=[Re("mdi-arrow-left-bold",-1)])]),_:1}),ue("div",Gh,Te(n.data.label),1)])}const Uh=rt(Fh,[["render",Xh],["__scopeId","data-v-791bf23d"]]);var ua=Object.defineProperty,Wh=(e,t,n)=>t in e?ua(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,jh=(e,t)=>{for(var n in t)ua(e,n,{get:t[n],enumerable:!0})},Zh=(e,t,n)=>Wh(e,t+"",n),ca={};jh(ca,{Graph:()=>Ve,alg:()=>Vo,json:()=>ga,version:()=>Jh});var Kh=Object.defineProperty,da=(e,t)=>{for(var n in t)Kh(e,n,{get:t[n],enumerable:!0})},Ve=class{constructor(e){this._isDirected=!0,this._isMultigraph=!1,this._isCompound=!1,this._nodes={},this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={},this._nodeCount=0,this._edgeCount=0,this._defaultNodeLabelFn=()=>{},this._defaultEdgeLabelFn=()=>{},e&&(this._isDirected="directed"in e?e.directed:!0,this._isMultigraph="multigraph"in e?e.multigraph:!1,this._isCompound="compound"in e?e.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children["\0"]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return typeof e!="function"?this._defaultNodeLabelFn=()=>e:this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){return this.nodes().filter(e=>Object.keys(this._in[e]).length===0)}sinks(){return this.nodes().filter(e=>Object.keys(this._out[e]).length===0)}setNodes(e,t){return e.forEach(n=>{t!==void 0?this.setNode(n,t):this.setNode(n)}),this}setNode(e,t){return e in this._nodes?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return e in this._nodes}removeNode(e){if(e in this._nodes){let t=n=>this.removeEdge(this._edgeObjs[n]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],this.children(e).forEach(n=>{this.setParent(n)}),delete this._children[e]),Object.keys(this._in[e]).forEach(t),delete this._in[e],delete this._preds[e],Object.keys(this._out[e]).forEach(t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(t===void 0)t="\0";else{t+="";for(let n=t;n!==void 0;n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}parent(e){if(this._isCompound){let t=this._parent[e];if(t!=="\0")return t}}children(e="\0"){if(this._isCompound){let t=this._children[e];if(t)return Object.keys(t)}else{if(e==="\0")return this.nodes();if(this.hasNode(e))return[]}return[]}predecessors(e){let t=this._preds[e];if(t)return Object.keys(t)}successors(e){let t=this._sucs[e];if(t)return Object.keys(t)}neighbors(e){let t=this.predecessors(e);if(t){let n=new Set(t);for(let o of this.successors(e))n.add(o);return Array.from(n.values())}}isLeaf(e){let t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){let t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph()),Object.entries(this._nodes).forEach(([r,i])=>{e(r)&&t.setNode(r,i)}),Object.values(this._edgeObjs).forEach(r=>{t.hasNode(r.v)&&t.hasNode(r.w)&&t.setEdge(r,this.edge(r))});let n={},o=r=>{let i=this.parent(r);return!i||t.hasNode(i)?(n[r]=i??void 0,i??void 0):i in n?n[i]:o(i)};return this._isCompound&&t.nodes().forEach(r=>t.setParent(r,o(r))),t}setDefaultEdgeLabel(e){return typeof e!="function"?this._defaultEdgeLabelFn=()=>e:this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(e,t){return e.reduce((n,o)=>(t!==void 0?this.setEdge(n,o,t):this.setEdge(n,o),o)),this}setEdge(e,t,n,o){let r,i,a,s,l=!1;typeof e=="object"&&e!==null&&"v"in e?(r=e.v,i=e.w,a=e.name,arguments.length===2&&(s=t,l=!0)):(r=e,i=t,a=o,arguments.length>2&&(s=n,l=!0)),r=""+r,i=""+i,a!==void 0&&(a=""+a);let u=rn(this._isDirected,r,i,a);if(u in this._edgeLabels)return l&&(this._edgeLabels[u]=s),this;if(a!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(r),this.setNode(i),this._edgeLabels[u]=l?s:this._defaultEdgeLabelFn(r,i,a);let c=qh(this._isDirected,r,i,a);return r=c.v,i=c.w,Object.freeze(c),this._edgeObjs[u]=c,fa(this._preds[i],r),fa(this._sucs[r],i),this._in[i][u]=c,this._out[r][u]=c,this._edgeCount++,this}edge(e,t,n){let o=arguments.length===1?Ro(this._isDirected,e):rn(this._isDirected,e,t,n);return this._edgeLabels[o]}edgeAsObj(e,t,n){let o=arguments.length===1?this.edge(e):this.edge(e,t,n);return typeof o!="object"?{label:o}:o}hasEdge(e,t,n){return(arguments.length===1?Ro(this._isDirected,e):rn(this._isDirected,e,t,n))in this._edgeLabels}removeEdge(e,t,n){let o=arguments.length===1?Ro(this._isDirected,e):rn(this._isDirected,e,t,n),r=this._edgeObjs[o];if(r){let i=r.v,a=r.w;delete this._edgeLabels[o],delete this._edgeObjs[o],ha(this._preds[a],i),ha(this._sucs[i],a),delete this._in[a][o],delete this._out[i][o],this._edgeCount--}return this}inEdges(e,t){return this.isDirected()?this.filterEdges(this._in[e],e,t):this.nodeEdges(e,t)}outEdges(e,t){return this.isDirected()?this.filterEdges(this._out[e],e,t):this.nodeEdges(e,t)}nodeEdges(e,t){if(e in this._nodes)return this.filterEdges({...this._in[e],...this._out[e]},e,t)}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}filterEdges(e,t,n){if(!e)return;let o=Object.values(e);return n?o.filter(r=>r.v===t&&r.w===n||r.v===n&&r.w===t):o}};function fa(e,t){e[t]?e[t]++:e[t]=1}function ha(e,t){e[t]!==void 0&&!--e[t]&&delete e[t]}function rn(e,t,n,o){let r=""+t,i=""+n;if(!e&&r>i){let a=r;r=i,i=a}return r+""+i+""+(o===void 0?"\0":o)}function qh(e,t,n,o){let r=""+t,i=""+n;if(!e&&r>i){let s=r;r=i,i=s}let a={v:r,w:i};return o&&(a.name=o),a}function Ro(e,t){return rn(e,t.v,t.w,t.name)}var Jh="4.0.1",ga={};da(ga,{read:()=>ng,write:()=>Qh});function Qh(e){let t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:eg(e),edges:tg(e)},n=e.graph();return n!==void 0&&(t.value=structuredClone(n)),t}function eg(e){return e.nodes().map(t=>{let n=e.node(t),o=e.parent(t),r={v:t};return n!==void 0&&(r.value=n),o!==void 0&&(r.parent=o),r})}function tg(e){return e.edges().map(t=>{let n=e.edge(t),o={v:t.v,w:t.w};return t.name!==void 0&&(o.name=t.name),n!==void 0&&(o.value=n),o})}function ng(e){let t=new Ve(e.options);return e.value!==void 0&&t.setGraph(e.value),e.nodes.forEach(n=>{t.setNode(n.v,n.value),n.parent&&t.setParent(n.v,n.parent)}),e.edges.forEach(n=>{t.setEdge({v:n.v,w:n.w,name:n.name},n.value)}),t}var Vo={};da(Vo,{CycleException:()=>Un,bellmanFord:()=>pa,components:()=>ig,dijkstra:()=>Xn,dijkstraAll:()=>lg,findCycles:()=>ug,floydWarshall:()=>dg,isAcyclic:()=>hg,postorder:()=>pg,preorder:()=>vg,prim:()=>mg,shortestPaths:()=>_g,tarjan:()=>ma,topsort:()=>_a});var og=()=>1;function pa(e,t,n,o){return rg(e,String(t),n||og,o||function(r){return e.outEdges(r)})}function rg(e,t,n,o){let r={},i,a=0,s=e.nodes(),l=function(d){let f=n(d);r[d.v].distance+f<r[d.w].distance&&(r[d.w]={distance:r[d.v].distance+f,predecessor:d.v},i=!0)},u=function(){s.forEach(function(d){o(d).forEach(function(f){let h=f.v===d?f.v:f.w,_=h===f.v?f.w:f.v;l({v:h,w:_})})})};s.forEach(function(d){let f=d===t?0:Number.POSITIVE_INFINITY;r[d]={distance:f,predecessor:""}});let c=s.length;for(let d=1;d<c&&(i=!1,a++,u(),!!i);d++);if(a===c-1&&(i=!1,u(),i))throw new Error("The graph contains a negative weight cycle");return r}function ig(e){let t={},n=[],o;function r(i){i in t||(t[i]=!0,o.push(i),e.successors(i).forEach(r),e.predecessors(i).forEach(r))}return e.nodes().forEach(function(i){o=[],r(i),o.length&&n.push(o)}),n}var va=class{constructor(){this._arr=[],this._keyIndices={}}size(){return this._arr.length}keys(){return this._arr.map(e=>e.key)}has(e){return e in this._keyIndices}priority(e){let t=this._keyIndices[e];if(t!==void 0)return this._arr[t].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(e,t){let n=this._keyIndices,o=String(e);if(!(o in n)){let r=this._arr,i=r.length;return n[o]=i,r.push({key:o,priority:t}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);let e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key}decrease(e,t){let n=this._keyIndices[e];if(n===void 0)throw new Error(`Key not found: ${e}`);let o=this._arr[n].priority;if(t>o)throw new Error(`New priority is greater than current priority. Key: ${e} Old: ${o} New: ${t}`);this._arr[n].priority=t,this._decrease(n)}_heapify(e){let t=this._arr,n=2*e,o=n+1,r=e;n<t.length&&(r=t[n].priority<t[r].priority?n:r,o<t.length&&(r=t[o].priority<t[r].priority?o:r),r!==e&&(this._swap(e,r),this._heapify(r)))}_decrease(e){let t=this._arr,n=t[e].priority,o;for(;e!==0&&(o=e>>1,!(t[o].priority<n));)this._swap(e,o),e=o}_swap(e,t){let n=this._arr,o=this._keyIndices,r=n[e],i=n[t];n[e]=i,n[t]=r,o[i.key]=e,o[r.key]=t}},ag=()=>1;function Xn(e,t,n,o){let r=function(i){return e.outEdges(i)};return sg(e,String(t),n||ag,o||r)}function sg(e,t,n,o){let r={},i=new va,a,s,l=function(u){let c=u.v!==a?u.v:u.w,d=r[c],f=n(u),h=s.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+f);h<d.distance&&(d.distance=h,d.predecessor=a,i.decrease(c,h))};for(e.nodes().forEach(function(u){let c=u===t?0:Number.POSITIVE_INFINITY;r[u]={distance:c,predecessor:""},i.add(u,c)});i.size()>0&&(a=i.removeMin(),s=r[a],s.distance!==Number.POSITIVE_INFINITY);)o(a).forEach(l);return r}function lg(e,t,n){return e.nodes().reduce(function(o,r){return o[r]=Xn(e,r,t,n),o},{})}function ma(e){let t=0,n=[],o={},r=[];function i(a){let s=o[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach(function(l){l in o?o[l].onStack&&(s.lowlink=Math.min(s.lowlink,o[l].index)):(i(l),s.lowlink=Math.min(s.lowlink,o[l].lowlink))}),s.lowlink===s.index){let l=[],u;do u=n.pop(),o[u].onStack=!1,l.push(u);while(a!==u);r.push(l)}}return e.nodes().forEach(function(a){a in o||i(a)}),r}function ug(e){return ma(e).filter(function(t){return t.length>1||t.length===1&&e.hasEdge(t[0],t[0])})}var cg=()=>1;function dg(e,t,n){return fg(e,t||cg,n||function(o){return e.outEdges(o)})}function fg(e,t,n){let o={},r=e.nodes();return r.forEach(function(i){o[i]={},o[i][i]={distance:0,predecessor:""},r.forEach(function(a){i!==a&&(o[i][a]={distance:Number.POSITIVE_INFINITY,predecessor:""})}),n(i).forEach(function(a){let s=a.v===i?a.w:a.v,l=t(a);o[i][s]={distance:l,predecessor:i}})}),r.forEach(function(i){let a=o[i];r.forEach(function(s){let l=o[s];r.forEach(function(u){let c=l[i],d=a[u],f=l[u],h=c.distance+d.distance;h<f.distance&&(f.distance=h,f.predecessor=d.predecessor)})})}),o}var Un=class extends Error{constructor(...e){super(...e)}};function _a(e){let t={},n={},o=[];function r(i){if(i in n)throw new Un;i in t||(n[i]=!0,t[i]=!0,e.predecessors(i).forEach(r),delete n[i],o.push(i))}if(e.sinks().forEach(r),Object.keys(t).length!==e.nodeCount())throw new Un;return o}function hg(e){try{_a(e)}catch(t){if(t instanceof Un)return!1;throw t}return!0}function gg(e,t,n,o,r){Array.isArray(t)||(t=[t]);let i=(s=>{var l;return(l=e.isDirected()?e.successors(s):e.neighbors(s))!=null?l:[]}),a={};return t.forEach(function(s){if(!e.hasNode(s))throw new Error("Graph does not have node: "+s);r=ya(e,s,n==="post",a,i,o,r)}),r}function ya(e,t,n,o,r,i,a){return t in o||(o[t]=!0,n||(a=i(a,t)),r(t).forEach(function(s){a=ya(e,s,n,o,r,i,a)}),n&&(a=i(a,t))),a}function wa(e,t,n){return gg(e,t,n,function(o,r){return o.push(r),o},[])}function pg(e,t){return wa(e,t,"post")}function vg(e,t){return wa(e,t,"pre")}function mg(e,t){let n=new Ve,o={},r=new va,i;function a(l){let u=l.v===i?l.w:l.v,c=r.priority(u);if(c!==void 0){let d=t(l);d<c&&(o[u]=i,r.decrease(u,d))}}if(e.nodeCount()===0)return n;e.nodes().forEach(function(l){r.add(l,Number.POSITIVE_INFINITY),n.setNode(l)}),r.decrease(e.nodes()[0],0);let s=!1;for(;r.size()>0;){if(i=r.removeMin(),i in o)n.setEdge(i,o[i]);else{if(s)throw new Error("Input graph is not connected: "+e);s=!0}e.nodeEdges(i).forEach(a)}return n}function _g(e,t,n,o){return yg(e,t,n,o??(r=>{let i=e.outEdges(r);return i??[]}))}function yg(e,t,n,o){if(n===void 0)return Xn(e,t,n,o);let r=!1,i=e.nodes();for(let a=0;a<i.length;a++){let s=o(i[a]);for(let l=0;l<s.length;l++){let u=s[l],c=u.v===i[a]?u.v:u.w,d=c===u.v?u.w:u.v;n({v:c,w:d})<0&&(r=!0)}if(r)return pa(e,t,n,o)}return Xn(e,t,n,o)}function Ot(e,t,n,o){let r=o;for(;e.hasNode(r);)r=Ho(o);return n.dummy=t,e.setNode(r,n),r}function wg(e){let t=new Ve().setGraph(e.graph());return e.nodes().forEach(n=>t.setNode(n,e.node(n))),e.edges().forEach(n=>{let o=t.edge(n.v,n.w)||{weight:0,minlen:1},r=e.edge(n);t.setEdge(n.v,n.w,{weight:o.weight+r.weight,minlen:Math.max(o.minlen,r.minlen)})}),t}function ba(e){let t=new Ve({multigraph:e.isMultigraph()}).setGraph(e.graph());return e.nodes().forEach(n=>{e.children(n).length||t.setNode(n,e.node(n))}),e.edges().forEach(n=>{t.setEdge(n,e.edge(n))}),t}function xa(e,t){let n=e.x,o=e.y,r=t.x-n,i=t.y-o,a=e.width/2,s=e.height/2;if(!r&&!i)throw new Error("Not possible to find intersection inside of the rectangle");let l,u;return Math.abs(i)*a>Math.abs(r)*s?(i<0&&(s=-s),l=s*r/i,u=s):(r<0&&(a=-a),l=a,u=a*i/r),{x:n+l,y:o+u}}function an(e){let t=sn(Sa(e)+1).map(()=>[]);return e.nodes().forEach(n=>{let o=e.node(n),r=o.rank;r!==void 0&&(t[r]||(t[r]=[]),t[r][o.order]=n)}),t}function bg(e){let t=e.nodes().map(o=>{let r=e.node(o).rank;return r===void 0?Number.MAX_VALUE:r}),n=je(Math.min,t);e.nodes().forEach(o=>{let r=e.node(o);Object.hasOwn(r,"rank")&&(r.rank-=n)})}function xg(e){let t=e.nodes().map(a=>e.node(a).rank).filter(a=>a!==void 0),n=je(Math.min,t),o=[];e.nodes().forEach(a=>{let s=e.node(a).rank-n;o[s]||(o[s]=[]),o[s].push(a)});let r=0,i=e.graph().nodeRankFactor;Array.from(o).forEach((a,s)=>{a===void 0&&s%i!==0?--r:a!==void 0&&r&&a.forEach(l=>e.node(l).rank+=r)})}function Ea(e,t,n,o){let r={width:0,height:0};return arguments.length>=4&&(r.rank=n,r.order=o),Ot(e,"border",r,t)}function Eg(e,t=Na){let n=[];for(let o=0;o<e.length;o+=t){let r=e.slice(o,o+t);n.push(r)}return n}var Na=65535;function je(e,t){if(t.length>Na){let n=Eg(t);return e(...n.map(o=>e(...o)))}else return e(...t)}function Sa(e){let t=e.nodes().map(n=>{let o=e.node(n).rank;return o===void 0?Number.MIN_VALUE:o});return je(Math.max,t)}function Ng(e,t){let n={lhs:[],rhs:[]};return e.forEach(o=>{t(o)?n.lhs.push(o):n.rhs.push(o)}),n}function ka(e,t){let n=Date.now();try{return t()}finally{console.log(e+" time: "+(Date.now()-n)+"ms")}}function $a(e,t){return t()}var Sg=0;function Ho(e){let t=++Sg;return e+(""+t)}function sn(e,t,n=1){t==null&&(t=e,e=0);let o=i=>i<t;n<0&&(o=i=>t<i);let r=[];for(let i=e;o(i);i+=n)r.push(i);return r}function Wn(e,t){let n={};for(let o of t)e[o]!==void 0&&(n[o]=e[o]);return n}function jn(e,t){let n;return typeof t=="string"?n=o=>o[t]:n=t,Object.entries(e).reduce((o,[r,i])=>(o[r]=n(i,r),o),{})}function kg(e,t){return e.reduce((n,o,r)=>(n[o]=t[r],n),{})}var Zn="\0",$g="3.0.0",Cg=class{constructor(){Zh(this,"_sentinel");let e={};e._next=e._prev=e,this._sentinel=e}dequeue(){let e=this._sentinel,t=e._prev;if(t!==e)return Ca(t),t}enqueue(e){let t=this._sentinel;e._prev&&e._next&&Ca(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t}toString(){let e=[],t=this._sentinel,n=t._prev;for(;n!==t;)e.push(JSON.stringify(n,Ig)),n=n._prev;return"["+e.join(", ")+"]"}};function Ca(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function Ig(e,t){if(e!=="_next"&&e!=="_prev")return t}var Mg=Cg,Dg=()=>1;function Tg(e,t){if(e.nodeCount()<=1)return[];let n=Og(e,t||Dg);return Pg(n.graph,n.buckets,n.zeroIdx).flatMap(o=>e.outEdges(o.v,o.w)||[])}function Pg(e,t,n){var o;let r=[],i=t[t.length-1],a=t[0],s;for(;e.nodeCount();){for(;s=a.dequeue();)Lo(e,t,n,s);for(;s=i.dequeue();)Lo(e,t,n,s);if(e.nodeCount()){for(let l=t.length-2;l>0;--l)if(s=(o=t[l])==null?void 0:o.dequeue(),s){r=r.concat(Lo(e,t,n,s,!0)||[]);break}}}return r}function Lo(e,t,n,o,r){let i=[],a=r?i:void 0;return(e.inEdges(o.v)||[]).forEach(s=>{let l=e.edge(s),u=e.node(s.v);r&&i.push({v:s.v,w:s.w}),u.out-=l,Fo(t,n,u)}),(e.outEdges(o.v)||[]).forEach(s=>{let l=e.edge(s),u=s.w,c=e.node(u);c.in-=l,Fo(t,n,c)}),e.removeNode(o.v),a}function Og(e,t){let n=new Ve,o=0,r=0;e.nodes().forEach(s=>{n.setNode(s,{v:s,in:0,out:0})}),e.edges().forEach(s=>{let l=n.edge(s.v,s.w)||0,u=t(s),c=l+u;n.setEdge(s.v,s.w,c);let d=n.node(s.v),f=n.node(s.w);r=Math.max(r,d.out+=u),o=Math.max(o,f.in+=u)});let i=zg(r+o+3).map(()=>new Mg),a=o+1;return n.nodes().forEach(s=>{Fo(i,a,n.node(s))}),{graph:n,buckets:i,zeroIdx:a}}function Fo(e,t,n){var o,r,i;n.out?n.in?(i=e[n.out-n.in+t])==null||i.enqueue(n):(r=e[e.length-1])==null||r.enqueue(n):(o=e[0])==null||o.enqueue(n)}function zg(e){let t=[];for(let n=0;n<e;n++)t.push(n);return t}function Ag(e){(e.graph().acyclicer==="greedy"?Tg(e,t(e)):Bg(e)).forEach(n=>{let o=e.edge(n);e.removeEdge(n),o.forwardName=n.name,o.reversed=!0,e.setEdge(n.w,n.v,o,Ho("rev"))});function t(n){return o=>n.edge(o).weight}}function Bg(e){let t=[],n={},o={};function r(i){Object.hasOwn(o,i)||(o[i]=!0,n[i]=!0,e.outEdges(i).forEach(a=>{Object.hasOwn(n,a.w)?t.push(a):r(a.w)}),delete n[i])}return e.nodes().forEach(r),t}function Rg(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.reversed){e.removeEdge(t);let o=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,o)}})}function Vg(e){e.graph().dummyChains=[],e.edges().forEach(t=>Hg(e,t))}function Hg(e,t){let n=t.v,o=e.node(n).rank,r=t.w,i=e.node(r).rank,a=t.name,s=e.edge(t),l=s.labelRank;if(i===o+1)return;e.removeEdge(t);let u,c,d;for(d=0,++o;o<i;++d,++o)s.points=[],c={width:0,height:0,edgeLabel:s,edgeObj:t,rank:o},u=Ot(e,"edge",c,"_d"),o===l&&(c.width=s.width,c.height=s.height,c.dummy="edge-label",c.labelpos=s.labelpos),e.setEdge(n,u,{weight:s.weight},a),d===0&&e.graph().dummyChains.push(u),n=u;e.setEdge(n,r,{weight:s.weight},a)}function Lg(e){e.graph().dummyChains.forEach(t=>{let n=e.node(t),o=n.edgeLabel,r;for(e.setEdge(n.edgeObj,o);n.dummy;)r=e.successors(t)[0],e.removeNode(t),o.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(o.x=n.x,o.y=n.y,o.width=n.width,o.height=n.height),t=r,n=e.node(t)})}function Yo(e){let t={};function n(o){let r=e.node(o);if(Object.hasOwn(t,o))return r.rank;t[o]=!0;let i=e.outEdges(o),a=i?i.map(l=>l==null?Number.POSITIVE_INFINITY:n(l.w)-e.edge(l).minlen):[],s=je(Math.min,a);return s===Number.POSITIVE_INFINITY&&(s=0),r.rank=s}e.sources().forEach(n)}function zt(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var Ia=Fg;function Fg(e){let t=new Ve({directed:!1}),n=e.nodes();if(n.length===0)throw new Error("Graph must have at least one node");let o=n[0],r=e.nodeCount();t.setNode(o,{});let i,a;for(;Yg(t,e)<r&&(i=Gg(t,e),!!i);)a=t.hasNode(i.v)?zt(e,i):-zt(e,i),Xg(t,e,a);return t}function Yg(e,t){function n(o){let r=t.nodeEdges(o);r&&r.forEach(i=>{let a=i.v,s=o===a?i.w:a;!e.hasNode(s)&&!zt(t,i)&&(e.setNode(s,{}),e.setEdge(o,s,{}),n(s))})}return e.nodes().forEach(n),e.nodeCount()}function Gg(e,t){return t.edges().reduce((n,o)=>{let r=Number.POSITIVE_INFINITY;return e.hasNode(o.v)!==e.hasNode(o.w)&&(r=zt(t,o)),r<n[0]?[r,o]:n},[Number.POSITIVE_INFINITY,null])[1]}function Xg(e,t,n){e.nodes().forEach(o=>t.node(o).rank+=n)}var{preorder:Ug,postorder:Wg}=Vo,jg=Nt;Nt.initLowLimValues=Xo,Nt.initCutValues=Go,Nt.calcCutValue=Ma,Nt.leaveEdge=Ta,Nt.enterEdge=Pa,Nt.exchangeEdges=Oa;function Nt(e){e=wg(e),Yo(e);let t=Ia(e);Xo(t),Go(t,e);let n,o;for(;n=Ta(t);)o=Pa(t,e,n),Oa(t,e,n,o)}function Go(e,t){let n=Wg(e,e.nodes());n=n.slice(0,n.length-1),n.forEach(o=>Zg(e,t,o))}function Zg(e,t,n){let o=e.node(n).parent,r=e.edge(n,o);r.cutvalue=Ma(e,t,n)}function Ma(e,t,n){let o=e.node(n).parent,r=!0,i=t.edge(n,o),a=0;i||(r=!1,i=t.edge(o,n)),a=i.weight;let s=t.nodeEdges(n);return s&&s.forEach(l=>{let u=l.v===n,c=u?l.w:l.v;if(c!==o){let d=u===r,f=t.edge(l).weight;if(a+=d?f:-f,qg(e,n,c)){let h=e.edge(n,c).cutvalue;a+=d?-h:h}}}),a}function Xo(e,t){arguments.length<2&&(t=e.nodes()[0]),Da(e,{},1,t)}function Da(e,t,n,o,r){let i=n,a=e.node(o);t[o]=!0;let s=e.neighbors(o);return s&&s.forEach(l=>{Object.hasOwn(t,l)||(n=Da(e,t,n,l,o))}),a.low=i,a.lim=n++,r?a.parent=r:delete a.parent,n}function Ta(e){return e.edges().find(t=>e.edge(t).cutvalue<0)}function Pa(e,t,n){let o=n.v,r=n.w;t.hasEdge(o,r)||(o=n.w,r=n.v);let i=e.node(o),a=e.node(r),s=i,l=!1;return i.lim>a.lim&&(s=a,l=!0),t.edges().filter(u=>l===za(e,e.node(u.v),s)&&l!==za(e,e.node(u.w),s)).reduce((u,c)=>zt(t,c)<zt(t,u)?c:u)}function Oa(e,t,n,o){let r=n.v,i=n.w;e.removeEdge(r,i),e.setEdge(o.v,o.w,{}),Xo(e),Go(e,t),Kg(e,t)}function Kg(e,t){let n=e.nodes().find(r=>!e.node(r).parent);if(!n)return;let o=Ug(e,[n]);o=o.slice(1),o.forEach(r=>{let i=e.node(r).parent,a=t.edge(r,i),s=!1;a||(a=t.edge(i,r),s=!0),t.node(r).rank=t.node(i).rank+(s?a.minlen:-a.minlen)})}function qg(e,t,n){return e.hasEdge(t,n)}function za(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var Jg=Qg;function Qg(e){let t=e.graph().ranker;if(typeof t=="function")return t(e);switch(t){case"network-simplex":Aa(e);break;case"tight-tree":tp(e);break;case"longest-path":ep(e);break;case"none":break;default:Aa(e)}}var ep=Yo;function tp(e){Yo(e),Ia(e)}function Aa(e){jg(e)}var np=op;function op(e){let t=ip(e);e.graph().dummyChains.forEach(n=>{let o=e.node(n),r=o.edgeObj,i=rp(e,t,r.v,r.w),a=i.path,s=i.lca,l=0,u=a[l],c=!0;for(;n!==r.w;){if(o=e.node(n),c){for(;(u=a[l])!==s&&e.node(u).maxRank<o.rank;)l++;u===s&&(c=!1)}if(!c){for(;l<a.length-1&&e.node(a[l+1]).minRank<=o.rank;)l++;u=a[l]}u!==void 0&&e.setParent(n,u),n=e.successors(n)[0]}})}function rp(e,t,n,o){let r=[],i=[],a=Math.min(t[n].low,t[o].low),s=Math.max(t[n].lim,t[o].lim),l;l=n;do l=e.parent(l),r.push(l);while(l&&(t[l].low>a||s>t[l].lim));let u=l,c=o;for(;(c=e.parent(c))!==u;)i.push(c);return{path:r.concat(i.reverse()),lca:u}}function ip(e){let t={},n=0;function o(r){let i=n;e.children(r).forEach(o),t[r]={low:i,lim:n++}}return e.children(Zn).forEach(o),t}function ap(e){let t=Ot(e,"root",{},"_root"),n=sp(e),o=Object.values(n),r=je(Math.max,o)-1,i=2*r+1;e.graph().nestingRoot=t,e.edges().forEach(s=>e.edge(s).minlen*=i);let a=lp(e)+1;e.children(Zn).forEach(s=>Ba(e,t,i,a,r,n,s)),e.graph().nodeRankFactor=i}function Ba(e,t,n,o,r,i,a){var s;let l=e.children(a);if(!l.length){a!==t&&e.setEdge(t,a,{weight:0,minlen:n});return}let u=Ea(e,"_bt"),c=Ea(e,"_bb"),d=e.node(a);e.setParent(u,a),d.borderTop=u,e.setParent(c,a),d.borderBottom=c,l.forEach(f=>{var h;Ba(e,t,n,o,r,i,f);let _=e.node(f),v=_.borderTop?_.borderTop:f,y=_.borderBottom?_.borderBottom:f,S=_.borderTop?o:2*o,M=v!==y?1:r-((h=i[a])!=null?h:0)+1;e.setEdge(u,v,{weight:S,minlen:M,nestingEdge:!0}),e.setEdge(y,c,{weight:S,minlen:M,nestingEdge:!0})}),e.parent(a)||e.setEdge(t,u,{weight:0,minlen:r+((s=i[a])!=null?s:0)})}function sp(e){let t={};function n(o,r){let i=e.children(o);i&&i.length&&i.forEach(a=>n(a,r+1)),t[o]=r}return e.children(Zn).forEach(o=>n(o,1)),t}function lp(e){return e.edges().reduce((t,n)=>t+e.edge(n).weight,0)}function up(e){let t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,e.edges().forEach(n=>{e.edge(n).nestingEdge&&e.removeEdge(n)})}var cp=dp;function dp(e){function t(n){let o=e.children(n),r=e.node(n);if(o.length&&o.forEach(t),Object.hasOwn(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(let i=r.minRank,a=r.maxRank+1;i<a;++i)Ra(e,"borderLeft","_bl",n,r,i),Ra(e,"borderRight","_br",n,r,i)}}e.children(Zn).forEach(t)}function Ra(e,t,n,o,r,i){let a={width:0,height:0,rank:i,borderType:t},s=r[t][i-1],l=Ot(e,"border",a,n);r[t][i]=l,e.setParent(l,o),s&&e.setEdge(s,l,{weight:1})}function fp(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="lr"||n==="rl")&&Va(e)}function hp(e){var t;let n=(t=e.graph().rankdir)==null?void 0:t.toLowerCase();(n==="bt"||n==="rl")&&gp(e),(n==="lr"||n==="rl")&&(pp(e),Va(e))}function Va(e){e.nodes().forEach(t=>Ha(e.node(t))),e.edges().forEach(t=>Ha(e.edge(t)))}function Ha(e){let t=e.width;e.width=e.height,e.height=t}function gp(e){e.nodes().forEach(t=>Uo(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Uo),Object.hasOwn(o,"y")&&Uo(o)})}function Uo(e){e.y=-e.y}function pp(e){e.nodes().forEach(t=>Wo(e.node(t))),e.edges().forEach(t=>{var n;let o=e.edge(t);(n=o.points)==null||n.forEach(Wo),Object.hasOwn(o,"x")&&Wo(o)})}function Wo(e){let t=e.x;e.x=e.y,e.y=t}function vp(e){let t={},n=e.nodes().filter(s=>!e.children(s).length),o=n.map(s=>e.node(s).rank),r=je(Math.max,o),i=sn(r+1).map(()=>[]);function a(s){if(t[s])return;t[s]=!0;let l=e.node(s);i[l.rank].push(s);let u=e.successors(s);u&&u.forEach(a)}return n.sort((s,l)=>e.node(s).rank-e.node(l).rank).forEach(a),i}function mp(e,t){let n=0;for(let o=1;o<t.length;++o)n+=_p(e,t[o-1],t[o]);return n}function _p(e,t,n){let o=kg(n,n.map((u,c)=>c)),r=t.flatMap(u=>{let c=e.outEdges(u);return c?c.map(d=>({pos:o[d.w],weight:e.edge(d).weight})).sort((d,f)=>d.pos-f.pos):[]}),i=1;for(;i<n.length;)i<<=1;let a=2*i-1;i-=1;let s=new Array(a).fill(0),l=0;return r.forEach(u=>{let c=u.pos+i;s[c]+=u.weight;let d=0;for(;c>0;)c%2&&(d+=s[c+1]),c=c-1>>1,s[c]+=u.weight;l+=u.weight*d}),l}function yp(e,t=[]){return t.map(n=>{let o=e.inEdges(n);if(!o||!o.length)return{v:n};{let r=o.reduce((i,a)=>{let s=e.edge(a),l=e.node(a.v);return{sum:i.sum+s.weight*l.order,weight:i.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:r.sum/r.weight,weight:r.weight}}})}function wp(e,t){let n={};e.forEach((r,i)=>{let a={indegree:0,in:[],out:[],vs:[r.v],i};r.barycenter!==void 0&&(a.barycenter=r.barycenter,a.weight=r.weight),n[r.v]=a}),t.edges().forEach(r=>{let i=n[r.v],a=n[r.w];i!==void 0&&a!==void 0&&(a.indegree++,i.out.push(a))});let o=Object.values(n).filter(r=>!r.indegree);return bp(o)}function bp(e){let t=[];function n(r){return i=>{i.merged||(i.barycenter===void 0||r.barycenter===void 0||i.barycenter>=r.barycenter)&&xp(r,i)}}function o(r){return i=>{i.in.push(r),--i.indegree===0&&e.push(i)}}for(;e.length;){let r=e.pop();t.push(r),r.in.reverse().forEach(n(r)),r.out.forEach(o(r))}return t.filter(r=>!r.merged).map(r=>Wn(r,["vs","i","barycenter","weight"]))}function xp(e,t){let n=0,o=0;e.weight&&(n+=e.barycenter*e.weight,o+=e.weight),t.weight&&(n+=t.barycenter*t.weight,o+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/o,e.weight=o,e.i=Math.min(t.i,e.i),t.merged=!0}function Ep(e,t){let n=Ng(e,c=>Object.hasOwn(c,"barycenter")),o=n.lhs,r=n.rhs.sort((c,d)=>d.i-c.i),i=[],a=0,s=0,l=0;o.sort(Np(!!t)),l=La(i,r,l),o.forEach(c=>{l+=c.vs.length,i.push(c.vs),a+=c.barycenter*c.weight,s+=c.weight,l=La(i,r,l)});let u={vs:i.flat(1)};return s&&(u.barycenter=a/s,u.weight=s),u}function La(e,t,n){let o;for(;t.length&&(o=t[t.length-1]).i<=n;)t.pop(),e.push(o.vs),n++;return n}function Np(e){return(t,n)=>t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}function Fa(e,t,n,o){let r=e.children(t),i=e.node(t),a=i?i.borderLeft:void 0,s=i?i.borderRight:void 0,l={};a&&(r=r.filter(f=>f!==a&&f!==s));let u=yp(e,r);u.forEach(f=>{if(e.children(f.v).length){let h=Fa(e,f.v,n,o);l[f.v]=h,Object.hasOwn(h,"barycenter")&&kp(f,h)}});let c=wp(u,n);Sp(c,l);let d=Ep(c,o);if(a&&s){d.vs=[a,d.vs,s].flat(1);let f=e.predecessors(a);if(f&&f.length){let h=e.node(f[0]),_=e.predecessors(s),v=e.node(_[0]);Object.hasOwn(d,"barycenter")||(d.barycenter=0,d.weight=0),d.barycenter=(d.barycenter*d.weight+h.order+v.order)/(d.weight+2),d.weight+=2}}return d}function Sp(e,t){e.forEach(n=>{n.vs=n.vs.flatMap(o=>t[o]?t[o].vs:o)})}function kp(e,t){e.barycenter!==void 0?(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight):(e.barycenter=t.barycenter,e.weight=t.weight)}function $p(e,t,n,o){o||(o=e.nodes());let r=Cp(e),i=new Ve({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(a=>e.node(a));return o.forEach(a=>{let s=e.node(a),l=e.parent(a);if(s.rank===t||s.minRank<=t&&t<=s.maxRank){i.setNode(a),i.setParent(a,l||r);let u=e[n](a);u&&u.forEach(c=>{let d=c.v===a?c.w:c.v,f=i.edge(d,a),h=f!==void 0?f.weight:0;i.setEdge(d,a,{weight:e.edge(c).weight+h})}),Object.hasOwn(s,"minRank")&&i.setNode(a,{borderLeft:s.borderLeft[t],borderRight:s.borderRight[t]})}}),i}function Cp(e){let t;for(;e.hasNode(t=Ho("_root")););return t}function Ip(e,t,n){let o={},r;n.forEach(i=>{let a=e.parent(i),s,l;for(;a;){if(s=e.parent(a),s?(l=o[s],o[s]=a):(l=r,r=a),l&&l!==a){t.setEdge(l,a);return}a=s}})}function Ya(e,t={}){if(typeof t.customOrder=="function"){t.customOrder(e,Ya);return}let n=Sa(e),o=Ga(e,sn(1,n+1),"inEdges"),r=Ga(e,sn(n-1,-1,-1),"outEdges"),i=vp(e);if(Xa(e,i),t.disableOptimalOrderHeuristic)return;let a=Number.POSITIVE_INFINITY,s,l=t.constraints||[];for(let u=0,c=0;c<4;++u,++c){Mp(u%2?o:r,u%4>=2,l),i=an(e);let d=mp(e,i);d<a?(c=0,s=Object.assign({},i),a=d):d===a&&(s=structuredClone(i))}Xa(e,s)}function Ga(e,t,n){let o=new Map,r=(i,a)=>{o.has(i)||o.set(i,[]),o.get(i).push(a)};for(let i of e.nodes()){let a=e.node(i);if(typeof a.rank=="number"&&r(a.rank,i),typeof a.minRank=="number"&&typeof a.maxRank=="number")for(let s=a.minRank;s<=a.maxRank;s++)s!==a.rank&&r(s,i)}return t.map(function(i){return $p(e,i,n,o.get(i)||[])})}function Mp(e,t,n){let o=new Ve;e.forEach(function(r){n.forEach(s=>o.setEdge(s.left,s.right));let i=r.graph().root,a=Fa(r,i,o,t);a.vs.forEach((s,l)=>r.node(s).order=l),Ip(r,o,a.vs)})}function Xa(e,t){Object.values(t).forEach(n=>n.forEach((o,r)=>e.node(o).order=r))}function Dp(e,t){let n={};function o(r,i){let a=0,s=0,l=r.length,u=i[i.length-1];return i.forEach((c,d)=>{let f=Pp(e,c),h=f?e.node(f).order:l;(f||c===u)&&(i.slice(s,d+1).forEach(_=>{let v=e.predecessors(_);v&&v.forEach(y=>{let S=e.node(y),M=S.order;(M<a||h<M)&&!(S.dummy&&e.node(_).dummy)&&Ua(n,y,_)})}),s=d+1,a=h)}),i}return t.length&&t.reduce(o),n}function Tp(e,t){let n={};function o(i,a,s,l,u){sn(a,s).forEach(c=>{let d=i[c];if(d!==void 0&&e.node(d).dummy){let f=e.predecessors(d);f&&f.forEach(h=>{if(h===void 0)return;let _=e.node(h);_.dummy&&(_.order<l||_.order>u)&&Ua(n,h,d)})}})}function r(i,a){let s=-1,l=-1,u=0;return a.forEach((c,d)=>{if(e.node(c).dummy==="border"){let f=e.predecessors(c);if(f&&f.length){let h=f[0];if(h===void 0)return;l=e.node(h).order,o(a,u,d,s,l),u=d,s=l}}o(a,u,a.length,l,i.length)}),a}return t.length&&t.reduce(r),n}function Pp(e,t){if(e.node(t).dummy){let n=e.predecessors(t);if(n)return n.find(o=>e.node(o).dummy)}}function Ua(e,t,n){if(t>n){let r=t;t=n,n=r}let o=e[t];o||(e[t]=o={}),o[n]=!0}function Op(e,t,n){if(t>n){let r=t;t=n,n=r}let o=e[t];return o!==void 0&&Object.hasOwn(o,n)}function zp(e,t,n,o){let r={},i={},a={};return t.forEach(s=>{s.forEach((l,u)=>{r[l]=l,i[l]=l,a[l]=u})}),t.forEach(s=>{let l=-1;s.forEach(u=>{let c=o(u);if(c&&c.length){let d=c.sort((h,_)=>{let v=a[h],y=a[_];return(v!==void 0?v:0)-(y!==void 0?y:0)}),f=(d.length-1)/2;for(let h=Math.floor(f),_=Math.ceil(f);h<=_;++h){let v=d[h];if(v===void 0)continue;let y=a[v];if(y!==void 0&&i[u]===u&&l<y&&!Op(n,u,v)){let S=r[v];S!==void 0&&(i[v]=u,i[u]=r[u]=S,l=y)}}}})}),{root:r,align:i}}function Ap(e,t,n,o,r=!1){let i={},a=Bp(e,t,n,r),s=r?"borderLeft":"borderRight";function l(h,_){let v=a.nodes().slice(),y={},S=v.pop();for(;S;){if(y[S])h(S);else{y[S]=!0,v.push(S);for(let M of _(S))v.push(M)}S=v.pop()}}function u(h){let _=a.inEdges(h);_?i[h]=_.reduce((v,y)=>{var S;let M=(S=i[y.v])!=null?S:0,w=a.edge(y);return Math.max(v,M+(w!==void 0?w:0))},0):i[h]=0}function c(h){let _=a.outEdges(h),v=Number.POSITIVE_INFINITY;_&&(v=_.reduce((S,M)=>{let w=i[M.w],k=a.edge(M);return Math.min(S,(w!==void 0?w:0)-(k!==void 0?k:0))},Number.POSITIVE_INFINITY));let y=e.node(h);v!==Number.POSITIVE_INFINITY&&y.borderType!==s&&(i[h]=Math.max(i[h]!==void 0?i[h]:0,v))}function d(h){return a.predecessors(h)||[]}function f(h){return a.successors(h)||[]}return l(u,d),l(c,f),Object.keys(o).forEach(h=>{var _;let v=n[h];v!==void 0&&(i[h]=(_=i[v])!=null?_:0)}),i}function Bp(e,t,n,o){let r=new Ve,i=e.graph(),a=Fp(i.nodesep,i.edgesep,o);return t.forEach(s=>{let l;s.forEach(u=>{let c=n[u];if(c!==void 0){if(r.setNode(c),l!==void 0){let d=n[l];if(d!==void 0){let f=r.edge(d,c);r.setEdge(d,c,Math.max(a(e,u,l),f||0))}}l=u}})}),r}function Rp(e,t){return Object.values(t).reduce((n,o)=>{let r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;Object.entries(o).forEach(([s,l])=>{let u=Yp(e,s)/2;r=Math.max(l+u,r),i=Math.min(l-u,i)});let a=r-i;return a<n[0]&&(n=[a,o]),n},[Number.POSITIVE_INFINITY,null])[1]}function Vp(e,t){let n=Object.values(t),o=je(Math.min,n),r=je(Math.max,n);["u","d"].forEach(i=>{["l","r"].forEach(a=>{let s=i+a,l=e[s];if(!l||l===t)return;let u=Object.values(l),c=o-je(Math.min,u);a!=="l"&&(c=r-je(Math.max,u)),c&&(e[s]=jn(l,d=>d+c))})})}function Hp(e,t=void 0){let n=e.ul;return n?jn(n,(o,r)=>{var i,a;if(t){let l=t.toLowerCase(),u=e[l];if(u&&u[r]!==void 0)return u[r]}let s=Object.values(e).map(l=>{let u=l[r];return u!==void 0?u:0}).sort((l,u)=>l-u);return(((i=s[1])!=null?i:0)+((a=s[2])!=null?a:0))/2}):{}}function Lp(e){let t=an(e),n=Object.assign(Dp(e,t),Tp(e,t)),o={},r;["u","d"].forEach(a=>{r=a==="u"?t:Object.values(t).reverse(),["l","r"].forEach(s=>{s==="r"&&(r=r.map(c=>Object.values(c).reverse()));let l=zp(e,r,n,c=>(a==="u"?e.predecessors(c):e.successors(c))||[]),u=Ap(e,r,l.root,l.align,s==="r");s==="r"&&(u=jn(u,c=>-c)),o[a+s]=u})});let i=Rp(e,o);return Vp(o,i),Hp(o,e.graph().align)}function Fp(e,t,n){return(o,r,i)=>{let a=o.node(r),s=o.node(i),l=0,u;if(l+=a.width/2,Object.hasOwn(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(l+=n?u:-u),u=void 0,l+=(a.dummy?t:e)/2,l+=(s.dummy?t:e)/2,l+=s.width/2,Object.hasOwn(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":u=s.width/2;break;case"r":u=-s.width/2;break}return u&&(l+=n?u:-u),l}}function Yp(e,t){return e.node(t).width}function Gp(e){e=ba(e),Xp(e),Object.entries(Lp(e)).forEach(([t,n])=>e.node(t).x=n)}function Xp(e){let t=an(e),n=e.graph(),o=n.ranksep,r=n.rankalign,i=0;t.forEach(a=>{let s=a.reduce((l,u)=>{var c;let d=(c=e.node(u).height)!=null?c:0;return l>d?l:d},0);a.forEach(l=>{let u=e.node(l);r==="top"?u.y=i+u.height/2:r==="bottom"?u.y=i+s-u.height/2:u.y=i+s/2}),i+=s+o})}function Up(e,t={}){let n=t.debugTiming?ka:$a;return n("layout",()=>{let o=n(" buildLayoutGraph",()=>nv(e));return n(" runLayout",()=>Wp(o,n,t)),n(" updateInputGraph",()=>jp(e,o)),o})}function Wp(e,t,n){t(" makeSpaceForEdgeLabels",()=>ov(e)),t(" removeSelfEdges",()=>fv(e)),t(" acyclic",()=>Ag(e)),t(" nestingGraph.run",()=>ap(e)),t(" rank",()=>Jg(ba(e))),t(" injectEdgeLabelProxies",()=>rv(e)),t(" removeEmptyRanks",()=>xg(e)),t(" nestingGraph.cleanup",()=>up(e)),t(" normalizeRanks",()=>bg(e)),t(" assignRankMinMax",()=>iv(e)),t(" removeEdgeLabelProxies",()=>av(e)),t(" normalize.run",()=>Vg(e)),t(" parentDummyChains",()=>np(e)),t(" addBorderSegments",()=>cp(e)),t(" order",()=>Ya(e,n)),t(" insertSelfEdges",()=>hv(e)),t(" adjustCoordinateSystem",()=>fp(e)),t(" position",()=>Gp(e)),t(" positionSelfEdges",()=>gv(e)),t(" removeBorderNodes",()=>dv(e)),t(" normalize.undo",()=>Lg(e)),t(" fixupEdgeLabelCoords",()=>uv(e)),t(" undoCoordinateSystem",()=>hp(e)),t(" translateGraph",()=>sv(e)),t(" assignNodeIntersects",()=>lv(e)),t(" reversePoints",()=>cv(e)),t(" acyclic.undo",()=>Rg(e))}function jp(e,t){e.nodes().forEach(n=>{let o=e.node(n),r=t.node(n);o&&(o.x=r.x,o.y=r.y,o.order=r.order,o.rank=r.rank,t.children(n).length&&(o.width=r.width,o.height=r.height))}),e.edges().forEach(n=>{let o=e.edge(n),r=t.edge(n);o.points=r.points,Object.hasOwn(r,"x")&&(o.x=r.x,o.y=r.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var Zp=["nodesep","edgesep","ranksep","marginx","marginy"],Kp={ranksep:50,edgesep:20,nodesep:50,rankdir:"TB",rankalign:"center"},qp=["acyclicer","ranker","rankdir","align","rankalign"],Jp=["width","height","rank"],Wa={width:0,height:0},Qp=["minlen","weight","width","height","labeloffset"],ev={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},tv=["labelpos"];function nv(e){let t=new Ve({multigraph:!0,compound:!0}),n=Zo(e.graph());return t.setGraph(Object.assign({},Kp,jo(n,Zp),Wn(n,qp))),e.nodes().forEach(o=>{let r=Zo(e.node(o)),i=jo(r,Jp);Object.keys(Wa).forEach(s=>{i[s]===void 0&&(i[s]=Wa[s])}),t.setNode(o,i);let a=e.parent(o);a!==void 0&&t.setParent(o,a)}),e.edges().forEach(o=>{let r=Zo(e.edge(o));t.setEdge(o,Object.assign({},ev,jo(r,Qp),Wn(r,tv)))}),t}function ov(e){let t=e.graph();t.ranksep/=2,e.edges().forEach(n=>{let o=e.edge(n);o.minlen*=2,o.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?o.width+=o.labeloffset:o.height+=o.labeloffset)})}function rv(e){e.edges().forEach(t=>{let n=e.edge(t);if(n.width&&n.height){let o=e.node(t.v),r={rank:(e.node(t.w).rank-o.rank)/2+o.rank,e:t};Ot(e,"edge-proxy",r,"_ep")}})}function iv(e){let t=0;e.nodes().forEach(n=>{let o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=Math.max(t,o.maxRank))}),e.graph().maxRank=t}function av(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="edge-proxy"){let o=n;e.edge(o.e).labelRank=n.rank,e.removeNode(t)}})}function sv(e){let t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,r=0,i=e.graph(),a=i.marginx||0,s=i.marginy||0;function l(u){let c=u.x,d=u.y,f=u.width,h=u.height;t=Math.min(t,c-f/2),n=Math.max(n,c+f/2),o=Math.min(o,d-h/2),r=Math.max(r,d+h/2)}e.nodes().forEach(u=>l(e.node(u))),e.edges().forEach(u=>{let c=e.edge(u);Object.hasOwn(c,"x")&&l(c)}),t-=a,o-=s,e.nodes().forEach(u=>{let c=e.node(u);c.x-=t,c.y-=o}),e.edges().forEach(u=>{let c=e.edge(u);c.points.forEach(d=>{d.x-=t,d.y-=o}),Object.hasOwn(c,"x")&&(c.x-=t),Object.hasOwn(c,"y")&&(c.y-=o)}),i.width=n-t+a,i.height=r-o+s}function lv(e){e.edges().forEach(t=>{let n=e.edge(t),o=e.node(t.v),r=e.node(t.w),i,a;n.points?(i=n.points[0],a=n.points[n.points.length-1]):(n.points=[],i=r,a=o),n.points.unshift(xa(o,i)),n.points.push(xa(r,a))})}function uv(e){e.edges().forEach(t=>{let n=e.edge(t);if(Object.hasOwn(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function cv(e){e.edges().forEach(t=>{let n=e.edge(t);n.reversed&&n.points.reverse()})}function dv(e){e.nodes().forEach(t=>{if(e.children(t).length){let n=e.node(t),o=e.node(n.borderTop),r=e.node(n.borderBottom),i=e.node(n.borderLeft[n.borderLeft.length-1]),a=e.node(n.borderRight[n.borderRight.length-1]);n.width=Math.abs(a.x-i.x),n.height=Math.abs(r.y-o.y),n.x=i.x+n.width/2,n.y=o.y+n.height/2}}),e.nodes().forEach(t=>{e.node(t).dummy==="border"&&e.removeNode(t)})}function fv(e){e.edges().forEach(t=>{if(t.v===t.w){let n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function hv(e){an(e).forEach(t=>{let n=0;t.forEach((o,r)=>{let i=e.node(o);i.order=r+n,(i.selfEdges||[]).forEach(a=>{Ot(e,"selfedge",{width:a.label.width,height:a.label.height,rank:i.rank,order:r+ ++n,e:a.e,label:a.label},"_se")}),delete i.selfEdges})})}function gv(e){e.nodes().forEach(t=>{let n=e.node(t);if(n.dummy==="selfedge"){let o=n,r=e.node(o.e.v),i=r.x+r.width/2,a=r.y,s=n.x-i,l=r.height/2;e.setEdge(o.e,o.label),e.removeNode(t),o.label.points=[{x:i+2*s/3,y:a-l},{x:i+5*s/6,y:a-l},{x:i+s,y:a},{x:i+5*s/6,y:a+l},{x:i+2*s/3,y:a+l}],o.label.x=n.x,o.label.y=n.y}})}function jo(e,t){return jn(Wn(e,t),Number)}function Zo(e){let t={};return e&&Object.entries(e).forEach(([n,o])=>{typeof n=="string"&&(n=n.toLowerCase()),t[n]=o}),t}function pv(e){let t=an(e),n=new Ve({compound:!0,multigraph:!0}).setGraph({});return e.nodes().forEach(o=>{n.setNode(o,{label:o}),n.setParent(o,"layer"+e.node(o).rank)}),e.edges().forEach(o=>n.setEdge(o.v,o.w,{},o.name)),t.forEach((o,r)=>{let i="layer"+r;n.setNode(i,{rank:"same"}),o.reduce((a,s)=>(n.setEdge(a,s,{style:"invis"}),s))}),n}var vv={graphlib:ca,version:$g,layout:Up,debug:pv,util:{time:ka,notime:$a}},Ko=vv;function mv(){const{findNode:e}=Ee(),t=xe(new Ko.graphlib.Graph),n=xe("LR");function o(r,i,a){const s=new Ko.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,Ko.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?J.Left:J.Top,sourcePosition:l?J.Right:J.Bottom,position:{x:c.x,y:c.y}}:u})}return{graph:t,layout:o,previousDirection:n}}const _v={class:"interface-flow-chart"},yv={class:"docs-overlay"},wv={href:"/tools/staticdocs/docs/tools/cmd-tlm-server#data-flows-tab",target:"_blank",class:"docs-link"},bv={key:1,class:"empty-state"},nm=ja("_",{__name:"InterfaceFlowChart",props:{interfaceDetails:{type:Array,default:()=>[]},routerDetails:{type:Array,default:()=>[]}},setup(e){const{layout:t}=mv(),{onConnect:n,addEdges:o,onNodesChange:r,applyNodeChanges:i,onEdgesChange:a,applyEdgeChanges:s,fitView:l,findNode:u,getViewport:c,setViewport:d}=Ee(),f=ot("dialog"),h=new dr,_=e,v=xe([]),y=xe([]);let S=!1,M=!1;async function w(C,b=!1){(S||b)&&(v.value=t(v.value,y.value,C),S=!1,M=!1,Oe(()=>{l()}))}n(C=>{let b=C.source.startsWith("interface__"),V=C.target.startsWith("interface__"),p=C.source.startsWith("router__"),D=C.target.startsWith("router__"),E=C.source.startsWith("cosmos__"),T=C.target.startsWith("cosmos__"),O=C.source.startsWith("target__"),B=C.target.startsWith("target__"),L=C.sourceHandle.split("__")[1],I=C.targetHandle.split("__")[1];if(L!==I||b&&V||p&&D||p&&V||b&&D||E&&T||O&&B||E&&B||O&&T)return;let P="";E&&(P=P+`cosmos__${C.source.split("__")[1]}`),T&&(P=P+`cosmos__${C.target.split("__")[1]}`),P.length==0&&(b&&(P=P+`interface__${C.source.split("__")[1]}`),V&&(P=P+`interface__${C.target.split("__")[1]}`),p&&(P=P+`router__${C.source.split("__")[1]}`),D&&(P=P+`router__${C.target.split("__")[1]}`)),P.startsWith("cosmos__")&&(b&&(P=P+`__interface__${C.source.split("__")[1]}`),V&&(P=P+`__interface__${C.target.split("__")[1]}`),p&&(P=P+`__router__${C.source.split("__")[1]}`),D&&(P=P+`__router__${C.target.split("__")[1]}`)),O&&(P=P+`__target__${C.source.split("__")[1]}`),B&&(P=P+`__target__${C.target.split("__")[1]}`),P=P+`__${L}`,C.id=P;let j=!1;if(y.value.forEach(ee=>{if(ee.id===P){j=!0;return}}),j)return;let A="",z="",R="",W=P.split("__"),ge=W[0],se=W[4];ge==="cosmos"?(z=W[1],A=W[2],R=W[3],se=="cmd"?(C.type="default",C.label="CMD Enable",C.markerStart={type:"arrowclosed"}):(C.type="default",C.label="Tlm Enable",C.markerEnd={type:"arrowclosed"}),A==="interface"?h.interface_target_enable(R,z,se==="cmd",se==="tlm").then(ee=>{o(C),y.value.push(C)}):h.router_target_enable(R,z,se==="cmd",se==="tlm").then(ee=>{o(C),y.value.push(C)})):(A=W[0],R=W[1],z=W[3],se=="cmd"?(C.type="default",C.label="CMD Map",C.markerStart={type:"arrowclosed"}):(C.type="default",C.label="Tlm Map",C.markerEnd={type:"arrowclosed"}),A==="interface"?f.confirm(`${C.label} target ${z} to interface ${R}? Note this will cause the interface to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{h.map_target_to_interface(z,R,se==="cmd",se==="tlm",!1).then(ee=>{o(C),y.value.push(C)})}):f.confirm(`${C.label} target ${z} to router ${R}? Note this will cause the router to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{h.map_target_to_router(z,R,se==="cmd",se==="tlm",!1).then(ee=>{o(C),y.value.push(C)})}))}),r(async C=>{const b=[];for(const V of C)V.type!=="remove"&&b.push(V),V.type==="dimensions"&&M&&(S=!0,Oe(()=>{w("LR")}));i(b)}),a(async C=>{const b=[];for(const V of C)if(V.type!=="remove")b.push(V);else{let p="",D="",E="",T="",O="",B=V.id.split("__"),L=B[0],I=B[4];L==="cosmos"?(E=B[1],T=B[2],O=B[3],p=`Disable ${E} ${I} with ${T} ${O}?`,D="Disable"):(T=B[0],O=B[1],E=B[3],p=`Unmap ${E} ${I} with ${T} ${O}? Note this will cause the ${T} to restart.`,D="Unmap"),f.confirm(p,{okText:D,cancelText:"Cancel"}).then(()=>{L=="cosmos"?T=="interface"?h.interface_target_disable(O,E,I==="cmd",I==="tlm").then(P=>{s([V]),y.value.forEach((j,A)=>{if(j.id===V.id){y.value.splice(A,1);return}})}):h.router_target_disable(O,E,I==="cmd",I==="tlm").then(P=>{s([V]),y.value.forEach((j,A)=>{if(j.id===V.id){y.value.splice(A,1);return}})}):T=="interface"?h.unmap_target_from_interface(E,O,I==="cmd",I==="tlm").then(P=>{s([V]),y.value.forEach((j,A)=>{if(j.id===V.id){y.value.splice(A,1);return}})}):h.unmap_target_from_router(E,O,I==="cmd",I==="tlm").then(P=>{s([V]),y.value.forEach((j,A)=>{if(j.id===V.id){y.value.splice(A,1);return}})})})}s(b)});const k=xe(!1),H=xe(null),Y=xe(null),X=xe(null),F=xe(null);function ae(C){C.node.type==="interface"?(H.value="Interface",Y.value=_.interfaceDetails[C.node.data.label],X.value=null,F.value=null,k.value=!0):C.node.type=="router"?(H.value="Router",Y.value=_.routerDetails[C.node.data.label],X.value=null,F.value=null,k.value=!0):(C.node.type==="read-protocol"||C.node.type=="write-protocol")&&(C.node.data.interface?(H.value="Interface",Y.value=_.interfaceDetails[C.node.data.interface]):(H.value="Router",Y.value=_.routerDetails[C.node.data.router]),X.value=null,F.value=C.node.data.index,k.value=!0)}function q(){const C=new Set(v.value.map(I=>I.id)),b=new Map,V=C.size>0?c():null;v.value.forEach(I=>{const P=u(I.id);P&&b.set(I.id,{x:P.position.x,y:P.position.y})}),v.value=[],y.value=[];const p=[];let D=_.interfaceDetails||{};for(const I in D){(_.interfaceDetails[I].cmd_target_names||[]).forEach(A=>{p.includes(A)||p.push(A);const z={id:`interface__${I}__target__${A}__cmd`,source:`interface__${I}`,target:`target__${A}`,sourceHandle:"interface__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};y.value.push(z)});for(const[A,z]of Object.entries(_.interfaceDetails[I].cmd_target_enabled)){if(A==="UNKNOWN"||!z)continue;const R={id:`cosmos__${A}__interface__${I}__cmd`,target:`interface__${I}`,source:`cosmos__${A}`,sourceHandle:"cosmos__cmd",targetHandle:"interface__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};y.value.push(R)}(_.interfaceDetails[I].tlm_target_names||[]).forEach(A=>{p.includes(A)||p.push(A);const z={id:`interface__${I}__target__${A}__tlm`,source:`interface__${I}`,target:`target__${A}`,sourceHandle:"interface__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};y.value.push(z)});for(const[A,z]of Object.entries(_.interfaceDetails[I].tlm_target_enabled)){if(A==="UNKNOWN"||!z)continue;const R={id:`cosmos__${A}__interface__${I}__tlm`,target:`interface__${I}`,source:`cosmos__${A}`,sourceHandle:"cosmos__tlm",targetHandle:"interface__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};y.value.push(R)}}let E=_.routerDetails||{};for(const I in E){(_.routerDetails[I].cmd_target_names||[]).forEach(A=>{p.includes(A)||p.push(A);const z={id:`router__${I}__target__${A}__cmd`,source:`router__${I}`,target:`target__${A}`,sourceHandle:"router__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};y.value.push(z)});for(const[A,z]of Object.entries(_.routerDetails[I].cmd_target_enabled)){if(A==="UNKNOWN"||!z)continue;const R={id:`cosmos__${A}__router__${I}__cmd`,target:`router__${I}`,source:`cosmos__${A}`,sourceHandle:"cosmos__cmd",targetHandle:"router__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};y.value.push(R)}(_.routerDetails[I].tlm_target_names||[]).forEach(A=>{p.includes(A)||p.push(A);const z={id:`router__${I}__target__${A}__tlm`,source:`router__${I}`,target:`target__${A}`,sourceHandle:"router__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};y.value.push(z)});for(const[A,z]of Object.entries(_.routerDetails[I].tlm_target_enabled)){if(A==="UNKNOWN"||!z)continue;const R={id:`cosmos__${A}__router__${I}__tlm`,target:`router__${I}`,source:`cosmos__${A}`,sourceHandle:"cosmos__tlm",targetHandle:"router__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};y.value.push(R)}}p.forEach((I,P)=>{let j,A;j=0,A=P*250;const z={id:`cosmos__${I}`,type:"cosmos",position:{x:j,y:A},data:{label:I},draggable:!0};v.value.push(z)});let T=0,O=200;for(const I in D){let P=_.interfaceDetails[I].write_protocols||[],j=_.interfaceDetails[I].read_protocols||[];const A=Math.max(P.length,j.length,1),z=Math.max(200,80+A*70);z>O&&(O=z);const R=200,W={id:`interface__${I}`,type:"interface",position:{x:400,y:(R+50)*T},data:{label:I,width:z,height:R},draggable:!0};v.value.push(W),T+=1;const ge=50;P.forEach((se,ee)=>{let he=se.name;se.name.slice(-8)==="Protocol"&&(he=se.name.slice(0,-8));const oe={id:`write-protocol__interface__${I}__${ee}`,type:"write-protocol",position:{x:ge+ee*70,y:98},data:{index:ee,interface:I,label:he},draggable:!1,parentNode:`interface__${I}`,extent:"parent"};v.value.push(oe)}),j.forEach((se,ee)=>{let he=se.name;se.name.slice(-8)==="Protocol"&&(he=se.name.slice(0,-8));const oe={id:`read-protocol__interface__${I}__${ee}`,type:"read-protocol",position:{x:ge+ee*70,y:148},data:{index:ee,interface:I,label:he},draggable:!1,parentNode:`interface__${I}`,extent:"parent"};v.value.push(oe)})}for(const I in E){let P=_.routerDetails[I].write_protocols||[],j=_.routerDetails[I].read_protocols||[];const A=Math.max(P.length,j.length,1),z=Math.max(200,80+A*70);z>O&&(O=z);const R=200,W={id:`router__${I}`,type:"router",position:{x:400,y:(R+50)*T},data:{label:I,width:z,height:R},draggable:!0};v.value.push(W),T+=1;const ge=50;P.forEach((se,ee)=>{let he=se.name;se.name.slice(-8)==="Protocol"&&(he=se.name.slice(0,-8));const oe={id:`write-protocol__router__${I}__${ee}`,type:"write-protocol",position:{x:ge+ee*70,y:98},data:{index:ee,router:I,label:he},draggable:!1,parentNode:`router__${I}`,extent:"parent"};v.value.push(oe)}),j.forEach((se,ee)=>{let he=se.name;se.name.slice(-8)==="Protocol"&&(he=se.name.slice(0,-8));const oe={id:`read-protocol__router__${I}__${ee}`,type:"read-protocol",position:{x:ge+ee*70,y:148},data:{index:ee,router:I,label:he},draggable:!1,parentNode:`router__${I}`,extent:"parent"};v.value.push(oe)})}p.forEach((I,P)=>{let j,A;j=400+O+200,A=P*250;const z={id:`target__${I}`,type:"target",position:{x:j,y:A},data:{label:I},draggable:!0};v.value.push(z)});const B=new Set(v.value.map(I=>I.id));C.size===0||C.size!==B.size||[...B].some(I=>!C.has(I))||[...C].some(I=>!B.has(I))?(M=!0,S=!0):M||(v.value=v.value.map(I=>{const P=b.get(I.id);return P?{...I,position:P}:I}),V&&Oe(()=>{d(V)}))}return _e(()=>_.interfaceDetails,async()=>{_.interfaceDetails!==null&&q()},{immediate:!0}),_e(()=>_.routerDetails,async()=>{_.routerDetails!==null&&q()},{immediate:!0}),(C,b)=>{const V=Se("v-icon"),p=Se("v-dialog");return Q(),ce("div",_v,[v.value.length>0?(Q(),Ie(K(Of),{key:0,nodes:v.value,edges:y.value,"max-zoom":4,"min-zoom":.01,class:"vue-flow-container","elevate-edges-on-select":"","apply-default":!1,onNodeClick:ae},{"node-interface":me(({data:D})=>[ie(xh,{data:D},null,8,["data"])]),"node-router":me(({data:D})=>[ie(kh,{data:D},null,8,["data"])]),"node-target":me(({data:D})=>[ie(Ah,{data:D},null,8,["data"])]),"node-cosmos":me(D=>[ie(Dh,sr(lr(D)),null,16)]),"node-write-protocol":me(({data:D})=>[ie(Lh,{data:D},null,8,["data"])]),"node-read-protocol":me(({data:D})=>[ie(Uh,{data:D},null,8,["data"])]),default:me(()=>[ie(K(fh),{"pattern-color":"#aaa",gap:16}),ue("div",yv,[ue("a",wv,[ie(V,{size:"small",class:"mr-1"},{default:me(()=>[...b[3]||(b[3]=[Re("mdi-file-document-outline",-1)])]),_:1}),b[4]||(b[4]=Re(" Docs ",-1))])]),ie(K(ah),null,{default:me(()=>[ie(K(on),{title:"Reset",onClick:b[0]||(b[0]=D=>w("LR",!0))},{default:me(()=>[...b[5]||(b[5]=[ue("svg",{width:"16",height:"16",viewBox:"0 0 32 32"},[ue("path",{d:"M18 28A12 12 0 1 0 6 16v6.2l-3.6-3.6L1 20l6 6l6-6l-1.4-1.4L8 22.2V16a10 10 0 1 1 10 10Z"})],-1)])]),_:1})]),_:1})]),_:1},8,["nodes","edges"])):(Q(),ce("div",bv,[ie(V,{size:"large",color:"grey"},{default:me(()=>[...b[6]||(b[6]=[Re("mdi-lan-disconnect",-1)])]),_:1}),b[7]||(b[7]=ue("div",{class:"text-grey mt-2"},"Nothing to show",-1))])),ie(p,{modelValue:k.value,"onUpdate:modelValue":b[2]||(b[2]=D=>k.value=D),"max-width":"80vw","max-height":"80vh"},{default:me(()=>[ie(_h,{mode:H.value,details:Y.value,"read-protocol-index":F.value,"write-protocol-index":X.value,onClose:b[1]||(b[1]=D=>k.value=!1)},null,8,["mode","details","read-protocol-index","write-protocol-index"])]),_:1},8,["modelValue"])])}}})})}}));