openc3-cosmos-tool-cmdtlmserver 6.8.0 → 6.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. checksums.yaml +4 -4
  2. data/tools/cmdtlmserver/ArrayWidget-DLfNWDzN-1e8a3face2ed377ee14b.js +2 -0
  3. data/tools/cmdtlmserver/ArrayplotWidget-CoRsUxHG-9354353a435dca29d91b.js +1 -0
  4. data/tools/cmdtlmserver/BarColumn-DHP-zQ4R-13ea24b96ea1a8d35a6a.js +1 -0
  5. data/tools/cmdtlmserver/BlockWidget-BmHSFvOq-9bcd30fb55af2e9adfcc.js +2 -0
  6. data/tools/cmdtlmserver/ButtonWidget-C3ZWRjZZ-a09343e371e16d86fb23.js +2 -0
  7. data/tools/cmdtlmserver/CanvasWidget-CL-XzPF4-fa3331797f3605b54876.js +1 -0
  8. data/tools/cmdtlmserver/CanvasdotWidget-D8Y9DgVE-202754fdc6e1f8bc69b8.js +1 -0
  9. data/tools/cmdtlmserver/CanvasimageWidget-DHSGK_tD-706d31ac92632aa26d40.js +1 -0
  10. data/tools/cmdtlmserver/CanvasimagevalueWidget-Btt_fQfC-6211eb7aa7d153f644a5.js +1 -0
  11. data/tools/cmdtlmserver/CanvaslabelWidget-BF_8RTjv-ec3af661f0fe151ab181.js +1 -0
  12. data/tools/cmdtlmserver/CanvaslabelvalueWidget-scbwaujI-6f6e59336806beadc6d3.js +1 -0
  13. data/tools/cmdtlmserver/CanvaslineWidget-gRvm_-TT-6d1e9b263ef79c1b1647.js +1 -0
  14. data/tools/cmdtlmserver/CanvaslinevalueWidget-CljziRek-4250356d341ec24d29f4.js +1 -0
  15. data/tools/cmdtlmserver/CheckbuttonWidget-BOabI_jE-e4387e7d27cd938ef89b.js +1 -0
  16. data/tools/cmdtlmserver/CmdPacketsTab-7e20541da3036a84b375.js +1 -0
  17. data/tools/cmdtlmserver/CmdTlmServer-7b54c774fee5033c13bd.js +2 -0
  18. data/tools/cmdtlmserver/ComboboxWidget-BLXNYFiY-d5fd5406c480881fb5d4.js +1 -0
  19. data/tools/cmdtlmserver/DataFlowsTab-368d1fdb4209d66844af.js +1 -0
  20. data/tools/cmdtlmserver/DateWidget-BTqLCtLS-202c9085c8a667b42627.js +1 -0
  21. data/tools/cmdtlmserver/DetailsDialog-BNCS3QAe-2191292a9b1ab8d8ae75.js +1 -0
  22. data/tools/cmdtlmserver/DynamicWidget-CfMtj7H8-3e0eec47273fa4c63aee.js +1 -0
  23. data/tools/cmdtlmserver/FormatvalueWidget-CLYx8qbg-2913871219c14842cecb.js +1 -0
  24. data/tools/cmdtlmserver/Graph-BliBYJxD-bb80bc8984750d2f31de.js +1 -0
  25. data/tools/cmdtlmserver/GraphWidget-Cb6Ozf54-52583b1f0ff33268742b.js +1 -0
  26. data/tools/cmdtlmserver/HorizontalWidget-AY2M01qP-c726ad4d7b9989195780.js +1 -0
  27. data/tools/cmdtlmserver/HorizontalboxWidget-2MEKvq_C-caebeb4bc79733504840.js +1 -0
  28. data/tools/cmdtlmserver/HorizontallineWidget-DgpOPA7q-3e3c6a88bc67fe5f390c.js +1 -0
  29. data/tools/cmdtlmserver/IframeWidget-UKKUl7k5-58809376594a655a5f2a.js +1 -0
  30. data/tools/cmdtlmserver/ImageLoader-C-CIL4YD-bc35b32770c8a5c44e5e.js +1 -0
  31. data/tools/cmdtlmserver/ImageviewerWidget-DhuQH5Io-78d2c2dd21a053a89c51.js +1 -0
  32. data/tools/cmdtlmserver/InterfaceFlowChart-5d2b3bb2659991d3b6a7.js +27 -0
  33. data/tools/cmdtlmserver/InterfacesTab-3009a17e96e92ac1e70a.js +1 -0
  34. data/tools/cmdtlmserver/LabelWidget-SO9zqcNN-a13de181566f05837b14.js +1 -0
  35. data/tools/cmdtlmserver/LabelledWidget-DWoM5AJ5-ec761858f941c15ff604.js +1 -0
  36. data/tools/cmdtlmserver/LabelprogressbarWidget-D3vnkvQZ-af0accd1118f3923a9a3.js +1 -0
  37. data/tools/cmdtlmserver/LabelsparklineWidget-DO0T-Jot-ecf847a6e96a08b254ab.js +1 -0
  38. data/tools/cmdtlmserver/LabelvalueWidget-B6BbNFnk-3d45d1e6db6b2f8d29a5.js +1 -0
  39. data/tools/cmdtlmserver/LabelvaluedescWidget-CxfL-H9C-3a42edd68921e90d31ca.js +1 -0
  40. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-BT5k9mHv-52975b7494653d8c515f.js +1 -0
  41. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-DUbmxh4p-f295e97e30657fccc248.js +1 -0
  42. data/tools/cmdtlmserver/LabelvaluerangebarWidget-DexAc2UB-f151f5b53d9d4b184b06.js +1 -0
  43. data/tools/cmdtlmserver/Layout-Dd6dRf3R-ef7bd13b7ea3d133ccb0.js +1 -0
  44. data/tools/cmdtlmserver/LedWidget-D1RwHb_V-260ff4715a4a88a41508.js +1 -0
  45. data/tools/cmdtlmserver/LimitsbarWidget-ClOmoV50-48e5673dec9cb6e22731.js +1 -0
  46. data/tools/cmdtlmserver/LimitscolorWidget-CBUoEYKp-41ffd9d133666ed0f970.js +1 -0
  47. data/tools/cmdtlmserver/LimitscolumnWidget-hsHkmY-_-a3f6218974e5498090eb.js +1 -0
  48. data/tools/cmdtlmserver/LinegraphWidget-CXrKtxOo-be6c9cdfe9742e8d3bbc.js +1 -0
  49. data/tools/cmdtlmserver/MatrixbycolumnsWidget-CsogVU9c-8bc60a5aed8d3cabf27c.js +1 -0
  50. data/tools/cmdtlmserver/ProgressbarWidget-CO6CEkxP-4f04f42e3b29e4f6badf.js +1 -0
  51. data/tools/cmdtlmserver/RadiobuttonWidget-DrxUclws-e53a8ceae55c8d39b1bc.js +1 -0
  52. data/tools/cmdtlmserver/RadiogroupWidget-DN9C38cg-d3e2cee52f161e968cda.js +1 -0
  53. data/tools/cmdtlmserver/RangebarWidget-5uQTfLMP-3dc94e1929eab734826a.js +1 -0
  54. data/tools/cmdtlmserver/RawBuffer-5d94750d4746b711f55b.js +6 -0
  55. data/tools/cmdtlmserver/RawDialog-772a1282457ac36fd7a8.js +5 -0
  56. data/tools/cmdtlmserver/RollupWidget-B0DCULnu-75370b4e7a1f88bdc783.js +1 -0
  57. data/tools/cmdtlmserver/RoutersTab-2e3fa3d19fb8969dfab5.js +1 -0
  58. data/tools/cmdtlmserver/ScrollwindowWidget-BOkZQgtf-5862d90a0a854f7253c4.js +1 -0
  59. data/tools/cmdtlmserver/SignalWidget-Cis0Xkea-6a51ce3da68ffd3d9ac5.js +1 -0
  60. data/tools/cmdtlmserver/SpacerWidget-CLcqC2Qk-81d85af00986f3f5b056.js +1 -0
  61. data/tools/cmdtlmserver/SparklineWidget-CTp83eZ--bfbe9dc264b948bfeccf.js +1 -0
  62. data/tools/cmdtlmserver/StatusTab-37f142b5a919a517b454.js +1 -0
  63. data/tools/cmdtlmserver/TabbookWidget-uucd-zsX-f9571b1707f3d2313c74.js +1 -0
  64. data/tools/cmdtlmserver/TargetsTab-31817182dd194fae103f.js +1 -0
  65. data/tools/cmdtlmserver/TextboxWidget-C2n38ti5-70eef7e9cc17f76c4b45.js +1 -0
  66. data/tools/cmdtlmserver/TextfieldWidget--HTv9ddk-4f61e63b99bb27d3d0f9.js +1 -0
  67. data/tools/cmdtlmserver/TimeWidget-CPNVZaUM-84e9c1d910942f7918cb.js +1 -0
  68. data/tools/cmdtlmserver/TitleWidget-Cp0cb6V8-26da1f1345ebd0e2d8d2.js +1 -0
  69. data/tools/cmdtlmserver/TlmPacketsTab-8ab3463162d1614ac633.js +1 -0
  70. data/tools/cmdtlmserver/Updater-837ca86e536f4a3bdfa3.js +1 -0
  71. data/tools/cmdtlmserver/VWidget-DQGJRgAk-db0f8060669e1acf20ea.js +1 -0
  72. data/tools/cmdtlmserver/ValueWidget-Bk1RFjks-404325b51d8960d194ea.js +1 -0
  73. data/tools/cmdtlmserver/ValuelimitsbarWidget-C0HIBYh2-b127b268f152554e33fc.js +1 -0
  74. data/tools/cmdtlmserver/ValuelimitscolumnWidget-BTT90uyX-1d351782a10b310813e7.js +1 -0
  75. data/tools/cmdtlmserver/ValuerangebarWidget-CcQw_XK9-4bfb89b00ab2e5f9864a.js +1 -0
  76. data/tools/cmdtlmserver/VerticalWidget-CNtFQv3R-7c9384e32e2a84bdb6a3.js +1 -0
  77. data/tools/cmdtlmserver/VerticalboxWidget-Yxmz1SnU-f6d8fdccf06693ea3492.js +1 -0
  78. data/tools/cmdtlmserver/Widget-LsyjS7ZS-7441069f38e76756cf77.js +1 -0
  79. data/tools/cmdtlmserver/main-f371259352e08317c745.js +1505 -0
  80. data/tools/cmdtlmserver/main.js +1 -1
  81. data/tools/cmdtlmserver/services-eb1403f6c88517815ca2.js +7 -0
  82. metadata +81 -78
  83. data/tools/cmdtlmserver/ArrayWidget-j3ncPuPx-aa449c34e8f2de77f02d.js +0 -2
  84. data/tools/cmdtlmserver/ArrayplotWidget-DuLaiGa9-77c1fd4a0e82123f179c.js +0 -1
  85. data/tools/cmdtlmserver/BarColumn-BWJ0Dd4O-9580bca73f301a5631b0.js +0 -1
  86. data/tools/cmdtlmserver/BlockWidget-Bf5Dd6Cr-2ff4d8de685d2f1a246d.js +0 -2
  87. data/tools/cmdtlmserver/ButtonWidget-bl_mGFYh-23c6822c774698262466.js +0 -2
  88. data/tools/cmdtlmserver/CanvasWidget-boDemgx1-5f50b097b6549e169840.js +0 -1
  89. data/tools/cmdtlmserver/CanvasdotWidget-BZBbJcER-e2edd0c4fcd86c333a44.js +0 -1
  90. data/tools/cmdtlmserver/CanvasimageWidget-6ywvT5jd-a799aa1aa433d6d88beb.js +0 -1
  91. data/tools/cmdtlmserver/CanvasimagevalueWidget-DjWrA3gX-230ce31ddbb0bafff228.js +0 -1
  92. data/tools/cmdtlmserver/CanvaslabelWidget-Bq4V2BQh-67022f223ae243ebffca.js +0 -1
  93. data/tools/cmdtlmserver/CanvaslabelvalueWidget-C8oNcFLi-13dedf0d20f2441be1d8.js +0 -1
  94. data/tools/cmdtlmserver/CanvaslineWidget-nvbL2GoL-765e7124b8b7548dfe0a.js +0 -1
  95. data/tools/cmdtlmserver/CanvaslinevalueWidget-ZACQedKx-9552fa7149a798613862.js +0 -1
  96. data/tools/cmdtlmserver/CheckbuttonWidget-B82UE8AB-df0b5614bec6e1ccf335.js +0 -1
  97. data/tools/cmdtlmserver/CmdPacketsTab-7b1570af54437af5c0de.js +0 -1
  98. data/tools/cmdtlmserver/CmdTlmServer-5815c31ab60371d94b85.js +0 -2
  99. data/tools/cmdtlmserver/ComboboxWidget-4OFiSkI6-7afa4829a51f955a8209.js +0 -1
  100. data/tools/cmdtlmserver/DateWidget-BmwtdirF-bd6b72378049852005fe.js +0 -1
  101. data/tools/cmdtlmserver/DetailsDialog-CLKEfU0s-938c98477d00508b53db.js +0 -1
  102. data/tools/cmdtlmserver/DynamicWidget-CfMtj7H8-c96aa4c168ed11bcf844.js +0 -1
  103. data/tools/cmdtlmserver/FormatvalueWidget-C8exC3bj-8404db1fd5379699b37f.js +0 -1
  104. data/tools/cmdtlmserver/Graph-CWcrowaT-3e0edfd3dff3bc7fa765.js +0 -1
  105. data/tools/cmdtlmserver/GraphWidget-CvzxZYVx-e85f7d45732c92a996bb.js +0 -1
  106. data/tools/cmdtlmserver/HorizontalWidget-Ck151zVw-ba2c7293de57b38ad084.js +0 -1
  107. data/tools/cmdtlmserver/HorizontalboxWidget-D3P-cl9V-8e77ae12037a5cad67c4.js +0 -1
  108. data/tools/cmdtlmserver/HorizontallineWidget-BE1TjPU8-57fb772c196f8ef02c1d.js +0 -1
  109. data/tools/cmdtlmserver/IframeWidget-BgJCgues-7416bfc3527f97b9c518.js +0 -1
  110. data/tools/cmdtlmserver/ImageLoader-CWn-PLOk-5bbb7cf54177471e4a33.js +0 -1
  111. data/tools/cmdtlmserver/ImageviewerWidget-BlhFZD2f-91640482e9e639ceface.js +0 -1
  112. data/tools/cmdtlmserver/InterfacesTab-4bc1d83c4984c90c17de.js +0 -1
  113. data/tools/cmdtlmserver/LabelWidget-Cwosk4x2-8785c02eedc9d37ce9f4.js +0 -1
  114. data/tools/cmdtlmserver/LabelledWidget-Dl6rAFTQ-ffff6c8bc54996ff009b.js +0 -1
  115. data/tools/cmdtlmserver/LabelprogressbarWidget-MuAKesOz-19ab339878f12d356862.js +0 -1
  116. data/tools/cmdtlmserver/LabelsparklineWidget-6LA6Ox3d-bcc296ae7aac37883cba.js +0 -1
  117. data/tools/cmdtlmserver/LabelvalueWidget-BxAXx-Tf-2957105bfd285293b1ff.js +0 -1
  118. data/tools/cmdtlmserver/LabelvaluedescWidget-Dwwlnd1g-977a71583eb59f6ca41e.js +0 -1
  119. data/tools/cmdtlmserver/LabelvaluelimitsbarWidget-Dv8Qk8kK-85033266a3796669f49a.js +0 -1
  120. data/tools/cmdtlmserver/LabelvaluelimitscolumnWidget-D-_gl6fq-fa9848f7143e5417a6e3.js +0 -1
  121. data/tools/cmdtlmserver/LabelvaluerangebarWidget-B3MKT-3Y-1d904e7150106be3691c.js +0 -1
  122. data/tools/cmdtlmserver/Layout-Bkb6VP3e-fc96ab10903fbd87a380.js +0 -1
  123. data/tools/cmdtlmserver/LedWidget-DOuDD8LI-694fd994c9de77da0b0e.js +0 -1
  124. data/tools/cmdtlmserver/LimitsbarWidget-D1U6SvVL-405a5d80bc0d24a6ea9c.js +0 -1
  125. data/tools/cmdtlmserver/LimitscolorWidget-iSMGusqt-305f9af8f2126d808257.js +0 -1
  126. data/tools/cmdtlmserver/LimitscolumnWidget-DjxZTt_r-7884a5f80243d71a9d93.js +0 -1
  127. data/tools/cmdtlmserver/LinegraphWidget-BHKU6zlT-b11846e1d296fe9e737a.js +0 -1
  128. data/tools/cmdtlmserver/MatrixbycolumnsWidget-BKO-A2QD-b4a979b9575a554a8094.js +0 -1
  129. data/tools/cmdtlmserver/ProgressbarWidget-fbr2qu_N-6859373386d079792a35.js +0 -1
  130. data/tools/cmdtlmserver/RadiobuttonWidget-DL08zcQT-5efcd58f0a02450b7a37.js +0 -1
  131. data/tools/cmdtlmserver/RadiogroupWidget-DW9Xpj3c-d1707fe4a2c00fae25f9.js +0 -1
  132. data/tools/cmdtlmserver/RangebarWidget-o9q55kjc-7aabb41ecc4ae9037d47.js +0 -1
  133. data/tools/cmdtlmserver/RawDialog-e4e3df8a8847d8b9c7a8.js +0 -11
  134. data/tools/cmdtlmserver/RollupWidget-BHnjj-DF-c74742451d37d9e097bd.js +0 -1
  135. data/tools/cmdtlmserver/RoutersTab-2b7966868bec8fc126c1.js +0 -1
  136. data/tools/cmdtlmserver/ScrollwindowWidget-D-QVwztC-f20ac6f14a07bf25d9fc.js +0 -1
  137. data/tools/cmdtlmserver/SignalWidget-CsWuufdx-b3ad1e932e523a328af2.js +0 -1
  138. data/tools/cmdtlmserver/SpacerWidget-Di9-qunj-f0576375735204748b60.js +0 -1
  139. data/tools/cmdtlmserver/SparklineWidget-B6-zhdPW-f446460528d6a77569f4.js +0 -1
  140. data/tools/cmdtlmserver/StatusTab-ae0b2c5be6cbf46600a1.js +0 -1
  141. data/tools/cmdtlmserver/TabbookWidget-B1E1_mzA-271da99223fd0fe54877.js +0 -1
  142. data/tools/cmdtlmserver/TargetsTab-d3f565722ca5bc06951c.js +0 -1
  143. data/tools/cmdtlmserver/TextboxWidget-CBVEXPw_-e3310a030edd4860e1c6.js +0 -1
  144. data/tools/cmdtlmserver/TextfieldWidget-DZMHrtQa-5edfedfbe5434ac47fce.js +0 -1
  145. data/tools/cmdtlmserver/TimeWidget-K4MNmJ7J-e360ab888129cd54fdc0.js +0 -1
  146. data/tools/cmdtlmserver/TitleWidget-8IcwweFE-d7457335c820d6d08fce.js +0 -1
  147. data/tools/cmdtlmserver/TlmPacketsTab-f323eb4d9a40e8bf8fca.js +0 -1
  148. data/tools/cmdtlmserver/Updater-e55ffb83364e21986b8c.js +0 -1
  149. data/tools/cmdtlmserver/VWidget-CoIgX3hM-ccd82edbac10fbc930dc.js +0 -1
  150. data/tools/cmdtlmserver/ValueWidget-BvT1ASar-7d9cbd5e4e5c5145fb91.js +0 -1
  151. data/tools/cmdtlmserver/ValuelimitsbarWidget-C5lBnUmB-bfe696226d34e3ce4e48.js +0 -1
  152. data/tools/cmdtlmserver/ValuelimitscolumnWidget-DHYI0WBL-22923915e43f24541699.js +0 -1
  153. data/tools/cmdtlmserver/ValuerangebarWidget-BSszZhlE-e0a9426f1670a3078848.js +0 -1
  154. data/tools/cmdtlmserver/VerticalWidget-1GhgYrC3-3c064edb22edbb46dba2.js +0 -1
  155. data/tools/cmdtlmserver/VerticalboxWidget-DYHJqEzd-d0896602a919174a6de6.js +0 -1
  156. data/tools/cmdtlmserver/Widget-B8t93Oid-23f19040e8371d60c6e8.js +0 -1
  157. data/tools/cmdtlmserver/main-27739428341b2d2dc265.js +0 -1504
  158. data/tools/cmdtlmserver/services-7ff9a5fbdaf6fa0de1b3.js +0 -7
@@ -0,0 +1,27 @@
1
+ var xv=Object.defineProperty;var Ev=(ft,ot,_e)=>ot in ft?xv(ft,ot,{enumerable:!0,configurable:!0,writable:!0,value:_e}):ft[ot]=_e;var Me=(ft,ot,_e)=>Ev(ft,typeof ot!="symbol"?ot+"":ot,_e);System.register(["vue","./Updater-837ca86e536f4a3bdfa3.js","./RawBuffer-5d94750d4746b711f55b.js","./main-f371259352e08317c745.js","./services-eb1403f6c88517815ca2.js"],function(ft,ot){"use strict";var _e,Ln,rt,Hn,ye,ht,Sr,kr,de,oe,Z,se,ke,ge,ue,Cr,Ee,me,fe,Ke,pt,vt,$r,Tt,Ae,Ir,Pt,Ve,tn,ze,Fn,De,Mr,Oe,Pe,nn,Dr,Or,pe,Se,we,Tr,Gn,gt,Ye,At,Pr,Ar,Rr,zr,Br,it,Vr;return{setters:[re=>{_e=re.defineComponent,Ln=re.getCurrentScope,rt=re.inject,Hn=re.effectScope,ye=re.watch,ht=re.provide,Sr=re.useSlots,kr=re.onUnmounted,de=re.createElementBlock,oe=re.openBlock,Z=re.unref,se=re.createVNode,ke=re.renderSlot,ge=re.withCtx,ue=re.createElementVNode,Cr=re.createPropsRestProxy,Ee=re.toRef,me=re.ref,fe=re.computed,Ke=re.onMounted,pt=re.normalizeClass,vt=re.getCurrentInstance,$r=re.reactive,Tt=re.onScopeDispose,Ae=re.nextTick,Ir=re.onBeforeMount,Pt=re.shallowRef,Ve=re.Fragment,tn=re.renderList,ze=re.normalizeStyle,Fn=re.onBeforeUnmount,De=re.createCommentVNode,Mr=re.isMemoSame,Oe=re.createBlock,Pe=re.toDisplayString,nn=re.isRef,Dr=re.toRefs,Or=re.customRef,pe=re.toValue,Se=re.resolveComponent,we=re.h,Tr=re.useAttrs,Gn=re.mergeProps,gt=re.resolveDynamicComponent,Ye=re.createTextVNode,At=re.markRaw,Pr=re.readonly,Ar=re.normalizeProps,Rr=re.guardReactiveProps},re=>{zr=re.U},re=>{Br=re.R},re=>{it=re._},re=>{Vr=re.g}],execute:function(){var re=document.createElement("style");re.textContent=`.details-table[data-v-0b4171c8]{width:100%;overflow-x:hidden;overflow-y:hidden}.interface-node[data-v-a31e429f]{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-a31e429f]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.router-node[data-v-75db5a9b]{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-75db5a9b]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.cosmos-node[data-v-d2155b1f]{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-d2155b1f]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.target-node[data-v-b38bbebb]{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-b38bbebb]{font-weight:500;margin:4px 0;font-size:14px;color:#1f2937}.write-protocol-node[data-v-301d4de9]{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-301d4de9]{font-weight:500;font-size:10px;margin:2px 0;color:#374151}.read-protocol-node[data-v-d8220607]{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-d8220607]{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-default,.vue-flow__node-input,.vue-flow__node-output{border-width:1px;border-style:solid;border-color:#bbb}.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{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 .vue-flow__handle,.vue-flow__node-input .vue-flow__handle,.vue-flow__node-output .vue-flow__handle{background:var(--vf-handle)}.vue-flow__node-default.selectable:hover,.vue-flow__node-input.selectable:hover,.vue-flow__node-output.selectable:hover{box-shadow:0 1px 4px 1px #00000014}.vue-flow__node-input{--vf-node-color: var(--vf-node-color, #0041d0);--vf-handle: var(--vf-node-color, #0041d0);--vf-box-shadow: var(--vf-node-color, #0041d0);background:var(--vf-node-bg);border-color:var(--vf-node-color, #0041d0)}.vue-flow__node-input.selected,.vue-flow__node-input:focus,.vue-flow__node-input:focus-visible{outline:none;border:1px solid var(--vf-node-color, #0041d0)}.vue-flow__node-default{--vf-handle: var(--vf-node-color, #1a192b);--vf-box-shadow: var(--vf-node-color, #1a192b);background:var(--vf-node-bg);border-color:var(--vf-node-color, #1a192b)}.vue-flow__node-default.selected,.vue-flow__node-default:focus,.vue-flow__node-default:focus-visible{outline:none;border:1px solid var(--vf-node-color, #1a192b)}.vue-flow__node-output{--vf-handle: var(--vf-node-color, #ff0072);--vf-box-shadow: var(--vf-node-color, #ff0072);background:var(--vf-node-bg);border-color:var(--vf-node-color, #ff0072)}.vue-flow__node-output.selected,.vue-flow__node-output:focus,.vue-flow__node-output:focus-visible{outline:none;border:1px solid var(--vf-node-color, #ff0072)}.vue-flow__nodesselection-rect,.vue-flow__selection{background:#0059dc14;border:1px dotted rgba(0,89,220,.8)}.vue-flow__nodesselection-rect:focus,.vue-flow__nodesselection-rect:focus-visible,.vue-flow__selection:focus,.vue-flow__selection:focus-visible{outline:none}.vue-flow__handle{width:6px;height:6px;background:var(--vf-handle);border:1px solid #fff;border-radius:100%}.interface-flow-chart{height:100%;width:100%}.vue-flow-container{height:100%;width:100%;background-color:#172635;border-radius:4px}.empty-state{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;color:#6b7280}.vue-flow__handle{height:24px;width:10px;background:#aaa;border-radius:4px}.vue-flow__node{background-color:#172635}.vue-flow__edges path{stroke-width:2}
2
+ /*$vite$:1*/`,document.head.appendChild(re);function Rt(e){return Ln()?(Tt(e),!0):!1}function Qe(e){return typeof e=="function"?e():Z(e)}const Rs=typeof window<"u"&&typeof document<"u",zs=e=>typeof e<"u",Bs=Object.prototype.toString,Vs=e=>Bs.call(e)==="[object Object]",Ls=()=>{};function Hs(e,t){function n(...r){return new Promise((o,a)=>{Promise.resolve(e(()=>t.apply(this,r),{fn:t,thisArg:this,args:r})).then(o).catch(a)})}return n}const Lr=e=>e();function Fs(e=Lr){const t=me(!0);function n(){t.value=!1}function r(){t.value=!0}const o=(...a)=>{t.value&&e(...a)};return{isActive:Pr(t),pause:n,resume:r,eventFilter:o}}function Hr(e,t=!1,n="Timeout"){return new Promise((r,o)=>{setTimeout(t?()=>o(n):r,e)})}function Gs(e,t,n={}){const{eventFilter:r=Lr,...o}=n;return ye(e,Hs(r,t),o)}function St(e,t,n={}){const{eventFilter:r,...o}=n,{eventFilter:a,pause:i,resume:s,isActive:l}=Fs(r);return{stop:Gs(e,t,{...o,eventFilter:a}),pause:i,resume:s,isActive:l}}function Ys(e,t={}){if(!nn(e))return Dr(e);const n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(const r in e.value)n[r]=Or(()=>({get(){return e.value[r]},set(o){var a;if((a=Qe(t.replaceRef))!=null?a:!0)if(Array.isArray(e.value)){const s=[...e.value];s[r]=o,e.value=s}else{const s={...e.value,[r]:o};Object.setPrototypeOf(s,Object.getPrototypeOf(e.value)),e.value=s}else e.value[r]=o}}));return n}function Yn(e,t=!1){function n(d,{flush:f="sync",deep:h=!1,timeout:m,throwOnTimeout:b}={}){let g=null;const y=[new Promise(v=>{g=ye(e,x=>{d(x)!==t&&(g==null||g(),v(x))},{flush:f,deep:h,immediate:!0})})];return m!=null&&y.push(Hr(m,b).then(()=>Qe(e)).finally(()=>g==null?void 0:g())),Promise.race(y)}function r(d,f){if(!nn(d))return n(x=>x===d,f);const{flush:h="sync",deep:m=!1,timeout:b,throwOnTimeout:g}=f??{};let E=null;const v=[new Promise(x=>{E=ye([e,d],([z,B])=>{t!==(z===B)&&(E==null||E(),x(z))},{flush:h,deep:m,immediate:!0})})];return b!=null&&v.push(Hr(b,g).then(()=>Qe(e)).finally(()=>(E==null||E(),Qe(e)))),Promise.race(v)}function o(d){return n(f=>!!f,d)}function a(d){return r(null,d)}function i(d){return r(void 0,d)}function s(d){return n(Number.isNaN,d)}function l(d,f){return n(h=>{const m=Array.from(h);return m.includes(d)||m.includes(Qe(d))},f)}function c(d){return u(1,d)}function u(d=1,f){let h=-1;return n(()=>(h+=1,h>=d),f)}return Array.isArray(Qe(e))?{toMatch:n,toContains:l,changed:c,changedTimes:u,get not(){return Yn(e,!t)}}:{toMatch:n,toBe:r,toBeTruthy:o,toBeNull:a,toBeNaN:s,toBeUndefined:i,changed:c,changedTimes:u,get not(){return Yn(e,!t)}}}function qn(e){return Yn(e)}function qs(e){var t;const n=Qe(e);return(t=n==null?void 0:n.$el)!=null?t:n}const Fr=Rs?window:void 0;function Gr(...e){let t,n,r,o;if(typeof e[0]=="string"||Array.isArray(e[0])?([n,r,o]=e,t=Fr):[t,n,r,o]=e,!t)return Ls;Array.isArray(n)||(n=[n]),Array.isArray(r)||(r=[r]);const a=[],i=()=>{a.forEach(u=>u()),a.length=0},s=(u,d,f,h)=>(u.addEventListener(d,f,h),()=>u.removeEventListener(d,f,h)),l=ye(()=>[qs(t),Qe(o)],([u,d])=>{if(i(),!u)return;const f=Vs(d)?{...d}:d;a.push(...n.flatMap(h=>r.map(m=>s(u,h,m,f))))},{immediate:!0,flush:"post"}),c=()=>{l(),i()};return Rt(c),c}function js(e){return typeof e=="function"?e:typeof e=="string"?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Yr(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]=="object"?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);const{target:o=Fr,eventName:a="keydown",passive:i=!1,dedupe:s=!1}=r,l=js(t);return Gr(o,a,u=>{u.repeat&&Qe(s)||l(u)&&n(u)},i)}function Ws(e){return JSON.parse(JSON.stringify(e))}function jn(e,t,n,r={}){var o,a,i;const{clone:s=!1,passive:l=!1,eventName:c,deep:u=!1,defaultValue:d,shouldEmit:f}=r,h=vt(),m=n||(h==null?void 0:h.emit)||((o=h==null?void 0:h.$emit)==null?void 0:o.bind(h))||((i=(a=h==null?void 0:h.proxy)==null?void 0:a.$emit)==null?void 0:i.bind(h==null?void 0:h.proxy));let b=c;t||(t="modelValue"),b=b||`update:${t.toString()}`;const g=v=>s?typeof s=="function"?s(v):Ws(v):v,E=()=>zs(e[t])?g(e[t]):d,y=v=>{f?f(v)&&m(b,v):m(b,v)};if(l){const v=E(),x=me(v);let z=!1;return ye(()=>e[t],B=>{z||(z=!0,x.value=g(B),Ae(()=>z=!1))}),ye(x,B=>{!z&&(B!==e[t]||u)&&y(B)},{deep:u}),x}else return fe({get(){return E()},set(v){y(v)}})}var Xs={value:()=>{}};function on(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new rn(n)}function rn(e){this._=e}function Us(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}rn.prototype=on.prototype={constructor:rn,on:function(e,t){var n=this._,r=Us(e+"",n),o,a=-1,i=r.length;if(arguments.length<2){for(;++a<i;)if((o=(e=r[a]).type)&&(o=Zs(n[o],e.name)))return o;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<i;)if(o=(e=r[a]).type)n[o]=qr(n[o],e.name,t);else if(t==null)for(o in n)n[o]=qr(n[o],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new rn(e)},call:function(e,t){if((o=arguments.length-2)>0)for(var n=new Array(o),r=0,o,a;r<o;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,o=a.length;r<o;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,a=r.length;o<a;++o)r[o].value.apply(t,n)}};function Zs(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function qr(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Xs,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Wn="http://www.w3.org/1999/xhtml";const jr={svg:"http://www.w3.org/2000/svg",xhtml:Wn,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function an(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),jr.hasOwnProperty(t)?{space:jr[t],local:e}:e}function Ks(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Wn&&t.documentElement.namespaceURI===Wn?t.createElement(e):t.createElementNS(n,e)}}function Qs(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Wr(e){var t=an(e);return(t.local?Qs:Ks)(t)}function Js(){}function Xn(e){return e==null?Js:function(){return this.querySelector(e)}}function el(e){typeof e!="function"&&(e=Xn(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=new Array(i),l,c,u=0;u<i;++u)(l=a[u])&&(c=e.call(l,l.__data__,u,a))&&("__data__"in l&&(c.__data__=l.__data__),s[u]=c);return new Be(r,this._parents)}function tl(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function nl(){return[]}function Xr(e){return e==null?nl:function(){return this.querySelectorAll(e)}}function ol(e){return function(){return tl(e.apply(this,arguments))}}function rl(e){typeof e=="function"?e=ol(e):e=Xr(e);for(var t=this._groups,n=t.length,r=[],o=[],a=0;a<n;++a)for(var i=t[a],s=i.length,l,c=0;c<s;++c)(l=i[c])&&(r.push(e.call(l,l.__data__,c,i)),o.push(l));return new Be(r,o)}function Ur(e){return function(){return this.matches(e)}}function Zr(e){return function(t){return t.matches(e)}}var il=Array.prototype.find;function al(e){return function(){return il.call(this.children,e)}}function sl(){return this.firstElementChild}function ll(e){return this.select(e==null?sl:al(typeof e=="function"?e:Zr(e)))}var ul=Array.prototype.filter;function cl(){return Array.from(this.children)}function dl(e){return function(){return ul.call(this.children,e)}}function fl(e){return this.selectAll(e==null?cl:dl(typeof e=="function"?e:Zr(e)))}function hl(e){typeof e!="function"&&(e=Ur(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=[],l,c=0;c<i;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Be(r,this._parents)}function Kr(e){return new Array(e.length)}function pl(){return new Be(this._enter||this._groups.map(Kr),this._parents)}function sn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}sn.prototype={constructor:sn,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 vl(e){return function(){return e}}function gl(e,t,n,r,o,a){for(var i=0,s,l=t.length,c=a.length;i<c;++i)(s=t[i])?(s.__data__=a[i],r[i]=s):n[i]=new sn(e,a[i]);for(;i<l;++i)(s=t[i])&&(o[i]=s)}function ml(e,t,n,r,o,a,i){var s,l,c=new Map,u=t.length,d=a.length,f=new Array(u),h;for(s=0;s<u;++s)(l=t[s])&&(f[s]=h=i.call(l,l.__data__,s,t)+"",c.has(h)?o[s]=l:c.set(h,l));for(s=0;s<d;++s)h=i.call(e,a[s],s,a)+"",(l=c.get(h))?(r[s]=l,l.__data__=a[s],c.delete(h)):n[s]=new sn(e,a[s]);for(s=0;s<u;++s)(l=t[s])&&c.get(f[s])===l&&(o[s]=l)}function _l(e){return e.__data__}function yl(e,t){if(!arguments.length)return Array.from(this,_l);var n=t?ml:gl,r=this._parents,o=this._groups;typeof e!="function"&&(e=vl(e));for(var a=o.length,i=new Array(a),s=new Array(a),l=new Array(a),c=0;c<a;++c){var u=r[c],d=o[c],f=d.length,h=wl(e.call(u,u&&u.__data__,c,r)),m=h.length,b=s[c]=new Array(m),g=i[c]=new Array(m),E=l[c]=new Array(f);n(u,d,b,g,E,h,t);for(var y=0,v=0,x,z;y<m;++y)if(x=b[y]){for(y>=v&&(v=y+1);!(z=g[v])&&++v<m;);x._next=z||null}}return i=new Be(i,r),i._enter=s,i._exit=l,i}function wl(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function bl(){return new Be(this._exit||this._groups.map(Kr),this._parents)}function xl(e,t,n){var r=this.enter(),o=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?a.remove():n(a),r&&o?r.merge(o).order():o}function El(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,a=r.length,i=Math.min(o,a),s=new Array(o),l=0;l<i;++l)for(var c=n[l],u=r[l],d=c.length,f=s[l]=new Array(d),h,m=0;m<d;++m)(h=c[m]||u[m])&&(f[m]=h);for(;l<o;++l)s[l]=n[l];return new Be(s,this._parents)}function Nl(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,a=r[o],i;--o>=0;)(i=r[o])&&(a&&i.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(i,a),a=i);return this}function Sl(e){e||(e=kl);function t(d,f){return d&&f?e(d.__data__,f.__data__):!d-!f}for(var n=this._groups,r=n.length,o=new Array(r),a=0;a<r;++a){for(var i=n[a],s=i.length,l=o[a]=new Array(s),c,u=0;u<s;++u)(c=i[u])&&(l[u]=c);l.sort(t)}return new Be(o,this._parents).order()}function kl(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Cl(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function $l(){return Array.from(this)}function Il(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length;o<a;++o){var i=r[o];if(i)return i}return null}function Ml(){let e=0;for(const t of this)++e;return e}function Dl(){return!this.node()}function Ol(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],a=0,i=o.length,s;a<i;++a)(s=o[a])&&e.call(s,s.__data__,a,o);return this}function Tl(e){return function(){this.removeAttribute(e)}}function Pl(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Al(e,t){return function(){this.setAttribute(e,t)}}function Rl(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function zl(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function Bl(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 Vl(e,t){var n=an(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Pl:Tl:typeof t=="function"?n.local?Bl:zl:n.local?Rl:Al)(n,t))}function Qr(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Ll(e){return function(){this.style.removeProperty(e)}}function Hl(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Fl(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Gl(e,t,n){return arguments.length>1?this.each((t==null?Ll:typeof t=="function"?Fl:Hl)(e,t,n??"")):kt(this.node(),e)}function kt(e,t){return e.style.getPropertyValue(t)||Qr(e).getComputedStyle(e,null).getPropertyValue(t)}function Yl(e){return function(){delete this[e]}}function ql(e,t){return function(){this[e]=t}}function jl(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Wl(e,t){return arguments.length>1?this.each((t==null?Yl:typeof t=="function"?jl:ql)(e,t)):this.node()[e]}function Jr(e){return e.trim().split(/^|\s+/)}function Un(e){return e.classList||new ei(e)}function ei(e){this._node=e,this._names=Jr(e.getAttribute("class")||"")}ei.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 ti(e,t){for(var n=Un(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function ni(e,t){for(var n=Un(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Xl(e){return function(){ti(this,e)}}function Ul(e){return function(){ni(this,e)}}function Zl(e,t){return function(){(t.apply(this,arguments)?ti:ni)(this,e)}}function Kl(e,t){var n=Jr(e+"");if(arguments.length<2){for(var r=Un(this.node()),o=-1,a=n.length;++o<a;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?Zl:t?Xl:Ul)(n,t))}function Ql(){this.textContent=""}function Jl(e){return function(){this.textContent=e}}function eu(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function tu(e){return arguments.length?this.each(e==null?Ql:(typeof e=="function"?eu:Jl)(e)):this.node().textContent}function nu(){this.innerHTML=""}function ou(e){return function(){this.innerHTML=e}}function ru(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function iu(e){return arguments.length?this.each(e==null?nu:(typeof e=="function"?ru:ou)(e)):this.node().innerHTML}function au(){this.nextSibling&&this.parentNode.appendChild(this)}function su(){return this.each(au)}function lu(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function uu(){return this.each(lu)}function cu(e){var t=typeof e=="function"?e:Wr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function du(){return null}function fu(e,t){var n=typeof e=="function"?e:Wr(e),r=t==null?du:typeof t=="function"?t:Xn(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function hu(){var e=this.parentNode;e&&e.removeChild(this)}function pu(){return this.each(hu)}function vu(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gu(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function mu(e){return this.select(e?gu:vu)}function _u(e){return arguments.length?this.property("__data__",e):this.node().__data__}function yu(e){return function(t){e.call(this,t,this.__data__)}}function wu(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function bu(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,a;n<o;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function xu(e,t,n){return function(){var r=this.__on,o,a=yu(t);if(r){for(var i=0,s=r.length;i<s;++i)if((o=r[i]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=a,o.options=n),o.value=t;return}}this.addEventListener(e.type,a,n),o={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(o):this.__on=[o]}}function Eu(e,t,n){var r=wu(e+""),o,a=r.length,i;if(arguments.length<2){var s=this.node().__on;if(s){for(var l=0,c=s.length,u;l<c;++l)for(o=0,u=s[l];o<a;++o)if((i=r[o]).type===u.type&&i.name===u.name)return u.value}return}for(s=t?xu:bu,o=0;o<a;++o)this.each(s(r[o],t,n));return this}function oi(e,t,n){var r=Qr(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function Nu(e,t){return function(){return oi(this,e,t)}}function Su(e,t){return function(){return oi(this,e,t.apply(this,arguments))}}function ku(e,t){return this.each((typeof t=="function"?Su:Nu)(e,t))}function*Cu(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,a=r.length,i;o<a;++o)(i=r[o])&&(yield i)}var ri=[null];function Be(e,t){this._groups=e,this._parents=t}function zt(){return new Be([[document.documentElement]],ri)}function $u(){return this}Be.prototype=zt.prototype={constructor:Be,select:el,selectAll:rl,selectChild:ll,selectChildren:fl,filter:hl,data:yl,enter:pl,exit:bl,join:xl,merge:El,selection:$u,order:Nl,sort:Sl,call:Cl,nodes:$l,node:Il,size:Ml,empty:Dl,each:Ol,attr:Vl,style:Gl,property:Wl,classed:Kl,text:tu,html:iu,raise:su,lower:uu,append:cu,insert:fu,remove:pu,clone:mu,datum:_u,on:Eu,dispatch:ku,[Symbol.iterator]:Cu};function Le(e){return typeof e=="string"?new Be([[document.querySelector(e)]],[document.documentElement]):new Be([[e]],ri)}function Iu(e){let t;for(;t=e.sourceEvent;)e=t;return e}function qe(e,t){if(e=Iu(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}const Mu={passive:!1},Bt={capture:!0,passive:!1};function Zn(e){e.stopImmediatePropagation()}function Ct(e){e.preventDefault(),e.stopImmediatePropagation()}function ii(e){var t=e.document.documentElement,n=Le(e).on("dragstart.drag",Ct,Bt);"onselectstart"in t?n.on("selectstart.drag",Ct,Bt):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function ai(e,t){var n=e.document.documentElement,r=Le(e).on("dragstart.drag",null);t&&(r.on("click.drag",Ct,Bt),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const ln=e=>()=>e;function Kn(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:a,x:i,y:s,dx:l,dy:c,dispatch:u}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:o,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:c,enumerable:!0,configurable:!0},_:{value:u}})}Kn.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Du(e){return!e.ctrlKey&&!e.button}function Ou(){return this.parentNode}function Tu(e,t){return t??{x:e.x,y:e.y}}function Pu(){return navigator.maxTouchPoints||"ontouchstart"in this}function Au(){var e=Du,t=Ou,n=Tu,r=Pu,o={},a=on("start","drag","end"),i=0,s,l,c,u,d=0;function f(x){x.on("mousedown.drag",h).filter(r).on("touchstart.drag",g).on("touchmove.drag",E,Mu).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(x,z){if(!(u||!e.call(this,x,z))){var B=v(this,t.call(this,x,z),x,z,"mouse");B&&(Le(x.view).on("mousemove.drag",m,Bt).on("mouseup.drag",b,Bt),ii(x.view),Zn(x),c=!1,s=x.clientX,l=x.clientY,B("start",x))}}function m(x){if(Ct(x),!c){var z=x.clientX-s,B=x.clientY-l;c=z*z+B*B>d}o.mouse("drag",x)}function b(x){Le(x.view).on("mousemove.drag mouseup.drag",null),ai(x.view,c),Ct(x),o.mouse("end",x)}function g(x,z){if(e.call(this,x,z)){var B=x.changedTouches,$=t.call(this,x,z),w=B.length,I,T;for(I=0;I<w;++I)(T=v(this,$,x,z,B[I].identifier,B[I]))&&(Zn(x),T("start",x,B[I]))}}function E(x){var z=x.changedTouches,B=z.length,$,w;for($=0;$<B;++$)(w=o[z[$].identifier])&&(Ct(x),w("drag",x,z[$]))}function y(x){var z=x.changedTouches,B=z.length,$,w;for(u&&clearTimeout(u),u=setTimeout(function(){u=null},500),$=0;$<B;++$)(w=o[z[$].identifier])&&(Zn(x),w("end",x,z[$]))}function v(x,z,B,$,w,I){var T=a.copy(),k=qe(I||B,z),p,V,_;if((_=n.call(x,new Kn("beforestart",{sourceEvent:B,target:f,identifier:w,active:i,x:k[0],y:k[1],dx:0,dy:0,dispatch:T}),$))!=null)return p=_.x-k[0]||0,V=_.y-k[1]||0,function O(M,L,F){var q=k,Y;switch(M){case"start":o[w]=O,Y=i++;break;case"end":delete o[w],--i;case"drag":k=qe(F||L,z),Y=i;break}T.call(M,x,new Kn(M,{sourceEvent:L,subject:_,target:f,identifier:w,active:Y,x:k[0]+p,y:k[1]+V,dx:k[0]-q[0],dy:k[1]-q[1],dispatch:T}),$)}}return f.filter=function(x){return arguments.length?(e=typeof x=="function"?x:ln(!!x),f):e},f.container=function(x){return arguments.length?(t=typeof x=="function"?x:ln(x),f):t},f.subject=function(x){return arguments.length?(n=typeof x=="function"?x:ln(x),f):n},f.touchable=function(x){return arguments.length?(r=typeof x=="function"?x:ln(!!x),f):r},f.on=function(){var x=a.on.apply(a,arguments);return x===a?f:x},f.clickDistance=function(x){return arguments.length?(d=(x=+x)*x,f):Math.sqrt(d)},f}function Qn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function si(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Vt(){}var Lt=.7,un=1/Lt,$t="\\s*([+-]?\\d+)\\s*",Ht="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",je="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Ru=/^#([0-9a-f]{3,8})$/,zu=new RegExp(`^rgb\\(${$t},${$t},${$t}\\)$`),Bu=new RegExp(`^rgb\\(${je},${je},${je}\\)$`),Vu=new RegExp(`^rgba\\(${$t},${$t},${$t},${Ht}\\)$`),Lu=new RegExp(`^rgba\\(${je},${je},${je},${Ht}\\)$`),Hu=new RegExp(`^hsl\\(${Ht},${je},${je}\\)$`),Fu=new RegExp(`^hsla\\(${Ht},${je},${je},${Ht}\\)$`),li={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Qn(Vt,mt,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ui,formatHex:ui,formatHex8:Gu,formatHsl:Yu,formatRgb:ci,toString:ci});function ui(){return this.rgb().formatHex()}function Gu(){return this.rgb().formatHex8()}function Yu(){return vi(this).formatHsl()}function ci(){return this.rgb().formatRgb()}function mt(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=Ru.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?di(t):n===3?new Re(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?cn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?cn(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=zu.exec(e))?new Re(t[1],t[2],t[3],1):(t=Bu.exec(e))?new Re(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Vu.exec(e))?cn(t[1],t[2],t[3],t[4]):(t=Lu.exec(e))?cn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=Hu.exec(e))?pi(t[1],t[2]/100,t[3]/100,1):(t=Fu.exec(e))?pi(t[1],t[2]/100,t[3]/100,t[4]):li.hasOwnProperty(e)?di(li[e]):e==="transparent"?new Re(NaN,NaN,NaN,0):null}function di(e){return new Re(e>>16&255,e>>8&255,e&255,1)}function cn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Re(e,t,n,r)}function qu(e){return e instanceof Vt||(e=mt(e)),e?(e=e.rgb(),new Re(e.r,e.g,e.b,e.opacity)):new Re}function Jn(e,t,n,r){return arguments.length===1?qu(e):new Re(e,t,n,r??1)}function Re(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Qn(Re,Jn,si(Vt,{brighter(e){return e=e==null?un:Math.pow(un,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Lt:Math.pow(Lt,e),new Re(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Re(_t(this.r),_t(this.g),_t(this.b),dn(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:fi,formatHex:fi,formatHex8:ju,formatRgb:hi,toString:hi}));function fi(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}`}function ju(){return`#${yt(this.r)}${yt(this.g)}${yt(this.b)}${yt((isNaN(this.opacity)?1:this.opacity)*255)}`}function hi(){const e=dn(this.opacity);return`${e===1?"rgb(":"rgba("}${_t(this.r)}, ${_t(this.g)}, ${_t(this.b)}${e===1?")":`, ${e})`}`}function dn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function _t(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yt(e){return e=_t(e),(e<16?"0":"")+e.toString(16)}function pi(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new He(e,t,n,r)}function vi(e){if(e instanceof He)return new He(e.h,e.s,e.l,e.opacity);if(e instanceof Vt||(e=mt(e)),!e)return new He;if(e instanceof He)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),a=Math.max(t,n,r),i=NaN,s=a-o,l=(a+o)/2;return s?(t===a?i=(n-r)/s+(n<r)*6:n===a?i=(r-t)/s+2:i=(t-n)/s+4,s/=l<.5?a+o:2-a-o,i*=60):s=l>0&&l<1?0:i,new He(i,s,l,e.opacity)}function Wu(e,t,n,r){return arguments.length===1?vi(e):new He(e,t,n,r??1)}function He(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Qn(He,Wu,si(Vt,{brighter(e){return e=e==null?un:Math.pow(un,e),new He(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Lt:Math.pow(Lt,e),new He(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,o=2*n-r;return new Re(eo(e>=240?e-240:e+120,o,r),eo(e,o,r),eo(e<120?e+240:e-120,o,r),this.opacity)},clamp(){return new He(gi(this.h),fn(this.s),fn(this.l),dn(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=dn(this.opacity);return`${e===1?"hsl(":"hsla("}${gi(this.h)}, ${fn(this.s)*100}%, ${fn(this.l)*100}%${e===1?")":`, ${e})`}`}}));function gi(e){return e=(e||0)%360,e<0?e+360:e}function fn(e){return Math.max(0,Math.min(1,e||0))}function eo(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 to=e=>()=>e;function Xu(e,t){return function(n){return e+n*t}}function Uu(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Zu(e){return(e=+e)==1?mi:function(t,n){return n-t?Uu(t,n,e):to(isNaN(t)?n:t)}}function mi(e,t){var n=t-e;return n?Xu(e,n):to(isNaN(e)?t:e)}const hn=function e(t){var n=Zu(t);function r(o,a){var i=n((o=Jn(o)).r,(a=Jn(a)).r),s=n(o.g,a.g),l=n(o.b,a.b),c=mi(o.opacity,a.opacity);return function(u){return o.r=i(u),o.g=s(u),o.b=l(u),o.opacity=c(u),o+""}}return r.gamma=e,r}(1);function Ku(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),o;return function(a){for(o=0;o<n;++o)r[o]=e[o]*(1-a)+t[o]*a;return r}}function Qu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ju(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,o=new Array(r),a=new Array(n),i;for(i=0;i<r;++i)o[i]=Ft(e[i],t[i]);for(;i<n;++i)a[i]=t[i];return function(s){for(i=0;i<r;++i)a[i]=o[i](s);return a}}function ec(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function We(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function tc(e,t){var n={},r={},o;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(o in t)o in e?n[o]=Ft(e[o],t[o]):r[o]=t[o];return function(a){for(o in n)r[o]=n[o](a);return r}}var no=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oo=new RegExp(no.source,"g");function nc(e){return function(){return e}}function oc(e){return function(t){return e(t)+""}}function _i(e,t){var n=no.lastIndex=oo.lastIndex=0,r,o,a,i=-1,s=[],l=[];for(e=e+"",t=t+"";(r=no.exec(e))&&(o=oo.exec(t));)(a=o.index)>n&&(a=t.slice(n,a),s[i]?s[i]+=a:s[++i]=a),(r=r[0])===(o=o[0])?s[i]?s[i]+=o:s[++i]=o:(s[++i]=null,l.push({i,x:We(r,o)})),n=oo.lastIndex;return n<t.length&&(a=t.slice(n),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?oc(l[0].x):nc(t):(t=l.length,function(c){for(var u=0,d;u<t;++u)s[(d=l[u]).i]=d.x(c);return s.join("")})}function Ft(e,t){var n=typeof t,r;return t==null||n==="boolean"?to(t):(n==="number"?We:n==="string"?(r=mt(t))?(t=r,hn):_i:t instanceof mt?hn:t instanceof Date?ec:Qu(t)?Ku:Array.isArray(t)?Ju:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?tc:We)(e,t)}var yi=180/Math.PI,ro={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function wi(e,t,n,r,o,a){var i,s,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,l/=s),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:a,rotate:Math.atan2(t,e)*yi,skewX:Math.atan(l)*yi,scaleX:i,scaleY:s}}var pn;function rc(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?ro:wi(t.a,t.b,t.c,t.d,t.e,t.f)}function ic(e){return e==null||(pn||(pn=document.createElementNS("http://www.w3.org/2000/svg","g")),pn.setAttribute("transform",e),!(e=pn.transform.baseVal.consolidate()))?ro:(e=e.matrix,wi(e.a,e.b,e.c,e.d,e.e,e.f))}function bi(e,t,n,r){function o(c){return c.length?c.pop()+" ":""}function a(c,u,d,f,h,m){if(c!==d||u!==f){var b=h.push("translate(",null,t,null,n);m.push({i:b-4,x:We(c,d)},{i:b-2,x:We(u,f)})}else(d||f)&&h.push("translate("+d+t+f+n)}function i(c,u,d,f){c!==u?(c-u>180?u+=360:u-c>180&&(c+=360),f.push({i:d.push(o(d)+"rotate(",null,r)-2,x:We(c,u)})):u&&d.push(o(d)+"rotate("+u+r)}function s(c,u,d,f){c!==u?f.push({i:d.push(o(d)+"skewX(",null,r)-2,x:We(c,u)}):u&&d.push(o(d)+"skewX("+u+r)}function l(c,u,d,f,h,m){if(c!==d||u!==f){var b=h.push(o(h)+"scale(",null,",",null,")");m.push({i:b-4,x:We(c,d)},{i:b-2,x:We(u,f)})}else(d!==1||f!==1)&&h.push(o(h)+"scale("+d+","+f+")")}return function(c,u){var d=[],f=[];return c=e(c),u=e(u),a(c.translateX,c.translateY,u.translateX,u.translateY,d,f),i(c.rotate,u.rotate,d,f),s(c.skewX,u.skewX,d,f),l(c.scaleX,c.scaleY,u.scaleX,u.scaleY,d,f),c=u=null,function(h){for(var m=-1,b=f.length,g;++m<b;)d[(g=f[m]).i]=g.x(h);return d.join("")}}}var ac=bi(rc,"px, ","px)","deg)"),sc=bi(ic,", ",")",")"),lc=1e-12;function xi(e){return((e=Math.exp(e))+1/e)/2}function uc(e){return((e=Math.exp(e))-1/e)/2}function cc(e){return((e=Math.exp(2*e))-1)/(e+1)}const vn=function e(t,n,r){function o(a,i){var s=a[0],l=a[1],c=a[2],u=i[0],d=i[1],f=i[2],h=u-s,m=d-l,b=h*h+m*m,g,E;if(b<lc)E=Math.log(f/c)/t,g=function($){return[s+$*h,l+$*m,c*Math.exp(t*$*E)]};else{var y=Math.sqrt(b),v=(f*f-c*c+r*b)/(2*c*n*y),x=(f*f-c*c-r*b)/(2*f*n*y),z=Math.log(Math.sqrt(v*v+1)-v),B=Math.log(Math.sqrt(x*x+1)-x);E=(B-z)/t,g=function($){var w=$*E,I=xi(z),T=c/(n*y)*(I*cc(t*w+z)-uc(z));return[s+T*h,l+T*m,c*I/xi(t*w+z)]}}return g.duration=E*1e3*t/Math.SQRT2,g}return o.rho=function(a){var i=Math.max(.001,+a),s=i*i,l=s*s;return e(i,s,l)},o}(Math.SQRT2,2,4);var It=0,Gt=0,Yt=0,Ei=1e3,gn,qt,mn=0,wt=0,_n=0,jt=typeof performance=="object"&&performance.now?performance:Date,Ni=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function io(){return wt||(Ni(dc),wt=jt.now()+_n)}function dc(){wt=0}function yn(){this._call=this._time=this._next=null}yn.prototype=Si.prototype={constructor:yn,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?io():+n)+(t==null?0:+t),!this._next&&qt!==this&&(qt?qt._next=this:gn=this,qt=this),this._call=e,this._time=n,ao()},stop:function(){this._call&&(this._call=null,this._time=1/0,ao())}};function Si(e,t,n){var r=new yn;return r.restart(e,t,n),r}function fc(){io(),++It;for(var e=gn,t;e;)(t=wt-e._time)>=0&&e._call.call(void 0,t),e=e._next;--It}function ki(){wt=(mn=jt.now())+_n,It=Gt=0;try{fc()}finally{It=0,pc(),wt=0}}function hc(){var e=jt.now(),t=e-mn;t>Ei&&(_n-=t,mn=e)}function pc(){for(var e,t=gn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:gn=n);qt=e,ao(r)}function ao(e){if(!It){Gt&&(Gt=clearTimeout(Gt));var t=e-wt;t>24?(e<1/0&&(Gt=setTimeout(ki,e-jt.now()-_n)),Yt&&(Yt=clearInterval(Yt))):(Yt||(mn=jt.now(),Yt=setInterval(hc,Ei)),It=1,Ni(ki))}}function Ci(e,t,n){var r=new yn;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var vc=on("start","end","cancel","interrupt"),gc=[],$i=0,Ii=1,so=2,wn=3,Mi=4,lo=5,bn=6;function xn(e,t,n,r,o,a){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;mc(e,n,{name:t,index:r,group:o,on:vc,tween:gc,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:$i})}function uo(e,t){var n=Fe(e,t);if(n.state>$i)throw new Error("too late; already scheduled");return n}function Xe(e,t){var n=Fe(e,t);if(n.state>wn)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 mc(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Si(a,0,n.time);function a(c){n.state=Ii,n.timer.restart(i,n.delay,n.time),n.delay<=c&&i(c-n.delay)}function i(c){var u,d,f,h;if(n.state!==Ii)return l();for(u in r)if(h=r[u],h.name===n.name){if(h.state===wn)return Ci(i);h.state===Mi?(h.state=bn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[u]):+u<t&&(h.state=bn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[u])}if(Ci(function(){n.state===wn&&(n.state=Mi,n.timer.restart(s,n.delay,n.time),s(c))}),n.state=so,n.on.call("start",e,e.__data__,n.index,n.group),n.state===so){for(n.state=wn,o=new Array(f=n.tween.length),u=0,d=-1;u<f;++u)(h=n.tween[u].value.call(e,e.__data__,n.index,n.group))&&(o[++d]=h);o.length=d+1}}function s(c){for(var u=c<n.duration?n.ease.call(null,c/n.duration):(n.timer.restart(l),n.state=lo,1),d=-1,f=o.length;++d<f;)o[d].call(e,u);n.state===lo&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=bn,n.timer.stop(),delete r[t];for(var c in r)return;delete e.__transition}}function En(e,t){var n=e.__transition,r,o,a=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){a=!1;continue}o=r.state>so&&r.state<lo,r.state=bn,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}a&&delete e.__transition}}function _c(e){return this.each(function(){En(this,e)})}function yc(e,t){var n,r;return function(){var o=Xe(this,e),a=o.tween;if(a!==n){r=n=a;for(var i=0,s=r.length;i<s;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}o.tween=r}}function wc(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var a=Xe(this,e),i=a.tween;if(i!==r){o=(r=i).slice();for(var s={name:t,value:n},l=0,c=o.length;l<c;++l)if(o[l].name===t){o[l]=s;break}l===c&&o.push(s)}a.tween=o}}function bc(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(this.node(),n).tween,o=0,a=r.length,i;o<a;++o)if((i=r[o]).name===e)return i.value;return null}return this.each((t==null?yc:wc)(n,e,t))}function co(e,t,n){var r=e._id;return e.each(function(){var o=Xe(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Fe(o,r).value[t]}}function Di(e,t){var n;return(typeof t=="number"?We:t instanceof mt?hn:(n=mt(t))?(t=n,hn):_i)(e,t)}function xc(e){return function(){this.removeAttribute(e)}}function Ec(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Nc(e,t,n){var r,o=n+"",a;return function(){var i=this.getAttribute(e);return i===o?null:i===r?a:a=t(r=i,n)}}function Sc(e,t,n){var r,o=n+"",a;return function(){var i=this.getAttributeNS(e.space,e.local);return i===o?null:i===r?a:a=t(r=i,n)}}function kc(e,t,n){var r,o,a;return function(){var i,s=n(this),l;return s==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=s+"",i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s)))}}function Cc(e,t,n){var r,o,a;return function(){var i,s=n(this),l;return s==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=s+"",i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s)))}}function $c(e,t){var n=an(e),r=n==="transform"?sc:Di;return this.attrTween(e,typeof t=="function"?(n.local?Cc:kc)(n,r,co(this,"attr."+e,t)):t==null?(n.local?Ec:xc)(n):(n.local?Sc:Nc)(n,r,t))}function Ic(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Mc(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Dc(e,t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Mc(e,a)),n}return o._value=t,o}function Oc(e,t){var n,r;function o(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Ic(e,a)),n}return o._value=t,o}function Tc(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=an(e);return this.tween(n,(r.local?Dc:Oc)(r,t))}function Pc(e,t){return function(){uo(this,e).delay=+t.apply(this,arguments)}}function Ac(e,t){return t=+t,function(){uo(this,e).delay=t}}function Rc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Pc:Ac)(t,e)):Fe(this.node(),t).delay}function zc(e,t){return function(){Xe(this,e).duration=+t.apply(this,arguments)}}function Bc(e,t){return t=+t,function(){Xe(this,e).duration=t}}function Vc(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?zc:Bc)(t,e)):Fe(this.node(),t).duration}function Lc(e,t){if(typeof t!="function")throw new Error;return function(){Xe(this,e).ease=t}}function Hc(e){var t=this._id;return arguments.length?this.each(Lc(t,e)):Fe(this.node(),t).ease}function Fc(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Xe(this,e).ease=n}}function Gc(e){if(typeof e!="function")throw new Error;return this.each(Fc(this._id,e))}function Yc(e){typeof e!="function"&&(e=Ur(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var a=t[o],i=a.length,s=r[o]=[],l,c=0;c<i;++c)(l=a[c])&&e.call(l,l.__data__,c,a)&&s.push(l);return new Je(r,this._parents,this._name,this._id)}function qc(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,a=Math.min(r,o),i=new Array(r),s=0;s<a;++s)for(var l=t[s],c=n[s],u=l.length,d=i[s]=new Array(u),f,h=0;h<u;++h)(f=l[h]||c[h])&&(d[h]=f);for(;s<r;++s)i[s]=t[s];return new Je(i,this._parents,this._name,this._id)}function jc(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 Wc(e,t,n){var r,o,a=jc(t)?uo:Xe;return function(){var i=a(this,e),s=i.on;s!==r&&(o=(r=s).copy()).on(t,n),i.on=o}}function Xc(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(Wc(n,e,t))}function Uc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Zc(){return this.on("end.remove",Uc(this._id))}function Kc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Xn(e));for(var r=this._groups,o=r.length,a=new Array(o),i=0;i<o;++i)for(var s=r[i],l=s.length,c=a[i]=new Array(l),u,d,f=0;f<l;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&("__data__"in u&&(d.__data__=u.__data__),c[f]=d,xn(c[f],t,n,f,c,Fe(u,n)));return new Je(a,this._parents,t,n)}function Qc(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Xr(e));for(var r=this._groups,o=r.length,a=[],i=[],s=0;s<o;++s)for(var l=r[s],c=l.length,u,d=0;d<c;++d)if(u=l[d]){for(var f=e.call(u,u.__data__,d,l),h,m=Fe(u,n),b=0,g=f.length;b<g;++b)(h=f[b])&&xn(h,t,n,b,f,m);a.push(f),i.push(u)}return new Je(a,i,t,n)}var Jc=zt.prototype.constructor;function ed(){return new Jc(this._groups,this._parents)}function td(e,t){var n,r,o;return function(){var a=kt(this,e),i=(this.style.removeProperty(e),kt(this,e));return a===i?null:a===n&&i===r?o:o=t(n=a,r=i)}}function Oi(e){return function(){this.style.removeProperty(e)}}function nd(e,t,n){var r,o=n+"",a;return function(){var i=kt(this,e);return i===o?null:i===r?a:a=t(r=i,n)}}function od(e,t,n){var r,o,a;return function(){var i=kt(this,e),s=n(this),l=s+"";return s==null&&(l=s=(this.style.removeProperty(e),kt(this,e))),i===l?null:i===r&&l===o?a:(o=l,a=t(r=i,s))}}function rd(e,t){var n,r,o,a="style."+t,i="end."+a,s;return function(){var l=Xe(this,e),c=l.on,u=l.value[a]==null?s||(s=Oi(t)):void 0;(c!==n||o!==u)&&(r=(n=c).copy()).on(i,o=u),l.on=r}}function id(e,t,n){var r=(e+="")=="transform"?ac:Di;return t==null?this.styleTween(e,td(e,r)).on("end.style."+e,Oi(e)):typeof t=="function"?this.styleTween(e,od(e,r,co(this,"style."+e,t))).each(rd(this._id,e)):this.styleTween(e,nd(e,r,t),n).on("end.style."+e,null)}function ad(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function sd(e,t,n){var r,o;function a(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&ad(e,i,n)),r}return a._value=t,a}function ld(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,sd(e,t,n??""))}function ud(e){return function(){this.textContent=e}}function cd(e){return function(){var t=e(this);this.textContent=t??""}}function dd(e){return this.tween("text",typeof e=="function"?cd(co(this,"text",e)):ud(e==null?"":e+""))}function fd(e){return function(t){this.textContent=e.call(this,t)}}function hd(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&fd(o)),t}return r._value=e,r}function pd(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,hd(e))}function vd(){for(var e=this._name,t=this._id,n=Ti(),r=this._groups,o=r.length,a=0;a<o;++a)for(var i=r[a],s=i.length,l,c=0;c<s;++c)if(l=i[c]){var u=Fe(l,t);xn(l,e,n,c,i,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Je(r,this._parents,e,n)}function gd(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(a,i){var s={value:i},l={value:function(){--o===0&&a()}};n.each(function(){var c=Xe(this,r),u=c.on;u!==e&&(t=(e=u).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(l)),c.on=t}),o===0&&a()})}var md=0;function Je(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ti(){return++md}var et=zt.prototype;Je.prototype={constructor:Je,select:Kc,selectAll:Qc,selectChild:et.selectChild,selectChildren:et.selectChildren,filter:Yc,merge:qc,selection:ed,transition:vd,call:et.call,nodes:et.nodes,node:et.node,size:et.size,empty:et.empty,each:et.each,on:Xc,attr:$c,attrTween:Tc,style:id,styleTween:ld,text:dd,textTween:pd,remove:Zc,tween:bc,delay:Rc,duration:Vc,ease:Hc,easeVarying:Gc,end:gd,[Symbol.iterator]:et[Symbol.iterator]};function _d(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var yd={time:null,delay:0,duration:250,ease:_d};function wd(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 bd(e){var t,n;e instanceof Je?(t=e._id,e=e._name):(t=Ti(),(n=yd).time=io(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,a=0;a<o;++a)for(var i=r[a],s=i.length,l,c=0;c<s;++c)(l=i[c])&&xn(l,e,t,c,i,n||wd(l,t));return new Je(r,this._parents,e,t)}zt.prototype.interrupt=_c,zt.prototype.transition=bd;const Nn=e=>()=>e;function xd(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function 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 fo(e){e.stopImmediatePropagation()}function Wt(e){e.preventDefault(),e.stopImmediatePropagation()}function Ed(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function Nd(){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 Pi(){return this.__zoom||Mt}function Sd(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function kd(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cd(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>a?(a+i)/2:Math.min(0,a)||Math.max(0,i))}function $d(){var e=Ed,t=Nd,n=Cd,r=Sd,o=kd,a=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],s=250,l=vn,c=on("start","zoom","end"),u,d,f,h=500,m=150,b=0,g=10;function E(_){_.property("__zoom",Pi).on("wheel.zoom",w,{passive:!1}).on("mousedown.zoom",I).on("dblclick.zoom",T).filter(o).on("touchstart.zoom",k).on("touchmove.zoom",p).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}E.transform=function(_,O,M,L){var F=_.selection?_.selection():_;F.property("__zoom",Pi),_!==F?z(_,O,M,L):F.interrupt().each(function(){B(this,arguments).event(L).start().zoom(null,typeof O=="function"?O.apply(this,arguments):O).end()})},E.scaleBy=function(_,O,M,L){E.scaleTo(_,function(){var F=this.__zoom.k,q=typeof O=="function"?O.apply(this,arguments):O;return F*q},M,L)},E.scaleTo=function(_,O,M,L){E.transform(_,function(){var F=t.apply(this,arguments),q=this.__zoom,Y=M==null?x(F):typeof M=="function"?M.apply(this,arguments):M,j=q.invert(Y),W=typeof O=="function"?O.apply(this,arguments):O;return n(v(y(q,W),Y,j),F,i)},M,L)},E.translateBy=function(_,O,M,L){E.transform(_,function(){return n(this.__zoom.translate(typeof O=="function"?O.apply(this,arguments):O,typeof M=="function"?M.apply(this,arguments):M),t.apply(this,arguments),i)},null,L)},E.translateTo=function(_,O,M,L,F){E.transform(_,function(){var q=t.apply(this,arguments),Y=this.__zoom,j=L==null?x(q):typeof L=="function"?L.apply(this,arguments):L;return n(Mt.translate(j[0],j[1]).scale(Y.k).translate(typeof O=="function"?-O.apply(this,arguments):-O,typeof M=="function"?-M.apply(this,arguments):-M),q,i)},L,F)};function y(_,O){return O=Math.max(a[0],Math.min(a[1],O)),O===_.k?_:new tt(O,_.x,_.y)}function v(_,O,M){var L=O[0]-M[0]*_.k,F=O[1]-M[1]*_.k;return L===_.x&&F===_.y?_:new tt(_.k,L,F)}function x(_){return[(+_[0][0]+ +_[1][0])/2,(+_[0][1]+ +_[1][1])/2]}function z(_,O,M,L){_.on("start.zoom",function(){B(this,arguments).event(L).start()}).on("interrupt.zoom end.zoom",function(){B(this,arguments).event(L).end()}).tween("zoom",function(){var F=this,q=arguments,Y=B(F,q).event(L),j=t.apply(F,q),W=M==null?x(j):typeof M=="function"?M.apply(F,q):M,P=Math.max(j[1][0]-j[0][0],j[1][1]-j[0][1]),A=F.__zoom,R=typeof O=="function"?O.apply(F,q):O,H=l(A.invert(W).concat(P/A.k),R.invert(W).concat(P/R.k));return function(X){if(X===1)X=R;else{var te=H(X),ne=P/te[2];X=new tt(ne,W[0]-te[0]*ne,W[1]-te[1]*ne)}Y.zoom(null,X)}})}function B(_,O,M){return!M&&_.__zooming||new $(_,O)}function $(_,O){this.that=_,this.args=O,this.active=0,this.sourceEvent=null,this.extent=t.apply(_,O),this.taps=0}$.prototype={event:function(_){return _&&(this.sourceEvent=_),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(_,O){return this.mouse&&_!=="mouse"&&(this.mouse[1]=O.invert(this.mouse[0])),this.touch0&&_!=="touch"&&(this.touch0[1]=O.invert(this.touch0[0])),this.touch1&&_!=="touch"&&(this.touch1[1]=O.invert(this.touch1[0])),this.that.__zoom=O,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(_){var O=Le(this.that).datum();c.call(_,this.that,new xd(_,{sourceEvent:this.sourceEvent,target:E,transform:this.that.__zoom,dispatch:c}),O)}};function w(_,...O){if(!e.apply(this,arguments))return;var M=B(this,O).event(_),L=this.__zoom,F=Math.max(a[0],Math.min(a[1],L.k*Math.pow(2,r.apply(this,arguments)))),q=qe(_);if(M.wheel)(M.mouse[0][0]!==q[0]||M.mouse[0][1]!==q[1])&&(M.mouse[1]=L.invert(M.mouse[0]=q)),clearTimeout(M.wheel);else{if(L.k===F)return;M.mouse=[q,L.invert(q)],En(this),M.start()}Wt(_),M.wheel=setTimeout(Y,m),M.zoom("mouse",n(v(y(L,F),M.mouse[0],M.mouse[1]),M.extent,i));function Y(){M.wheel=null,M.end()}}function I(_,...O){if(f||!e.apply(this,arguments))return;var M=_.currentTarget,L=B(this,O,!0).event(_),F=Le(_.view).on("mousemove.zoom",W,!0).on("mouseup.zoom",P,!0),q=qe(_,M),Y=_.clientX,j=_.clientY;ii(_.view),fo(_),L.mouse=[q,this.__zoom.invert(q)],En(this),L.start();function W(A){if(Wt(A),!L.moved){var R=A.clientX-Y,H=A.clientY-j;L.moved=R*R+H*H>b}L.event(A).zoom("mouse",n(v(L.that.__zoom,L.mouse[0]=qe(A,M),L.mouse[1]),L.extent,i))}function P(A){F.on("mousemove.zoom mouseup.zoom",null),ai(A.view,L.moved),Wt(A),L.event(A).end()}}function T(_,...O){if(e.apply(this,arguments)){var M=this.__zoom,L=qe(_.changedTouches?_.changedTouches[0]:_,this),F=M.invert(L),q=M.k*(_.shiftKey?.5:2),Y=n(v(y(M,q),L,F),t.apply(this,O),i);Wt(_),s>0?Le(this).transition().duration(s).call(z,Y,L,_):Le(this).call(E.transform,Y,L,_)}}function k(_,...O){if(e.apply(this,arguments)){var M=_.touches,L=M.length,F=B(this,O,_.changedTouches.length===L).event(_),q,Y,j,W;for(fo(_),Y=0;Y<L;++Y)j=M[Y],W=qe(j,this),W=[W,this.__zoom.invert(W),j.identifier],F.touch0?!F.touch1&&F.touch0[2]!==W[2]&&(F.touch1=W,F.taps=0):(F.touch0=W,q=!0,F.taps=1+!!u);u&&(u=clearTimeout(u)),q&&(F.taps<2&&(d=W[0],u=setTimeout(function(){u=null},h)),En(this),F.start())}}function p(_,...O){if(this.__zooming){var M=B(this,O).event(_),L=_.changedTouches,F=L.length,q,Y,j,W;for(Wt(_),q=0;q<F;++q)Y=L[q],j=qe(Y,this),M.touch0&&M.touch0[2]===Y.identifier?M.touch0[0]=j:M.touch1&&M.touch1[2]===Y.identifier&&(M.touch1[0]=j);if(Y=M.that.__zoom,M.touch1){var P=M.touch0[0],A=M.touch0[1],R=M.touch1[0],H=M.touch1[1],X=(X=R[0]-P[0])*X+(X=R[1]-P[1])*X,te=(te=H[0]-A[0])*te+(te=H[1]-A[1])*te;Y=y(Y,Math.sqrt(X/te)),j=[(P[0]+R[0])/2,(P[1]+R[1])/2],W=[(A[0]+H[0])/2,(A[1]+H[1])/2]}else if(M.touch0)j=M.touch0[0],W=M.touch0[1];else return;M.zoom("touch",n(v(Y,j,W),M.extent,i))}}function V(_,...O){if(this.__zooming){var M=B(this,O).event(_),L=_.changedTouches,F=L.length,q,Y;for(fo(_),f&&clearTimeout(f),f=setTimeout(function(){f=null},h),q=0;q<F;++q)Y=L[q],M.touch0&&M.touch0[2]===Y.identifier?delete M.touch0:M.touch1&&M.touch1[2]===Y.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(Y=qe(Y,this),Math.hypot(d[0]-Y[0],d[1]-Y[1])<g)){var j=Le(this).on("dblclick.zoom");j&&j.apply(this,arguments)}}}return E.wheelDelta=function(_){return arguments.length?(r=typeof _=="function"?_:Nn(+_),E):r},E.filter=function(_){return arguments.length?(e=typeof _=="function"?_:Nn(!!_),E):e},E.touchable=function(_){return arguments.length?(o=typeof _=="function"?_:Nn(!!_),E):o},E.extent=function(_){return arguments.length?(t=typeof _=="function"?_:Nn([[+_[0][0],+_[0][1]],[+_[1][0],+_[1][1]]]),E):t},E.scaleExtent=function(_){return arguments.length?(a[0]=+_[0],a[1]=+_[1],E):[a[0],a[1]]},E.translateExtent=function(_){return arguments.length?(i[0][0]=+_[0][0],i[1][0]=+_[1][0],i[0][1]=+_[0][1],i[1][1]=+_[1][1],E):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},E.constrain=function(_){return arguments.length?(n=_,E):n},E.duration=function(_){return arguments.length?(s=+_,E):s},E.interpolate=function(_){return arguments.length?(l=_,E):l},E.on=function(){var _=c.on.apply(c,arguments);return _===c?E:_},E.clickDistance=function(_){return arguments.length?(b=(_=+_)*_,E):Math.sqrt(b)},E.tapDistance=function(_){return arguments.length?(g=+_,E):g},E}var K=(e=>(e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom",e))(K||{}),ho=(e=>(e.Partial="partial",e.Full="full",e))(ho||{}),bt=(e=>(e.Bezier="default",e.SimpleBezier="simple-bezier",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e))(bt||{}),at=(e=>(e.Strict="strict",e.Loose="loose",e))(at||{}),po=(e=>(e.Arrow="arrow",e.ArrowClosed="arrowclosed",e))(po||{}),Xt=(e=>(e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal",e))(Xt||{}),Ai=(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))(Ai||{});const Id=["INPUT","SELECT","TEXTAREA"],Md=typeof document<"u"?document:null;function vo(e){var t,n;const r=((n=(t=e.composedPath)==null?void 0:t.call(e))==null?void 0:n[0])||e.target,o=typeof(r==null?void 0:r.hasAttribute)=="function"?r.hasAttribute("contenteditable"):!1,a=typeof(r==null?void 0:r.closest)=="function"?r.closest(".nokey"):null;return Id.includes(r==null?void 0:r.nodeName)||o||!!a}function Dd(e){return e.ctrlKey||e.metaKey||e.shiftKey||e.altKey}function Ri(e,t,n,r){const o=t.replace("+",`
3
+ `).replace(`
4
+
5
+ `,`
6
+ +`).split(`
7
+ `).map(i=>i.trim().toLowerCase());if(o.length===1)return e.toLowerCase()===t.toLowerCase();r||n.add(e.toLowerCase());const a=o.every((i,s)=>n.has(i)&&Array.from(n.values())[s]===o[s]);return r&&n.delete(e.toLowerCase()),a}function Od(e,t){return n=>{if(!n.code&&!n.key)return!1;const r=Td(n.code,e);return Array.isArray(e)?e.some(o=>Ri(n[r],o,t,n.type==="keyup")):Ri(n[r],e,t,n.type==="keyup")}}function Td(e,t){return t.includes(e)?"code":"key"}function Ut(e,t){const n=fe(()=>pe(t==null?void 0:t.target)??Md),r=Pt(pe(e)===!0);let o=!1;const a=new Set;let i=l(pe(e));ye(()=>pe(e),(c,u)=>{typeof u=="boolean"&&typeof c!="boolean"&&s(),i=l(c)},{immediate:!0}),Gr(["blur","contextmenu"],s),Yr((...c)=>i(...c),c=>{var u,d;const f=pe(t==null?void 0:t.actInsideInputWithModifier)??!0,h=pe(t==null?void 0:t.preventDefault)??!1;if(o=Dd(c),(!o||o&&!f)&&vo(c))return;const b=((d=(u=c.composedPath)==null?void 0:u.call(c))==null?void 0:d[0])||c.target,g=(b==null?void 0:b.nodeName)==="BUTTON"||(b==null?void 0:b.nodeName)==="A";!h&&(o||!g)&&c.preventDefault(),r.value=!0},{eventName:"keydown",target:n}),Yr((...c)=>i(...c),c=>{const u=pe(t==null?void 0:t.actInsideInputWithModifier)??!0;if(r.value){if((!o||o&&!u)&&vo(c))return;o=!1,r.value=!1}},{eventName:"keyup",target:n});function s(){o=!1,a.clear(),r.value=pe(e)===!0}function l(c){return c===null?(s(),()=>!1):typeof c=="boolean"?(s(),r.value=c,()=>!1):Array.isArray(c)||typeof c=="string"?Od(c,a):c}return r}const zi="vue-flow__node-desc",Bi="vue-flow__edge-desc",Pd="vue-flow__aria-live",Vi=["Enter"," ","Escape"],Dt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};function Sn(e){return{...e.computedPosition||{x:0,y:0},width:e.dimensions.width||0,height:e.dimensions.height||0}}function kn(e,t){const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)}function Cn(e){return{width:e.offsetWidth,height:e.offsetHeight}}function xt(e,t=0,n=1){return Math.min(Math.max(e,t),n)}function Li(e,t){return{x:xt(e.x,t[0][0],t[1][0]),y:xt(e.y,t[0][1],t[1][1])}}function Hi(e){const t=e.getRootNode();return"elementFromPoint"in t?t:window.document}function st(e){return e&&typeof e=="object"&&"id"in e&&"source"in e&&"target"in e}function Et(e){return e&&typeof e=="object"&&"id"in e&&"position"in e&&!st(e)}function Zt(e){return Et(e)&&"computedPosition"in e}function $n(e){return!Number.isNaN(e)&&Number.isFinite(e)}function Ad(e){return $n(e.width)&&$n(e.height)&&$n(e.x)&&$n(e.y)}function Rd(e,t,n){const r={id:e.id.toString(),type:e.type??"default",dimensions:At({width:0,height:0}),computedPosition:At({z:0,...e.position}),handleBounds:{source:[],target:[]},draggable:void 0,selectable:void 0,connectable:void 0,focusable:void 0,selected:!1,dragging:!1,resizing:!1,initialized:!1,isParent:!1,position:{x:0,y:0},data:$e(e.data)?e.data:{},events:At($e(e.events)?e.events:{})};return Object.assign(t??r,e,{id:e.id.toString(),parentNode:n})}function Fi(e,t,n){var r,o;const a={id:e.id.toString(),type:e.type??(t==null?void 0:t.type)??"default",source:e.source.toString(),target:e.target.toString(),sourceHandle:(r=e.sourceHandle)==null?void 0:r.toString(),targetHandle:(o=e.targetHandle)==null?void 0:o.toString(),updatable:e.updatable??(n==null?void 0:n.updatable),selectable:e.selectable??(n==null?void 0:n.selectable),focusable:e.focusable??(n==null?void 0:n.focusable),data:$e(e.data)?e.data:{},events:At($e(e.events)?e.events:{}),label:e.label??"",interactionWidth:e.interactionWidth??(n==null?void 0:n.interactionWidth),...n??{}};return Object.assign(t??a,e,{id:e.id.toString()})}function Gi(e,t,n,r){const o=typeof e=="string"?e:e.id,a=new Set,i=r==="source"?"target":"source";for(const s of n)s[i]===o&&a.add(s[r]);return t.filter(s=>a.has(s.id))}function zd(...e){if(e.length===3){const[a,i,s]=e;return Gi(a,i,s,"target")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(a=>st(a)&&a.source===r).map(a=>n.find(i=>Et(i)&&i.id===a.target))}function Bd(...e){if(e.length===3){const[a,i,s]=e;return Gi(a,i,s,"source")}const[t,n]=e,r=typeof t=="string"?t:t.id;return n.filter(a=>st(a)&&a.target===r).map(a=>n.find(i=>Et(i)&&i.id===a.source))}function Yi({source:e,sourceHandle:t,target:n,targetHandle:r}){return`vueflow__edge-${e}${t??""}-${n}${r??""}`}function Vd(e,t){return t.some(n=>st(n)&&n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle))}function go({x:e,y:t},{x:n,y:r,zoom:o}){return{x:e*o+n,y:t*o+r}}function Kt({x:e,y:t},{x:n,y:r,zoom:o},a=!1,i=[1,1]){const s={x:(e-n)/o,y:(t-r)/o};return a?Mn(s,i):s}function Ld(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 qi({x:e,y:t,width:n,height:r}){return{x:e,y:t,x2:e+n,y2:t+r}}function Hd({x:e,y:t,x2:n,y2:r}){return{x:e,y:t,width:n-e,height:r-t}}function ji(e){let t={x:Number.POSITIVE_INFINITY,y:Number.POSITIVE_INFINITY,x2:Number.NEGATIVE_INFINITY,y2:Number.NEGATIVE_INFINITY};for(let n=0;n<e.length;n++){const r=e[n];t=Ld(t,qi({...r.computedPosition,...r.dimensions}))}return Hd(t)}function Wi(e,t,n={x:0,y:0,zoom:1},r=!1,o=!1){const a={...Kt(t,n),width:t.width/n.zoom,height:t.height/n.zoom},i=[];for(const s of e){const{dimensions:l,selectable:c=!0,hidden:u=!1}=s,d=l.width??s.width??null,f=l.height??s.height??null;if(o&&!c||u)continue;const h=kn(a,Sn(s)),m=d===null||f===null,b=r&&h>0,g=(d??0)*(f??0);(m||b||h>=g||s.dragging)&&i.push(s)}return i}function Xi(e,t){const n=new Set;if(typeof e=="string")n.add(e);else if(e.length>=1)for(const r of e)n.add(r.id);return t.filter(r=>n.has(r.source)||n.has(r.target))}function Ui(e,t,n,r,o,a=.1,i={x:0,y:0}){const s=t/(e.width*(1+a)),l=n/(e.height*(1+a)),c=Math.min(s,l),u=xt(c,r,o),d=e.x+e.width/2,f=e.y+e.height/2,h=t/2-d*u+(i.x??0),m=n/2-f*u+(i.y??0);return{x:h,y:m,zoom:u}}function Fd(e,t){return{x:t.x+e.x,y:t.y+e.y,z:(e.z>t.z?e.z:t.z)+1}}function Zi(e,t){if(!e.parentNode)return!1;const n=t.get(e.parentNode);return n?n.selected?!0:Zi(n,t):!1}function Qt(e,t){return typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`}function Ki(e){const t=e.ctrlKey&&In()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t}function Qi(e,t,n){return e<t?xt(Math.abs(e-t),1,t)/t:e>n?-xt(Math.abs(e-n),1,t)/t:0}function Ji(e,t,n=15,r=40){const o=Qi(e.x,r,t.width-r)*n,a=Qi(e.y,r,t.height-r)*n;return[o,a]}function mo(e,t){if(t){const n=e.position.x+e.dimensions.width-t.dimensions.width,r=e.position.y+e.dimensions.height-t.dimensions.height;if(n>0||r>0||e.position.x<0||e.position.y<0){let o={};if(typeof t.style=="function"?o={...t.style(t)}:t.style&&(o={...t.style}),o.width=o.width??`${t.dimensions.width}px`,o.height=o.height??`${t.dimensions.height}px`,n>0)if(typeof o.width=="string"){const a=Number(o.width.replace("px",""));o.width=`${a+n}px`}else o.width+=n;if(r>0)if(typeof o.height=="string"){const a=Number(o.height.replace("px",""));o.height=`${a+r}px`}else o.height+=r;if(e.position.x<0){const a=Math.abs(e.position.x);if(t.position.x=t.position.x-a,typeof o.width=="string"){const i=Number(o.width.replace("px",""));o.width=`${i+a}px`}else o.width+=a;e.position.x=0}if(e.position.y<0){const a=Math.abs(e.position.y);if(t.position.y=t.position.y-a,typeof o.height=="string"){const i=Number(o.height.replace("px",""));o.height=`${i+a}px`}else o.height+=a;e.position.y=0}t.dimensions.width=Number(o.width.toString().replace("px","")),t.dimensions.height=Number(o.height.toString().replace("px","")),typeof t.style=="function"?t.style=a=>{const i=t.style;return{...i(a),...o}}:t.style={...t.style,...o}}}}function ea(e,t){var n,r;const o=e.filter(i=>i.type==="add"||i.type==="remove");for(const i of o)if(i.type==="add")t.findIndex(l=>l.id===i.item.id)===-1&&t.push(i.item);else if(i.type==="remove"){const s=t.findIndex(l=>l.id===i.id);s!==-1&&t.splice(s,1)}const a=t.map(i=>i.id);for(const i of t)for(const s of e)if(s.id===i.id)switch(s.type){case"select":i.selected=s.selected;break;case"position":if(Zt(i)&&(typeof s.position<"u"&&(i.position=s.position),typeof s.dragging<"u"&&(i.dragging=s.dragging),i.expandParent&&i.parentNode)){const l=t[a.indexOf(i.parentNode)];l&&Zt(l)&&mo(i,l)}break;case"dimensions":if(Zt(i)&&(typeof s.dimensions<"u"&&(i.dimensions=s.dimensions),typeof s.updateStyle<"u"&&s.updateStyle&&(i.style={...i.style||{},width:`${(n=s.dimensions)==null?void 0:n.width}px`,height:`${(r=s.dimensions)==null?void 0:r.height}px`}),typeof s.resizing<"u"&&(i.resizing=s.resizing),i.expandParent&&i.parentNode)){const l=t[a.indexOf(i.parentNode)];l&&Zt(l)&&(!!l.dimensions.width&&!!l.dimensions.height?mo(i,l):Ae(()=>{mo(i,l)}))}break}return t}function lt(e,t){return{id:e,type:"select",selected:t}}function ta(e){return{item:e,type:"add"}}function na(e){return{id:e,type:"remove"}}function oa(e,t,n,r,o){return{id:e,source:t,target:n,sourceHandle:r||null,targetHandle:o||null,type:"remove"}}function ut(e,t=new Set,n=!1){const r=[];for(const[o,a]of e){const i=t.has(o);!(a.selected===void 0&&!i)&&a.selected!==i&&(n&&(a.selected=i),r.push(lt(a.id,i)))}return r}const ra=()=>{};function U(e){const t=new Set;let n=ra,r=()=>!1;const o=()=>t.size>0||r(),a=f=>{n=f},i=()=>{n=ra},s=f=>{r=f},l=()=>{r=()=>!1},c=f=>{t.delete(f)};return{on:f=>{t.add(f);const h=()=>c(f);return Rt(h),{off:h}},off:c,trigger:f=>{const h=[n];return o()?h.push(...t):e&&h.push(e),Promise.allSettled(h.map(m=>m(f)))},hasListeners:o,listeners:t,setEmitter:a,removeEmitter:i,setHasEmitListeners:s,removeHasEmitListeners:l}}function ia(e,t,n){let r=e;do{if(r&&r.matches(t))return!0;if(r===n)return!1;r=r.parentElement}while(r);return!1}function Gd(e,t,n,r){var o,a;const i=new Map;for(const[s,l]of e)(l.selected||l.id===r)&&(!l.parentNode||!Zi(l,e))&&(l.draggable||t&&typeof l.draggable>"u")&&e.get(s)&&i.set(s,{id:l.id,position:l.position||{x:0,y:0},distance:{x:n.x-((o=l.computedPosition)==null?void 0:o.x)||0,y:n.y-((a=l.computedPosition)==null?void 0:a.y)||0},from:{x:l.computedPosition.x,y:l.computedPosition.y},extent:l.extent,parentNode:l.parentNode,dimensions:{...l.dimensions},expandParent:l.expandParent});return Array.from(i.values())}function _o({id:e,dragItems:t,findNode:n}){const r=[];for(const o of t){const a=n(o.id);a&&r.push(a)}return[e?r.find(o=>o.id===e):r[0],r]}function aa(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 Yd(e,t,n){const[r,o,a,i]=typeof e!="string"?aa(e.padding):[0,0,0,0];return n&&typeof n.computedPosition.x<"u"&&typeof n.computedPosition.y<"u"&&typeof n.dimensions.width<"u"&&typeof n.dimensions.height<"u"?[[n.computedPosition.x+i,n.computedPosition.y+r],[n.computedPosition.x+n.dimensions.width-o,n.computedPosition.y+n.dimensions.height-a]]:!1}function qd(e,t,n,r){let o=e.extent||n;if((o==="parent"||!Array.isArray(o)&&(o==null?void 0:o.range)==="parent")&&!e.expandParent)if(e.parentNode&&r&&e.dimensions.width&&e.dimensions.height){const a=Yd(o,e,r);a&&(o=a)}else t(new Te(Ce.NODE_EXTENT_INVALID,e.id)),o=n;else if(Array.isArray(o)){const a=(r==null?void 0:r.computedPosition.x)||0,i=(r==null?void 0:r.computedPosition.y)||0;o=[[o[0][0]+a,o[0][1]+i],[o[1][0]+a,o[1][1]+i]]}else if(o!=="parent"&&(o!=null&&o.range)&&Array.isArray(o.range)){const[a,i,s,l]=aa(o.padding),c=(r==null?void 0:r.computedPosition.x)||0,u=(r==null?void 0:r.computedPosition.y)||0;o=[[o.range[0][0]+c+l,o.range[0][1]+u+a],[o.range[1][0]+c-i,o.range[1][1]+u-s]]}return o==="parent"?[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]]:o}function jd({width:e,height:t},n){return[n[0],[n[1][0]-(e||0),n[1][1]-(t||0)]]}function yo(e,t,n,r,o){const a=jd(e.dimensions,qd(e,n,r,o)),i=Li(t,a);return{position:{x:i.x-((o==null?void 0:o.computedPosition.x)||0),y:i.y-((o==null?void 0:o.computedPosition.y)||0)},computedPosition:i}}function Ot(e,t,n=K.Left,r=!1){const o=((t==null?void 0:t.x)??0)+e.computedPosition.x,a=((t==null?void 0:t.y)??0)+e.computedPosition.y,{width:i,height:s}=t??Zd(e);if(r)return{x:o+i/2,y:a+s/2};switch((t==null?void 0:t.position)??n){case K.Top:return{x:o+i/2,y:a};case K.Right:return{x:o+i,y:a+s/2};case K.Bottom:return{x:o+i/2,y:a+s};case K.Left:return{x:o,y:a+s/2}}}function sa(e,t){return e&&(t?e.find(n=>n.id===t):e[0])||null}function Wd({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:a,width:i,height:s,viewport:l}){const c={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+a)};c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u=qi({x:(0-l.x)/l.zoom,y:(0-l.y)/l.zoom,width:i/l.zoom,height:s/l.zoom}),d=Math.max(0,Math.min(u.x2,c.x2)-Math.max(u.x,c.x)),f=Math.max(0,Math.min(u.y2,c.y2)-Math.max(u.y,c.y));return Math.ceil(d*f)>0}function Xd(e,t,n=!1){const r=typeof e.zIndex=="number";let o=r?e.zIndex:0;const a=t(e.source),i=t(e.target);return!a||!i?0:(n&&(o=r?e.zIndex:Math.max(a.computedPosition.z||0,i.computedPosition.z||0)),o)}var Ce=(e=>(e.MISSING_STYLES="MISSING_STYLES",e.MISSING_VIEWPORT_DIMENSIONS="MISSING_VIEWPORT_DIMENSIONS",e.NODE_INVALID="NODE_INVALID",e.NODE_NOT_FOUND="NODE_NOT_FOUND",e.NODE_MISSING_PARENT="NODE_MISSING_PARENT",e.NODE_TYPE_MISSING="NODE_TYPE_MISSING",e.NODE_EXTENT_INVALID="NODE_EXTENT_INVALID",e.EDGE_INVALID="EDGE_INVALID",e.EDGE_NOT_FOUND="EDGE_NOT_FOUND",e.EDGE_SOURCE_MISSING="EDGE_SOURCE_MISSING",e.EDGE_TARGET_MISSING="EDGE_TARGET_MISSING",e.EDGE_TYPE_MISSING="EDGE_TYPE_MISSING",e.EDGE_SOURCE_TARGET_SAME="EDGE_SOURCE_TARGET_SAME",e.EDGE_SOURCE_TARGET_MISSING="EDGE_SOURCE_TARGET_MISSING",e.EDGE_ORPHANED="EDGE_ORPHANED",e.USEVUEFLOW_OPTIONS="USEVUEFLOW_OPTIONS",e))(Ce||{});const la={MISSING_STYLES:()=>"It seems that you haven't loaded the necessary styles. Please import '@vue-flow/core/dist/style.css' to ensure that the graph is rendered correctly",MISSING_VIEWPORT_DIMENSIONS:()=>"The Vue Flow parent container needs a width and a height to render the graph",NODE_INVALID:e=>`Node is invalid
8
+ Node: ${e}`,NODE_NOT_FOUND:e=>`Node not found
9
+ Node: ${e}`,NODE_MISSING_PARENT:(e,t)=>`Node is missing a parent
10
+ Node: ${e}
11
+ Parent: ${t}`,NODE_TYPE_MISSING:e=>`Node type is missing
12
+ Type: ${e}`,NODE_EXTENT_INVALID:e=>`Only child nodes can use a parent extent
13
+ Node: ${e}`,EDGE_INVALID:e=>`An edge needs a source and a target
14
+ Edge: ${e}`,EDGE_SOURCE_MISSING:(e,t)=>`Edge source is missing
15
+ Edge: ${e}
16
+ Source: ${t}`,EDGE_TARGET_MISSING:(e,t)=>`Edge target is missing
17
+ Edge: ${e}
18
+ Target: ${t}`,EDGE_TYPE_MISSING:e=>`Edge type is missing
19
+ Type: ${e}`,EDGE_SOURCE_TARGET_SAME:(e,t,n)=>`Edge source and target are the same
20
+ Edge: ${e}
21
+ Source: ${t}
22
+ Target: ${n}`,EDGE_SOURCE_TARGET_MISSING:(e,t,n)=>`Edge source or target is missing
23
+ Edge: ${e}
24
+ Source: ${t}
25
+ Target: ${n}`,EDGE_ORPHANED:e=>`Edge was orphaned (suddenly missing source or target) and has been removed
26
+ Edge: ${e}`,EDGE_NOT_FOUND:e=>`Edge not found
27
+ Edge: ${e}`,USEVUEFLOW_OPTIONS:()=>"The options parameter is deprecated and will be removed in the next major version. Please use the id parameter instead"};class Te extends Error{constructor(t,...n){var r;super((r=la[t])==null?void 0:r.call(la,...n)),this.name="VueFlowError",this.code=t,this.args=n}}function wo(e){return"clientX"in e}function Ud(e){return"sourceEvent"in e}function Ue(e,t){const n=wo(e);let r,o;return n?(r=e.clientX,o=e.clientY):"touches"in e&&e.touches.length>0?(r=e.touches[0].clientX,o=e.touches[0].clientY):"changedTouches"in e&&e.changedTouches.length>0?(r=e.changedTouches[0].clientX,o=e.changedTouches[0].clientY):(r=0,o=0),{x:r-((t==null?void 0:t.left)??0),y:o-((t==null?void 0:t.top)??0)}}const In=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Zd(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 Mn(e,t=[1,1]){return{x:t[0]*Math.round(e.x/t[0]),y:t[1]*Math.round(e.y/t[1])}}const Kd=()=>!0;function bo(e){e==null||e.classList.remove("valid","connecting","vue-flow__handle-valid","vue-flow__handle-connecting")}function Qd(e,t,n){const r=[],o={x:e.x-n,y:e.y-n,width:n*2,height:n*2};for(const a of t.values())kn(o,Sn(a))>0&&r.push(a);return r}const Jd=250;function ef(e,t,n,r){var o,a;let i=[],s=Number.POSITIVE_INFINITY;const l=Qd(e,n,t+Jd);for(const c of l){const u=[...((o=c.handleBounds)==null?void 0:o.source)??[],...((a=c.handleBounds)==null?void 0:a.target)??[]];for(const d of u){if(r.nodeId===d.nodeId&&r.type===d.type&&r.id===d.id)continue;const{x:f,y:h}=Ot(c,d,d.position,!0),m=Math.sqrt((f-e.x)**2+(h-e.y)**2);m>t||(m<s?(i=[{...d,x:f,y:h}],s=m):m===s&&i.push({...d,x:f,y:h}))}}if(!i.length)return null;if(i.length>1){const c=r.type==="source"?"target":"source";return i.find(u=>u.type===c)??i[0]}return i[0]}function ua(e,{handle:t,connectionMode:n,fromNodeId:r,fromHandleId:o,fromType:a,doc:i,lib:s,flowId:l,isValidConnection:c=Kd},u,d,f,h){const m=a==="target",b=t?i.querySelector(`.${s}-flow__handle[data-id="${l}-${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`):null,{x:g,y:E}=Ue(e),y=i.elementFromPoint(g,E),v=y!=null&&y.classList.contains(`${s}-flow__handle`)?y:b,x={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const z=ca(void 0,v),B=v.getAttribute("data-nodeid"),$=v.getAttribute("data-handleid"),w=v.classList.contains("connectable"),I=v.classList.contains("connectableend");if(!B||!z)return x;const T={source:m?B:r,sourceHandle:m?$:o,target:m?r:B,targetHandle:m?o:$};x.connection=T;const p=w&&I&&(n===at.Strict?m&&z==="source"||!m&&z==="target":B!==r||$!==o);x.isValid=p&&c(T,{nodes:d,edges:u,sourceNode:f(T.source),targetNode:f(T.target)}),x.toHandle=da(B,z,$,h,n,!0)}return x}function ca(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function tf(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function nf(e,t){let n=null;return t?n=!0:e&&!t&&(n=!1),n}function da(e,t,n,r,o,a=!1){var i,s,l;const c=r.get(e);if(!c)return null;const u=o===at.Strict?(i=c.handleBounds)==null?void 0:i[t]:[...((s=c.handleBounds)==null?void 0:s.source)??[],...((l=c.handleBounds)==null?void 0:l.target)??[]],d=(n?u==null?void 0:u.find(f=>f.id===n):u==null?void 0:u[0])??null;return d&&a?{...d,...Ot(c,d,d.position,!0)}:d}const xo={[K.Left]:K.Right,[K.Right]:K.Left,[K.Top]:K.Bottom,[K.Bottom]:K.Top},of=["production","prod"];function Dn(e,...t){fa()&&console.warn(`[Vue Flow]: ${e}`,...t)}function fa(){return!of.includes("production")}function ha(e,t,n,r,o){const a=t.querySelectorAll(`.vue-flow__handle.${e}`);return a!=null&&a.length?Array.from(a).map(i=>{const s=i.getBoundingClientRect();return{id:i.getAttribute("data-handleid"),type:e,nodeId:o,position:i.getAttribute("data-handlepos"),x:(s.left-n.left)/r,y:(s.top-n.top)/r,...Cn(i)}}):null}function Eo(e,t,n,r,o,a=!1,i){o.value=!1,e.selected?(a||e.selected&&t)&&(r([e]),Ae(()=>{i.blur()})):n([e])}function $e(e){return typeof Z(e)<"u"}function rf(e,t,n,r){if(!e||!e.source||!e.target)return n(new Te(Ce.EDGE_INVALID,(e==null?void 0:e.id)??"[ID UNKNOWN]")),!1;let o;return st(e)?o=e:o={...e,id:Yi(e)},o=Fi(o,void 0,r),Vd(o,t)?!1:o}function af(e,t,n,r,o){if(!t.source||!t.target)return o(new Te(Ce.EDGE_INVALID,e.id)),!1;if(!n)return o(new Te(Ce.EDGE_NOT_FOUND,e.id)),!1;const{id:a,...i}=e;return{...i,id:r?Yi(t):a,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle}}function pa(e,t,n){const r={},o=[];for(let a=0;a<e.length;++a){const i=e[a];if(!Et(i)){n(new Te(Ce.NODE_INVALID,i==null?void 0:i.id)||`[ID UNKNOWN|INDEX ${a}]`);continue}const s=Rd(i,t(i.id),i.parentNode);i.parentNode&&(r[i.parentNode]=!0),o[a]=s}for(const a of o){const i=t(a.parentNode)||o.find(s=>s.id===a.parentNode);a.parentNode&&!i&&n(new Te(Ce.NODE_MISSING_PARENT,a.id,a.parentNode)),(a.parentNode||r[a.id])&&(r[a.id]&&(a.isParent=!0),i&&(i.isParent=!0))}return o}function va(e,t,n,r,o,a){let i=o;const s=r.get(i)||new Map;r.set(i,s.set(n,t)),i=`${o}-${e}`;const l=r.get(i)||new Map;if(r.set(i,l.set(n,t)),a){i=`${o}-${e}-${a}`;const c=r.get(i)||new Map;r.set(i,c.set(n,t))}}function No(e,t,n){e.clear();for(const r of n){const{source:o,target:a,sourceHandle:i=null,targetHandle:s=null}=r,l={edgeId:r.id,source:o,target:a,sourceHandle:i,targetHandle:s},c=`${o}-${i}--${a}-${s}`,u=`${a}-${s}--${o}-${i}`;va("source",l,u,e,o,i),va("target",l,c,e,a,s)}}function ga(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0}function So(e,t,n,r,o,a,i,s){const l=[];for(const c of e){const u=st(c)?c:rf(c,s,o,a);if(!u)continue;const d=n(u.source),f=n(u.target);if(!d||!f){o(new Te(Ce.EDGE_SOURCE_TARGET_MISSING,u.id,u.source,u.target));continue}if(!d){o(new Te(Ce.EDGE_SOURCE_MISSING,u.id,u.source));continue}if(!f){o(new Te(Ce.EDGE_TARGET_MISSING,u.id,u.target));continue}if(t&&!t(u,{edges:s,nodes:i,sourceNode:d,targetNode:f})){o(new Te(Ce.EDGE_INVALID,u.id));continue}const h=r(u.id);l.push({...Fi(u,h,a),sourceNode:d,targetNode:f})}return l}const ma=Symbol("vueFlow"),_a=Symbol("nodeId"),ya=Symbol("nodeRef"),sf=Symbol("edgeId"),lf=Symbol("edgeRef"),On=Symbol("slots");function wa(e){const{vueFlowRef:t,snapToGrid:n,snapGrid:r,noDragClassName:o,nodeLookup:a,nodeExtent:i,nodeDragThreshold:s,viewport:l,autoPanOnNodeDrag:c,autoPanSpeed:u,nodesDraggable:d,panBy:f,findNode:h,multiSelectionActive:m,nodesSelectionActive:b,selectNodesOnDrag:g,removeSelectedElements:E,addSelectedNodes:y,updateNodePositions:v,emits:x}=Ne(),{onStart:z,onDrag:B,onStop:$,onClick:w,el:I,disabled:T,id:k,selectable:p,dragHandle:V}=e,_=Pt(!1);let O=[],M,L=null,F={x:void 0,y:void 0},q={x:0,y:0},Y=null,j=!1,W=!1,P=0,A=!1;const R=df(),H=({x:ie,y:le})=>{F={x:ie,y:le};let S=!1;if(O=O.map(N=>{const D={x:ie-N.distance.x,y:le-N.distance.y},{computedPosition:C}=yo(N,n.value?Mn(D,r.value):D,x.error,i.value,N.parentNode?h(N.parentNode):void 0);return S=S||N.position.x!==C.x||N.position.y!==C.y,N.position=C,N}),W=W||S,!!S&&(v(O,!0,!0),_.value=!0,Y)){const[N,D]=_o({id:k,dragItems:O,findNode:h});B({event:Y,node:N,nodes:D})}},X=()=>{if(!L)return;const[ie,le]=Ji(q,L,u.value);if(ie!==0||le!==0){const S={x:(F.x??0)-ie/l.value.zoom,y:(F.y??0)-le/l.value.zoom};f({x:ie,y:le})&&H(S)}P=requestAnimationFrame(X)},te=(ie,le)=>{j=!0;const S=h(k);!g.value&&!m.value&&S&&(S.selected||E()),S&&pe(p)&&g.value&&Eo(S,m.value,y,E,b,!1,le);const N=R(ie.sourceEvent);if(F=N,O=Gd(a.value,d.value,N,k),O.length){const[D,C]=_o({id:k,dragItems:O,findNode:h});z({event:ie.sourceEvent,node:D,nodes:C})}},ne=(ie,le)=>{var S;ie.sourceEvent.type==="touchmove"&&ie.sourceEvent.touches.length>1||(W=!1,s.value===0&&te(ie,le),F=R(ie.sourceEvent),L=((S=t.value)==null?void 0:S.getBoundingClientRect())||null,q=Ue(ie.sourceEvent,L))},ce=(ie,le)=>{const S=R(ie.sourceEvent);if(!A&&j&&c.value&&(A=!0,X()),!j){const N=S.xSnapped-(F.x??0),D=S.ySnapped-(F.y??0);Math.sqrt(N*N+D*D)>s.value&&te(ie,le)}(F.x!==S.xSnapped||F.y!==S.ySnapped)&&O.length&&j&&(Y=ie.sourceEvent,q=Ue(ie.sourceEvent,L),H(S))},be=ie=>{let le=!1;if(!j&&!_.value&&!m.value){const S=ie.sourceEvent,N=R(S),D=N.xSnapped-(F.x??0),C=N.ySnapped-(F.y??0),G=Math.sqrt(D*D+C*C);G!==0&&G<=s.value&&(w==null||w(S),le=!0)}if(O.length&&!le){W&&(v(O,!1,!1),W=!1);const[S,N]=_o({id:k,dragItems:O,findNode:h});$({event:ie.sourceEvent,node:S,nodes:N})}O=[],_.value=!1,A=!1,j=!1,F={x:void 0,y:void 0},cancelAnimationFrame(P)};return ye([()=>pe(T),I],([ie,le],S,N)=>{if(le){const D=Le(le);ie||(M=Au().on("start",C=>ne(C,le)).on("drag",C=>ce(C,le)).on("end",C=>be(C)).filter(C=>{const G=C.target,Q=pe(V);return!C.button&&(!o.value||!ia(G,`.${o.value}`,le)&&(!Q||ia(G,Q,le)))}),D.call(M)),N(()=>{D.on(".drag",null),M&&(M.on("start",null),M.on("drag",null),M.on("end",null))})}}),_}function uf(){return{doubleClick:U(),click:U(),mouseEnter:U(),mouseMove:U(),mouseLeave:U(),contextMenu:U(),updateStart:U(),update:U(),updateEnd:U()}}function cf(e,t){const n=uf();return n.doubleClick.on(r=>{var o,a;t.edgeDoubleClick(r),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,r)}),n.click.on(r=>{var o,a;t.edgeClick(r),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,r)}),n.mouseEnter.on(r=>{var o,a;t.edgeMouseEnter(r),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,r)}),n.mouseMove.on(r=>{var o,a;t.edgeMouseMove(r),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,r)}),n.mouseLeave.on(r=>{var o,a;t.edgeMouseLeave(r),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,r)}),n.contextMenu.on(r=>{var o,a;t.edgeContextMenu(r),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,r)}),n.updateStart.on(r=>{var o,a;t.edgeUpdateStart(r),(a=(o=e.events)==null?void 0:o.updateStart)==null||a.call(o,r)}),n.update.on(r=>{var o,a;t.edgeUpdate(r),(a=(o=e.events)==null?void 0:o.update)==null||a.call(o,r)}),n.updateEnd.on(r=>{var o,a;t.edgeUpdateEnd(r),(a=(o=e.events)==null?void 0:o.updateEnd)==null||a.call(o,r)}),Object.entries(n).reduce((r,[o,a])=>(r.emit[o]=a.trigger,r.on[o]=a.on,r),{emit:{},on:{}})}function df(){const{viewport:e,snapGrid:t,snapToGrid:n,vueFlowRef:r}=Ne();return o=>{var a;const i=((a=r.value)==null?void 0:a.getBoundingClientRect())??{left:0,top:0},s=Ud(o)?o.sourceEvent:o,{x:l,y:c}=Ue(s,i),u=Kt({x:l,y:c},e.value),{x:d,y:f}=n.value?Mn(u,t.value):u;return{xSnapped:d,ySnapped:f,...u}}}function Tn(){return!0}function ba({handleId:e,nodeId:t,type:n,isValidConnection:r,edgeUpdaterType:o,onEdgeUpdate:a,onEdgeUpdateEnd:i}){const{id:s,vueFlowRef:l,connectionMode:c,connectionRadius:u,connectOnClick:d,connectionClickStartHandle:f,nodesConnectable:h,autoPanOnConnect:m,autoPanSpeed:b,findNode:g,panBy:E,startConnection:y,updateConnection:v,endConnection:x,emits:z,viewport:B,edges:$,nodes:w,isValidConnection:I,nodeLookup:T}=Ne();let k=null,p=!1,V=null;function _(M){var L;const F=pe(n)==="target",q=wo(M),Y=Hi(M.target),j=M.currentTarget;if(j&&(q&&M.button===0||!q)){let W=function(ae){S=Ue(ae,be),H=ef(Kt(S,B.value,!1,[1,1]),u.value,T.value,C),N||(D(),N=!0);const he=ua(ae,{handle:H,connectionMode:c.value,fromNodeId:pe(t),fromHandleId:pe(e),fromType:F?"target":"source",isValidConnection:R,doc:Y,lib:"vue",flowId:s,nodeLookup:T.value},$.value,w.value,g,T.value);V=he.handleDomNode,k=he.connection,p=nf(!!H,he.isValid);const ve={...ee,isValid:p,to:he.toHandle&&p?go({x:he.toHandle.x,y:he.toHandle.y},B.value):S,toHandle:he.toHandle,toPosition:p&&he.toHandle?he.toHandle.position:xo[C.position],toNode:he.toHandle?T.value.get(he.toHandle.nodeId):null};if(p&&H&&(ee!=null&&ee.toHandle)&&ve.toHandle&&ee.toHandle.type===ve.toHandle.type&&ee.toHandle.nodeId===ve.toHandle.nodeId&&ee.toHandle.id===ve.toHandle.id&&ee.to.x===ve.to.x&&ee.to.y===ve.to.y)return;const xe=H??he.toHandle;if(v(xe&&p?go({x:xe.x,y:xe.y},B.value):S,he.toHandle,tf(!!xe,p)),ee=ve,!H&&!p&&!V)return bo(le);k&&k.source!==k.target&&V&&(bo(le),le=V,V.classList.add("connecting","vue-flow__handle-connecting"),V.classList.toggle("valid",!!p),V.classList.toggle("vue-flow__handle-valid",!!p))},P=function(ae){"touches"in ae&&ae.touches.length>0||((H||V)&&k&&p&&(a?a(ae,k):z.connect(k)),z.connectEnd(ae),o&&(i==null||i(ae)),bo(le),cancelAnimationFrame(X),x(ae),N=!1,p=!1,k=null,V=null,Y.removeEventListener("mousemove",W),Y.removeEventListener("mouseup",P),Y.removeEventListener("touchmove",W),Y.removeEventListener("touchend",P))};const A=g(pe(t));let R=pe(r)||I.value||Tn;!R&&A&&(R=(F?A.isValidSourcePos:A.isValidTargetPos)||Tn);let H,X=0;const{x:te,y:ne}=Ue(M),ce=ca(pe(o),j),be=(L=l.value)==null?void 0:L.getBoundingClientRect();if(!be||!ce)return;const ie=da(pe(t),ce,pe(e),T.value,c.value);if(!ie)return;let le,S=Ue(M,be),N=!1;const D=()=>{if(!m.value)return;const[ae,he]=Ji(S,be,b.value);E({x:ae,y:he}),X=requestAnimationFrame(D)},C={...ie,nodeId:pe(t),type:ce,position:ie.position},G=T.value.get(pe(t)),J={inProgress:!0,isValid:null,from:Ot(G,C,K.Left,!0),fromHandle:C,fromPosition:C.position,fromNode:G,to:S,toHandle:null,toPosition:xo[C.position],toNode:null};y({nodeId:pe(t),id:pe(e),type:ce,position:(j==null?void 0:j.getAttribute("data-handlepos"))||K.Top,...S},{x:te-be.left,y:ne-be.top}),z.connectStart({event:M,nodeId:pe(t),handleId:pe(e),handleType:ce});let ee=J;Y.addEventListener("mousemove",W),Y.addEventListener("mouseup",P),Y.addEventListener("touchmove",W),Y.addEventListener("touchend",P)}}function O(M){var L,F;if(!d.value)return;const q=pe(n)==="target";if(!f.value){z.clickConnectStart({event:M,nodeId:pe(t),handleId:pe(e)}),y({nodeId:pe(t),type:pe(n),id:pe(e),position:K.Top,...Ue(M)},void 0,!0);return}let Y=pe(r)||I.value||Tn;const j=g(pe(t));if(!Y&&j&&(Y=(q?j.isValidSourcePos:j.isValidTargetPos)||Tn),j&&(typeof j.connectable>"u"?h.value:j.connectable)===!1)return;const W=Hi(M.target),P=ua(M,{handle:{nodeId:pe(t),id:pe(e),type:pe(n),position:K.Top,...Ue(M)},connectionMode:c.value,fromNodeId:f.value.nodeId,fromHandleId:f.value.id??null,fromType:f.value.type,isValidConnection:Y,doc:W,lib:"vue",flowId:s,nodeLookup:T.value},$.value,w.value,g,T.value),A=((L=P.connection)==null?void 0:L.source)===((F=P.connection)==null?void 0:F.target);P.isValid&&P.connection&&!A&&z.connect(P.connection),z.clickConnectEnd(M),x(M,!0)}return{handlePointerDown:_,handleClick:O}}function ff(){return rt(_a,"")}function xa(e){const t=e??ff()??"",n=rt(ya,me(null)),{findNode:r,edges:o,emits:a}=Ne(),i=r(t);return i||a.error(new Te(Ce.NODE_NOT_FOUND,t)),{id:t,nodeEl:n,node:i,parentNode:fe(()=>r(i.parentNode)),connectedEdges:fe(()=>Xi([i],o.value))}}function hf(){return{doubleClick:U(),click:U(),mouseEnter:U(),mouseMove:U(),mouseLeave:U(),contextMenu:U(),dragStart:U(),drag:U(),dragStop:U()}}function pf(e,t){const n=hf();return n.doubleClick.on(r=>{var o,a;t.nodeDoubleClick(r),(a=(o=e.events)==null?void 0:o.doubleClick)==null||a.call(o,r)}),n.click.on(r=>{var o,a;t.nodeClick(r),(a=(o=e.events)==null?void 0:o.click)==null||a.call(o,r)}),n.mouseEnter.on(r=>{var o,a;t.nodeMouseEnter(r),(a=(o=e.events)==null?void 0:o.mouseEnter)==null||a.call(o,r)}),n.mouseMove.on(r=>{var o,a;t.nodeMouseMove(r),(a=(o=e.events)==null?void 0:o.mouseMove)==null||a.call(o,r)}),n.mouseLeave.on(r=>{var o,a;t.nodeMouseLeave(r),(a=(o=e.events)==null?void 0:o.mouseLeave)==null||a.call(o,r)}),n.contextMenu.on(r=>{var o,a;t.nodeContextMenu(r),(a=(o=e.events)==null?void 0:o.contextMenu)==null||a.call(o,r)}),n.dragStart.on(r=>{var o,a;t.nodeDragStart(r),(a=(o=e.events)==null?void 0:o.dragStart)==null||a.call(o,r)}),n.drag.on(r=>{var o,a;t.nodeDrag(r),(a=(o=e.events)==null?void 0:o.drag)==null||a.call(o,r)}),n.dragStop.on(r=>{var o,a;t.nodeDragStop(r),(a=(o=e.events)==null?void 0:o.dragStop)==null||a.call(o,r)}),Object.entries(n).reduce((r,[o,a])=>(r.emit[o]=a.trigger,r.on[o]=a.on,r),{emit:{},on:{}})}function Ea(){const{getSelectedNodes:e,nodeExtent:t,updateNodePositions:n,findNode:r,snapGrid:o,snapToGrid:a,nodesDraggable:i,emits:s}=Ne();return(l,c=!1)=>{const u=a.value?o.value[0]:5,d=a.value?o.value[1]:5,f=c?4:1,h=l.x*u*f,m=l.y*d*f,b=[];for(const g of e.value)if(g.draggable||i&&typeof g.draggable>"u"){const E={x:g.computedPosition.x+h,y:g.computedPosition.y+m},{computedPosition:y}=yo(g,E,s.error,t.value,g.parentNode?r(g.parentNode):void 0);b.push({id:g.id,position:y,from:g.position,distance:{x:l.x,y:l.y},dimensions:g.dimensions})}n(b,!0,!1)}}const ko=.1,vf=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2;function ct(){return Dn("Viewport not initialized yet."),Promise.resolve(!1)}const gf={zoomIn:ct,zoomOut:ct,zoomTo:ct,fitView:ct,setCenter:ct,fitBounds:ct,project:e=>e,screenToFlowCoordinate:e=>e,flowToScreenCoordinate:e=>e,setViewport:ct,setTransform:ct,getViewport:()=>({x:0,y:0,zoom:1}),getTransform:()=>({x:0,y:0,zoom:1}),viewportInitialized:!1};function mf(e){function t(r,o){return new Promise(a=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate((o==null?void 0:o.interpolate)==="linear"?Ft:vn).scaleBy(Co(e.d3Selection,o==null?void 0:o.duration,o==null?void 0:o.ease,()=>{a(!0)}),r):a(!1)})}function n(r,o,a,i){return new Promise(s=>{var l;const{x:c,y:u}=Li({x:-r,y:-o},e.translateExtent),d=Mt.translate(-c,-u).scale(a);e.d3Selection&&e.d3Zoom?(l=e.d3Zoom)==null||l.interpolate((i==null?void 0:i.interpolate)==="linear"?Ft:vn).transform(Co(e.d3Selection,i==null?void 0:i.duration,i==null?void 0:i.ease,()=>{s(!0)}),d):s(!1)})}return fe(()=>e.d3Zoom&&e.d3Selection&&e.dimensions.width&&e.dimensions.height?{viewportInitialized:!0,zoomIn:o=>t(1.2,o),zoomOut:o=>t(1/1.2,o),zoomTo:(o,a)=>new Promise(i=>{e.d3Selection&&e.d3Zoom?e.d3Zoom.interpolate((a==null?void 0:a.interpolate)==="linear"?Ft:vn).scaleTo(Co(e.d3Selection,a==null?void 0:a.duration,a==null?void 0:a.ease,()=>{i(!0)}),o):i(!1)}),setViewport:(o,a)=>n(o.x,o.y,o.zoom,a),setTransform:(o,a)=>n(o.x,o.y,o.zoom,a),getViewport:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),getTransform:()=>({x:e.viewport.x,y:e.viewport.y,zoom:e.viewport.zoom}),fitView:(o={padding:ko,includeHiddenNodes:!1,duration:0})=>{var a,i;const s=[];for(const f of e.nodes)f.dimensions.width&&f.dimensions.height&&((o==null?void 0:o.includeHiddenNodes)||!f.hidden)&&(!((a=o.nodes)!=null&&a.length)||(i=o.nodes)!=null&&i.length&&o.nodes.includes(f.id))&&s.push(f);if(!s.length)return Promise.resolve(!1);const l=ji(s),{x:c,y:u,zoom:d}=Ui(l,e.dimensions.width,e.dimensions.height,o.minZoom??e.minZoom,o.maxZoom??e.maxZoom,o.padding??ko,o.offset);return n(c,u,d,o)},setCenter:(o,a,i)=>{const s=typeof(i==null?void 0:i.zoom)<"u"?i.zoom:e.maxZoom,l=e.dimensions.width/2-o*s,c=e.dimensions.height/2-a*s;return n(l,c,s,i)},fitBounds:(o,a={padding:ko})=>{const{x:i,y:s,zoom:l}=Ui(o,e.dimensions.width,e.dimensions.height,e.minZoom,e.maxZoom,a.padding);return n(i,s,l,a)},project:o=>Kt(o,e.viewport,e.snapToGrid,e.snapGrid),screenToFlowCoordinate:o=>{if(e.vueFlowRef){const{x:a,y:i}=e.vueFlowRef.getBoundingClientRect(),s={x:o.x-a,y:o.y-i};return Kt(s,e.viewport,e.snapToGrid,e.snapGrid)}return{x:0,y:0}},flowToScreenCoordinate:o=>{if(e.vueFlowRef){const{x:a,y:i}=e.vueFlowRef.getBoundingClientRect(),s={x:o.x+a,y:o.y+i};return go(s,e.viewport)}return{x:0,y:0}}}:gf)}function Co(e,t=0,n=vf,r=()=>{}){const o=typeof t=="number"&&t>0;return o||r(),o?e.transition().duration(t).ease(n).on("end",r):e}function _f(e,t,n){const r=Hn(!0);return r.run(()=>{const o=()=>{r.run(()=>{let b,g,E=!!(n.nodes.value.length||n.edges.value.length);b=St([e.modelValue,()=>{var y,v;return(v=(y=e.modelValue)==null?void 0:y.value)==null?void 0:v.length}],([y])=>{y&&Array.isArray(y)&&(g==null||g.pause(),n.setElements(y),!g&&!E&&y.length?E=!0:g==null||g.resume())}),g=St([n.nodes,n.edges,()=>n.edges.value.length,()=>n.nodes.value.length],([y,v])=>{var x;(x=e.modelValue)!=null&&x.value&&Array.isArray(e.modelValue.value)&&(b==null||b.pause(),e.modelValue.value=[...y,...v],Ae(()=>{b==null||b.resume()}))},{immediate:E}),Tt(()=>{b==null||b.stop(),g==null||g.stop()})})},a=()=>{r.run(()=>{let b,g,E=!!n.nodes.value.length;b=St([e.nodes,()=>{var y,v;return(v=(y=e.nodes)==null?void 0:y.value)==null?void 0:v.length}],([y])=>{y&&Array.isArray(y)&&(g==null||g.pause(),n.setNodes(y),!g&&!E&&y.length?E=!0:g==null||g.resume())}),g=St([n.nodes,()=>n.nodes.value.length],([y])=>{var v;(v=e.nodes)!=null&&v.value&&Array.isArray(e.nodes.value)&&(b==null||b.pause(),e.nodes.value=[...y],Ae(()=>{b==null||b.resume()}))},{immediate:E}),Tt(()=>{b==null||b.stop(),g==null||g.stop()})})},i=()=>{r.run(()=>{let b,g,E=!!n.edges.value.length;b=St([e.edges,()=>{var y,v;return(v=(y=e.edges)==null?void 0:y.value)==null?void 0:v.length}],([y])=>{y&&Array.isArray(y)&&(g==null||g.pause(),n.setEdges(y),!g&&!E&&y.length?E=!0:g==null||g.resume())}),g=St([n.edges,()=>n.edges.value.length],([y])=>{var v;(v=e.edges)!=null&&v.value&&Array.isArray(e.edges.value)&&(b==null||b.pause(),e.edges.value=[...y],Ae(()=>{b==null||b.resume()}))},{immediate:E}),Tt(()=>{b==null||b.stop(),g==null||g.stop()})})},s=()=>{r.run(()=>{ye(()=>t.maxZoom,()=>{t.maxZoom&&$e(t.maxZoom)&&n.setMaxZoom(t.maxZoom)},{immediate:!0})})},l=()=>{r.run(()=>{ye(()=>t.minZoom,()=>{t.minZoom&&$e(t.minZoom)&&n.setMinZoom(t.minZoom)},{immediate:!0})})},c=()=>{r.run(()=>{ye(()=>t.translateExtent,()=>{t.translateExtent&&$e(t.translateExtent)&&n.setTranslateExtent(t.translateExtent)},{immediate:!0})})},u=()=>{r.run(()=>{ye(()=>t.nodeExtent,()=>{t.nodeExtent&&$e(t.nodeExtent)&&n.setNodeExtent(t.nodeExtent)},{immediate:!0})})},d=()=>{r.run(()=>{ye(()=>t.applyDefault,()=>{$e(t.applyDefault)&&(n.applyDefault.value=t.applyDefault)},{immediate:!0})})},f=()=>{r.run(()=>{const b=async g=>{let E=g;typeof t.autoConnect=="function"&&(E=await t.autoConnect(g)),E!==!1&&n.addEdges([E])};ye(()=>t.autoConnect,()=>{$e(t.autoConnect)&&(n.autoConnect.value=t.autoConnect)},{immediate:!0}),ye(n.autoConnect,(g,E,y)=>{g?n.onConnect(b):n.hooks.value.connect.off(b),y(()=>{n.hooks.value.connect.off(b)})},{immediate:!0})})},h=()=>{const b=["id","modelValue","translateExtent","nodeExtent","edges","nodes","maxZoom","minZoom","applyDefault","autoConnect"];for(const g of Object.keys(t)){const E=g;if(!b.includes(E)){const y=Ee(()=>t[E]),v=n[E];nn(v)&&r.run(()=>{ye(y,x=>{$e(x)&&(v.value=x)},{immediate:!0})})}}};(()=>{o(),a(),i(),l(),s(),c(),u(),d(),f(),h()})()}),()=>r.stop()}function yf(){return{edgesChange:U(),nodesChange:U(),nodeDoubleClick:U(),nodeClick:U(),nodeMouseEnter:U(),nodeMouseMove:U(),nodeMouseLeave:U(),nodeContextMenu:U(),nodeDragStart:U(),nodeDrag:U(),nodeDragStop:U(),nodesInitialized:U(),miniMapNodeClick:U(),miniMapNodeDoubleClick:U(),miniMapNodeMouseEnter:U(),miniMapNodeMouseMove:U(),miniMapNodeMouseLeave:U(),connect:U(),connectStart:U(),connectEnd:U(),clickConnectStart:U(),clickConnectEnd:U(),paneReady:U(),init:U(),move:U(),moveStart:U(),moveEnd:U(),selectionDragStart:U(),selectionDrag:U(),selectionDragStop:U(),selectionContextMenu:U(),selectionStart:U(),selectionEnd:U(),viewportChangeStart:U(),viewportChange:U(),viewportChangeEnd:U(),paneScroll:U(),paneClick:U(),paneContextMenu:U(),paneMouseEnter:U(),paneMouseMove:U(),paneMouseLeave:U(),edgeContextMenu:U(),edgeMouseEnter:U(),edgeMouseMove:U(),edgeMouseLeave:U(),edgeDoubleClick:U(),edgeClick:U(),edgeUpdateStart:U(),edgeUpdate:U(),edgeUpdateEnd:U(),updateNodeInternals:U(),error:U(e=>Dn(e.message))}}function wf(e,t){const n=vt();Ir(()=>{for(const[o,a]of Object.entries(t.value)){const i=s=>{e(o,s)};a.setEmitter(i),Rt(a.removeEmitter),a.setHasEmitListeners(()=>r(o)),Rt(a.removeHasEmitListeners)}});function r(o){var a;const i=bf(o);return!!((a=n==null?void 0:n.vnode.props)==null?void 0:a[i])}}function bf(e){const[t,...n]=e.split(":");return`on${t.replace(/(?:^|-)(\w)/g,(o,a)=>a.toUpperCase())}${n.length?`:${n.join(":")}`:""}`}function Na(){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:ho.Full,paneDragging:!1,preventScrolling:!0,zoomOnScroll:!0,zoomOnPinch:!0,zoomOnDoubleClick:!0,panOnScroll:!1,panOnScrollSpeed:.5,panOnScrollMode:Xt.Free,paneClickDistance:0,panOnDrag:!0,edgeUpdaterRadius:10,onlyRenderVisibleElements:!1,defaultViewport:{x:0,y:0,zoom:1},nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,defaultMarkerColor:"#b1b1b7",connectionLineStyle:{},connectionLineType:null,connectionLineOptions:{type:bt.Bezier,style:{}},connectionMode:at.Loose,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectionPosition:{x:Number.NaN,y:Number.NaN},connectionRadius:20,connectOnClick:!0,connectionStatus:null,isValidConnection:null,snapGrid:[15,15],snapToGrid:!1,edgesUpdatable:!1,edgesFocusable:!0,nodesFocusable:!0,nodesConnectable:!0,nodesDraggable:!0,nodeDragThreshold:1,elementsSelectable:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,selectionKeyCode:"Shift",multiSelectionKeyCode:In()?"Meta":"Control",zoomActivationKeyCode:In()?"Meta":"Control",deleteKeyCode:"Backspace",panActivationKeyCode:"Space",hooks:yf(),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 xf=["id","vueFlowRef","viewportRef","initialized","modelValue","nodes","edges","maxZoom","minZoom","translateExtent","hooks","defaultEdgeOptions"];function Ef(e,t,n){const r=mf(e),o=S=>{const N=S??[];e.hooks.updateNodeInternals.trigger(N)},a=S=>Bd(S,e.nodes,e.edges),i=S=>zd(S,e.nodes,e.edges),s=S=>Xi(S,e.edges),l=({id:S,type:N,nodeId:D})=>{var C;const G=S?`-${N}-${S}`:`-${N}`;return Array.from(((C=e.connectionLookup.get(`${D}${G}`))==null?void 0:C.values())??[])},c=S=>{if(S)return t.value.get(S)},u=S=>{if(S)return n.value.get(S)},d=(S,N,D)=>{var C,G;const Q=[];for(const J of S){const ee={id:J.id,type:"position",dragging:D,from:J.from};if(N&&(ee.position=J.position,J.parentNode)){const ae=c(J.parentNode);ee.position={x:ee.position.x-(((C=ae==null?void 0:ae.computedPosition)==null?void 0:C.x)??0),y:ee.position.y-(((G=ae==null?void 0:ae.computedPosition)==null?void 0:G.y)??0)}}Q.push(ee)}Q!=null&&Q.length&&e.hooks.nodesChange.trigger(Q)},f=S=>{if(!e.vueFlowRef)return;const N=e.vueFlowRef.querySelector(".vue-flow__transformationpane");if(!N)return;const D=window.getComputedStyle(N),{m22:C}=new window.DOMMatrixReadOnly(D.transform),G=[];for(const Q of S){const J=Q,ee=c(J.id);if(ee){const ae=Cn(J.nodeElement);if(!!(ae.width&&ae.height&&(ee.dimensions.width!==ae.width||ee.dimensions.height!==ae.height||J.forceUpdate))){const ve=J.nodeElement.getBoundingClientRect();ee.dimensions=ae,ee.handleBounds.source=ha("source",J.nodeElement,ve,C,ee.id),ee.handleBounds.target=ha("target",J.nodeElement,ve,C,ee.id),G.push({id:ee.id,type:"dimensions",dimensions:ae})}}}!e.fitViewOnInitDone&&e.fitViewOnInit&&r.value.fitView().then(()=>{e.fitViewOnInitDone=!0}),G.length&&e.hooks.nodesChange.trigger(G)},h=(S,N)=>{const D=new Set,C=new Set;for(const J of S)Et(J)?D.add(J.id):st(J)&&C.add(J.id);const G=ut(t.value,D,!0),Q=ut(n.value,C);if(e.multiSelectionActive){for(const J of D)G.push(lt(J,N));for(const J of C)Q.push(lt(J,N))}G.length&&e.hooks.nodesChange.trigger(G),Q.length&&e.hooks.edgesChange.trigger(Q)},m=S=>{if(e.multiSelectionActive){const N=S.map(D=>lt(D.id,!0));e.hooks.nodesChange.trigger(N);return}e.hooks.nodesChange.trigger(ut(t.value,new Set(S.map(N=>N.id)),!0)),e.hooks.edgesChange.trigger(ut(n.value))},b=S=>{if(e.multiSelectionActive){const N=S.map(D=>lt(D.id,!0));e.hooks.edgesChange.trigger(N);return}e.hooks.edgesChange.trigger(ut(n.value,new Set(S.map(N=>N.id)))),e.hooks.nodesChange.trigger(ut(t.value,new Set,!0))},g=S=>{h(S,!0)},E=S=>{const D=(S||e.nodes).map(C=>(C.selected=!1,lt(C.id,!1)));e.hooks.nodesChange.trigger(D)},y=S=>{const D=(S||e.edges).map(C=>(C.selected=!1,lt(C.id,!1)));e.hooks.edgesChange.trigger(D)},v=S=>{if(!S||!S.length)return h([],!1);const N=S.reduce((D,C)=>{const G=lt(C.id,!1);return Et(C)?D.nodes.push(G):D.edges.push(G),D},{nodes:[],edges:[]});N.nodes.length&&e.hooks.nodesChange.trigger(N.nodes),N.edges.length&&e.hooks.edgesChange.trigger(N.edges)},x=S=>{var N;(N=e.d3Zoom)==null||N.scaleExtent([S,e.maxZoom]),e.minZoom=S},z=S=>{var N;(N=e.d3Zoom)==null||N.scaleExtent([e.minZoom,S]),e.maxZoom=S},B=S=>{var N;(N=e.d3Zoom)==null||N.translateExtent(S),e.translateExtent=S},$=S=>{e.nodeExtent=S,o()},w=S=>{var N;(N=e.d3Zoom)==null||N.clickDistance(S)},I=S=>{e.nodesDraggable=S,e.nodesConnectable=S,e.elementsSelectable=S},T=S=>{const N=S instanceof Function?S(e.nodes):S;!e.initialized&&!N.length||(e.nodes=pa(N,c,e.hooks.error.trigger))},k=S=>{const N=S instanceof Function?S(e.edges):S;if(!e.initialized&&!N.length)return;const D=So(N,e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);No(e.connectionLookup,n.value,D),e.edges=D},p=S=>{const N=S instanceof Function?S([...e.nodes,...e.edges]):S;!e.initialized&&!N.length||(T(N.filter(Et)),k(N.filter(st)))},V=S=>{let N=S instanceof Function?S(e.nodes):S;N=Array.isArray(N)?N:[N];const D=pa(N,c,e.hooks.error.trigger),C=[];for(const G of D)C.push(ta(G));C.length&&e.hooks.nodesChange.trigger(C)},_=S=>{let N=S instanceof Function?S(e.edges):S;N=Array.isArray(N)?N:[N];const D=So(N,e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges),C=[];for(const G of D)C.push(ta(G));C.length&&e.hooks.edgesChange.trigger(C)},O=(S,N=!0,D=!1)=>{const C=S instanceof Function?S(e.nodes):S,G=Array.isArray(C)?C:[C],Q=[],J=[];function ee(he){const ve=s(he);for(const xe of ve)(!$e(xe.deletable)||xe.deletable)&&J.push(oa(xe.id,xe.source,xe.target,xe.sourceHandle,xe.targetHandle))}function ae(he){const ve=[];for(const xe of e.nodes)xe.parentNode===he&&ve.push(xe);if(ve.length){for(const xe of ve)Q.push(na(xe.id));N&&ee(ve);for(const xe of ve)ae(xe.id)}}for(const he of G){const ve=typeof he=="string"?c(he):he;ve&&($e(ve.deletable)&&!ve.deletable||(Q.push(na(ve.id)),N&&ee([ve]),D&&ae(ve.id)))}J.length&&e.hooks.edgesChange.trigger(J),Q.length&&e.hooks.nodesChange.trigger(Q)},M=S=>{const N=S instanceof Function?S(e.edges):S,D=Array.isArray(N)?N:[N],C=[];for(const G of D){const Q=typeof G=="string"?u(G):G;Q&&($e(Q.deletable)&&!Q.deletable||C.push(oa(typeof G=="string"?G:G.id,Q.source,Q.target,Q.sourceHandle,Q.targetHandle)))}e.hooks.edgesChange.trigger(C)},L=(S,N,D=!0)=>{const C=u(S.id);if(!C)return!1;const G=e.edges.indexOf(C),Q=af(S,N,C,D,e.hooks.error.trigger);if(Q){const[J]=So([Q],e.isValidConnection,c,u,e.hooks.error.trigger,e.defaultEdgeOptions,e.nodes,e.edges);return e.edges=e.edges.map((ee,ae)=>ae===G?J:ee),No(e.connectionLookup,n.value,[J]),J}return!1},F=(S,N,D={replace:!1})=>{const C=u(S);if(!C)return;const G=typeof N=="function"?N(C):N;C.data=D.replace?G:{...C.data,...G}},q=S=>ea(S,e.nodes),Y=S=>{const N=ea(S,e.edges);return No(e.connectionLookup,n.value,N),N},j=(S,N,D={replace:!1})=>{const C=c(S);if(!C)return;const G=typeof N=="function"?N(C):N;D.replace?e.nodes.splice(e.nodes.indexOf(C),1,G):Object.assign(C,G)},W=(S,N,D={replace:!1})=>{const C=c(S);if(!C)return;const G=typeof N=="function"?N(C):N;C.data=D.replace?G:{...C.data,...G}},P=(S,N,D=!1)=>{D?e.connectionClickStartHandle=S:e.connectionStartHandle=S,e.connectionEndHandle=null,e.connectionStatus=null,N&&(e.connectionPosition=N)},A=(S,N=null,D=null)=>{e.connectionStartHandle&&(e.connectionPosition=S,e.connectionEndHandle=N,e.connectionStatus=D)},R=(S,N)=>{e.connectionPosition={x:Number.NaN,y:Number.NaN},e.connectionEndHandle=null,e.connectionStatus=null,N?e.connectionClickStartHandle=null:e.connectionStartHandle=null},H=S=>{const N=Ad(S),D=N?null:Zt(S)?S:c(S.id);return!N&&!D?[null,null,N]:[N?S:Sn(D),D,N]},X=(S,N=!0,D=e.nodes)=>{const[C,G,Q]=H(S);if(!C)return[];const J=[];for(const ee of D||e.nodes){if(!Q&&(ee.id===G.id||!ee.computedPosition))continue;const ae=Sn(ee),he=kn(ae,C);(N&&he>0||he>=ae.width*ae.height||he>=Number(C.width)*Number(C.height))&&J.push(ee)}return J},te=(S,N,D=!0)=>{const[C]=H(S);if(!C)return!1;const G=kn(C,N);return D&&G>0||G>=Number(C.width)*Number(C.height)},ne=S=>{const{viewport:N,dimensions:D,d3Zoom:C,d3Selection:G,translateExtent:Q}=e;if(!C||!G||!S.x&&!S.y)return!1;const J=Mt.translate(N.x+S.x,N.y+S.y).scale(N.zoom),ee=[[0,0],[D.width,D.height]],ae=C.constrain()(J,ee,Q),he=e.viewport.x!==ae.x||e.viewport.y!==ae.y||e.viewport.zoom!==ae.k;return C.transform(G,ae),he},ce=S=>{const N=S instanceof Function?S(e):S,D=["d3Zoom","d3Selection","d3ZoomHandler","viewportRef","vueFlowRef","dimensions","hooks"];$e(N.defaultEdgeOptions)&&(e.defaultEdgeOptions=N.defaultEdgeOptions);const C=N.modelValue||N.nodes||N.edges?[]:void 0;C&&(N.modelValue&&C.push(...N.modelValue),N.nodes&&C.push(...N.nodes),N.edges&&C.push(...N.edges),p(C));const G=()=>{$e(N.maxZoom)&&z(N.maxZoom),$e(N.minZoom)&&x(N.minZoom),$e(N.translateExtent)&&B(N.translateExtent)};for(const Q of Object.keys(N)){const J=Q,ee=N[J];![...xf,...D].includes(J)&&$e(ee)&&(e[J]=ee)}qn(()=>e.d3Zoom).not.toBeNull().then(G),e.initialized||(e.initialized=!0)};return{updateNodePositions:d,updateNodeDimensions:f,setElements:p,setNodes:T,setEdges:k,addNodes:V,addEdges:_,removeNodes:O,removeEdges:M,findNode:c,findEdge:u,updateEdge:L,updateEdgeData:F,updateNode:j,updateNodeData:W,applyEdgeChanges:Y,applyNodeChanges:q,addSelectedElements:g,addSelectedNodes:m,addSelectedEdges:b,setMinZoom:x,setMaxZoom:z,setTranslateExtent:B,setNodeExtent:$,setPaneClickDistance:w,removeSelectedElements:v,removeSelectedNodes:E,removeSelectedEdges:y,startConnection:P,updateConnection:A,endConnection:R,setInteractive:I,setState:ce,getIntersectingNodes:X,getIncomers:a,getOutgoers:i,getConnectedEdges:s,getHandleConnections:l,isNodeIntersecting:te,panBy:ne,fitView:S=>r.value.fitView(S),zoomIn:S=>r.value.zoomIn(S),zoomOut:S=>r.value.zoomOut(S),zoomTo:(S,N)=>r.value.zoomTo(S,N),setViewport:(S,N)=>r.value.setViewport(S,N),setTransform:(S,N)=>r.value.setTransform(S,N),getViewport:()=>r.value.getViewport(),getTransform:()=>r.value.getTransform(),setCenter:(S,N,D)=>r.value.setCenter(S,N,D),fitBounds:(S,N)=>r.value.fitBounds(S,N),project:S=>r.value.project(S),screenToFlowCoordinate:S=>r.value.screenToFlowCoordinate(S),flowToScreenCoordinate:S=>r.value.flowToScreenCoordinate(S),toObject:()=>{const S=[],N=[];for(const D of e.nodes){const{computedPosition:C,handleBounds:G,selected:Q,dimensions:J,isParent:ee,resizing:ae,dragging:he,events:ve,...xe}=D;S.push(xe)}for(const D of e.edges){const{selected:C,sourceNode:G,targetNode:Q,events:J,...ee}=D;N.push(ee)}return JSON.parse(JSON.stringify({nodes:S,edges:N,position:[e.viewport.x,e.viewport.y],zoom:e.viewport.zoom,viewport:e.viewport}))},fromObject:S=>new Promise(N=>{const{nodes:D,edges:C,position:G,zoom:Q,viewport:J}=S;if(D&&T(D),C&&k(C),J!=null&&J.x&&(J!=null&&J.y)||G){const ee=(J==null?void 0:J.x)||G[0],ae=(J==null?void 0:J.y)||G[1],he=(J==null?void 0:J.zoom)||Q||e.viewport.zoom;return qn(()=>r.value.viewportInitialized).toBe(!0).then(()=>{r.value.setViewport({x:ee,y:ae,zoom:he}).then(()=>{N(!0)})})}else N(!0)}),updateNodeInternals:o,viewportHelper:r,$reset:()=>{const S=Na();if(e.edges=[],e.nodes=[],e.d3Zoom&&e.d3Selection){const N=Mt.translate(S.defaultViewport.x??0,S.defaultViewport.y??0).scale(xt(S.defaultViewport.zoom??1,S.minZoom,S.maxZoom)),D=e.viewportRef.getBoundingClientRect(),C=[[0,0],[D.width,D.height]],G=e.d3Zoom.constrain()(N,C,S.translateExtent);e.d3Zoom.transform(e.d3Selection,G)}ce(S)},$destroy:()=>{}}}const Nf=["data-id","data-handleid","data-nodeid","data-handlepos"],dt=_e({...{name:"Handle",compatConfig:{MODE:3}},props:{id:{default:null},type:{},position:{default:()=>K.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=Cr(e,["position","connectable","connectableStart","connectableEnd","id"]),r=Ee(()=>n.type??"source"),o=Ee(()=>n.isValidConnection??null),{id:a,connectionStartHandle:i,connectionClickStartHandle:s,connectionEndHandle:l,vueFlowRef:c,nodesConnectable:u,noDragClassName:d,noPanClassName:f}=Ne(),{id:h,node:m,nodeEl:b,connectedEdges:g}=xa(),E=me(),y=Ee(()=>typeof e.connectableStart<"u"?e.connectableStart:!0),v=Ee(()=>typeof e.connectableEnd<"u"?e.connectableEnd:!0),x=Ee(()=>{var k,p,V,_,O,M;return((k=i.value)==null?void 0:k.nodeId)===h&&((p=i.value)==null?void 0:p.id)===e.id&&((V=i.value)==null?void 0:V.type)===r.value||((_=l.value)==null?void 0:_.nodeId)===h&&((O=l.value)==null?void 0:O.id)===e.id&&((M=l.value)==null?void 0:M.type)===r.value}),z=Ee(()=>{var k,p,V;return((k=s.value)==null?void 0:k.nodeId)===h&&((p=s.value)==null?void 0:p.id)===e.id&&((V=s.value)==null?void 0:V.type)===r.value}),{handlePointerDown:B,handleClick:$}=ba({nodeId:h,handleId:e.id,isValidConnection:o,type:r}),w=fe(()=>typeof e.connectable=="string"&&e.connectable==="single"?!g.value.some(k=>{const p=k[`${r.value}Handle`];return k[r.value]!==h?!1:p?p===e.id:!0}):typeof e.connectable=="number"?g.value.filter(k=>{const p=k[`${r.value}Handle`];return k[r.value]!==h?!1:p?p===e.id:!0}).length<e.connectable:typeof e.connectable=="function"?e.connectable(m,g.value):$e(e.connectable)?e.connectable:u.value);Ke(()=>{var k;if(!m.dimensions.width||!m.dimensions.height)return;const p=(k=m.handleBounds[r.value])==null?void 0:k.find(q=>q.id===e.id);if(!c.value||p)return;const V=c.value.querySelector(".vue-flow__transformationpane");if(!b.value||!E.value||!V||!e.id)return;const _=b.value.getBoundingClientRect(),O=E.value.getBoundingClientRect(),M=window.getComputedStyle(V),{m22:L}=new window.DOMMatrixReadOnly(M.transform),F={id:e.id,position:e.position,x:(O.left-_.left)/L,y:(O.top-_.top)/L,type:r.value,nodeId:h,...Cn(E.value)};m.handleBounds[r.value]=[...m.handleBounds[r.value]??[],F]});function I(k){const p=wo(k);w.value&&y.value&&(p&&k.button===0||!p)&&B(k)}function T(k){!h||!s.value&&!y.value||w.value&&$(k)}return t({handleClick:$,handlePointerDown:B,onClick:T,onPointerDown:I}),(k,p)=>(oe(),de("div",{ref_key:"handle",ref:E,"data-id":`${Z(a)}-${Z(h)}-${e.id}-${r.value}`,"data-handleid":e.id,"data-nodeid":Z(h),"data-handlepos":k.position,class:pt(["vue-flow__handle",[`vue-flow__handle-${k.position}`,`vue-flow__handle-${e.id}`,Z(d),Z(f),r.value,{connectable:w.value,connecting:z.value,connectablestart:y.value,connectableend:v.value,connectionindicator:w.value&&(y.value&&!x.value||v.value&&x.value)}]]),onMousedown:I,onTouchstartPassive:I,onClick:T},[ke(k.$slots,"default",{id:k.id})],42,Nf))}}),Pn=function({sourcePosition:e=K.Bottom,targetPosition:t=K.Top,label:n,connectable:r=!0,isValidTargetPos:o,isValidSourcePos:a,data:i}){const s=i.label??n;return[we(dt,{type:"target",position:t,connectable:r,isValidConnection:o}),typeof s!="string"&&s?we(s):we(Ve,[s]),we(dt,{type:"source",position:e,connectable:r,isValidConnection:a})]};Pn.props=["sourcePosition","targetPosition","label","isValidTargetPos","isValidSourcePos","connectable","data"],Pn.inheritAttrs=!1,Pn.compatConfig={MODE:3};const Sf=Pn,An=function({targetPosition:e=K.Top,label:t,connectable:n=!0,isValidTargetPos:r,data:o}){const a=o.label??t;return[we(dt,{type:"target",position:e,connectable:n,isValidConnection:r}),typeof a!="string"&&a?we(a):we(Ve,[a])]};An.props=["targetPosition","label","isValidTargetPos","connectable","data"],An.inheritAttrs=!1,An.compatConfig={MODE:3};const kf=An,Rn=function({sourcePosition:e=K.Bottom,label:t,connectable:n=!0,isValidSourcePos:r,data:o}){const a=o.label??t;return[typeof a!="string"&&a?we(a):we(Ve,[a]),we(dt,{type:"source",position:e,connectable:n,isValidConnection:r})]};Rn.props=["sourcePosition","label","isValidSourcePos","connectable","data"],Rn.inheritAttrs=!1,Rn.compatConfig={MODE:3};const Cf=Rn,$f=["transform"],If=["width","height","x","y","rx","ry"],Mf=["y"],Df=_e({...{name:"EdgeText",compatConfig:{MODE:3}},props:{x:{},y:{},label:{},labelStyle:{default:()=>({})},labelShowBg:{type:Boolean,default:!0},labelBgStyle:{default:()=>({})},labelBgPadding:{default:()=>[2,4]},labelBgBorderRadius:{default:2}},setup(e){const t=me({x:0,y:0,width:0,height:0}),n=me(null),r=fe(()=>`translate(${e.x-t.value.width/2} ${e.y-t.value.height/2})`);Ke(o),ye([()=>e.x,()=>e.y,n,()=>e.label],o);function o(){if(!n.value)return;const a=n.value.getBBox();(a.width!==t.value.width||a.height!==t.value.height)&&(t.value=a)}return(a,i)=>(oe(),de("g",{transform:r.value,class:"vue-flow__edge-textwrapper"},[a.labelShowBg?(oe(),de("rect",{key:0,class:"vue-flow__edge-textbg",width:`${t.value.width+2*a.labelBgPadding[0]}px`,height:`${t.value.height+2*a.labelBgPadding[1]}px`,x:-a.labelBgPadding[0],y:-a.labelBgPadding[1],style:ze(a.labelBgStyle),rx:a.labelBgBorderRadius,ry:a.labelBgBorderRadius},null,12,If)):De("",!0),ue("text",Gn(a.$attrs,{ref_key:"el",ref:n,class:"vue-flow__edge-text",y:t.value.height/2,dy:"0.3em",style:a.labelStyle}),[ke(a.$slots,"default",{},()=>[typeof a.label!="string"?(oe(),Oe(gt(a.label),{key:0})):(oe(),de(Ve,{key:1},[Ye(Pe(a.label),1)],64))])],16,Mf)],8,$f))}}),Of=["id","d","marker-end","marker-start"],Tf=["d","stroke-width"],zn=_e({...{name:"BaseEdge",inheritAttrs:!1,compatConfig:{MODE:3}},props:{id:{},labelX:{},labelY:{},path:{},label:{},markerStart:{},markerEnd:{},interactionWidth:{default:20},labelStyle:{},labelShowBg:{type:Boolean},labelBgStyle:{},labelBgPadding:{},labelBgBorderRadius:{}},setup(e,{expose:t}){const n=me(null),r=me(null),o=me(null),a=Tr();return t({pathEl:n,interactionEl:r,labelEl:o}),(i,s)=>(oe(),de(Ve,null,[ue("path",Gn(Z(a),{id:i.id,ref_key:"pathEl",ref:n,d:i.path,class:"vue-flow__edge-path","marker-end":i.markerEnd,"marker-start":i.markerStart}),null,16,Of),i.interactionWidth?(oe(),de("path",{key:0,ref_key:"interactionEl",ref:r,fill:"none",d:i.path,"stroke-width":i.interactionWidth,"stroke-opacity":0,class:"vue-flow__edge-interaction"},null,8,Tf)):De("",!0),i.label&&i.labelX&&i.labelY?(oe(),Oe(Df,{key:1,ref_key:"labelEl",ref:o,x:i.labelX,y:i.labelY,label:i.label,"label-show-bg":i.labelShowBg,"label-bg-style":i.labelBgStyle,"label-bg-padding":i.labelBgPadding,"label-bg-border-radius":i.labelBgBorderRadius,"label-style":i.labelStyle},null,8,["x","y","label","label-show-bg","label-bg-style","label-bg-padding","label-bg-border-radius","label-style"])):De("",!0)],64))}});function Sa({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,a=n<e?n+o:n-o,i=Math.abs(r-t)/2,s=r<t?r+i:r-i;return[a,s,o,i]}function ka({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:a,targetControlX:i,targetControlY:s}){const l=e*.125+o*.375+i*.375+n*.125,c=t*.125+a*.375+s*.375+r*.125,u=Math.abs(l-e),d=Math.abs(c-t);return[l,c,u,d]}function Bn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ca({pos:e,x1:t,y1:n,x2:r,y2:o,c:a}){let i,s;switch(e){case K.Left:i=t-Bn(t-r,a),s=n;break;case K.Right:i=t+Bn(r-t,a),s=n;break;case K.Top:i=t,s=n-Bn(n-o,a);break;case K.Bottom:i=t,s=n+Bn(o-n,a);break}return[i,s]}function $a(e){const{sourceX:t,sourceY:n,sourcePosition:r=K.Bottom,targetX:o,targetY:a,targetPosition:i=K.Top,curvature:s=.25}=e,[l,c]=Ca({pos:r,x1:t,y1:n,x2:o,y2:a,c:s}),[u,d]=Ca({pos:i,x1:o,y1:a,x2:t,y2:n,c:s}),[f,h,m,b]=ka({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:l,sourceControlY:c,targetControlX:u,targetControlY:d});return[`M${t},${n} C${l},${c} ${u},${d} ${o},${a}`,f,h,m,b]}function Ia({pos:e,x1:t,y1:n,x2:r,y2:o}){let a,i;switch(e){case K.Left:case K.Right:a=.5*(t+r),i=n;break;case K.Top:case K.Bottom:a=t,i=.5*(n+o);break}return[a,i]}function Ma(e){const{sourceX:t,sourceY:n,sourcePosition:r=K.Bottom,targetX:o,targetY:a,targetPosition:i=K.Top}=e,[s,l]=Ia({pos:r,x1:t,y1:n,x2:o,y2:a}),[c,u]=Ia({pos:i,x1:o,y1:a,x2:t,y2:n}),[d,f,h,m]=ka({sourceX:t,sourceY:n,targetX:o,targetY:a,sourceControlX:s,sourceControlY:l,targetControlX:c,targetControlY:u});return[`M${t},${n} C${s},${l} ${c},${u} ${o},${a}`,d,f,h,m]}const Da={[K.Left]:{x:-1,y:0},[K.Right]:{x:1,y:0},[K.Top]:{x:0,y:-1},[K.Bottom]:{x:0,y:1}};function Pf({source:e,sourcePosition:t=K.Bottom,target:n}){return t===K.Left||t===K.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 Oa(e,t){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}function Af({source:e,sourcePosition:t=K.Bottom,target:n,targetPosition:r=K.Top,center:o,offset:a}){const i=Da[t],s=Da[r],l={x:e.x+i.x*a,y:e.y+i.y*a},c={x:n.x+s.x*a,y:n.y+s.y*a},u=Pf({source:l,sourcePosition:t,target:c}),d=u.x!==0?"x":"y",f=u[d];let h,m,b;const g={x:0,y:0},E={x:0,y:0},[y,v,x,z]=Sa({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(i[d]*s[d]===-1){m=o.x??y,b=o.y??v;const $=[{x:m,y:l.y},{x:m,y:c.y}],w=[{x:l.x,y:b},{x:c.x,y:b}];i[d]===f?h=d==="x"?$:w:h=d==="x"?w:$}else{const $=[{x:l.x,y:c.y}],w=[{x:c.x,y:l.y}];if(d==="x"?h=i.x===f?w:$:h=i.y===f?$:w,t===r){const V=Math.abs(e[d]-n[d]);if(V<=a){const _=Math.min(a-1,a-V);i[d]===f?g[d]=(l[d]>e[d]?-1:1)*_:E[d]=(c[d]>n[d]?-1:1)*_}}if(t!==r){const V=d==="x"?"y":"x",_=i[d]===s[V],O=l[V]>c[V],M=l[V]<c[V];(i[d]===1&&(!_&&O||_&&M)||i[d]!==1&&(!_&&M||_&&O))&&(h=d==="x"?$:w)}const I={x:l.x+g.x,y:l.y+g.y},T={x:c.x+E.x,y:c.y+E.y},k=Math.max(Math.abs(I.x-h[0].x),Math.abs(T.x-h[0].x)),p=Math.max(Math.abs(I.y-h[0].y),Math.abs(T.y-h[0].y));k>=p?(m=(I.x+T.x)/2,b=h[0].y):(m=h[0].x,b=(I.y+T.y)/2)}return[[e,{x:l.x+g.x,y:l.y+g.y},...h,{x:c.x+E.x,y:c.y+E.y},n],m,b,x,z]}function Rf(e,t,n,r){const o=Math.min(Oa(e,t)/2,Oa(t,n)/2,r),{x:a,y:i}=t;if(e.x===a&&a===n.x||e.y===i&&i===n.y)return`L${a} ${i}`;if(e.y===i){const c=e.x<n.x?-1:1,u=e.y<n.y?1:-1;return`L ${a+o*c},${i}Q ${a},${i} ${a},${i+o*u}`}const s=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${a},${i+o*l}Q ${a},${i} ${a+o*s},${i}`}function $o(e){const{sourceX:t,sourceY:n,sourcePosition:r=K.Bottom,targetX:o,targetY:a,targetPosition:i=K.Top,borderRadius:s=5,centerX:l,centerY:c,offset:u=20}=e,[d,f,h,m,b]=Af({source:{x:t,y:n},sourcePosition:r,target:{x:o,y:a},targetPosition:i,center:{x:l,y:c},offset:u});return[d.reduce((E,y,v)=>{let x;return v>0&&v<d.length-1?x=Rf(d[v-1],y,d[v+1],s):x=`${v===0?"M":"L"}${y.x} ${y.y}`,E+=x,E},""),f,h,m,b]}function zf(e){const{sourceX:t,sourceY:n,targetX:r,targetY:o}=e,[a,i,s,l]=Sa({sourceX:t,sourceY:n,targetX:r,targetY:o});return[`M ${t},${n}L ${r},${o}`,a,i,s,l]}const Bf=_e({name:"StraightEdge",props:["label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=zf(e);return we(zn,{path:n,labelX:r,labelY:o,...t,...e})}}}),Ta=_e({name:"SmoothStepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","borderRadius","markerEnd","markerStart","interactionWidth","offset"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=$o({...e,sourcePosition:e.sourcePosition??K.Bottom,targetPosition:e.targetPosition??K.Top});return we(zn,{path:n,labelX:r,labelY:o,...t,...e})}}}),Vf=_e({name:"StepEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],setup(e,{attrs:t}){return()=>we(Ta,{...e,...t,borderRadius:0})}}),Lf=_e({name:"BezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","curvature","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=$a({...e,sourcePosition:e.sourcePosition??K.Bottom,targetPosition:e.targetPosition??K.Top});return we(zn,{path:n,labelX:r,labelY:o,...t,...e})}}}),Hf=_e({name:"SimpleBezierEdge",props:["sourcePosition","targetPosition","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","sourceY","sourceX","targetX","targetY","markerEnd","markerStart","interactionWidth"],compatConfig:{MODE:3},setup(e,{attrs:t}){return()=>{const[n,r,o]=Ma({...e,sourcePosition:e.sourcePosition??K.Bottom,targetPosition:e.targetPosition??K.Top});return we(zn,{path:n,labelX:r,labelY:o,...t,...e})}}}),Ff={input:Cf,default:Sf,output:kf},Gf={default:Lf,straight:Bf,step:Vf,smoothstep:Ta,simplebezier:Hf};function Yf(e,t,n){const r=fe(()=>b=>t.value.get(b)),o=fe(()=>b=>n.value.get(b)),a=fe(()=>{const b={...Gf,...e.edgeTypes},g=Object.keys(b);for(const E of e.edges)E.type&&!g.includes(E.type)&&(b[E.type]=E.type);return b}),i=fe(()=>{const b={...Ff,...e.nodeTypes},g=Object.keys(b);for(const E of e.nodes)E.type&&!g.includes(E.type)&&(b[E.type]=E.type);return b}),s=fe(()=>e.onlyRenderVisibleElements?Wi(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 b=[];for(const g of e.edges){const E=t.value.get(g.source),y=t.value.get(g.target);Wd({sourcePos:E.computedPosition||{x:0,y:0},targetPos:y.computedPosition||{x:0,y:0},sourceWidth:E.dimensions.width,sourceHeight:E.dimensions.height,targetWidth:y.dimensions.width,targetHeight:y.dimensions.height,width:e.dimensions.width,height:e.dimensions.height,viewport:e.viewport})&&b.push(g)}return b}return e.edges}),c=fe(()=>[...s.value,...l.value]),u=fe(()=>{const b=[];for(const g of e.nodes)g.selected&&b.push(g);return b}),d=fe(()=>{const b=[];for(const g of e.edges)g.selected&&b.push(g);return b}),f=fe(()=>[...u.value,...d.value]),h=fe(()=>{const b=[];for(const g of e.nodes)g.dimensions.width&&g.dimensions.height&&g.handleBounds!==void 0&&b.push(g);return b}),m=fe(()=>s.value.length>0&&h.value.length===s.value.length);return{getNode:r,getEdge:o,getElements:c,getEdgeTypes:a,getNodeTypes:i,getEdges:l,getNodes:s,getSelectedElements:f,getSelectedNodes:u,getSelectedEdges:d,getNodesInitialized:h,areNodesInitialized:m}}class Nt{constructor(){this.currentId=0,this.flows=new Map}static getInstance(){var t;const n=(t=vt())==null?void 0:t.appContext.app,r=(n==null?void 0:n.config.globalProperties.$vueFlowStorage)??Nt.instance;return Nt.instance=r??new Nt,n&&(n.config.globalProperties.$vueFlowStorage=Nt.instance),Nt.instance}set(t,n){return this.flows.set(t,n)}get(t){return this.flows.get(t)}remove(t){return this.flows.delete(t)}create(t,n){const r=Na(),o=$r(r),a={};for(const[f,h]of Object.entries(o.hooks)){const m=`on${f.charAt(0).toUpperCase()+f.slice(1)}`;a[m]=h.on}const i={};for(const[f,h]of Object.entries(o.hooks))i[f]=h.trigger;const s=fe(()=>{const f=new Map;for(const h of o.nodes)f.set(h.id,h);return f}),l=fe(()=>{const f=new Map;for(const h of o.edges)f.set(h.id,h);return f}),c=Yf(o,s,l),u=Ef(o,s,l);u.setState({...o,...n});const d={...a,...c,...u,...Ys(o),nodeLookup:s,edgeLookup:l,emits:i,id:t,vueFlowVersion:"1.46.2",$destroy:()=>{this.remove(t)}};return this.set(t,d),d}getId(){return`vue-flow-${this.currentId++}`}}function Ne(e){const t=Nt.getInstance(),n=Ln(),r=typeof e=="object",o=r?e:{id:e},a=o.id,i=a??(n==null?void 0:n.vueFlowId);let s;if(n){const l=rt(ma,null);typeof l<"u"&&l!==null&&(!i||l.id===i)&&(s=l)}if(s||i&&(s=t.get(i)),!s||i&&s.id!==i){const l=a??t.getId(),c=t.create(l,o);s=c,(n??Hn(!0)).run(()=>{ye(c.applyDefault,(d,f,h)=>{const m=g=>{c.applyNodeChanges(g)},b=g=>{c.applyEdgeChanges(g)};d?(c.onNodesChange(m),c.onEdgesChange(b)):(c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(b)),h(()=>{c.hooks.value.nodesChange.off(m),c.hooks.value.edgesChange.off(b)})},{immediate:!0}),Rt(()=>{if(s){const d=t.get(s.id);d?d.$destroy():Dn(`No store instance found for id ${s.id} in storage.`)}})})}else r&&s.setState(o);if(n&&(ht(ma,s),n.vueFlowId=s.id),r){const l=vt();(l==null?void 0:l.type.name)!=="VueFlow"&&s.emits.error(new Te(Ce.USEVUEFLOW_OPTIONS))}return s}function qf(e){const{emits:t,dimensions:n}=Ne();let r;Ke(()=>{const o=()=>{if(!e.value||!(e.value.checkVisibility()??!0))return;const a=Cn(e.value);(a.width===0||a.height===0)&&t.error(new Te(Ce.MISSING_VIEWPORT_DIMENSIONS)),n.value={width:a.width||500,height:a.height||500}};o(),window.addEventListener("resize",o),e.value&&(r=new ResizeObserver(()=>o()),r.observe(e.value)),Fn(()=>{window.removeEventListener("resize",o),r&&e.value&&r.unobserve(e.value)})})}const jf=_e({...{name:"UserSelection",compatConfig:{MODE:3}},props:{userSelectionRect:{}},setup(e){return(t,n)=>(oe(),de("div",{class:"vue-flow__selection vue-flow__container",style:ze({width:`${t.userSelectionRect.width}px`,height:`${t.userSelectionRect.height}px`,transform:`translate(${t.userSelectionRect.x}px, ${t.userSelectionRect.y}px)`})},null,4))}}),Wf=["tabIndex"],Xf=_e({...{name:"NodesSelection",compatConfig:{MODE:3}},setup(e){const{emits:t,viewport:n,getSelectedNodes:r,noPanClassName:o,disableKeyboardA11y:a,userSelectionActive:i}=Ne(),s=Ea(),l=me(null),c=wa({el:l,onStart(m){t.selectionDragStart(m),t.nodeDragStart(m)},onDrag(m){t.selectionDrag(m),t.nodeDrag(m)},onStop(m){t.selectionDragStop(m),t.nodeDragStop(m)}});Ke(()=>{var m;a.value||(m=l.value)==null||m.focus({preventScroll:!0})});const u=fe(()=>ji(r.value)),d=fe(()=>({width:`${u.value.width}px`,height:`${u.value.height}px`,top:`${u.value.y}px`,left:`${u.value.x}px`}));function f(m){t.selectionContextMenu({event:m,nodes:r.value})}function h(m){a||Dt[m.key]&&(m.preventDefault(),s({x:Dt[m.key].x,y:Dt[m.key].y},m.shiftKey))}return(m,b)=>!Z(i)&&u.value.width&&u.value.height?(oe(),de("div",{key:0,class:pt(["vue-flow__nodesselection vue-flow__container",Z(o)]),style:ze({transform:`translate(${Z(n).x}px,${Z(n).y}px) scale(${Z(n).zoom})`})},[ue("div",{ref_key:"el",ref:l,class:pt([{dragging:Z(c)},"vue-flow__nodesselection-rect"]),style:ze(d.value),tabIndex:Z(a)?void 0:-1,onContextmenu:f,onKeydown:h},null,46,Wf)],6)):De("",!0)}});function Uf(e,t){return{x:e.clientX-t.left,y:e.clientY-t.top}}const Zf=_e({...{name:"Pane",compatConfig:{MODE:3}},props:{isSelecting:{type:Boolean},selectionKeyPressed:{type:Boolean}},setup(e){const{vueFlowRef:t,nodes:n,viewport:r,emits:o,userSelectionActive:a,removeSelectedElements:i,userSelectionRect:s,elementsSelectable:l,nodesSelectionActive:c,getSelectedEdges:u,getSelectedNodes:d,removeNodes:f,removeEdges:h,selectionMode:m,deleteKeyCode:b,multiSelectionKeyCode:g,multiSelectionActive:E,edgeLookup:y,nodeLookup:v,connectionLookup:x,defaultEdgeOptions:z,connectionStartHandle:B}=Ne(),$=me(null),w=me(new Set),I=me(new Set),T=me(),k=Ee(()=>l.value&&(e.isSelecting||a.value)),p=Ee(()=>B.value!==null);let V=!1,_=!1;const O=Ut(b,{actInsideInputWithModifier:!1}),M=Ut(g);ye(O,A=>{A&&(f(d.value),h(u.value),c.value=!1)}),ye(M,A=>{E.value=A});function L(A,R){return H=>{H.target===R&&(A==null||A(H))}}function F(A){if(V||p.value){V=!1;return}o.paneClick(A),i(),c.value=!1}function q(A){A.preventDefault(),A.stopPropagation(),o.paneContextMenu(A)}function Y(A){o.paneScroll(A)}function j(A){var R,H,X;if(T.value=(R=t.value)==null?void 0:R.getBoundingClientRect(),!l.value||!e.isSelecting||A.button!==0||A.target!==$.value||!T.value)return;(X=(H=A.target)==null?void 0:H.setPointerCapture)==null||X.call(H,A.pointerId);const{x:te,y:ne}=Uf(A,T.value);_=!0,V=!1,i(),s.value={width:0,height:0,startX:te,startY:ne,x:te,y:ne},o.selectionStart(A)}function W(A){var R;if(!T.value||!s.value)return;V=!0;const{x:H,y:X}=Ue(A,T.value),{startX:te=0,startY:ne=0}=s.value,ce={startX:te,startY:ne,x:H<te?H:te,y:X<ne?X:ne,width:Math.abs(H-te),height:Math.abs(X-ne)},be=w.value,ie=I.value;w.value=new Set(Wi(n.value,ce,r.value,m.value===ho.Partial,!0).map(S=>S.id)),I.value=new Set;const le=((R=z.value)==null?void 0:R.selectable)??!0;for(const S of w.value){const N=x.value.get(S);if(N)for(const{edgeId:D}of N.values()){const C=y.value.get(D);C&&(C.selectable??le)&&I.value.add(D)}}if(!ga(be,w.value)){const S=ut(v.value,w.value,!0);o.nodesChange(S)}if(!ga(ie,I.value)){const S=ut(y.value,I.value);o.edgesChange(S)}s.value=ce,a.value=!0,c.value=!1}function P(A){var R;A.button!==0||!_||((R=A.target)==null||R.releasePointerCapture(A.pointerId),!a.value&&s.value&&A.target===$.value&&F(A),a.value=!1,s.value=null,c.value=w.value.size>0,o.selectionEnd(A),e.selectionKeyPressed&&(V=!1),_=!1)}return(A,R)=>(oe(),de("div",{ref_key:"container",ref:$,class:pt(["vue-flow__pane vue-flow__container",{selection:A.isSelecting}]),onClick:R[0]||(R[0]=H=>k.value?void 0:L(F,$.value)(H)),onContextmenu:R[1]||(R[1]=H=>L(q,$.value)(H)),onWheelPassive:R[2]||(R[2]=H=>L(Y,$.value)(H)),onPointerenter:R[3]||(R[3]=H=>k.value?void 0:Z(o).paneMouseEnter(H)),onPointerdown:R[4]||(R[4]=H=>k.value?j(H):Z(o).paneMouseMove(H)),onPointermove:R[5]||(R[5]=H=>k.value?W(H):Z(o).paneMouseMove(H)),onPointerup:R[6]||(R[6]=H=>k.value?P(H):void 0),onPointerleave:R[7]||(R[7]=H=>Z(o).paneMouseLeave(H))},[ke(A.$slots,"default"),Z(a)&&Z(s)?(oe(),Oe(jf,{key:0,"user-selection-rect":Z(s)},null,8,["user-selection-rect"])):De("",!0),Z(c)&&Z(d).length?(oe(),Oe(Xf,{key:1})):De("",!0)],34))}}),Kf=_e({...{name:"Transform",compatConfig:{MODE:3}},setup(e){const{viewport:t,fitViewOnInit:n,fitViewOnInitDone:r}=Ne(),o=fe(()=>n.value?!r.value:!1),a=fe(()=>`translate(${t.value.x}px,${t.value.y}px) scale(${t.value.zoom})`);return(i,s)=>(oe(),de("div",{class:"vue-flow__transformationpane vue-flow__container",style:ze({transform:a.value,opacity:o.value?0:void 0})},[ke(i.$slots,"default")],4))}}),Qf=_e({...{name:"Viewport",compatConfig:{MODE:3}},setup(e){const{minZoom:t,maxZoom:n,defaultViewport:r,translateExtent:o,zoomActivationKeyCode:a,selectionKeyCode:i,panActivationKeyCode:s,panOnScroll:l,panOnScrollMode:c,panOnScrollSpeed:u,panOnDrag:d,zoomOnDoubleClick:f,zoomOnPinch:h,zoomOnScroll:m,preventScrolling:b,noWheelClassName:g,noPanClassName:E,emits:y,connectionStartHandle:v,userSelectionActive:x,paneDragging:z,d3Zoom:B,d3Selection:$,d3ZoomHandler:w,viewport:I,viewportRef:T,paneClickDistance:k}=Ne();qf(T);const p=Pt(!1),V=Pt(!1);let _=null,O=!1,M=0,L={x:0,y:0,zoom:0};const F=Ut(s),q=Ut(i),Y=Ut(a),j=Ee(()=>(!q.value||q.value&&i.value===!0)&&(F.value||d.value)),W=Ee(()=>F.value||l.value),P=Ee(()=>q.value||i.value===!0&&j.value!==!0),A=Ee(()=>v.value!==null);Ke(()=>{if(!T.value){Dn("Viewport element is missing");return}const ne=T.value,ce=ne.getBoundingClientRect(),be=$d().clickDistance(k.value).scaleExtent([t.value,n.value]).translateExtent(o.value),ie=Le(ne).call(be),le=ie.on("wheel.zoom"),S=Mt.translate(r.value.x??0,r.value.y??0).scale(xt(r.value.zoom??1,t.value,n.value)),N=[[0,0],[ce.width,ce.height]],D=be.constrain()(S,N,o.value);be.transform(ie,D),be.wheelDelta(Ki),B.value=be,$.value=ie,w.value=le,I.value={x:D.x,y:D.y,zoom:D.k},be.on("start",C=>{var G;if(!C.sourceEvent)return null;M=C.sourceEvent.button,p.value=!0;const Q=X(C.transform);((G=C.sourceEvent)==null?void 0:G.type)==="mousedown"&&(z.value=!0),L=Q,y.viewportChangeStart(Q),y.moveStart({event:C,flowTransform:Q})}),be.on("end",C=>{if(!C.sourceEvent)return null;if(p.value=!1,z.value=!1,R(j.value,M??0)&&!O&&y.paneContextMenu(C.sourceEvent),O=!1,H(L,C.transform)){const G=X(C.transform);L=G,y.viewportChangeEnd(G),y.moveEnd({event:C,flowTransform:G})}}),be.filter(C=>{var G;const Q=Y.value||m.value,J=h.value&&C.ctrlKey,ee=C.button,ae=C.type==="wheel";if(ee===1&&C.type==="mousedown"&&(te(C,"vue-flow__node")||te(C,"vue-flow__edge")))return!0;if(!j.value&&!Q&&!W.value&&!f.value&&!h.value||x.value||A.value&&!ae||!f.value&&C.type==="dblclick"||te(C,g.value)&&ae||te(C,E.value)&&(!ae||W.value&&ae&&!Y.value)||!h.value&&C.ctrlKey&&ae||!Q&&!W.value&&!J&&ae)return!1;if(!h&&C.type==="touchstart"&&((G=C.touches)==null?void 0:G.length)>1)return C.preventDefault(),!1;if(!j.value&&(C.type==="mousedown"||C.type==="touchstart")||i.value===!0&&Array.isArray(d.value)&&d.value.includes(0)&&ee===0||Array.isArray(d.value)&&!d.value.includes(ee)&&(C.type==="mousedown"||C.type==="touchstart"))return!1;const he=Array.isArray(d.value)&&d.value.includes(ee)||i.value===!0&&Array.isArray(d.value)&&!d.value.includes(0)||!ee||ee<=1;return(!C.ctrlKey||F.value||ae)&&he}),ye([x,j],()=>{x.value&&!p.value?be.on("zoom",null):x.value||be.on("zoom",C=>{I.value={x:C.transform.x,y:C.transform.y,zoom:C.transform.k};const G=X(C.transform);O=R(j.value,M??0),y.viewportChange(G),y.move({event:C,flowTransform:G})})},{immediate:!0}),ye([x,W,c,Y,h,b,g],()=>{W.value&&!Y.value&&!x.value?ie.on("wheel.zoom",C=>{if(te(C,g.value))return!1;const G=Y.value||m.value,Q=h.value&&C.ctrlKey;if(!(!b.value||W.value||G||Q))return!1;C.preventDefault(),C.stopImmediatePropagation();const ee=ie.property("__zoom").k||1,ae=In();if(!F.value&&C.ctrlKey&&h.value&&ae){const en=qe(C),wv=Ki(C),bv=ee*2**wv;be.scaleTo(ie,bv,en,C);return}const he=C.deltaMode===1?20:1;let ve=c.value===Xt.Vertical?0:C.deltaX*he,xe=c.value===Xt.Horizontal?0:C.deltaY*he;!ae&&C.shiftKey&&c.value!==Xt.Vertical&&!ve&&xe&&(ve=xe,xe=0),be.translateBy(ie,-(ve/ee)*u.value,-(xe/ee)*u.value);const Ze=X(ie.property("__zoom"));_&&clearTimeout(_),V.value?(y.move({event:C,flowTransform:Ze}),y.viewportChange(Ze),_=setTimeout(()=>{y.moveEnd({event:C,flowTransform:Ze}),y.viewportChangeEnd(Ze),V.value=!1},150)):(V.value=!0,y.moveStart({event:C,flowTransform:Ze}),y.viewportChangeStart(Ze))},{passive:!1}):typeof le<"u"&&ie.on("wheel.zoom",function(C,G){const Q=!b.value&&C.type==="wheel"&&!C.ctrlKey,J=Y.value||m.value,ee=h.value&&C.ctrlKey;if(!J&&!l.value&&!ee&&C.type==="wheel"||Q||te(C,g.value))return null;C.preventDefault(),le.call(this,C,G)},{passive:!1})},{immediate:!0})});function R(ne,ce){return ce===2&&Array.isArray(ne)&&ne.includes(2)}function H(ne,ce){return ne.x!==ce.x&&!Number.isNaN(ce.x)||ne.y!==ce.y&&!Number.isNaN(ce.y)||ne.zoom!==ce.k&&!Number.isNaN(ce.k)}function X(ne){return{x:ne.x,y:ne.y,zoom:ne.k}}function te(ne,ce){return ne.target.closest(`.${ce}`)}return(ne,ce)=>(oe(),de("div",{ref_key:"viewportRef",ref:T,class:"vue-flow__viewport vue-flow__container"},[se(Zf,{"is-selecting":P.value,"selection-key-pressed":Z(q),class:pt({connecting:A.value,dragging:Z(z),draggable:Z(d)===!0||Array.isArray(Z(d))&&Z(d).includes(0)})},{default:ge(()=>[se(Kf,null,{default:ge(()=>[ke(ne.$slots,"default")]),_:3})]),_:3},8,["is-selecting","selection-key-pressed","class"])],512))}}),Jf=["id"],eh=["id"],th=["id"],nh=_e({...{name:"A11yDescriptions",compatConfig:{MODE:3}},setup(e){const{id:t,disableKeyboardA11y:n,ariaLiveMessage:r}=Ne();return(o,a)=>(oe(),de(Ve,null,[ue("div",{id:`${Z(zi)}-${Z(t)}`,style:{display:"none"}}," Press enter or space to select a node. "+Pe(Z(n)?"":"You can then use the arrow keys to move the node around.")+" You can then use the arrow keys to move the node around, press delete to remove it and press escape to cancel. ",9,Jf),ue("div",{id:`${Z(Bi)}-${Z(t)}`,style:{display:"none"}}," Press enter or space to select an edge. You can then press delete to remove it or press escape to cancel. ",8,eh),Z(n)?De("",!0):(oe(),de("div",{key:0,id:`${Z(Pd)}-${Z(t)}`,"aria-live":"assertive","aria-atomic":"true",style:{position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)","clip-path":"inset(100%)"}},Pe(Z(r)),9,th))],64))}});function oh(){const e=Ne();ye(()=>e.viewportHelper.value.viewportInitialized,t=>{t&&setTimeout(()=>{e.emits.init(e),e.emits.paneReady(e)},1)})}function rh(e,t,n){return n===K.Left?e-t:n===K.Right?e+t:e}function ih(e,t,n){return n===K.Top?e-t:n===K.Bottom?e+t:e}const Io=function({radius:e=10,centerX:t=0,centerY:n=0,position:r=K.Top,type:o}){return we("circle",{class:`vue-flow__edgeupdater vue-flow__edgeupdater-${o}`,cx:rh(t,e,r),cy:ih(n,e,r),r:e,stroke:"transparent",fill:"transparent"})};Io.props=["radius","centerX","centerY","position","type"],Io.compatConfig={MODE:3};const Pa=Io,ah=_e({name:"Edge",compatConfig:{MODE:3},props:["id"],setup(e){const{id:t,addSelectedEdges:n,connectionMode:r,edgeUpdaterRadius:o,emits:a,nodesSelectionActive:i,noPanClassName:s,getEdgeTypes:l,removeSelectedEdges:c,findEdge:u,findNode:d,isValidConnection:f,multiSelectionActive:h,disableKeyboardA11y:m,elementsSelectable:b,edgesUpdatable:g,edgesFocusable:E,hooks:y}=Ne(),v=fe(()=>u(e.id)),{emit:x,on:z}=cf(v.value,a),B=rt(On),$=vt(),w=me(!1),I=me(!1),T=me(""),k=me(null),p=me("source"),V=me(null),_=Ee(()=>typeof v.value.selectable>"u"?b.value:v.value.selectable),O=Ee(()=>typeof v.value.updatable>"u"?g.value:v.value.updatable),M=Ee(()=>typeof v.value.focusable>"u"?E.value:v.value.focusable);ht(sf,e.id),ht(lf,V);const L=fe(()=>v.value.class instanceof Function?v.value.class(v.value):v.value.class),F=fe(()=>v.value.style instanceof Function?v.value.style(v.value):v.value.style),q=fe(()=>{const N=v.value.type||"default",D=B==null?void 0:B[`edge-${N}`];if(D)return D;let C=v.value.template??l.value[N];if(typeof C=="string"&&$){const G=Object.keys($.appContext.components);G&&G.includes(N)&&(C=Se(N,!1))}return C&&typeof C!="string"?C:(a.error(new Te(Ce.EDGE_TYPE_MISSING,C)),!1)}),{handlePointerDown:Y}=ba({nodeId:T,handleId:k,type:p,isValidConnection:f,edgeUpdaterType:p,onEdgeUpdate:P,onEdgeUpdateEnd:A});return()=>{const N=d(v.value.source),D=d(v.value.target),C="pathOptions"in v.value?v.value.pathOptions:{};if(!N&&!D)return a.error(new Te(Ce.EDGE_SOURCE_TARGET_MISSING,v.value.id,v.value.source,v.value.target)),null;if(!N)return a.error(new Te(Ce.EDGE_SOURCE_MISSING,v.value.id,v.value.source)),null;if(!D)return a.error(new Te(Ce.EDGE_TARGET_MISSING,v.value.id,v.value.target)),null;if(!v.value||v.value.hidden||N.hidden||D.hidden)return null;let G;r.value===at.Strict?G=N.handleBounds.source:G=[...N.handleBounds.source||[],...N.handleBounds.target||[]];const Q=sa(G,v.value.sourceHandle);let J;r.value===at.Strict?J=D.handleBounds.target:J=[...D.handleBounds.target||[],...D.handleBounds.source||[]];const ee=sa(J,v.value.targetHandle),ae=(Q==null?void 0:Q.position)||K.Bottom,he=(ee==null?void 0:ee.position)||K.Top,{x:ve,y:xe}=Ot(N,Q,ae),{x:Ze,y:en}=Ot(D,ee,he);return v.value.sourceX=ve,v.value.sourceY=xe,v.value.targetX=Ze,v.value.targetY=en,we("g",{ref:V,key:e.id,"data-id":e.id,class:["vue-flow__edge",`vue-flow__edge-${q.value===!1?"default":v.value.type||"default"}`,s.value,L.value,{updating:w.value,selected:v.value.selected,animated:v.value.animated,inactive:!_.value&&!y.value.edgeClick.hasListeners()}],tabIndex:M.value?0:void 0,"aria-label":v.value.ariaLabel===null?void 0:v.value.ariaLabel??`Edge from ${v.value.source} to ${v.value.target}`,"aria-describedby":M.value?`${Bi}-${t}`:void 0,"aria-roledescription":"edge",role:M.value?"group":"img",...v.value.domAttributes,onClick:H,onContextmenu:X,onDblclick:te,onMouseenter:ne,onMousemove:ce,onMouseleave:be,onKeyDown:M.value?S:void 0},[I.value?null:we(q.value===!1?l.value.default:q.value,{id:e.id,sourceNode:N,targetNode:D,source:v.value.source,target:v.value.target,type:v.value.type,updatable:O.value,selected:v.value.selected,animated:v.value.animated,label:v.value.label,labelStyle:v.value.labelStyle,labelShowBg:v.value.labelShowBg,labelBgStyle:v.value.labelBgStyle,labelBgPadding:v.value.labelBgPadding,labelBgBorderRadius:v.value.labelBgBorderRadius,data:v.value.data,events:{...v.value.events,...z},style:F.value,markerStart:`url('#${Qt(v.value.markerStart,t)}')`,markerEnd:`url('#${Qt(v.value.markerEnd,t)}')`,sourcePosition:ae,targetPosition:he,sourceX:ve,sourceY:xe,targetX:Ze,targetY:en,sourceHandleId:v.value.sourceHandle,targetHandleId:v.value.targetHandle,interactionWidth:v.value.interactionWidth,...C}),[O.value==="source"||O.value===!0?[we("g",{onMousedown:ie,onMouseenter:j,onMouseout:W},we(Pa,{position:ae,centerX:ve,centerY:xe,radius:o.value,type:"source","data-type":"source"}))]:null,O.value==="target"||O.value===!0?[we("g",{onMousedown:le,onMouseenter:j,onMouseout:W},we(Pa,{position:he,centerX:Ze,centerY:en,radius:o.value,type:"target","data-type":"target"}))]:null]])};function j(){w.value=!0}function W(){w.value=!1}function P(N,D){x.update({event:N,edge:v.value,connection:D})}function A(N){x.updateEnd({event:N,edge:v.value}),I.value=!1}function R(N,D){N.button===0&&(I.value=!0,T.value=D?v.value.target:v.value.source,k.value=(D?v.value.targetHandle:v.value.sourceHandle)??null,p.value=D?"target":"source",x.updateStart({event:N,edge:v.value}),Y(N))}function H(N){var D;const C={event:N,edge:v.value};_.value&&(i.value=!1,v.value.selected&&h.value?(c([v.value]),(D=V.value)==null||D.blur()):n([v.value])),x.click(C)}function X(N){x.contextMenu({event:N,edge:v.value})}function te(N){x.doubleClick({event:N,edge:v.value})}function ne(N){x.mouseEnter({event:N,edge:v.value})}function ce(N){x.mouseMove({event:N,edge:v.value})}function be(N){x.mouseLeave({event:N,edge:v.value})}function ie(N){R(N,!0)}function le(N){R(N,!1)}function S(N){var D;!m.value&&Vi.includes(N.key)&&_.value&&(N.key==="Escape"?((D=V.value)==null||D.blur(),c([u(e.id)])):n([u(e.id)]))}}}),sh=_e({name:"ConnectionLine",compatConfig:{MODE:3},setup(){var e;const{id:t,connectionMode:n,connectionStartHandle:r,connectionEndHandle:o,connectionPosition:a,connectionLineType:i,connectionLineStyle:s,connectionLineOptions:l,connectionStatus:c,viewport:u,findNode:d}=Ne(),f=(e=rt(On))==null?void 0:e["connection-line"],h=fe(()=>{var y;return d((y=r.value)==null?void 0:y.nodeId)}),m=fe(()=>{var y;return d((y=o.value)==null?void 0:y.nodeId)??null}),b=fe(()=>({x:(a.value.x-u.value.x)/u.value.zoom,y:(a.value.y-u.value.y)/u.value.zoom})),g=fe(()=>l.value.markerStart?`url(#${Qt(l.value.markerStart,t)})`:""),E=fe(()=>l.value.markerEnd?`url(#${Qt(l.value.markerEnd,t)})`:"");return()=>{var y,v,x;if(!h.value||!r.value)return null;const z=r.value.id,B=r.value.type,$=h.value.handleBounds;let w=($==null?void 0:$[B])??[];if(n.value===at.Loose){const F=($==null?void 0:$[B==="source"?"target":"source"])??[];w=[...w,...F]}if(!w)return null;const I=(z?w.find(F=>F.id===z):w[0])??null,T=(I==null?void 0:I.position)??K.Top,{x:k,y:p}=Ot(h.value,I,T);let V=null;m.value&&(n.value===at.Strict?V=((y=m.value.handleBounds[B==="source"?"target":"source"])==null?void 0:y.find(F=>{var q;return F.id===((q=o.value)==null?void 0:q.id)}))||null:V=((v=[...m.value.handleBounds.source??[],...m.value.handleBounds.target??[]])==null?void 0:v.find(F=>{var q;return F.id===((q=o.value)==null?void 0:q.id)}))||null);const _=((x=o.value)==null?void 0:x.position)??(T?xo[T]:null);if(!T||!_)return null;const O=i.value??l.value.type??bt.Bezier;let M="";const L={sourceX:k,sourceY:p,sourcePosition:T,targetX:b.value.x,targetY:b.value.y,targetPosition:_};return O===bt.Bezier?[M]=$a(L):O===bt.Step?[M]=$o({...L,borderRadius:0}):O===bt.SmoothStep?[M]=$o(L):O===bt.SimpleBezier?[M]=Ma(L):M=`M${k},${p} ${b.value.x},${b.value.y}`,we("svg",{class:"vue-flow__edges vue-flow__connectionline vue-flow__container"},we("g",{class:"vue-flow__connection"},f?we(f,{sourceX:k,sourceY:p,sourcePosition:T,targetX:b.value.x,targetY:b.value.y,targetPosition:_,sourceNode:h.value,sourceHandle:I,targetNode:m.value,targetHandle:V,markerEnd:E.value,markerStart:g.value,connectionStatus:c.value}):we("path",{d:M,class:[l.value.class,c,"vue-flow__connection-path"],style:{...s.value,...l.value.style},"marker-end":E.value,"marker-start":g.value})))}}}),lh=["id","markerWidth","markerHeight","markerUnits","orient"],uh=_e({...{name:"MarkerType",compatConfig:{MODE:3}},props:{id:{},type:{},color:{default:"none"},width:{default:12.5},height:{default:12.5},markerUnits:{default:"strokeWidth"},orient:{default:"auto-start-reverse"},strokeWidth:{default:1}},setup(e){return(t,n)=>(oe(),de("marker",{id:t.id,class:"vue-flow__arrowhead",viewBox:"-10 -10 20 20",refX:"0",refY:"0",markerWidth:`${t.width}`,markerHeight:`${t.height}`,markerUnits:t.markerUnits,orient:t.orient},[t.type===Z(po).ArrowClosed?(oe(),de("polyline",{key:0,style:ze({stroke:t.color,fill:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",points:"-5,-4 0,0 -5,4 -5,-4"},null,4)):De("",!0),t.type===Z(po).Arrow?(oe(),de("polyline",{key:1,style:ze({stroke:t.color,strokeWidth:t.strokeWidth}),"stroke-linecap":"round","stroke-linejoin":"round",fill:"none",points:"-5,-4 0,0 -5,4"},null,4)):De("",!0)],8,lh))}}),ch={class:"vue-flow__marker vue-flow__container","aria-hidden":"true"},dh=_e({...{name:"MarkerDefinitions",compatConfig:{MODE:3}},setup(e){const{id:t,edges:n,connectionLineOptions:r,defaultMarkerColor:o}=Ne(),a=fe(()=>{const i=new Set,s=[],l=c=>{if(c){const u=Qt(c,t);i.has(u)||(typeof c=="object"?s.push({...c,id:u,color:c.color||o.value}):s.push({id:u,color:o.value,type:c}),i.add(u))}};for(const c of[r.value.markerEnd,r.value.markerStart])l(c);for(const c of n.value)for(const u of[c.markerStart,c.markerEnd])l(u);return s.sort((c,u)=>c.id.localeCompare(u.id))});return(i,s)=>(oe(),de("svg",ch,[ue("defs",null,[(oe(!0),de(Ve,null,tn(a.value,l=>(oe(),Oe(uh,{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))])]))}}),fh=_e({...{name:"Edges",compatConfig:{MODE:3}},setup(e){const{findNode:t,getEdges:n,elevateEdgesOnSelect:r}=Ne();return(o,a)=>(oe(),de(Ve,null,[se(dh),(oe(!0),de(Ve,null,tn(Z(n),i=>(oe(),de("svg",{key:i.id,class:"vue-flow__edges vue-flow__container",style:ze({zIndex:Z(Xd)(i,Z(t),Z(r))})},[se(Z(ah),{id:i.id},null,8,["id"])],4))),128)),se(Z(sh))],64))}}),hh=_e({name:"Node",compatConfig:{MODE:3},props:["id","resizeObserver"],setup(e){const{id:t,noPanClassName:n,selectNodesOnDrag:r,nodesSelectionActive:o,multiSelectionActive:a,emits:i,removeSelectedNodes:s,addSelectedNodes:l,updateNodeDimensions:c,onUpdateNodeInternals:u,getNodeTypes:d,nodeExtent:f,elevateNodesOnSelect:h,disableKeyboardA11y:m,ariaLiveMessage:b,snapToGrid:g,snapGrid:E,nodeDragThreshold:y,nodesDraggable:v,elementsSelectable:x,nodesConnectable:z,nodesFocusable:B,hooks:$}=Ne(),w=me(null);ht(ya,w),ht(_a,e.id);const I=rt(On),T=vt(),k=Ea(),{node:p,parentNode:V}=xa(e.id),{emit:_,on:O}=pf(p,i),M=Ee(()=>typeof p.draggable>"u"?v.value:p.draggable),L=Ee(()=>typeof p.selectable>"u"?x.value:p.selectable),F=Ee(()=>typeof p.connectable>"u"?z.value:p.connectable),q=Ee(()=>typeof p.focusable>"u"?B.value:p.focusable),Y=fe(()=>L.value||M.value||$.value.nodeClick.hasListeners()||$.value.nodeDoubleClick.hasListeners()||$.value.nodeMouseEnter.hasListeners()||$.value.nodeMouseMove.hasListeners()||$.value.nodeMouseLeave.hasListeners()),j=Ee(()=>!!p.dimensions.width&&!!p.dimensions.height),W=fe(()=>{const D=p.type||"default",C=I==null?void 0:I[`node-${D}`];if(C)return C;let G=p.template||d.value[D];if(typeof G=="string"&&T){const Q=Object.keys(T.appContext.components);Q&&Q.includes(D)&&(G=Se(D,!1))}return G&&typeof G!="string"?G:(i.error(new Te(Ce.NODE_TYPE_MISSING,G)),!1)}),P=wa({id:e.id,el:w,disabled:()=>!M.value,selectable:L,dragHandle:()=>p.dragHandle,onStart(D){_.dragStart(D)},onDrag(D){_.drag(D)},onStop(D){_.dragStop(D)},onClick(D){S(D)}}),A=fe(()=>p.class instanceof Function?p.class(p):p.class),R=fe(()=>{const D=(p.style instanceof Function?p.style(p):p.style)||{},C=p.width instanceof Function?p.width(p):p.width,G=p.height instanceof Function?p.height(p):p.height;return!D.width&&C&&(D.width=typeof C=="string"?C:`${C}px`),!D.height&&G&&(D.height=typeof G=="string"?G:`${G}px`),D}),H=Ee(()=>Number(p.zIndex??R.value.zIndex??0));return u(D=>{(D.includes(e.id)||!D.length)&&te()}),Ke(()=>{ye(()=>p.hidden,(D=!1,C,G)=>{!D&&w.value&&(e.resizeObserver.observe(w.value),G(()=>{w.value&&e.resizeObserver.unobserve(w.value)}))},{immediate:!0,flush:"post"})}),ye([()=>p.type,()=>p.sourcePosition,()=>p.targetPosition],()=>{Ae(()=>{c([{id:e.id,nodeElement:w.value,forceUpdate:!0}])})}),ye([()=>p.position.x,()=>p.position.y,()=>{var D;return(D=V.value)==null?void 0:D.computedPosition.x},()=>{var D;return(D=V.value)==null?void 0:D.computedPosition.y},()=>{var D;return(D=V.value)==null?void 0:D.computedPosition.z},H,()=>p.selected,()=>p.dimensions.height,()=>p.dimensions.width,()=>{var D;return(D=V.value)==null?void 0:D.dimensions.height},()=>{var D;return(D=V.value)==null?void 0:D.dimensions.width}],([D,C,G,Q,J,ee])=>{const ae={x:D,y:C,z:ee+(h.value&&p.selected?1e3:0)};typeof G<"u"&&typeof Q<"u"?p.computedPosition=Fd({x:G,y:Q,z:J},ae):p.computedPosition=ae},{flush:"post",immediate:!0}),ye([()=>p.extent,f],([D,C],[G,Q])=>{(D!==G||C!==Q)&&X()}),p.extent==="parent"||typeof p.extent=="object"&&"range"in p.extent&&p.extent.range==="parent"?qn(()=>j).toBe(!0).then(X):X(),()=>p.hidden?null:we("div",{ref:w,"data-id":p.id,class:["vue-flow__node",`vue-flow__node-${W.value===!1?"default":p.type||"default"}`,{[n.value]:M.value,dragging:P==null?void 0:P.value,draggable:M.value,selected:p.selected,selectable:L.value,parent:p.isParent},A.value],style:{visibility:j.value?"visible":"hidden",zIndex:p.computedPosition.z??H.value,transform:`translate(${p.computedPosition.x}px,${p.computedPosition.y}px)`,pointerEvents:Y.value?"all":"none",...R.value},tabIndex:q.value?0:void 0,role:q.value?"group":void 0,"aria-describedby":m.value?void 0:`${zi}-${t}`,"aria-label":p.ariaLabel,"aria-roledescription":"node",...p.domAttributes,onMouseenter:ne,onMousemove:ce,onMouseleave:be,onContextmenu:ie,onClick:S,onDblclick:le,onKeydown:N},[we(W.value===!1?d.value.default:W.value,{id:p.id,type:p.type,data:p.data,events:{...p.events,...O},selected:p.selected,resizing:p.resizing,dragging:P.value,connectable:F.value,position:p.computedPosition,dimensions:p.dimensions,isValidTargetPos:p.isValidTargetPos,isValidSourcePos:p.isValidSourcePos,parent:p.parentNode,parentNodeId:p.parentNode,zIndex:p.computedPosition.z??H.value,targetPosition:p.targetPosition,sourcePosition:p.sourcePosition,label:p.label,dragHandle:p.dragHandle,onUpdateNodeInternals:te})]);function X(){const D=p.computedPosition,{computedPosition:C,position:G}=yo(p,g.value?Mn(D,E.value):D,i.error,f.value,V.value);(p.computedPosition.x!==C.x||p.computedPosition.y!==C.y)&&(p.computedPosition={...p.computedPosition,...C}),(p.position.x!==G.x||p.position.y!==G.y)&&(p.position=G)}function te(){w.value&&c([{id:e.id,nodeElement:w.value,forceUpdate:!0}])}function ne(D){P!=null&&P.value||_.mouseEnter({event:D,node:p})}function ce(D){P!=null&&P.value||_.mouseMove({event:D,node:p})}function be(D){P!=null&&P.value||_.mouseLeave({event:D,node:p})}function ie(D){return _.contextMenu({event:D,node:p})}function le(D){return _.doubleClick({event:D,node:p})}function S(D){L.value&&(!r.value||!M.value||y.value>0)&&Eo(p,a.value,l,s,o,!1,w.value),_.click({event:D,node:p})}function N(D){if(!(vo(D)||m.value))if(Vi.includes(D.key)&&L.value){const C=D.key==="Escape";Eo(p,a.value,l,s,o,C,w.value)}else M.value&&p.selected&&Dt[D.key]&&(D.preventDefault(),b.value=`Moved selected node ${D.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~p.position.x}, y: ${~~p.position.y}`,k({x:Dt[D.key].x,y:Dt[D.key].y},D.shiftKey))}}});function ph(e={includeHiddenNodes:!1}){const{nodes:t}=Ne();return fe(()=>{if(t.value.length===0)return!1;for(const n of t.value)if((e.includeHiddenNodes||!n.hidden)&&((n==null?void 0:n.handleBounds)===void 0||n.dimensions.width===0||n.dimensions.height===0))return!1;return!0})}const vh={class:"vue-flow__nodes vue-flow__container"},gh=_e({...{name:"Nodes",compatConfig:{MODE:3}},setup(e){const{getNodes:t,updateNodeDimensions:n,emits:r}=Ne(),o=ph(),a=me();return ye(o,i=>{i&&Ae(()=>{r.nodesInitialized(t.value)})},{immediate:!0}),Ke(()=>{a.value=new ResizeObserver(i=>{const s=i.map(l=>({id:l.target.getAttribute("data-id"),nodeElement:l.target,forceUpdate:!0}));Ae(()=>n(s))})}),Fn(()=>{var i;return(i=a.value)==null?void 0:i.disconnect()}),(i,s)=>(oe(),de("div",vh,[a.value?(oe(!0),de(Ve,{key:0},tn(Z(t),(l,c,u,d)=>{const f=[l.id];if(d&&d.key===l.id&&Mr(d,f))return d;const h=(oe(),Oe(Z(hh),{id:l.id,key:l.id,"resize-observer":a.value},null,8,["id","resize-observer"]));return h.memo=f,h},s,0),128)):De("",!0)]))}});function mh(){const{emits:e}=Ne();Ke(()=>{if(fa()){const t=document.querySelector(".vue-flow__pane");t&&window.getComputedStyle(t).zIndex!=="1"&&e.error(new Te(Ce.MISSING_STYLES))}})}const _h=ue("div",{class:"vue-flow__edge-labels"},null,-1),yh=_e({...{name:"VueFlow",compatConfig:{MODE:3}},props:{id:{},modelValue:{},nodes:{},edges:{},edgeTypes:{},nodeTypes:{},connectionMode:{},connectionLineType:{},connectionLineStyle:{default:void 0},connectionLineOptions:{default:void 0},connectionRadius:{},isValidConnection:{type:[Function,null],default:void 0},deleteKeyCode:{default:void 0},selectionKeyCode:{type:[Boolean,null],default:void 0},multiSelectionKeyCode:{default:void 0},zoomActivationKeyCode:{default:void 0},panActivationKeyCode:{default:void 0},snapToGrid:{type:Boolean,default:void 0},snapGrid:{},onlyRenderVisibleElements:{type:Boolean,default:void 0},edgesUpdatable:{type:[Boolean,String],default:void 0},nodesDraggable:{type:Boolean,default:void 0},nodesConnectable:{type:Boolean,default:void 0},nodeDragThreshold:{},elementsSelectable:{type:Boolean,default:void 0},selectNodesOnDrag:{type:Boolean,default:void 0},panOnDrag:{type:[Boolean,Array],default:void 0},minZoom:{},maxZoom:{},defaultViewport:{},translateExtent:{},nodeExtent:{},defaultMarkerColor:{},zoomOnScroll:{type:Boolean,default:void 0},zoomOnPinch:{type:Boolean,default:void 0},panOnScroll:{type:Boolean,default:void 0},panOnScrollSpeed:{},panOnScrollMode:{},paneClickDistance:{},zoomOnDoubleClick:{type:Boolean,default:void 0},preventScrolling:{type:Boolean,default:void 0},selectionMode:{},edgeUpdaterRadius:{},fitViewOnInit:{type:Boolean,default:void 0},connectOnClick:{type:Boolean,default:void 0},applyDefault:{type:Boolean,default:void 0},autoConnect:{type:[Boolean,Function],default:void 0},noDragClassName:{},noWheelClassName:{},noPanClassName:{},defaultEdgeOptions:{},elevateEdgesOnSelect:{type:Boolean,default:void 0},elevateNodesOnSelect:{type:Boolean,default:void 0},disableKeyboardA11y:{type:Boolean,default:void 0},edgesFocusable:{type:Boolean,default:void 0},nodesFocusable:{type:Boolean,default:void 0},autoPanOnConnect:{type:Boolean,default:void 0},autoPanOnNodeDrag:{type:Boolean,default:void 0},autoPanSpeed:{}},emits:["nodesChange","edgesChange","nodesInitialized","paneReady","init","updateNodeInternals","error","connect","connectStart","connectEnd","clickConnectStart","clickConnectEnd","moveStart","move","moveEnd","selectionDragStart","selectionDrag","selectionDragStop","selectionContextMenu","selectionStart","selectionEnd","viewportChangeStart","viewportChange","viewportChangeEnd","paneScroll","paneClick","paneContextMenu","paneMouseEnter","paneMouseMove","paneMouseLeave","edgeUpdate","edgeContextMenu","edgeMouseEnter","edgeMouseMove","edgeMouseLeave","edgeDoubleClick","edgeClick","edgeUpdateStart","edgeUpdateEnd","nodeContextMenu","nodeMouseEnter","nodeMouseMove","nodeMouseLeave","nodeDoubleClick","nodeClick","nodeDragStart","nodeDrag","nodeDragStop","miniMapNodeClick","miniMapNodeDoubleClick","miniMapNodeMouseEnter","miniMapNodeMouseMove","miniMapNodeMouseLeave","update:modelValue","update:nodes","update:edges"],setup(e,{expose:t,emit:n}){const r=e,o=Sr(),a=jn(r,"modelValue",n),i=jn(r,"nodes",n),s=jn(r,"edges",n),l=Ne(r),c=_f({modelValue:a,nodes:i,edges:s},r,l);return wf(n,l.hooks),oh(),mh(),ht(On,o),kr(c),t(l),(u,d)=>(oe(),de("div",{ref:Z(l).vueFlowRef,class:"vue-flow"},[se(Qf,null,{default:ge(()=>[se(fh),_h,se(gh),ke(u.$slots,"zoom-pane")]),_:3}),ke(u.$slots,"default"),se(nh)],512))}}),wh=_e({...{name:"Panel",compatConfig:{MODE:3}},props:{position:{}},setup(e){const t=e,{userSelectionActive:n}=Ne(),r=fe(()=>`${t.position}`.split("-"));return(o,a)=>(oe(),de("div",{class:pt(["vue-flow__panel",r.value]),style:ze({pointerEvents:Z(n)?"none":"all"})},[ke(o.$slots,"default")],6))}}),bh={name:"ControlButton",compatConfig:{MODE:3}},xh=(e,t)=>{const n=e.__vccOpts||e;for(const[r,o]of t)n[r]=o;return n},Eh={type:"button",class:"vue-flow__controls-button"};function Nh(e,t,n,r,o,a){return oe(),de("button",Eh,[ke(e.$slots,"default")])}const Jt=xh(bh,[["render",Nh]]),Sh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},kh=[ue("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"},null,-1)];function Ch(e,t){return oe(),de("svg",Sh,kh)}const $h={render:Ch},Ih={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},Mh=[ue("path",{d:"M0 0h32v4.2H0z"},null,-1)];function Dh(e,t){return oe(),de("svg",Ih,Mh)}const Oh={render:Dh},Th={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},Ph=[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 Ah(e,t){return oe(),de("svg",Th,Ph)}const Rh={render:Ah},zh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Bh=[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 Vh(e,t){return oe(),de("svg",zh,Bh)}const Lh={render:Vh},Hh={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},Fh=[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 Gh(e,t){return oe(),de("svg",Hh,Fh)}const Yh={render:Gh},qh=_e({...{name:"Controls",compatConfig:{MODE:3}},props:{showZoom:{type:Boolean,default:!0},showFitView:{type:Boolean,default:!0},showInteractive:{type:Boolean,default:!0},fitViewParams:{},position:{default:()=>Ai.BottomLeft}},emits:["zoomIn","zoomOut","fitView","interactionChange"],setup(e,{emit:t}){const{nodesDraggable:n,nodesConnectable:r,elementsSelectable:o,setInteractive:a,zoomIn:i,zoomOut:s,fitView:l,viewport:c,minZoom:u,maxZoom:d}=Ne(),f=Ee(()=>n.value||r.value||o.value),h=Ee(()=>c.value.zoom<=u.value),m=Ee(()=>c.value.zoom>=d.value);function b(){i(),t("zoomIn")}function g(){s(),t("zoomOut")}function E(){l(e.fitViewParams),t("fitView")}function y(){a(!f.value),t("interactionChange",!f.value)}return(v,x)=>(oe(),Oe(Z(wh),{class:"vue-flow__controls",position:v.position},{default:ge(()=>[ke(v.$slots,"top"),v.showZoom?(oe(),de(Ve,{key:0},[ke(v.$slots,"control-zoom-in",{},()=>[se(Jt,{class:"vue-flow__controls-zoomin",disabled:m.value,onClick:b},{default:ge(()=>[ke(v.$slots,"icon-zoom-in",{},()=>[(oe(),Oe(gt(Z($h))))])]),_:3},8,["disabled"])]),ke(v.$slots,"control-zoom-out",{},()=>[se(Jt,{class:"vue-flow__controls-zoomout",disabled:h.value,onClick:g},{default:ge(()=>[ke(v.$slots,"icon-zoom-out",{},()=>[(oe(),Oe(gt(Z(Oh))))])]),_:3},8,["disabled"])])],64)):De("",!0),v.showFitView?ke(v.$slots,"control-fit-view",{key:1},()=>[se(Jt,{class:"vue-flow__controls-fitview",onClick:E},{default:ge(()=>[ke(v.$slots,"icon-fit-view",{},()=>[(oe(),Oe(gt(Z(Rh))))])]),_:3})]):De("",!0),v.showInteractive?ke(v.$slots,"control-interactive",{key:2},()=>[v.showInteractive?(oe(),Oe(Jt,{key:0,class:"vue-flow__controls-interactive",onClick:y},{default:ge(()=>[f.value?ke(v.$slots,"icon-unlock",{key:0},()=>[(oe(),Oe(gt(Z(Yh))))]):De("",!0),f.value?De("",!0):ke(v.$slots,"icon-lock",{key:1},()=>[(oe(),Oe(gt(Z(Lh))))])]),_:3})):De("",!0)]):De("",!0),ke(v.$slots,"default")]),_:3},8,["position"]))}});var nt=(e=>(e.Lines="lines",e.Dots="dots",e))(nt||{});const Aa=function({dimensions:e,size:t,color:n}){return we("path",{stroke:n,"stroke-width":t,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})},Ra=function({radius:e,color:t}){return we("circle",{cx:e,cy:e,r:e,fill:t})};nt.Lines+"",nt.Dots+"";const jh={[nt.Dots]:"#81818a",[nt.Lines]:"#eee"},Wh=["id","x","y","width","height","patternTransform"],Xh={key:2,height:"100",width:"100"},Uh=["fill"],Zh=["x","y","fill"],Kh=_e({...{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}=Ne(),r=fe(()=>{const i=n.value.zoom,[s,l]=Array.isArray(e.gap)?e.gap:[e.gap,e.gap],c=[s*i||1,l*i||1],u=e.size*i,[d,f]=Array.isArray(e.offset)?e.offset:[e.offset,e.offset],h=[d*i||1+c[0]/2,f*i||1+c[1]/2];return{scaledGap:c,offset:h,size:u}}),o=Ee(()=>`pattern-${t}${e.id?`-${e.id}`:""}`),a=Ee(()=>e.color||e.patternColor||jh[e.variant||nt.Dots]);return(i,s)=>(oe(),de("svg",{class:"vue-flow__background vue-flow__container",style:ze({height:`${i.height>100?100:i.height}%`,width:`${i.width>100?100:i.width}%`})},[ke(i.$slots,"pattern-container",{id:o.value},()=>[ue("pattern",{id:o.value,x:Z(n).x%r.value.scaledGap[0],y:Z(n).y%r.value.scaledGap[1],width:r.value.scaledGap[0],height:r.value.scaledGap[1],patternTransform:`translate(-${r.value.offset[0]},-${r.value.offset[1]})`,patternUnits:"userSpaceOnUse"},[ke(i.$slots,"pattern",{},()=>[i.variant===Z(nt).Lines?(oe(),Oe(Z(Aa),{key:0,size:i.lineWidth,color:a.value,dimensions:r.value.scaledGap},null,8,["size","color","dimensions"])):i.variant===Z(nt).Dots?(oe(),Oe(Z(Ra),{key:1,color:a.value,radius:r.value.size/2},null,8,["color","radius"])):De("",!0),i.bgColor?(oe(),de("svg",Xh,[ue("rect",{width:"100%",height:"100%",fill:i.bgColor},null,8,Uh)])):De("",!0)])],8,Wh)]),ue("rect",{x:i.x,y:i.y,width:"100%",height:"100%",fill:`url(#${o.value})`},null,8,Zh),ke(i.$slots,"default",{id:o.value})],4))}}),Qh={name:"DetailsTable",components:{RawBuffer:Br},mixins:[zr],props:{mode:{type:String,default:"Interface"},details:{type:Object,default:null},readProtocolIndex:{type:Number,default:null},writeProtocolIndex:{type:Number,default:null}},emits:["close"],data(){return{api:null,headers:[{title:"Property",key:"key",width:"30%"},{title:"Value",key:"value",width:"70%"}],paused:!1,updatedDetails:null}},computed:{shownDetails(){return this.updatedDetails?this.updatedDetails:this.details},upperData(){let e={};if(!this.shownDetails)return e;if(this.readProtocolIndex!==null){let t=this.shownDetails.read_protocols[this.readProtocolIndex];e.data=t.read_data_input,e.label="Read Data Input",e.time=t.read_data_input_time}else if(this.writeProtocolIndex!==null){let t=this.shownDetails.write_protocols[this.writeProtocolIndex];e.data=t.write_data_input,e.label="Write Data Input",e.time=t.write_data_input_time}else{let t=this.shownDetails;e.data=t.written_raw_data,e.label="Written Raw Data",e.time=t.written_raw_data_time}return e},lowerData(){let e={};if(!this.shownDetails)return e;if(this.readProtocolIndex!==null){let t=this.shownDetails.read_protocols[this.readProtocolIndex];e.data=t.read_data_output,e.label="Read Data Output",e.time=t.read_data_output_time}else if(this.writeProtocolIndex!==null){let t=this.shownDetails.write_protocols[this.writeProtocolIndex];e.data=t.write_data_output,e.label="Write Data Output",e.time=t.write_data_output_time}else{let t=this.shownDetails;e.data=t.read_raw_data,e.label="Read Raw Data",e.time=t.read_raw_data_time}return e},detailsItems(){if(!this.shownDetails)return[];const e=["written_raw_data","read_raw_data","written_raw_data_time","read_raw_data_time","read_protocols","write_protocols","read_data_input","read_data_output","write_data_input","write_data_output","read_data_input_time","read_data_output_time","write_data_input_time","write_data_output_time"];let t=null;return this.readProtocolIndex!==null?t=this.shownDetails.read_protocols[this.readProtocolIndex]:this.writeProtocolIndex!==null?t=this.shownDetails.write_protocols[this.writeProtocolIndex]:t=this.shownDetails,Object.entries(t).filter(([n,r])=>!e.includes(n)).map(([n,r])=>({key:this.formatKey(n),value:this.formatValue(r)}))},buttonIcon:function(){return this.paused?"mdi-play":"mdi-pause"}},methods:{pause:function(){this.paused=!this.paused},closeClick:function(){this.$emit("close")},update:function(){this.paused||this.details&&this.updateDetails(this.details.name)},updateDetails(e){this.mode=="Interface"?this.api.interface_details(e).then(t=>{this.updatedDetails=t}):this.api.router_details(e).then(t=>{this.updatedDetails=t})},formatKey(e){return e.replace(/_/g," ").replace(/\b\w/g,t=>t.toUpperCase())},formatValue(e){return e==null?"":typeof e=="object"?JSON.stringify(e,null,2):String(e)}}},Jh={class:"details-table"},ep={class:"text-wrap"},tp={key:1,class:"d-flex justify-center align-center pa-4"};function np(e,t,n,r,o,a){const i=Se("v-btn"),s=Se("v-spacer"),l=Se("v-card-title"),c=Se("v-data-table"),u=Se("v-progress-circular"),d=Se("v-col"),f=Se("raw-buffer"),h=Se("v-row"),m=Se("v-card-text"),b=Se("v-card");return oe(),Oe(b,{"max-height":"80vh",class:"d-flex flex-column"},{default:ge(()=>[se(l,{class:"d-flex align-center flex-shrink-0"},{default:ge(()=>[Ye(Pe(n.mode)+" Properties: "+Pe(a.shownDetails.name)+" ",1),se(i,{icon:a.buttonIcon,variant:"text","data-test":"pause",onClick:a.pause},null,8,["icon","onClick"]),se(s),se(i,{icon:"mdi-close",variant:"text","data-test":"close",onClick:a.closeClick},null,8,["onClick"])]),_:1}),se(m,{class:"overflow-y-auto flex-grow-1 pa-0"},{default:ge(()=>[ue("div",Jh,[se(h,null,{default:ge(()=>[se(d,{cols:"4"},{default:ge(()=>[a.shownDetails?(oe(),Oe(c,{key:0,headers:o.headers,items:a.detailsItems,"items-per-page":-1,"hide-default-footer":"",density:"compact",class:"details-table"},{"item.value":ge(({item:g})=>[ue("span",ep,Pe(g.value),1)]),_:1},8,["headers","items"])):(oe(),de("div",tp,[se(u,{indeterminate:"",color:"primary"})]))]),_:1}),se(d,{cols:"8"},{default:ge(()=>[ue("div",null,Pe(a.upperData.label)+": "+Pe(a.upperData.time),1),se(f,{modelValue:a.upperData.data,"onUpdate:modelValue":t[0]||(t[0]=g=>a.upperData.data=g)},null,8,["modelValue"]),ue("div",null,Pe(a.lowerData.label)+": "+Pe(a.lowerData.time),1),se(f,{modelValue:a.lowerData.data,"onUpdate:modelValue":t[1]||(t[1]=g=>a.lowerData.data=g)},null,8,["modelValue"])]),_:1})]),_:1})])]),_:1})]),_:1})}const op=it(Qh,[["render",np],["__scopeId","data-v-0b4171c8"]]),rp={name:"InterfaceNode",components:{Handle:dt},props:{data:{type:Object,required:!0}},computed:{interfaceStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}},data(){return{}}},ip={class:"node-label"};function ap(e,t,n,r,o,a){const i=Se("v-icon"),s=Se("Handle");return oe(),de("div",{class:"interface-node",style:ze(a.interfaceStyle)},[se(i,{color:"#1d85e1"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-swap-horizontal-bold",-1)])]),_:1}),ue("div",ip,Pe(n.data.label),1),t[1]||(t[1]=ue("div",{class:"node-label"},"Interface",-1)),se(s,{id:"interface__cmd__input",type:"target",position:"left",style:{top:"112px"}}),se(s,{id:"interface__tlm__input",type:"target",position:"left",style:{top:"162px"}}),se(s,{id:"interface__cmd__output",type:"source",position:"right",style:{top:"112px"}}),se(s,{id:"interface__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=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 sp=it(rp,[["render",ap],["__scopeId","data-v-a31e429f"]]),lp={name:"RouterNode",components:{Handle:dt},props:{data:{type:Object,required:!0}},computed:{routerStyle(){return{width:`${this.data.width}px`,height:`${this.data.height}px`}}},data(){return{}}},up={class:"node-label"};function cp(e,t,n,r,o,a){const i=Se("v-icon"),s=Se("Handle");return oe(),de("div",{class:"router-node",style:ze(a.routerStyle)},[se(i,{color:"#ba1de1"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-call-split",-1)])]),_:1}),ue("div",up,Pe(n.data.label),1),t[1]||(t[1]=ue("div",{class:"node-label"},"Router",-1)),se(s,{id:"router__cmd__input",type:"target",position:"left",style:{top:"112px"}}),se(s,{id:"router__tlm__input",type:"target",position:"left",style:{top:"162px"}}),se(s,{id:"router__cmd__output",type:"source",position:"right",style:{top:"112px"}}),se(s,{id:"router__tlm__output",type:"source",position:"right",style:{top:"162px"}}),t[2]||(t[2]=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 dp=it(lp,[["render",cp],["__scopeId","data-v-75db5a9b"]]),fp={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},hp={class:"cosmos-node"},pp={class:"node-label"};function vp(e,t,n,r,o,a){const i=Se("Handle"),s=Se("v-icon");return oe(),de("div",hp,[se(i,{id:"cosmos__cmd",type:"target",position:"right",style:{top:"114px"}}),se(i,{id:"cosmos__tlm",type:"target",position:"right",style:{top:"164px"}}),t[1]||(t[1]=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)),se(s,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-rocket-launch",-1)])]),_:1}),ue("div",pp,Pe(n.data.label),1),t[3]||(t[3]=ue("div",{class:"node-label"},"Processing",-1))])}const gp=it(fp,[["render",vp],["__scopeId","data-v-d2155b1f"]]),mp={name:"TargetNode",components:{Handle:dt},props:{data:{type:Object,required:!0}}},_p={class:"target-node"},yp={class:"node-label"};function wp(e,t,n,r,o,a){const i=Se("Handle"),s=Se("v-icon");return oe(),de("div",_p,[se(i,{id:"target__cmd",type:"target",position:"left",style:{top:"114px"}}),se(i,{id:"target__tlm",type:"target",position:"left",style:{top:"164px"}}),t[1]||(t[1]=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)),se(s,{color:"#10b981"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-target",-1)])]),_:1}),ue("div",yp,Pe(n.data.label),1),t[3]||(t[3]=ue("div",{class:"node-label"},"Target",-1))])}const bp=it(mp,[["render",wp],["__scopeId","data-v-b38bbebb"]]),xp={name:"WriteProtocolNode",props:{data:{type:Object,required:!0}}},Ep={class:"write-protocol-node"},Np={class:"protocol-label"};function Sp(e,t,n,r,o,a){const i=Se("v-icon");return oe(),de("div",Ep,[se(i,{color:"#f97316",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-arrow-right-bold",-1)])]),_:1}),ue("div",Np,Pe(n.data.label),1)])}const kp=it(xp,[["render",Sp],["__scopeId","data-v-301d4de9"]]),Cp={name:"ReadProtocolNode",props:{data:{type:Object,required:!0}}},$p={class:"read-protocol-node"},Ip={class:"protocol-label"};function Mp(e,t,n,r,o,a){const i=Se("v-icon");return oe(),de("div",$p,[se(i,{color:"#06b6d4",size:"small"},{default:ge(()=>[...t[0]||(t[0]=[Ye("mdi-arrow-left-bold",-1)])]),_:1}),ue("div",Ip,Pe(n.data.label),1)])}const Dp=it(Cp,[["render",Mp],["__scopeId","data-v-d8220607"]]);function Op(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mo,za;function Do(){if(za)return Mo;za=1;var e="\0",t="\0",n="";class r{constructor(u){Me(this,"_isDirected",!0);Me(this,"_isMultigraph",!1);Me(this,"_isCompound",!1);Me(this,"_label");Me(this,"_defaultNodeLabelFn",()=>{});Me(this,"_defaultEdgeLabelFn",()=>{});Me(this,"_nodes",{});Me(this,"_in",{});Me(this,"_preds",{});Me(this,"_out",{});Me(this,"_sucs",{});Me(this,"_edgeObjs",{});Me(this,"_edgeLabels",{});Me(this,"_nodeCount",0);Me(this,"_edgeCount",0);Me(this,"_parent");Me(this,"_children");u&&(this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[t]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){return this._defaultNodeLabelFn=u,typeof u!="function"&&(this._defaultNodeLabelFn=()=>u),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter(d=>Object.keys(u._in[d]).length===0)}sinks(){var u=this;return this.nodes().filter(d=>Object.keys(u._out[d]).length===0)}setNodes(u,d){var f=arguments,h=this;return u.forEach(function(m){f.length>1?h.setNode(m,d):h.setNode(m)}),this}setNode(u,d){return Object.hasOwn(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=d),this):(this._nodes[u]=arguments.length>1?d:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=t,this._children[u]={},this._children[t][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var d=this;if(Object.hasOwn(this._nodes,u)){var f=h=>d.removeEdge(d._edgeObjs[h]);delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(h){d.setParent(h)}),delete this._children[u]),Object.keys(this._in[u]).forEach(f),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach(f),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,d){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(d===void 0)d=t;else{d+="";for(var f=d;f!==void 0;f=this.parent(f))if(f===u)throw new Error("Setting "+d+" as parent of "+u+" would create a cycle");this.setNode(d)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=d,this._children[d][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var d=this._parent[u];if(d!==t)return d}}children(u=t){if(this._isCompound){var d=this._children[u];if(d)return Object.keys(d)}else{if(u===t)return this.nodes();if(this.hasNode(u))return[]}}predecessors(u){var d=this._preds[u];if(d)return Object.keys(d)}successors(u){var d=this._sucs[u];if(d)return Object.keys(d)}neighbors(u){var d=this.predecessors(u);if(d){const h=new Set(d);for(var f of this.successors(u))h.add(f);return Array.from(h.values())}}isLeaf(u){var d;return this.isDirected()?d=this.successors(u):d=this.neighbors(u),d.length===0}filterNodes(u){var d=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});d.setGraph(this.graph());var f=this;Object.entries(this._nodes).forEach(function([b,g]){u(b)&&d.setNode(b,g)}),Object.values(this._edgeObjs).forEach(function(b){d.hasNode(b.v)&&d.hasNode(b.w)&&d.setEdge(b,f.edge(b))});var h={};function m(b){var g=f.parent(b);return g===void 0||d.hasNode(g)?(h[b]=g,g):g in h?h[g]:m(g)}return this._isCompound&&d.nodes().forEach(b=>d.setParent(b,m(b))),d}setDefaultEdgeLabel(u){return this._defaultEdgeLabelFn=u,typeof u!="function"&&(this._defaultEdgeLabelFn=()=>u),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,d){var f=this,h=arguments;return u.reduce(function(m,b){return h.length>1?f.setEdge(m,b,d):f.setEdge(m,b),b}),this}setEdge(){var u,d,f,h,m=!1,b=arguments[0];typeof b=="object"&&b!==null&&"v"in b?(u=b.v,d=b.w,f=b.name,arguments.length===2&&(h=arguments[1],m=!0)):(u=b,d=arguments[1],f=arguments[3],arguments.length>2&&(h=arguments[2],m=!0)),u=""+u,d=""+d,f!==void 0&&(f=""+f);var g=i(this._isDirected,u,d,f);if(Object.hasOwn(this._edgeLabels,g))return m&&(this._edgeLabels[g]=h),this;if(f!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(d),this._edgeLabels[g]=m?h:this._defaultEdgeLabelFn(u,d,f);var E=s(this._isDirected,u,d,f);return u=E.v,d=E.w,Object.freeze(E),this._edgeObjs[g]=E,o(this._preds[d],u),o(this._sucs[u],d),this._in[d][g]=E,this._out[u][g]=E,this._edgeCount++,this}edge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f);return this._edgeLabels[h]}edgeAsObj(){const u=this.edge(...arguments);return typeof u!="object"?{label:u}:u}hasEdge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f);return Object.hasOwn(this._edgeLabels,h)}removeEdge(u,d,f){var h=arguments.length===1?l(this._isDirected,arguments[0]):i(this._isDirected,u,d,f),m=this._edgeObjs[h];return m&&(u=m.v,d=m.w,delete this._edgeLabels[h],delete this._edgeObjs[h],a(this._preds[d],u),a(this._sucs[u],d),delete this._in[d][h],delete this._out[u][h],this._edgeCount--),this}inEdges(u,d){var f=this._in[u];if(f){var h=Object.values(f);return d?h.filter(m=>m.v===d):h}}outEdges(u,d){var f=this._out[u];if(f){var h=Object.values(f);return d?h.filter(m=>m.w===d):h}}nodeEdges(u,d){var f=this.inEdges(u,d);if(f)return f.concat(this.outEdges(u,d))}}function o(c,u){c[u]?c[u]++:c[u]=1}function a(c,u){--c[u]||delete c[u]}function i(c,u,d,f){var h=""+u,m=""+d;if(!c&&h>m){var b=h;h=m,m=b}return h+n+m+n+(f===void 0?e:f)}function s(c,u,d,f){var h=""+u,m=""+d;if(!c&&h>m){var b=h;h=m,m=b}var g={v:h,w:m};return f&&(g.name=f),g}function l(c,u){return i(c,u.v,u.w,u.name)}return Mo=r,Mo}var Oo,Ba;function Tp(){return Ba||(Ba=1,Oo="2.2.4"),Oo}var To,Va;function Pp(){return Va||(Va=1,To={Graph:Do(),version:Tp()}),To}var Po,La;function Ap(){if(La)return Po;La=1;var e=Do();Po={write:t,read:o};function t(a){var i={options:{directed:a.isDirected(),multigraph:a.isMultigraph(),compound:a.isCompound()},nodes:n(a),edges:r(a)};return a.graph()!==void 0&&(i.value=structuredClone(a.graph())),i}function n(a){return a.nodes().map(function(i){var s=a.node(i),l=a.parent(i),c={v:i};return s!==void 0&&(c.value=s),l!==void 0&&(c.parent=l),c})}function r(a){return a.edges().map(function(i){var s=a.edge(i),l={v:i.v,w:i.w};return i.name!==void 0&&(l.name=i.name),s!==void 0&&(l.value=s),l})}function o(a){var i=new e(a.options).setGraph(a.value);return a.nodes.forEach(function(s){i.setNode(s.v,s.value),s.parent&&i.setParent(s.v,s.parent)}),a.edges.forEach(function(s){i.setEdge({v:s.v,w:s.w,name:s.name},s.value)}),i}return Po}var Ao,Ha;function Rp(){if(Ha)return Ao;Ha=1,Ao=e;function e(t){var n={},r=[],o;function a(i){Object.hasOwn(n,i)||(n[i]=!0,o.push(i),t.successors(i).forEach(a),t.predecessors(i).forEach(a))}return t.nodes().forEach(function(i){o=[],a(i),o.length&&r.push(o)}),r}return Ao}var Ro,Fa;function Ga(){if(Fa)return Ro;Fa=1;class e{constructor(){Me(this,"_arr",[]);Me(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(n){return n.key})}has(n){return Object.hasOwn(this._keyIndices,n)}priority(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(n,r){var o=this._keyIndices;if(n=String(n),!Object.hasOwn(o,n)){var a=this._arr,i=a.length;return o[n]=i,a.push({key:n,priority:r}),this._decrease(i),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key}decrease(n,r){var o=this._keyIndices[n];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)}_heapify(n){var r=this._arr,o=2*n,a=o+1,i=n;o<r.length&&(i=r[o].priority<r[i].priority?o:i,a<r.length&&(i=r[a].priority<r[i].priority?a:i),i!==n&&(this._swap(n,i),this._heapify(i)))}_decrease(n){for(var r=this._arr,o=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<o));)this._swap(n,a),n=a}_swap(n,r){var o=this._arr,a=this._keyIndices,i=o[n],s=o[r];o[n]=s,o[r]=i,a[s.key]=n,a[i.key]=r}}return Ro=e,Ro}var zo,Ya;function qa(){if(Ya)return zo;Ya=1;var e=Ga();zo=n;var t=()=>1;function n(o,a,i,s){return r(o,String(a),i||t,s||function(l){return o.outEdges(l)})}function r(o,a,i,s){var l={},c=new e,u,d,f=function(h){var m=h.v!==u?h.v:h.w,b=l[m],g=i(h),E=d.distance+g;if(g<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+h+" Weight: "+g);E<b.distance&&(b.distance=E,b.predecessor=u,c.decrease(m,E))};for(o.nodes().forEach(function(h){var m=h===a?0:Number.POSITIVE_INFINITY;l[h]={distance:m},c.add(h,m)});c.size()>0&&(u=c.removeMin(),d=l[u],d.distance!==Number.POSITIVE_INFINITY);)s(u).forEach(f);return l}return zo}var Bo,ja;function zp(){if(ja)return Bo;ja=1;var e=qa();Bo=t;function t(n,r,o){return n.nodes().reduce(function(a,i){return a[i]=e(n,i,r,o),a},{})}return Bo}var Vo,Wa;function Xa(){if(Wa)return Vo;Wa=1,Vo=e;function e(t){var n=0,r=[],o={},a=[];function i(s){var l=o[s]={onStack:!0,lowlink:n,index:n++};if(r.push(s),t.successors(s).forEach(function(d){Object.hasOwn(o,d)?o[d].onStack&&(l.lowlink=Math.min(l.lowlink,o[d].index)):(i(d),l.lowlink=Math.min(l.lowlink,o[d].lowlink))}),l.lowlink===l.index){var c=[],u;do u=r.pop(),o[u].onStack=!1,c.push(u);while(s!==u);a.push(c)}}return t.nodes().forEach(function(s){Object.hasOwn(o,s)||i(s)}),a}return Vo}var Lo,Ua;function Bp(){if(Ua)return Lo;Ua=1;var e=Xa();Lo=t;function t(n){return e(n).filter(function(r){return r.length>1||r.length===1&&n.hasEdge(r[0],r[0])})}return Lo}var Ho,Za;function Vp(){if(Za)return Ho;Za=1,Ho=t;var e=()=>1;function t(r,o,a){return n(r,o||e,a||function(i){return r.outEdges(i)})}function n(r,o,a){var i={},s=r.nodes();return s.forEach(function(l){i[l]={},i[l][l]={distance:0},s.forEach(function(c){l!==c&&(i[l][c]={distance:Number.POSITIVE_INFINITY})}),a(l).forEach(function(c){var u=c.v===l?c.w:c.v,d=o(c);i[l][u]={distance:d,predecessor:l}})}),s.forEach(function(l){var c=i[l];s.forEach(function(u){var d=i[u];s.forEach(function(f){var h=d[l],m=c[f],b=d[f],g=h.distance+m.distance;g<b.distance&&(b.distance=g,b.predecessor=m.predecessor)})})}),i}return Ho}var Fo,Ka;function Qa(){if(Ka)return Fo;Ka=1;function e(n){var r={},o={},a=[];function i(s){if(Object.hasOwn(o,s))throw new t;Object.hasOwn(r,s)||(o[s]=!0,r[s]=!0,n.predecessors(s).forEach(i),delete o[s],a.push(s))}if(n.sinks().forEach(i),Object.keys(r).length!==n.nodeCount())throw new t;return a}class t extends Error{constructor(){super(...arguments)}}return Fo=e,e.CycleException=t,Fo}var Go,Ja;function Lp(){if(Ja)return Go;Ja=1;var e=Qa();Go=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Go}var Yo,es;function ts(){if(es)return Yo;es=1,Yo=e;function e(o,a,i){Array.isArray(a)||(a=[a]);var s=o.isDirected()?d=>o.successors(d):d=>o.neighbors(d),l=i==="post"?t:n,c=[],u={};return a.forEach(d=>{if(!o.hasNode(d))throw new Error("Graph does not have node: "+d);l(d,s,u,c)}),c}function t(o,a,i,s){for(var l=[[o,!1]];l.length>0;){var c=l.pop();c[1]?s.push(c[0]):Object.hasOwn(i,c[0])||(i[c[0]]=!0,l.push([c[0],!0]),r(a(c[0]),u=>l.push([u,!1])))}}function n(o,a,i,s){for(var l=[o];l.length>0;){var c=l.pop();Object.hasOwn(i,c)||(i[c]=!0,s.push(c),r(a(c),u=>l.push(u)))}}function r(o,a){for(var i=o.length;i--;)a(o[i],i,o);return o}return Yo}var qo,ns;function Hp(){if(ns)return qo;ns=1;var e=ts();qo=t;function t(n,r){return e(n,r,"post")}return qo}var jo,os;function Fp(){if(os)return jo;os=1;var e=ts();jo=t;function t(n,r){return e(n,r,"pre")}return jo}var Wo,rs;function Gp(){if(rs)return Wo;rs=1;var e=Do(),t=Ga();Wo=n;function n(r,o){var a=new e,i={},s=new t,l;function c(d){var f=d.v===l?d.w:d.v,h=s.priority(f);if(h!==void 0){var m=o(d);m<h&&(i[f]=l,s.decrease(f,m))}}if(r.nodeCount()===0)return a;r.nodes().forEach(function(d){s.add(d,Number.POSITIVE_INFINITY),a.setNode(d)}),s.decrease(r.nodes()[0],0);for(var u=!1;s.size()>0;){if(l=s.removeMin(),Object.hasOwn(i,l))a.setEdge(l,i[l]);else{if(u)throw new Error("Input graph is not connected: "+r);u=!0}r.nodeEdges(l).forEach(c)}return a}return Wo}var Xo,is;function Yp(){return is||(is=1,Xo={components:Rp(),dijkstra:qa(),dijkstraAll:zp(),findCycles:Bp(),floydWarshall:Vp(),isAcyclic:Lp(),postorder:Hp(),preorder:Fp(),prim:Gp(),tarjan:Xa(),topsort:Qa()}),Xo}var Uo,as;function Ge(){if(as)return Uo;as=1;var e=Pp();return Uo={Graph:e.Graph,json:Ap(),alg:Yp(),version:e.version},Uo}var Zo,ss;function qp(){if(ss)return Zo;ss=1;class e{constructor(){let o={};o._next=o._prev=o,this._sentinel=o}dequeue(){let o=this._sentinel,a=o._prev;if(a!==o)return t(a),a}enqueue(o){let a=this._sentinel;o._prev&&o._next&&t(o),o._next=a._next,a._next._prev=o,a._next=o,o._prev=a}toString(){let o=[],a=this._sentinel,i=a._prev;for(;i!==a;)o.push(JSON.stringify(i,n)),i=i._prev;return"["+o.join(", ")+"]"}}function t(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function n(r,o){if(r!=="_next"&&r!=="_prev")return o}return Zo=e,Zo}var Ko,ls;function jp(){if(ls)return Ko;ls=1;let e=Ge().Graph,t=qp();Ko=r;let n=()=>1;function r(c,u){if(c.nodeCount()<=1)return[];let d=i(c,u||n);return o(d.graph,d.buckets,d.zeroIdx).flatMap(h=>c.outEdges(h.v,h.w))}function o(c,u,d){let f=[],h=u[u.length-1],m=u[0],b;for(;c.nodeCount();){for(;b=m.dequeue();)a(c,u,d,b);for(;b=h.dequeue();)a(c,u,d,b);if(c.nodeCount()){for(let g=u.length-2;g>0;--g)if(b=u[g].dequeue(),b){f=f.concat(a(c,u,d,b,!0));break}}}return f}function a(c,u,d,f,h){let m=h?[]:void 0;return c.inEdges(f.v).forEach(b=>{let g=c.edge(b),E=c.node(b.v);h&&m.push({v:b.v,w:b.w}),E.out-=g,s(u,d,E)}),c.outEdges(f.v).forEach(b=>{let g=c.edge(b),E=b.w,y=c.node(E);y.in-=g,s(u,d,y)}),c.removeNode(f.v),m}function i(c,u){let d=new e,f=0,h=0;c.nodes().forEach(g=>{d.setNode(g,{v:g,in:0,out:0})}),c.edges().forEach(g=>{let E=d.edge(g.v,g.w)||0,y=u(g),v=E+y;d.setEdge(g.v,g.w,v),h=Math.max(h,d.node(g.v).out+=y),f=Math.max(f,d.node(g.w).in+=y)});let m=l(h+f+3).map(()=>new t),b=f+1;return d.nodes().forEach(g=>{s(m,b,d.node(g))}),{graph:d,buckets:m,zeroIdx:b}}function s(c,u,d){d.out?d.in?c[d.out-d.in+u].enqueue(d):c[c.length-1].enqueue(d):c[0].enqueue(d)}function l(c){const u=[];for(let d=0;d<c;d++)u.push(d);return u}return Ko}var Qo,us;function Ie(){if(us)return Qo;us=1;let e=Ge().Graph;Qo={addBorderNode:u,addDummyNode:t,applyWithChunking:h,asNonCompoundGraph:r,buildLayerMatrix:s,intersectRect:i,mapValues:B,maxRank:m,normalizeRanks:l,notime:E,partition:b,pick:z,predecessorWeights:a,range:x,removeEmptyRanks:c,simplify:n,successorWeights:o,time:g,uniqueId:v,zipObject:$};function t(w,I,T,k){for(var p=k;w.hasNode(p);)p=v(k);return T.dummy=I,w.setNode(p,T),p}function n(w){let I=new e().setGraph(w.graph());return w.nodes().forEach(T=>I.setNode(T,w.node(T))),w.edges().forEach(T=>{let k=I.edge(T.v,T.w)||{weight:0,minlen:1},p=w.edge(T);I.setEdge(T.v,T.w,{weight:k.weight+p.weight,minlen:Math.max(k.minlen,p.minlen)})}),I}function r(w){let I=new e({multigraph:w.isMultigraph()}).setGraph(w.graph());return w.nodes().forEach(T=>{w.children(T).length||I.setNode(T,w.node(T))}),w.edges().forEach(T=>{I.setEdge(T,w.edge(T))}),I}function o(w){let I=w.nodes().map(T=>{let k={};return w.outEdges(T).forEach(p=>{k[p.w]=(k[p.w]||0)+w.edge(p).weight}),k});return $(w.nodes(),I)}function a(w){let I=w.nodes().map(T=>{let k={};return w.inEdges(T).forEach(p=>{k[p.v]=(k[p.v]||0)+w.edge(p).weight}),k});return $(w.nodes(),I)}function i(w,I){let T=w.x,k=w.y,p=I.x-T,V=I.y-k,_=w.width/2,O=w.height/2;if(!p&&!V)throw new Error("Not possible to find intersection inside of the rectangle");let M,L;return Math.abs(V)*_>Math.abs(p)*O?(V<0&&(O=-O),M=O*p/V,L=O):(p<0&&(_=-_),M=_,L=_*V/p),{x:T+M,y:k+L}}function s(w){let I=x(m(w)+1).map(()=>[]);return w.nodes().forEach(T=>{let k=w.node(T),p=k.rank;p!==void 0&&(I[p][k.order]=T)}),I}function l(w){let I=w.nodes().map(k=>{let p=w.node(k).rank;return p===void 0?Number.MAX_VALUE:p}),T=h(Math.min,I);w.nodes().forEach(k=>{let p=w.node(k);Object.hasOwn(p,"rank")&&(p.rank-=T)})}function c(w){let I=w.nodes().map(_=>w.node(_).rank),T=h(Math.min,I),k=[];w.nodes().forEach(_=>{let O=w.node(_).rank-T;k[O]||(k[O]=[]),k[O].push(_)});let p=0,V=w.graph().nodeRankFactor;Array.from(k).forEach((_,O)=>{_===void 0&&O%V!==0?--p:_!==void 0&&p&&_.forEach(M=>w.node(M).rank+=p)})}function u(w,I,T,k){let p={width:0,height:0};return arguments.length>=4&&(p.rank=T,p.order=k),t(w,"border",p,I)}function d(w,I=f){const T=[];for(let k=0;k<w.length;k+=I){const p=w.slice(k,k+I);T.push(p)}return T}const f=65535;function h(w,I){if(I.length>f){const T=d(I);return w.apply(null,T.map(k=>w.apply(null,k)))}else return w.apply(null,I)}function m(w){const T=w.nodes().map(k=>{let p=w.node(k).rank;return p===void 0?Number.MIN_VALUE:p});return h(Math.max,T)}function b(w,I){let T={lhs:[],rhs:[]};return w.forEach(k=>{I(k)?T.lhs.push(k):T.rhs.push(k)}),T}function g(w,I){let T=Date.now();try{return I()}finally{console.log(w+" time: "+(Date.now()-T)+"ms")}}function E(w,I){return I()}let y=0;function v(w){var I=++y;return w+(""+I)}function x(w,I,T=1){I==null&&(I=w,w=0);let k=V=>V<I;T<0&&(k=V=>I<V);const p=[];for(let V=w;k(V);V+=T)p.push(V);return p}function z(w,I){const T={};for(const k of I)w[k]!==void 0&&(T[k]=w[k]);return T}function B(w,I){let T=I;return typeof I=="string"&&(T=k=>k[I]),Object.entries(w).reduce((k,[p,V])=>(k[p]=T(V,p),k),{})}function $(w,I){return w.reduce((T,k,p)=>(T[k]=I[p],T),{})}return Qo}var Jo,cs;function Wp(){if(cs)return Jo;cs=1;let e=jp(),t=Ie().uniqueId;Jo={run:n,undo:o};function n(a){(a.graph().acyclicer==="greedy"?e(a,s(a)):r(a)).forEach(l=>{let c=a.edge(l);a.removeEdge(l),c.forwardName=l.name,c.reversed=!0,a.setEdge(l.w,l.v,c,t("rev"))});function s(l){return c=>l.edge(c).weight}}function r(a){let i=[],s={},l={};function c(u){Object.hasOwn(l,u)||(l[u]=!0,s[u]=!0,a.outEdges(u).forEach(d=>{Object.hasOwn(s,d.w)?i.push(d):c(d.w)}),delete s[u])}return a.nodes().forEach(c),i}function o(a){a.edges().forEach(i=>{let s=a.edge(i);if(s.reversed){a.removeEdge(i);let l=s.forwardName;delete s.reversed,delete s.forwardName,a.setEdge(i.w,i.v,s,l)}})}return Jo}var er,ds;function Xp(){if(ds)return er;ds=1;let e=Ie();er={run:t,undo:r};function t(o){o.graph().dummyChains=[],o.edges().forEach(a=>n(o,a))}function n(o,a){let i=a.v,s=o.node(i).rank,l=a.w,c=o.node(l).rank,u=a.name,d=o.edge(a),f=d.labelRank;if(c===s+1)return;o.removeEdge(a);let h,m,b;for(b=0,++s;s<c;++b,++s)d.points=[],m={width:0,height:0,edgeLabel:d,edgeObj:a,rank:s},h=e.addDummyNode(o,"edge",m,"_d"),s===f&&(m.width=d.width,m.height=d.height,m.dummy="edge-label",m.labelpos=d.labelpos),o.setEdge(i,h,{weight:d.weight},u),b===0&&o.graph().dummyChains.push(h),i=h;o.setEdge(i,l,{weight:d.weight},u)}function r(o){o.graph().dummyChains.forEach(a=>{let i=o.node(a),s=i.edgeLabel,l;for(o.setEdge(i.edgeObj,s);i.dummy;)l=o.successors(a)[0],o.removeNode(a),s.points.push({x:i.x,y:i.y}),i.dummy==="edge-label"&&(s.x=i.x,s.y=i.y,s.width=i.width,s.height=i.height),a=l,i=o.node(a)})}return er}var tr,fs;function Vn(){if(fs)return tr;fs=1;const{applyWithChunking:e}=Ie();tr={longestPath:t,slack:n};function t(r){var o={};function a(i){var s=r.node(i);if(Object.hasOwn(o,i))return s.rank;o[i]=!0;let l=r.outEdges(i).map(u=>u==null?Number.POSITIVE_INFINITY:a(u.w)-r.edge(u).minlen);var c=e(Math.min,l);return c===Number.POSITIVE_INFINITY&&(c=0),s.rank=c}r.sources().forEach(a)}function n(r,o){return r.node(o.w).rank-r.node(o.v).rank-r.edge(o).minlen}return tr}var nr,hs;function ps(){if(hs)return nr;hs=1;var e=Ge().Graph,t=Vn().slack;nr=n;function n(i){var s=new e({directed:!1}),l=i.nodes()[0],c=i.nodeCount();s.setNode(l,{});for(var u,d;r(s,i)<c;)u=o(s,i),d=s.hasNode(u.v)?t(i,u):-t(i,u),a(s,i,d);return s}function r(i,s){function l(c){s.nodeEdges(c).forEach(u=>{var d=u.v,f=c===d?u.w:d;!i.hasNode(f)&&!t(s,u)&&(i.setNode(f,{}),i.setEdge(c,f,{}),l(f))})}return i.nodes().forEach(l),i.nodeCount()}function o(i,s){return s.edges().reduce((c,u)=>{let d=Number.POSITIVE_INFINITY;return i.hasNode(u.v)!==i.hasNode(u.w)&&(d=t(s,u)),d<c[0]?[d,u]:c},[Number.POSITIVE_INFINITY,null])[1]}function a(i,s,l){i.nodes().forEach(c=>s.node(c).rank+=l)}return nr}var or,vs;function Up(){if(vs)return or;vs=1;var e=ps(),t=Vn().slack,n=Vn().longestPath,r=Ge().alg.preorder,o=Ge().alg.postorder,a=Ie().simplify;or=i,i.initLowLimValues=u,i.initCutValues=s,i.calcCutValue=c,i.leaveEdge=f,i.enterEdge=h,i.exchangeEdges=m;function i(y){y=a(y),n(y);var v=e(y);u(v),s(v,y);for(var x,z;x=f(v);)z=h(v,y,x),m(v,y,x,z)}function s(y,v){var x=o(y,y.nodes());x=x.slice(0,x.length-1),x.forEach(z=>l(y,v,z))}function l(y,v,x){var z=y.node(x),B=z.parent;y.edge(x,B).cutvalue=c(y,v,x)}function c(y,v,x){var z=y.node(x),B=z.parent,$=!0,w=v.edge(x,B),I=0;return w||($=!1,w=v.edge(B,x)),I=w.weight,v.nodeEdges(x).forEach(T=>{var k=T.v===x,p=k?T.w:T.v;if(p!==B){var V=k===$,_=v.edge(T).weight;if(I+=V?_:-_,g(y,x,p)){var O=y.edge(x,p).cutvalue;I+=V?-O:O}}}),I}function u(y,v){arguments.length<2&&(v=y.nodes()[0]),d(y,{},1,v)}function d(y,v,x,z,B){var $=x,w=y.node(z);return v[z]=!0,y.neighbors(z).forEach(I=>{Object.hasOwn(v,I)||(x=d(y,v,x,I,z))}),w.low=$,w.lim=x++,B?w.parent=B:delete w.parent,x}function f(y){return y.edges().find(v=>y.edge(v).cutvalue<0)}function h(y,v,x){var z=x.v,B=x.w;v.hasEdge(z,B)||(z=x.w,B=x.v);var $=y.node(z),w=y.node(B),I=$,T=!1;$.lim>w.lim&&(I=w,T=!0);var k=v.edges().filter(p=>T===E(y,y.node(p.v),I)&&T!==E(y,y.node(p.w),I));return k.reduce((p,V)=>t(v,V)<t(v,p)?V:p)}function m(y,v,x,z){var B=x.v,$=x.w;y.removeEdge(B,$),y.setEdge(z.v,z.w,{}),u(y),s(y,v),b(y,v)}function b(y,v){var x=y.nodes().find(B=>!v.node(B).parent),z=r(y,x);z=z.slice(1),z.forEach(B=>{var $=y.node(B).parent,w=v.edge(B,$),I=!1;w||(w=v.edge($,B),I=!0),v.node(B).rank=v.node($).rank+(I?w.minlen:-w.minlen)})}function g(y,v,x){return y.hasEdge(v,x)}function E(y,v,x){return x.low<=v.lim&&v.lim<=x.lim}return or}var rr,gs;function Zp(){if(gs)return rr;gs=1;var e=Vn(),t=e.longestPath,n=ps(),r=Up();rr=o;function o(l){var c=l.graph().ranker;if(c instanceof Function)return c(l);switch(l.graph().ranker){case"network-simplex":s(l);break;case"tight-tree":i(l);break;case"longest-path":a(l);break;case"none":break;default:s(l)}}var a=t;function i(l){t(l),n(l)}function s(l){r(l)}return rr}var ir,ms;function Kp(){if(ms)return ir;ms=1,ir=e;function e(r){let o=n(r);r.graph().dummyChains.forEach(a=>{let i=r.node(a),s=i.edgeObj,l=t(r,o,s.v,s.w),c=l.path,u=l.lca,d=0,f=c[d],h=!0;for(;a!==s.w;){if(i=r.node(a),h){for(;(f=c[d])!==u&&r.node(f).maxRank<i.rank;)d++;f===u&&(h=!1)}if(!h){for(;d<c.length-1&&r.node(f=c[d+1]).minRank<=i.rank;)d++;f=c[d]}r.setParent(a,f),a=r.successors(a)[0]}})}function t(r,o,a,i){let s=[],l=[],c=Math.min(o[a].low,o[i].low),u=Math.max(o[a].lim,o[i].lim),d,f;d=a;do d=r.parent(d),s.push(d);while(d&&(o[d].low>c||u>o[d].lim));for(f=d,d=i;(d=r.parent(d))!==f;)l.push(d);return{path:s.concat(l.reverse()),lca:f}}function n(r){let o={},a=0;function i(s){let l=a;r.children(s).forEach(i),o[s]={low:l,lim:a++}}return r.children().forEach(i),o}return ir}var ar,_s;function Qp(){if(_s)return ar;_s=1;let e=Ie();ar={run:t,cleanup:a};function t(i){let s=e.addDummyNode(i,"root",{},"_root"),l=r(i),c=Object.values(l),u=e.applyWithChunking(Math.max,c)-1,d=2*u+1;i.graph().nestingRoot=s,i.edges().forEach(h=>i.edge(h).minlen*=d);let f=o(i)+1;i.children().forEach(h=>n(i,s,d,f,u,l,h)),i.graph().nodeRankFactor=d}function n(i,s,l,c,u,d,f){let h=i.children(f);if(!h.length){f!==s&&i.setEdge(s,f,{weight:0,minlen:l});return}let m=e.addBorderNode(i,"_bt"),b=e.addBorderNode(i,"_bb"),g=i.node(f);i.setParent(m,f),g.borderTop=m,i.setParent(b,f),g.borderBottom=b,h.forEach(E=>{n(i,s,l,c,u,d,E);let y=i.node(E),v=y.borderTop?y.borderTop:E,x=y.borderBottom?y.borderBottom:E,z=y.borderTop?c:2*c,B=v!==x?1:u-d[f]+1;i.setEdge(m,v,{weight:z,minlen:B,nestingEdge:!0}),i.setEdge(x,b,{weight:z,minlen:B,nestingEdge:!0})}),i.parent(f)||i.setEdge(s,m,{weight:0,minlen:u+d[f]})}function r(i){var s={};function l(c,u){var d=i.children(c);d&&d.length&&d.forEach(f=>l(f,u+1)),s[c]=u}return i.children().forEach(c=>l(c,1)),s}function o(i){return i.edges().reduce((s,l)=>s+i.edge(l).weight,0)}function a(i){var s=i.graph();i.removeNode(s.nestingRoot),delete s.nestingRoot,i.edges().forEach(l=>{var c=i.edge(l);c.nestingEdge&&i.removeEdge(l)})}return ar}var sr,ys;function Jp(){if(ys)return sr;ys=1;let e=Ie();sr=t;function t(r){function o(a){let i=r.children(a),s=r.node(a);if(i.length&&i.forEach(o),Object.hasOwn(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(let l=s.minRank,c=s.maxRank+1;l<c;++l)n(r,"borderLeft","_bl",a,s,l),n(r,"borderRight","_br",a,s,l)}}r.children().forEach(o)}function n(r,o,a,i,s,l){let c={width:0,height:0,rank:l,borderType:o},u=s[o][l-1],d=e.addDummyNode(r,"border",c,a);s[o][l]=d,r.setParent(d,i),u&&r.setEdge(u,d,{weight:1})}return sr}var lr,ws;function ev(){if(ws)return lr;ws=1,lr={adjust:e,undo:t};function e(l){let c=l.graph().rankdir.toLowerCase();(c==="lr"||c==="rl")&&n(l)}function t(l){let c=l.graph().rankdir.toLowerCase();(c==="bt"||c==="rl")&&o(l),(c==="lr"||c==="rl")&&(i(l),n(l))}function n(l){l.nodes().forEach(c=>r(l.node(c))),l.edges().forEach(c=>r(l.edge(c)))}function r(l){let c=l.width;l.width=l.height,l.height=c}function o(l){l.nodes().forEach(c=>a(l.node(c))),l.edges().forEach(c=>{let u=l.edge(c);u.points.forEach(a),Object.hasOwn(u,"y")&&a(u)})}function a(l){l.y=-l.y}function i(l){l.nodes().forEach(c=>s(l.node(c))),l.edges().forEach(c=>{let u=l.edge(c);u.points.forEach(s),Object.hasOwn(u,"x")&&s(u)})}function s(l){let c=l.x;l.x=l.y,l.y=c}return lr}var ur,bs;function tv(){if(bs)return ur;bs=1;let e=Ie();ur=t;function t(n){let r={},o=n.nodes().filter(u=>!n.children(u).length),a=o.map(u=>n.node(u).rank),i=e.applyWithChunking(Math.max,a),s=e.range(i+1).map(()=>[]);function l(u){if(r[u])return;r[u]=!0;let d=n.node(u);s[d.rank].push(u),n.successors(u).forEach(l)}return o.sort((u,d)=>n.node(u).rank-n.node(d).rank).forEach(l),s}return ur}var cr,xs;function nv(){if(xs)return cr;xs=1;let e=Ie().zipObject;cr=t;function t(r,o){let a=0;for(let i=1;i<o.length;++i)a+=n(r,o[i-1],o[i]);return a}function n(r,o,a){let i=e(a,a.map((f,h)=>h)),s=o.flatMap(f=>r.outEdges(f).map(h=>({pos:i[h.w],weight:r.edge(h).weight})).sort((h,m)=>h.pos-m.pos)),l=1;for(;l<a.length;)l<<=1;let c=2*l-1;l-=1;let u=new Array(c).fill(0),d=0;return s.forEach(f=>{let h=f.pos+l;u[h]+=f.weight;let m=0;for(;h>0;)h%2&&(m+=u[h+1]),h=h-1>>1,u[h]+=f.weight;d+=f.weight*m}),d}return cr}var dr,Es;function ov(){if(Es)return dr;Es=1,dr=e;function e(t,n=[]){return n.map(r=>{let o=t.inEdges(r);if(o.length){let a=o.reduce((i,s)=>{let l=t.edge(s),c=t.node(s.v);return{sum:i.sum+l.weight*c.order,weight:i.weight+l.weight}},{sum:0,weight:0});return{v:r,barycenter:a.sum/a.weight,weight:a.weight}}else return{v:r}})}return dr}var fr,Ns;function rv(){if(Ns)return fr;Ns=1;let e=Ie();fr=t;function t(o,a){let i={};o.forEach((l,c)=>{let u=i[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:c};l.barycenter!==void 0&&(u.barycenter=l.barycenter,u.weight=l.weight)}),a.edges().forEach(l=>{let c=i[l.v],u=i[l.w];c!==void 0&&u!==void 0&&(u.indegree++,c.out.push(i[l.w]))});let s=Object.values(i).filter(l=>!l.indegree);return n(s)}function n(o){let a=[];function i(l){return c=>{c.merged||(c.barycenter===void 0||l.barycenter===void 0||c.barycenter>=l.barycenter)&&r(l,c)}}function s(l){return c=>{c.in.push(l),--c.indegree===0&&o.push(c)}}for(;o.length;){let l=o.pop();a.push(l),l.in.reverse().forEach(i(l)),l.out.forEach(s(l))}return a.filter(l=>!l.merged).map(l=>e.pick(l,["vs","i","barycenter","weight"]))}function r(o,a){let i=0,s=0;o.weight&&(i+=o.barycenter*o.weight,s+=o.weight),a.weight&&(i+=a.barycenter*a.weight,s+=a.weight),o.vs=a.vs.concat(o.vs),o.barycenter=i/s,o.weight=s,o.i=Math.min(a.i,o.i),a.merged=!0}return fr}var hr,Ss;function iv(){if(Ss)return hr;Ss=1;let e=Ie();hr=t;function t(o,a){let i=e.partition(o,m=>Object.hasOwn(m,"barycenter")),s=i.lhs,l=i.rhs.sort((m,b)=>b.i-m.i),c=[],u=0,d=0,f=0;s.sort(r(!!a)),f=n(c,l,f),s.forEach(m=>{f+=m.vs.length,c.push(m.vs),u+=m.barycenter*m.weight,d+=m.weight,f=n(c,l,f)});let h={vs:c.flat(!0)};return d&&(h.barycenter=u/d,h.weight=d),h}function n(o,a,i){let s;for(;a.length&&(s=a[a.length-1]).i<=i;)a.pop(),o.push(s.vs),i++;return i}function r(o){return(a,i)=>a.barycenter<i.barycenter?-1:a.barycenter>i.barycenter?1:o?i.i-a.i:a.i-i.i}return hr}var pr,ks;function av(){if(ks)return pr;ks=1;let e=ov(),t=rv(),n=iv();pr=r;function r(i,s,l,c){let u=i.children(s),d=i.node(s),f=d?d.borderLeft:void 0,h=d?d.borderRight:void 0,m={};f&&(u=u.filter(y=>y!==f&&y!==h));let b=e(i,u);b.forEach(y=>{if(i.children(y.v).length){let v=r(i,y.v,l,c);m[y.v]=v,Object.hasOwn(v,"barycenter")&&a(y,v)}});let g=t(b,l);o(g,m);let E=n(g,c);if(f&&(E.vs=[f,E.vs,h].flat(!0),i.predecessors(f).length)){let y=i.node(i.predecessors(f)[0]),v=i.node(i.predecessors(h)[0]);Object.hasOwn(E,"barycenter")||(E.barycenter=0,E.weight=0),E.barycenter=(E.barycenter*E.weight+y.order+v.order)/(E.weight+2),E.weight+=2}return E}function o(i,s){i.forEach(l=>{l.vs=l.vs.flatMap(c=>s[c]?s[c].vs:c)})}function a(i,s){i.barycenter!==void 0?(i.barycenter=(i.barycenter*i.weight+s.barycenter*s.weight)/(i.weight+s.weight),i.weight+=s.weight):(i.barycenter=s.barycenter,i.weight=s.weight)}return pr}var vr,Cs;function sv(){if(Cs)return vr;Cs=1;let e=Ge().Graph,t=Ie();vr=n;function n(o,a,i){let s=r(o),l=new e({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(c=>o.node(c));return o.nodes().forEach(c=>{let u=o.node(c),d=o.parent(c);(u.rank===a||u.minRank<=a&&a<=u.maxRank)&&(l.setNode(c),l.setParent(c,d||s),o[i](c).forEach(f=>{let h=f.v===c?f.w:f.v,m=l.edge(h,c),b=m!==void 0?m.weight:0;l.setEdge(h,c,{weight:o.edge(f).weight+b})}),Object.hasOwn(u,"minRank")&&l.setNode(c,{borderLeft:u.borderLeft[a],borderRight:u.borderRight[a]}))}),l}function r(o){for(var a;o.hasNode(a=t.uniqueId("_root")););return a}return vr}var gr,$s;function lv(){if($s)return gr;$s=1,gr=e;function e(t,n,r){let o={},a;r.forEach(i=>{let s=t.parent(i),l,c;for(;s;){if(l=t.parent(s),l?(c=o[l],o[l]=s):(c=a,a=s),c&&c!==s){n.setEdge(c,s);return}s=l}})}return gr}var mr,Is;function uv(){if(Is)return mr;Is=1;let e=tv(),t=nv(),n=av(),r=sv(),o=lv(),a=Ge().Graph,i=Ie();mr=s;function s(d,f){if(f&&typeof f.customOrder=="function"){f.customOrder(d,s);return}let h=i.maxRank(d),m=l(d,i.range(1,h+1),"inEdges"),b=l(d,i.range(h-1,-1,-1),"outEdges"),g=e(d);if(u(d,g),f&&f.disableOptimalOrderHeuristic)return;let E=Number.POSITIVE_INFINITY,y;for(let v=0,x=0;x<4;++v,++x){c(v%2?m:b,v%4>=2),g=i.buildLayerMatrix(d);let z=t(d,g);z<E&&(x=0,y=Object.assign({},g),E=z)}u(d,y)}function l(d,f,h){return f.map(function(m){return r(d,m,h)})}function c(d,f){let h=new a;d.forEach(function(m){let b=m.graph().root,g=n(m,b,h,f);g.vs.forEach((E,y)=>m.node(E).order=y),o(m,h,g.vs)})}function u(d,f){Object.values(f).forEach(h=>h.forEach((m,b)=>d.node(m).order=b))}return mr}var _r,Ms;function cv(){if(Ms)return _r;Ms=1;let e=Ge().Graph,t=Ie();_r={positionX:h,findType1Conflicts:n,findType2Conflicts:r,addConflict:a,hasConflict:i,verticalAlignment:s,horizontalCompaction:l,alignCoordinates:d,findSmallestWidthAlignment:u,balance:f};function n(g,E){let y={};function v(x,z){let B=0,$=0,w=x.length,I=z[z.length-1];return z.forEach((T,k)=>{let p=o(g,T),V=p?g.node(p).order:w;(p||T===I)&&(z.slice($,k+1).forEach(_=>{g.predecessors(_).forEach(O=>{let M=g.node(O),L=M.order;(L<B||V<L)&&!(M.dummy&&g.node(_).dummy)&&a(y,O,_)})}),$=k+1,B=V)}),z}return E.length&&E.reduce(v),y}function r(g,E){let y={};function v(z,B,$,w,I){let T;t.range(B,$).forEach(k=>{T=z[k],g.node(T).dummy&&g.predecessors(T).forEach(p=>{let V=g.node(p);V.dummy&&(V.order<w||V.order>I)&&a(y,p,T)})})}function x(z,B){let $=-1,w,I=0;return B.forEach((T,k)=>{if(g.node(T).dummy==="border"){let p=g.predecessors(T);p.length&&(w=g.node(p[0]).order,v(B,I,k,$,w),I=k,$=w)}v(B,I,B.length,w,z.length)}),B}return E.length&&E.reduce(x),y}function o(g,E){if(g.node(E).dummy)return g.predecessors(E).find(y=>g.node(y).dummy)}function a(g,E,y){if(E>y){let x=E;E=y,y=x}let v=g[E];v||(g[E]=v={}),v[y]=!0}function i(g,E,y){if(E>y){let v=E;E=y,y=v}return!!g[E]&&Object.hasOwn(g[E],y)}function s(g,E,y,v){let x={},z={},B={};return E.forEach($=>{$.forEach((w,I)=>{x[w]=w,z[w]=w,B[w]=I})}),E.forEach($=>{let w=-1;$.forEach(I=>{let T=v(I);if(T.length){T=T.sort((p,V)=>B[p]-B[V]);let k=(T.length-1)/2;for(let p=Math.floor(k),V=Math.ceil(k);p<=V;++p){let _=T[p];z[I]===I&&w<B[_]&&!i(y,I,_)&&(z[_]=I,z[I]=x[I]=x[_],w=B[_])}}})}),{root:x,align:z}}function l(g,E,y,v,x){let z={},B=c(g,E,y,x),$=x?"borderLeft":"borderRight";function w(k,p){let V=B.nodes(),_=V.pop(),O={};for(;_;)O[_]?k(_):(O[_]=!0,V.push(_),V=V.concat(p(_))),_=V.pop()}function I(k){z[k]=B.inEdges(k).reduce((p,V)=>Math.max(p,z[V.v]+B.edge(V)),0)}function T(k){let p=B.outEdges(k).reduce((_,O)=>Math.min(_,z[O.w]-B.edge(O)),Number.POSITIVE_INFINITY),V=g.node(k);p!==Number.POSITIVE_INFINITY&&V.borderType!==$&&(z[k]=Math.max(z[k],p))}return w(I,B.predecessors.bind(B)),w(T,B.successors.bind(B)),Object.keys(v).forEach(k=>z[k]=z[y[k]]),z}function c(g,E,y,v){let x=new e,z=g.graph(),B=m(z.nodesep,z.edgesep,v);return E.forEach($=>{let w;$.forEach(I=>{let T=y[I];if(x.setNode(T),w){var k=y[w],p=x.edge(k,T);x.setEdge(k,T,Math.max(B(g,I,w),p||0))}w=I})}),x}function u(g,E){return Object.values(E).reduce((y,v)=>{let x=Number.NEGATIVE_INFINITY,z=Number.POSITIVE_INFINITY;Object.entries(v).forEach(([$,w])=>{let I=b(g,$)/2;x=Math.max(w+I,x),z=Math.min(w-I,z)});const B=x-z;return B<y[0]&&(y=[B,v]),y},[Number.POSITIVE_INFINITY,null])[1]}function d(g,E){let y=Object.values(E),v=t.applyWithChunking(Math.min,y),x=t.applyWithChunking(Math.max,y);["u","d"].forEach(z=>{["l","r"].forEach(B=>{let $=z+B,w=g[$];if(w===E)return;let I=Object.values(w),T=v-t.applyWithChunking(Math.min,I);B!=="l"&&(T=x-t.applyWithChunking(Math.max,I)),T&&(g[$]=t.mapValues(w,k=>k+T))})})}function f(g,E){return t.mapValues(g.ul,(y,v)=>{if(E)return g[E.toLowerCase()][v];{let x=Object.values(g).map(z=>z[v]).sort((z,B)=>z-B);return(x[1]+x[2])/2}})}function h(g){let E=t.buildLayerMatrix(g),y=Object.assign(n(g,E),r(g,E)),v={},x;["u","d"].forEach(B=>{x=B==="u"?E:Object.values(E).reverse(),["l","r"].forEach($=>{$==="r"&&(x=x.map(k=>Object.values(k).reverse()));let w=(B==="u"?g.predecessors:g.successors).bind(g),I=s(g,x,y,w),T=l(g,x,I.root,I.align,$==="r");$==="r"&&(T=t.mapValues(T,k=>-k)),v[B+$]=T})});let z=u(g,v);return d(v,z),f(v,g.graph().align)}function m(g,E,y){return(v,x,z)=>{let B=v.node(x),$=v.node(z),w=0,I;if(w+=B.width/2,Object.hasOwn(B,"labelpos"))switch(B.labelpos.toLowerCase()){case"l":I=-B.width/2;break;case"r":I=B.width/2;break}if(I&&(w+=y?I:-I),I=0,w+=(B.dummy?E:g)/2,w+=($.dummy?E:g)/2,w+=$.width/2,Object.hasOwn($,"labelpos"))switch($.labelpos.toLowerCase()){case"l":I=$.width/2;break;case"r":I=-$.width/2;break}return I&&(w+=y?I:-I),I=0,w}}function b(g,E){return g.node(E).width}return _r}var yr,Ds;function dv(){if(Ds)return yr;Ds=1;let e=Ie(),t=cv().positionX;yr=n;function n(o){o=e.asNonCompoundGraph(o),r(o),Object.entries(t(o)).forEach(([a,i])=>o.node(a).x=i)}function r(o){let a=e.buildLayerMatrix(o),i=o.graph().ranksep,s=0;a.forEach(l=>{const c=l.reduce((u,d)=>{const f=o.node(d).height;return u>f?u:f},0);l.forEach(u=>o.node(u).y=s+c/2),s+=c+i})}return yr}var wr,Os;function fv(){if(Os)return wr;Os=1;let e=Wp(),t=Xp(),n=Zp(),r=Ie().normalizeRanks,o=Kp(),a=Ie().removeEmptyRanks,i=Qp(),s=Jp(),l=ev(),c=uv(),u=dv(),d=Ie(),f=Ge().Graph;wr=h;function h(P,A){let R=A&&A.debugTiming?d.time:d.notime;R("layout",()=>{let H=R(" buildLayoutGraph",()=>w(P));R(" runLayout",()=>m(H,R,A)),R(" updateInputGraph",()=>b(P,H))})}function m(P,A,R){A(" makeSpaceForEdgeLabels",()=>I(P)),A(" removeSelfEdges",()=>F(P)),A(" acyclic",()=>e.run(P)),A(" nestingGraph.run",()=>i.run(P)),A(" rank",()=>n(d.asNonCompoundGraph(P))),A(" injectEdgeLabelProxies",()=>T(P)),A(" removeEmptyRanks",()=>a(P)),A(" nestingGraph.cleanup",()=>i.cleanup(P)),A(" normalizeRanks",()=>r(P)),A(" assignRankMinMax",()=>k(P)),A(" removeEdgeLabelProxies",()=>p(P)),A(" normalize.run",()=>t.run(P)),A(" parentDummyChains",()=>o(P)),A(" addBorderSegments",()=>s(P)),A(" order",()=>c(P,R)),A(" insertSelfEdges",()=>q(P)),A(" adjustCoordinateSystem",()=>l.adjust(P)),A(" position",()=>u(P)),A(" positionSelfEdges",()=>Y(P)),A(" removeBorderNodes",()=>L(P)),A(" normalize.undo",()=>t.undo(P)),A(" fixupEdgeLabelCoords",()=>O(P)),A(" undoCoordinateSystem",()=>l.undo(P)),A(" translateGraph",()=>V(P)),A(" assignNodeIntersects",()=>_(P)),A(" reversePoints",()=>M(P)),A(" acyclic.undo",()=>e.undo(P))}function b(P,A){P.nodes().forEach(R=>{let H=P.node(R),X=A.node(R);H&&(H.x=X.x,H.y=X.y,H.rank=X.rank,A.children(R).length&&(H.width=X.width,H.height=X.height))}),P.edges().forEach(R=>{let H=P.edge(R),X=A.edge(R);H.points=X.points,Object.hasOwn(X,"x")&&(H.x=X.x,H.y=X.y)}),P.graph().width=A.graph().width,P.graph().height=A.graph().height}let g=["nodesep","edgesep","ranksep","marginx","marginy"],E={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},y=["acyclicer","ranker","rankdir","align"],v=["width","height","rank"],x={width:0,height:0},z=["minlen","weight","width","height","labeloffset"],B={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},$=["labelpos"];function w(P){let A=new f({multigraph:!0,compound:!0}),R=W(P.graph());return A.setGraph(Object.assign({},E,j(R,g),d.pick(R,y))),P.nodes().forEach(H=>{let X=W(P.node(H));const te=j(X,v);Object.keys(x).forEach(ne=>{te[ne]===void 0&&(te[ne]=x[ne])}),A.setNode(H,te),A.setParent(H,P.parent(H))}),P.edges().forEach(H=>{let X=W(P.edge(H));A.setEdge(H,Object.assign({},B,j(X,z),d.pick(X,$)))}),A}function I(P){let A=P.graph();A.ranksep/=2,P.edges().forEach(R=>{let H=P.edge(R);H.minlen*=2,H.labelpos.toLowerCase()!=="c"&&(A.rankdir==="TB"||A.rankdir==="BT"?H.width+=H.labeloffset:H.height+=H.labeloffset)})}function T(P){P.edges().forEach(A=>{let R=P.edge(A);if(R.width&&R.height){let H=P.node(A.v),te={rank:(P.node(A.w).rank-H.rank)/2+H.rank,e:A};d.addDummyNode(P,"edge-proxy",te,"_ep")}})}function k(P){let A=0;P.nodes().forEach(R=>{let H=P.node(R);H.borderTop&&(H.minRank=P.node(H.borderTop).rank,H.maxRank=P.node(H.borderBottom).rank,A=Math.max(A,H.maxRank))}),P.graph().maxRank=A}function p(P){P.nodes().forEach(A=>{let R=P.node(A);R.dummy==="edge-proxy"&&(P.edge(R.e).labelRank=R.rank,P.removeNode(A))})}function V(P){let A=Number.POSITIVE_INFINITY,R=0,H=Number.POSITIVE_INFINITY,X=0,te=P.graph(),ne=te.marginx||0,ce=te.marginy||0;function be(ie){let le=ie.x,S=ie.y,N=ie.width,D=ie.height;A=Math.min(A,le-N/2),R=Math.max(R,le+N/2),H=Math.min(H,S-D/2),X=Math.max(X,S+D/2)}P.nodes().forEach(ie=>be(P.node(ie))),P.edges().forEach(ie=>{let le=P.edge(ie);Object.hasOwn(le,"x")&&be(le)}),A-=ne,H-=ce,P.nodes().forEach(ie=>{let le=P.node(ie);le.x-=A,le.y-=H}),P.edges().forEach(ie=>{let le=P.edge(ie);le.points.forEach(S=>{S.x-=A,S.y-=H}),Object.hasOwn(le,"x")&&(le.x-=A),Object.hasOwn(le,"y")&&(le.y-=H)}),te.width=R-A+ne,te.height=X-H+ce}function _(P){P.edges().forEach(A=>{let R=P.edge(A),H=P.node(A.v),X=P.node(A.w),te,ne;R.points?(te=R.points[0],ne=R.points[R.points.length-1]):(R.points=[],te=X,ne=H),R.points.unshift(d.intersectRect(H,te)),R.points.push(d.intersectRect(X,ne))})}function O(P){P.edges().forEach(A=>{let R=P.edge(A);if(Object.hasOwn(R,"x"))switch((R.labelpos==="l"||R.labelpos==="r")&&(R.width-=R.labeloffset),R.labelpos){case"l":R.x-=R.width/2+R.labeloffset;break;case"r":R.x+=R.width/2+R.labeloffset;break}})}function M(P){P.edges().forEach(A=>{let R=P.edge(A);R.reversed&&R.points.reverse()})}function L(P){P.nodes().forEach(A=>{if(P.children(A).length){let R=P.node(A),H=P.node(R.borderTop),X=P.node(R.borderBottom),te=P.node(R.borderLeft[R.borderLeft.length-1]),ne=P.node(R.borderRight[R.borderRight.length-1]);R.width=Math.abs(ne.x-te.x),R.height=Math.abs(X.y-H.y),R.x=te.x+R.width/2,R.y=H.y+R.height/2}}),P.nodes().forEach(A=>{P.node(A).dummy==="border"&&P.removeNode(A)})}function F(P){P.edges().forEach(A=>{if(A.v===A.w){var R=P.node(A.v);R.selfEdges||(R.selfEdges=[]),R.selfEdges.push({e:A,label:P.edge(A)}),P.removeEdge(A)}})}function q(P){var A=d.buildLayerMatrix(P);A.forEach(R=>{var H=0;R.forEach((X,te)=>{var ne=P.node(X);ne.order=te+H,(ne.selfEdges||[]).forEach(ce=>{d.addDummyNode(P,"selfedge",{width:ce.label.width,height:ce.label.height,rank:ne.rank,order:te+ ++H,e:ce.e,label:ce.label},"_se")}),delete ne.selfEdges})})}function Y(P){P.nodes().forEach(A=>{var R=P.node(A);if(R.dummy==="selfedge"){var H=P.node(R.e.v),X=H.x+H.width/2,te=H.y,ne=R.x-X,ce=H.height/2;P.setEdge(R.e,R.label),P.removeNode(A),R.label.points=[{x:X+2*ne/3,y:te-ce},{x:X+5*ne/6,y:te-ce},{x:X+ne,y:te},{x:X+5*ne/6,y:te+ce},{x:X+2*ne/3,y:te+ce}],R.label.x=R.x,R.label.y=R.y}})}function j(P,A){return d.mapValues(d.pick(P,A),Number)}function W(P){var A={};return P&&Object.entries(P).forEach(([R,H])=>{typeof R=="string"&&(R=R.toLowerCase()),A[R]=H}),A}return wr}var br,Ts;function hv(){if(Ts)return br;Ts=1;let e=Ie(),t=Ge().Graph;br={debugOrdering:n};function n(r){let o=e.buildLayerMatrix(r),a=new t({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(i=>{a.setNode(i,{label:i}),a.setParent(i,"layer"+r.node(i).rank)}),r.edges().forEach(i=>a.setEdge(i.v,i.w,{},i.name)),o.forEach((i,s)=>{let l="layer"+s;a.setNode(l,{rank:"same"}),i.reduce((c,u)=>(a.setEdge(c,u,{style:"invis"}),u))}),a}return br}var xr,Ps;function pv(){return Ps||(Ps=1,xr="1.1.5"),xr}var Er,As;function vv(){return As||(As=1,Er={graphlib:Ge(),layout:fv(),debug:hv(),util:{time:Ie().time,notime:Ie().notime},version:pv()}),Er}var gv=vv();const Nr=Op(gv);function mv(){const{findNode:e}=Ne(),t=me(new Nr.graphlib.Graph),n=me("LR");function r(o,a,i){const s=new Nr.graphlib.Graph;t.value=s,s.setDefaultEdgeLabel(()=>({}));const l=i==="LR";s.setGraph({rankdir:i}),n.value=i;for(const c of o){const u=e(c.id);s.setNode(c.id,{width:u.dimensions.width,height:u.dimensions.height})}for(const c of a)s.setEdge(c.source,c.target);return s.graph().ranksep=200,Nr.layout(s),o.map(c=>{const u=s.node(c.id);return c.type=="cosmos"||c.type=="interface"||c.type=="router"||c.type=="target"?{...c,targetPosition:l?K.Left:K.Top,sourcePosition:l?K.Right:K.Bottom,position:{x:u.x,y:u.y}}:c})}return{graph:t,layout:r,previousDirection:n}}const _v={class:"interface-flow-chart"},yv={key:1,class:"empty-state"},eg=ft("_",{__name:"InterfaceFlowChart",props:["interfaceDetails","routerDetails"],setup(e){const{layout:t}=mv(),{onConnect:n,addEdges:r,onNodesChange:o,applyNodeChanges:a,onEdgesChange:i,applyEdgeChanges:s,fitView:l}=Ne(),c=rt("dialog"),u=new Vr,d=e,f=me([]),h=me([]);let m=!1;async function b($,w=!1){(m||w)&&(f.value=t(f.value,h.value,$),m=!1,Ae(()=>{l()}))}n($=>{let w=$.source.startsWith("interface__"),I=$.target.startsWith("interface__"),T=$.source.startsWith("router__"),k=$.target.startsWith("router__"),p=$.source.startsWith("cosmos__"),V=$.target.startsWith("cosmos__"),_=$.source.startsWith("target__"),O=$.target.startsWith("target__"),M=$.sourceHandle.split("__")[1],L=$.targetHandle.split("__")[1];if(M!==L||w&&I||T&&k||T&&I||w&&k||p&&V||_&&O||p&&O||_&&V)return;let F="";p&&(F=F+`cosmos__${$.source.split("__")[1]}`),V&&(F=F+`cosmos__${$.target.split("__")[1]}`),F.length==0&&(w&&(F=F+`interface__${$.source.split("__")[1]}`),I&&(F=F+`interface__${$.target.split("__")[1]}`),T&&(F=F+`router__${$.source.split("__")[1]}`),k&&(F=F+`router__${$.target.split("__")[1]}`)),F.startsWith("cosmos__")&&(w&&(F=F+`__interface__${$.source.split("__")[1]}`),I&&(F=F+`__interface__${$.target.split("__")[1]}`),T&&(F=F+`__router__${$.source.split("__")[1]}`),k&&(F=F+`__router__${$.target.split("__")[1]}`)),_&&(F=F+`__target__${$.source.split("__")[1]}`),O&&(F=F+`__target__${$.target.split("__")[1]}`),F=F+`__${M}`,$.id=F;let q=!1;if(h.value.forEach(H=>{if(H.id===F){q=!0;return}}),q)return;let Y="",j="",W="",P=F.split("__"),A=P[0],R=P[4];A==="cosmos"?(j=P[1],Y=P[2],W=P[3],R=="cmd"?($.type="default",$.label="CMD Enable",$.markerStart={type:"arrowclosed"}):($.type="default",$.label="Tlm Enable",$.markerEnd={type:"arrowclosed"}),Y==="interface"?u.interface_target_enable(W,j,R==="cmd",R==="tlm").then(H=>{r($),h.value.push($)}):u.router_target_enable(W,j,R==="cmd",R==="tlm").then(H=>{r($),h.value.push($)})):(Y=P[0],W=P[1],j=P[3],R=="cmd"?($.type="default",$.label="CMD Map",$.markerStart={type:"arrowclosed"}):($.type="default",$.label="Tlm Map",$.markerEnd={type:"arrowclosed"}),Y==="interface"?c.confirm(`${$.label} target ${j} to interface ${W}? Note this will cause the interface to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{u.map_target_to_interface(j,W,R==="cmd",R==="tlm",!1).then(H=>{r($),h.value.push($)})}):c.confirm(`${$.label} target ${j} to router ${W}? Note this will cause the router to restart.`,{okText:"Map",cancelText:"Cancel"}).then(()=>{u.map_target_to_router(j,W,R==="cmd",R==="tlm",!1).then(H=>{r($),h.value.push($)})}))}),o(async $=>{const w=[];for(const I of $)I.type!=="remove"&&w.push(I),I.type==="dimensions"&&(m=!0,Ae(()=>{b("LR")}));a(w)}),i(async $=>{const w=[];for(const I of $)if(I.type!=="remove")w.push(I);else{let T="",k="",p="",V="",_="",O=I.id.split("__"),M=O[0],L=O[4];M==="cosmos"?(p=O[1],V=O[2],_=O[3],T=`Disable ${p} ${L} with ${V} ${_}?`,k="Disable"):(V=O[0],_=O[1],p=O[3],T=`Unmap ${p} ${L} with ${V} ${_}? Note this will cause the ${V} to restart.`,k="Unmap"),c.confirm(T,{okText:k,cancelText:"Cancel"}).then(()=>{M=="cosmos"?V=="interface"?u.interface_target_disable(_,p,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})}):u.router_target_disable(_,p,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})}):V=="interface"?u.unmap_target_from_interface(p,_,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})}):u.unmap_target_from_router(p,_,L==="cmd",L==="tlm").then(F=>{s([I]),h.value.forEach((q,Y)=>{if(q.id===I.id){h.value.splice(Y,1);return}})})})}s(w)});const g=me(!1),E=me(null),y=me(null),v=me(null),x=me(null);function z($){$.node.type==="interface"?(E.value="Interface",y.value=d.interfaceDetails[$.node.data.label],v.value=null,x.value=null,g.value=!0):$.node.type=="router"?(E.value="Router",y.value=d.routerDetails[$.node.data.label],v.value=null,x.value=null,g.value=!0):($.node.type==="read-protocol"||$.node.type=="write-protocol")&&($.node.data.interface?(E.value="Interface",y.value=d.interfaceDetails[$.node.data.interface]):(E.value="Router",y.value=d.routerDetails[$.node.data.router]),v.value=null,x.value=$.node.data.index,g.value=!0)}function B(){f.value=[],h.value=[];const $=[];let w=d.interfaceDetails||{};for(const p in w){(d.interfaceDetails[p].cmd_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`interface__${p}__target__${O}__cmd`,source:`interface__${p}`,target:`target__${O}`,sourceHandle:"interface__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.interfaceDetails[p].cmd_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__interface__${p}__cmd`,target:`interface__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__cmd",targetHandle:"interface__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};h.value.push(L)}(d.interfaceDetails[p].tlm_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`interface__${p}__target__${O}__tlm`,source:`interface__${p}`,target:`target__${O}`,sourceHandle:"interface__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.interfaceDetails[p].tlm_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__interface__${p}__tlm`,target:`interface__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__tlm",targetHandle:"interface__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};h.value.push(L)}}let I=d.routerDetails||{};for(const p in I){(d.routerDetails[p].cmd_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`router__${p}__target__${O}__cmd`,source:`router__${p}`,target:`target__${O}`,sourceHandle:"router__cmd__output",targetHandle:"target__cmd",type:"default",label:"CMD Map",markerEnd:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.routerDetails[p].cmd_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__router__${p}__cmd`,target:`router__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__cmd",targetHandle:"router__cmd__input",type:"default",label:"CMD Enable",markerEnd:{type:"arrowclosed"}};h.value.push(L)}(d.routerDetails[p].tlm_target_names||[]).forEach(O=>{$.includes(O)||$.push(O);const M={id:`router__${p}__target__${O}__tlm`,source:`router__${p}`,target:`target__${O}`,sourceHandle:"router__tlm__output",targetHandle:"target__tlm",type:"default",label:"TLM Map",markerStart:{type:"arrowclosed"}};h.value.push(M)});for(const[O,M]of Object.entries(d.routerDetails[p].tlm_target_enabled)){if(O==="UNKNOWN"||!M)continue;const L={id:`cosmos__${O}__router__${p}__tlm`,target:`router__${p}`,source:`cosmos__${O}`,sourceHandle:"cosmos__tlm",targetHandle:"router__tlm__input",type:"default",label:"TLM Enable",markerStart:{type:"arrowclosed"}};h.value.push(L)}}$.forEach((p,V)=>{let _,O;_=0,O=V*250;const M={id:`cosmos__${p}`,type:"cosmos",position:{x:_,y:O},data:{label:p},draggable:!0};f.value.push(M)});let T=0,k=200;for(const p in w){let V=d.interfaceDetails[p].write_protocols||[],_=d.interfaceDetails[p].read_protocols||[];const O=Math.max(V.length,_.length,1),M=Math.max(200,80+O*70);M>k&&(k=M);const L=200,F={id:`interface__${p}`,type:"interface",position:{x:400,y:(L+50)*T},data:{label:p,width:M,height:L},draggable:!0};f.value.push(F),T+=1;const q=50;V.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`write-protocol__interface__${p}__${j}`,type:"write-protocol",position:{x:q+j*70,y:98},data:{index:j,interface:p,label:W},draggable:!1,parentNode:`interface__${p}`,extent:"parent"};f.value.push(P)}),_.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`read-protocol__interface__${p}__${j}`,type:"read-protocol",position:{x:q+j*70,y:148},data:{index:j,interface:p,label:W},draggable:!1,parentNode:`interface__${p}`,extent:"parent"};f.value.push(P)})}for(const p in I){let V=d.routerDetails[p].write_protocols||[],_=d.routerDetails[p].read_protocols||[];const O=Math.max(V.length,_.length,1),M=Math.max(200,80+O*70);M>k&&(k=M);const L=200,F={id:`router__${p}`,type:"router",position:{x:400,y:(L+50)*T},data:{label:p,width:M,height:L},draggable:!0};f.value.push(F),T+=1;const q=50;V.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`write-protocol__router__${p}__${j}`,type:"write-protocol",position:{x:q+j*70,y:98},data:{index:j,router:p,label:W},draggable:!1,parentNode:`router__${p}`,extent:"parent"};f.value.push(P)}),_.forEach((Y,j)=>{let W=Y.name;Y.name.slice(-8)==="Protocol"&&(W=Y.name.slice(0,-8));const P={id:`read-protocol__router__${p}__${j}`,type:"read-protocol",position:{x:q+j*70,y:148},data:{index:j,router:p,label:W},draggable:!1,parentNode:`router__${p}`,extent:"parent"};f.value.push(P)})}$.forEach((p,V)=>{let _,O;_=400+k+200,O=V*250;const M={id:`target__${p}`,type:"target",position:{x:_,y:O},data:{label:p},draggable:!0};f.value.push(M)}),m=!0}return ye(()=>d.interfaceDetails,async()=>{d.interfaceDetails!==null&&(B(),Ae(()=>{b("LR")}))},{immediate:!0}),ye(()=>d.routerDetails,async()=>{d.routerDetails!==null&&(B(),Ae(()=>{b("LR")}))},{immediate:!0}),($,w)=>{const I=Se("v-icon"),T=Se("v-dialog");return oe(),de("div",_v,[f.value.length>0?(oe(),Oe(Z(yh),{key:0,nodes:f.value,edges:h.value,"max-zoom":4,"min-zoom":.01,class:"vue-flow-container","elevate-edges-on-select":"","apply-default":!1,onNodeClick:z},{"node-interface":ge(({data:k})=>[se(sp,{data:k},null,8,["data"])]),"node-router":ge(({data:k})=>[se(dp,{data:k},null,8,["data"])]),"node-target":ge(({data:k})=>[se(bp,{data:k},null,8,["data"])]),"node-cosmos":ge(k=>[se(gp,Ar(Rr(k)),null,16)]),"node-write-protocol":ge(({data:k})=>[se(kp,{data:k},null,8,["data"])]),"node-read-protocol":ge(({data:k})=>[se(Dp,{data:k},null,8,["data"])]),default:ge(()=>[se(Z(Kh),{"pattern-color":"#aaa",gap:16}),se(Z(qh),null,{default:ge(()=>[se(Z(Jt),{title:"Reset",onClick:w[0]||(w[0]=k=>b("LR",!0))},{default:ge(()=>[...w[3]||(w[3]=[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"])):(oe(),de("div",yv,[se(I,{large:"",color:"grey"},{default:ge(()=>[...w[4]||(w[4]=[Ye("mdi-lan-disconnect",-1)])]),_:1}),w[5]||(w[5]=ue("div",{class:"text-grey mt-2"},"Nothing to show",-1))])),se(T,{modelValue:g.value,"onUpdate:modelValue":w[2]||(w[2]=k=>g.value=k),"max-width":"80vw","max-height":"80vh"},{default:ge(()=>[se(op,{mode:E.value,details:y.value,"read-protocol-index":x.value,"write-protocol-index":v.value,onClose:w[1]||(w[1]=k=>g.value=!1)},null,8,["mode","details","read-protocol-index","write-protocol-index"])]),_:1},8,["modelValue"])])}}})}}});