vue-data-ui 3.17.13 → 3.18.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.
- package/README.md +1 -1
- package/dist/A11yDataTable-q2-8fSlJ.js +45 -0
- package/dist/Arrow-BU2Z7mfz.js +116 -0
- package/dist/BaseDraggableDialog-LE75fWYz.js +272 -0
- package/dist/BaseIcon-CL6Y7alf.js +499 -0
- package/dist/BaseLegendToggle-BvPOFMVZ.js +56 -0
- package/dist/BaseScanner-C7dmAref.js +27 -0
- package/dist/BaseZoomControls-DSwf4HhS.js +111 -0
- package/dist/ColorPicker-BGbMrtup.js +255 -0
- package/dist/DataTable-ZG4GX2Zg.js +150 -0
- package/dist/Legend-BPb8i4aC.js +114 -0
- package/dist/NonSvgPenAndPaper-BT3YMjgo.js +577 -0
- package/dist/PackageVersion-B1cPtZ3Q.js +11 -0
- package/dist/PenAndPaper-DxBCVZAx.js +461 -0
- package/dist/RecursiveCircles-DPpLel6f.js +117 -0
- package/dist/RecursiveLabels-DBMJf_to.js +56 -0
- package/dist/RecursiveLinks-D06dBL4a.js +78 -0
- package/dist/Shape-Dbug7CtK.js +141 -0
- package/dist/Slicer-SEdaKYPX.js +1144 -0
- package/dist/SlicerPreview-BLlQTUI_.js +1523 -0
- package/dist/SparkTooltip-BaONR2nq.js +93 -0
- package/dist/Title-ByyzJzpc.js +87 -0
- package/dist/Tooltip-V6Z0Ko-1.js +307 -0
- package/dist/UserOptions-Gaw1761w.js +1407 -0
- package/dist/_plugin-vue_export-helper-Dq1MygBL.js +8 -0
- package/dist/canvas-lib-DTaADQOK.js +79 -0
- package/dist/components/arrow.js +2 -5
- package/dist/components/vue-ui-3d-bar.js +2 -5
- package/dist/components/vue-ui-accordion.js +2 -5
- package/dist/components/vue-ui-age-pyramid.js +2 -5
- package/dist/components/vue-ui-annotator.js +2 -5
- package/dist/components/vue-ui-bullet.js +2 -5
- package/dist/components/vue-ui-bump.js +2 -5
- package/dist/components/vue-ui-candlestick.js +2 -5
- package/dist/components/vue-ui-carousel-table.js +2 -5
- package/dist/components/vue-ui-chestnut.js +2 -5
- package/dist/components/vue-ui-chord.js +2 -5
- package/dist/components/vue-ui-circle-pack.js +2 -5
- package/dist/components/vue-ui-cursor.js +2 -5
- package/dist/components/vue-ui-dag.js +2 -5
- package/dist/components/vue-ui-dashboard.js +2 -5
- package/dist/components/vue-ui-digits.js +2 -5
- package/dist/components/vue-ui-donut-evolution.js +2 -5
- package/dist/components/vue-ui-donut.js +2 -5
- package/dist/components/vue-ui-dumbbell.js +2 -5
- package/dist/components/vue-ui-flow.js +2 -5
- package/dist/components/vue-ui-funnel.js +2 -5
- package/dist/components/vue-ui-galaxy.js +2 -5
- package/dist/components/vue-ui-gauge.js +2 -5
- package/dist/components/vue-ui-geo.js +2 -5
- package/dist/components/vue-ui-gizmo.js +2 -5
- package/dist/components/vue-ui-heatmap.js +2 -5
- package/dist/components/vue-ui-history-plot.js +2 -5
- package/dist/components/vue-ui-horizontal-bar.js +2 -5
- package/dist/components/vue-ui-icon.js +2 -5
- package/dist/components/vue-ui-kpi.js +2 -5
- package/dist/components/vue-ui-mini-loader.js +2 -5
- package/dist/components/vue-ui-molecule.js +2 -5
- package/dist/components/vue-ui-mood-radar.js +2 -5
- package/dist/components/vue-ui-nested-donuts.js +2 -5
- package/dist/components/vue-ui-onion.js +2 -5
- package/dist/components/vue-ui-parallel-coordinate-plot.js +2 -5
- package/dist/components/vue-ui-pattern-seed.js +2 -5
- package/dist/components/vue-ui-pattern.js +2 -5
- package/dist/components/vue-ui-quadrant.js +2 -5
- package/dist/components/vue-ui-quick-chart.js +2 -5
- package/dist/components/vue-ui-radar.js +2 -5
- package/dist/components/vue-ui-rating.js +2 -5
- package/dist/components/vue-ui-relation-circle.js +2 -5
- package/dist/components/vue-ui-ridgeline.js +2 -5
- package/dist/components/vue-ui-rings.js +2 -5
- package/dist/components/vue-ui-scatter.js +2 -5
- package/dist/components/vue-ui-skeleton.js +2 -5
- package/dist/components/vue-ui-smiley.js +2 -5
- package/dist/components/vue-ui-spark-trend.js +2 -5
- package/dist/components/vue-ui-sparkbar.js +2 -5
- package/dist/components/vue-ui-sparkgauge.js +2 -5
- package/dist/components/vue-ui-sparkhistogram.js +2 -5
- package/dist/components/vue-ui-sparkline.js +2 -5
- package/dist/components/vue-ui-sparkstackbar.js +2 -5
- package/dist/components/vue-ui-stackbar.js +2 -5
- package/dist/components/vue-ui-stackline.js +2 -5
- package/dist/components/vue-ui-strip-plot.js +2 -5
- package/dist/components/vue-ui-table-heatmap.js +2 -5
- package/dist/components/vue-ui-table-sparkline.js +2 -5
- package/dist/components/vue-ui-table.js +2 -5
- package/dist/components/vue-ui-thermometer.js +2 -5
- package/dist/components/vue-ui-timer.js +2 -5
- package/dist/components/vue-ui-tiremarks.js +2 -5
- package/dist/components/vue-ui-treemap.js +2 -5
- package/dist/components/vue-ui-vertical-bar.js +2 -5
- package/dist/components/vue-ui-waffle.js +2 -5
- package/dist/components/vue-ui-wheel.js +2 -5
- package/dist/components/vue-ui-word-cloud.js +2 -5
- package/dist/components/vue-ui-world.js +2 -5
- package/dist/components/vue-ui-xy-canvas.js +2 -5
- package/dist/components/vue-ui-xy.js +2 -5
- package/dist/dom-to-png-C9UOX1d2.js +237 -0
- package/dist/exposedLib-BQjH823l.js +19 -0
- package/dist/geoProjections-CQIkC70z.js +146 -0
- package/dist/img-NMY-_LiJ.js +74 -0
- package/dist/labelUtils-BiSegLOT.js +19 -0
- package/dist/lib-B83ZCydz.js +1879 -0
- package/dist/patternUtils-B7BWu5bV.js +258 -0
- package/dist/pdf-Ey2KFETK.js +90 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/style.css +2 -1
- package/dist/types/arrow.d.ts +1 -1
- package/dist/types/utils.d.ts +23 -0
- package/dist/types/vue-data-ui.d.ts +4766 -630
- package/dist/types/vue-ui-3d-bar.d.ts +64 -9
- package/dist/types/vue-ui-accordion.d.ts +4 -3
- package/dist/types/vue-ui-age-pyramid.d.ts +79 -9
- package/dist/types/vue-ui-annotator.d.ts +3 -5
- package/dist/types/vue-ui-bullet.d.ts +60 -9
- package/dist/types/vue-ui-bump.d.ts +65 -9
- package/dist/types/vue-ui-candlestick.d.ts +83 -9
- package/dist/types/vue-ui-carousel-table.d.ts +36 -6
- package/dist/types/vue-ui-chestnut.d.ts +66 -9
- package/dist/types/vue-ui-chord.d.ts +78 -9
- package/dist/types/vue-ui-circle-pack.d.ts +86 -9
- package/dist/types/vue-ui-cursor.d.ts +4 -2
- package/dist/types/vue-ui-dag.d.ts +92 -9
- package/dist/types/vue-ui-dashboard.d.ts +43 -6
- package/dist/types/vue-ui-digits.d.ts +4 -2
- package/dist/types/vue-ui-donut-evolution.d.ts +70 -9
- package/dist/types/vue-ui-donut.d.ts +92 -9
- package/dist/types/vue-ui-dumbbell.d.ts +65 -9
- package/dist/types/vue-ui-flow.d.ts +79 -9
- package/dist/types/vue-ui-funnel.d.ts +55 -9
- package/dist/types/vue-ui-galaxy.d.ts +83 -9
- package/dist/types/vue-ui-gauge.d.ts +64 -9
- package/dist/types/vue-ui-geo.d.ts +71 -9
- package/dist/types/vue-ui-gizmo.d.ts +17 -6
- package/dist/types/vue-ui-heatmap.d.ts +73 -9
- package/dist/types/vue-ui-history-plot.d.ts +82 -9
- package/dist/types/vue-ui-horizontal-bar.d.ts +84 -9
- package/dist/types/vue-ui-icon.d.ts +2 -2
- package/dist/types/vue-ui-kpi.d.ts +21 -7
- package/dist/types/vue-ui-mini-loader.d.ts +5 -3
- package/dist/types/vue-ui-molecule.d.ts +86 -9
- package/dist/types/vue-ui-mood-radar.d.ts +66 -9
- package/dist/types/vue-ui-nested-donuts.d.ts +80 -9
- package/dist/types/vue-ui-onion.d.ts +77 -9
- package/dist/types/vue-ui-parallel-coordinate-plot.d.ts +92 -9
- package/dist/types/vue-ui-pattern-seed.d.ts +1 -1
- package/dist/types/vue-ui-pattern.d.ts +2 -2
- package/dist/types/vue-ui-quadrant.d.ts +86 -9
- package/dist/types/vue-ui-quick-chart.d.ts +79 -9
- package/dist/types/vue-ui-radar.d.ts +83 -9
- package/dist/types/vue-ui-rating.d.ts +22 -6
- package/dist/types/vue-ui-relation-circle.d.ts +66 -9
- package/dist/types/vue-ui-ridgeline.d.ts +69 -9
- package/dist/types/vue-ui-rings.d.ts +70 -9
- package/dist/types/vue-ui-scatter.d.ts +67 -9
- package/dist/types/vue-ui-skeleton.d.ts +3 -2
- package/dist/types/vue-ui-smiley.d.ts +3 -2
- package/dist/types/vue-ui-spark-trend.d.ts +14 -6
- package/dist/types/vue-ui-sparkbar.d.ts +27 -6
- package/dist/types/vue-ui-sparkgauge.d.ts +20 -6
- package/dist/types/vue-ui-sparkhistogram.d.ts +24 -6
- package/dist/types/vue-ui-sparkline.d.ts +35 -6
- package/dist/types/vue-ui-sparkstackbar.d.ts +35 -6
- package/dist/types/vue-ui-stackbar.d.ts +85 -9
- package/dist/types/vue-ui-stackline.d.ts +81 -9
- package/dist/types/vue-ui-strip-plot.d.ts +66 -9
- package/dist/types/vue-ui-table-heatmap.d.ts +52 -6
- package/dist/types/vue-ui-table-sparkline.d.ts +30 -6
- package/dist/types/vue-ui-table.d.ts +10 -2
- package/dist/types/vue-ui-thermometer.d.ts +46 -9
- package/dist/types/vue-ui-timer.d.ts +31 -5
- package/dist/types/vue-ui-tiremarks.d.ts +46 -9
- package/dist/types/vue-ui-treemap.d.ts +73 -9
- package/dist/types/vue-ui-vertical-bar.d.ts +2 -2
- package/dist/types/vue-ui-waffle.d.ts +72 -9
- package/dist/types/vue-ui-wheel.d.ts +46 -9
- package/dist/types/vue-ui-word-cloud.d.ts +73 -9
- package/dist/types/vue-ui-world.d.ts +68 -9
- package/dist/types/vue-ui-xy-canvas.d.ts +75 -9
- package/dist/types/vue-ui-xy.d.ts +108 -10
- package/dist/useAutoSizeLabelsInsideViewbox-De0rTecW.js +50 -0
- package/dist/useChartAccessibility-Do37qcw2.js +12 -0
- package/dist/useConfig-KnOLHtlJ.js +7419 -0
- package/dist/useFitSvgText-C-MEdAfe.js +63 -0
- package/dist/useNestedProp-CcxL1gUU.js +10 -0
- package/dist/useObjectBindings-Dc8Rf6Qy.js +189 -0
- package/dist/usePanZoom-B-4M_gmY.js +157 -0
- package/dist/usePrefersMotion-BywLbIko.js +15 -0
- package/dist/usePrinter-CMLF900n.js +49 -0
- package/dist/useResponsive-CrAInupd.js +19 -0
- package/dist/useStableElementSize-0I1IpHPl.js +77 -0
- package/dist/useSvgExport-Dtu973wa.js +755 -0
- package/dist/useTableResponsive-DrM1xqII.js +24 -0
- package/dist/useThemeCheck-rFK9Zlb_.js +24 -0
- package/dist/useTimeLabelCollider-Dm55Emzg.js +57 -0
- package/dist/useTimeLabels-C0x7zUXP.js +272 -0
- package/dist/useUserOptionState-CjPJPTg2.js +15 -0
- package/dist/utils.js +27 -44
- package/dist/vClickOutside-CbX_bC9A.js +13 -0
- package/dist/vue-data-ui-D1REqS_k.js +274 -0
- package/dist/vue-data-ui.js +76 -167
- package/dist/vue-ui-3d-bar-vO_kSCd6.js +1747 -0
- package/dist/vue-ui-accordion-Cf-jZELj.js +81 -0
- package/dist/vue-ui-age-pyramid-DHXhrP_3.js +1226 -0
- package/dist/vue-ui-annotator-B0o6czmF.js +2899 -0
- package/dist/vue-ui-bullet-C93-cf0H.js +700 -0
- package/dist/vue-ui-bump-C_Szk9AZ.js +1239 -0
- package/dist/vue-ui-candlestick-6JdMEJKO.js +1802 -0
- package/dist/vue-ui-carousel-table-CZ_HK0Iw.js +445 -0
- package/dist/vue-ui-chestnut-B8ixU585.js +2000 -0
- package/dist/vue-ui-chord-DC5sLapz.js +1381 -0
- package/dist/vue-ui-circle-pack-CsmSEwt3.js +1183 -0
- package/dist/vue-ui-cursor-B-QODIL3.js +283 -0
- package/dist/vue-ui-dag-C9LYfjS_.js +2899 -0
- package/dist/vue-ui-dashboard-D-f4ZaLi.js +503 -0
- package/dist/vue-ui-digits-CcB3odN7.js +209 -0
- package/dist/vue-ui-donut-DR0ngnZC.js +2396 -0
- package/dist/vue-ui-donut-evolution-BXpOscCe.js +1490 -0
- package/dist/vue-ui-dumbbell-CB_clJWA.js +1517 -0
- package/dist/vue-ui-flow-CUiOAEy1.js +1223 -0
- package/dist/vue-ui-funnel-BAlGDK0o.js +767 -0
- package/dist/vue-ui-galaxy-DbYNfSHb.js +1062 -0
- package/dist/vue-ui-gauge-Cie7jykM.js +910 -0
- package/dist/vue-ui-geo-Ce_gBRye.js +1504 -0
- package/dist/vue-ui-gizmo-B9POi_SN.js +225 -0
- package/dist/vue-ui-heatmap-DFfRSbnk.js +1556 -0
- package/dist/vue-ui-history-plot-DHp5WFgx.js +1551 -0
- package/dist/vue-ui-horizontal-bar-DI4yoARv.js +1669 -0
- package/dist/vue-ui-kpi-oUfso4UP.js +96 -0
- package/dist/vue-ui-mini-loader-aZMi1_uX.js +125 -0
- package/dist/vue-ui-molecule-D72kzel_.js +912 -0
- package/dist/vue-ui-mood-radar-Tw2ZFP7Y.js +1138 -0
- package/dist/vue-ui-nested-donuts-Bza1LczX.js +1472 -0
- package/dist/vue-ui-onion-BOuuib5d.js +1188 -0
- package/dist/vue-ui-parallel-coordinate-plot-BuQUq6-o.js +1413 -0
- package/dist/vue-ui-pattern-Bj-IPFr2.js +154 -0
- package/dist/vue-ui-pattern-seed-abRweCDE.js +61 -0
- package/dist/vue-ui-quadrant-zNFIXNt9.js +1966 -0
- package/dist/vue-ui-quick-chart-B1a8QVUn.js +2459 -0
- package/dist/vue-ui-radar-VFn-YP_2.js +1214 -0
- package/dist/vue-ui-rating-Dxgn21FA.js +343 -0
- package/dist/vue-ui-relation-circle-B0sZaCgX.js +914 -0
- package/dist/vue-ui-ridgeline-BsBAbg5V.js +1612 -0
- package/dist/vue-ui-rings-CDwUzMF-.js +1231 -0
- package/dist/vue-ui-scatter-Du_b-zM8.js +2380 -0
- package/dist/vue-ui-skeleton-BAq6J_6G.js +2556 -0
- package/dist/vue-ui-smiley-CoHvkS0c.js +356 -0
- package/dist/vue-ui-spark-trend-BmCcJ17C.js +438 -0
- package/dist/vue-ui-sparkbar-9z05IMx8.js +393 -0
- package/dist/vue-ui-sparkgauge-BlWri9DP.js +255 -0
- package/dist/vue-ui-sparkhistogram-CHZTt8d8.js +560 -0
- package/dist/vue-ui-sparkline-DirLW9Nd.js +1503 -0
- package/dist/vue-ui-sparkstackbar-Dk6cEI2o.js +660 -0
- package/dist/vue-ui-stackbar-DNIrGHkt.js +2235 -0
- package/dist/vue-ui-stackline-HoWn_ur2.js +2362 -0
- package/dist/vue-ui-strip-plot-Bi8u_fLr.js +1328 -0
- package/dist/vue-ui-table-XLjOOfdI.js +1338 -0
- package/dist/vue-ui-table-heatmap-DvnFiveI.js +334 -0
- package/dist/vue-ui-table-sparkline-CSZf8XxP.js +697 -0
- package/dist/vue-ui-thermometer-7eUO_7CP.js +753 -0
- package/dist/vue-ui-timer-DCbxsREb.js +439 -0
- package/dist/vue-ui-tiremarks-p_sfTufv.js +542 -0
- package/dist/vue-ui-treemap-BdZOW7TM.js +1575 -0
- package/dist/vue-ui-waffle-Bf9dWWCM.js +1350 -0
- package/dist/vue-ui-wheel-CZrIiB0K.js +875 -0
- package/dist/vue-ui-word-cloud-BeLjxoRe.js +1644 -0
- package/dist/vue-ui-world-D9ahzEQ2.js +14252 -0
- package/dist/vue-ui-xy-DrvbVuHO.js +4063 -0
- package/dist/vue-ui-xy-canvas-DU7vFrQr.js +1774 -0
- package/dist/vue_ui_3d_bar-CXKqO5Ej.js +185 -0
- package/dist/vue_ui_age_pyramid-BON8QI6X.js +301 -0
- package/dist/vue_ui_bullet-CE5sFT7u.js +186 -0
- package/dist/vue_ui_bump-frnXaXul.js +201 -0
- package/dist/vue_ui_candlestick-sY6UtOop.js +374 -0
- package/dist/vue_ui_chestnut-BiUZFv40.js +305 -0
- package/dist/vue_ui_chord-DpyR_b9A.js +275 -0
- package/dist/vue_ui_circle_pack-DBKz_Fi_.js +130 -0
- package/dist/vue_ui_dag-Ci_MOnvd.js +258 -0
- package/dist/vue_ui_donut-Cx2_BGcQ.js +358 -0
- package/dist/vue_ui_donut_evolution-CAJefrHs.js +717 -0
- package/dist/vue_ui_dumbbell-CClzAZTN.js +304 -0
- package/dist/vue_ui_flow-CCHO1Lo9.js +238 -0
- package/dist/vue_ui_funnel-h8q2mRpC.js +234 -0
- package/dist/vue_ui_galaxy-70vtkEBw.js +265 -0
- package/dist/vue_ui_gauge-C17CgfzN.js +178 -0
- package/dist/vue_ui_geo-C0UbQ0Lc.js +248 -0
- package/dist/vue_ui_heatmap-BqPP3J4M.js +319 -0
- package/dist/vue_ui_history_plot-C5nytDHh.js +413 -0
- package/dist/vue_ui_horizontal_bar-Bqxorkc_.js +341 -0
- package/dist/vue_ui_molecule-Dka4JBOp.js +231 -0
- package/dist/vue_ui_mood_radar-Dg4ijm53.js +281 -0
- package/dist/vue_ui_nested_donuts-BY9cOoHF.js +273 -0
- package/dist/vue_ui_onion-DTV9cup-.js +293 -0
- package/dist/vue_ui_parallel_coordinate_plot-CNWrDh96.js +278 -0
- package/dist/vue_ui_quadrant-3kjYvxpj.js +428 -0
- package/dist/vue_ui_quick_chart--VaYQuM4.js +139 -0
- package/dist/vue_ui_radar-Dxx9GJmj.js +306 -0
- package/dist/vue_ui_relation_circle-Cr0I2SoU.js +98 -0
- package/dist/vue_ui_ridgeline-CAtYca4b.js +767 -0
- package/dist/vue_ui_rings-DXC1VeX5.js +320 -0
- package/dist/vue_ui_scatter-D2S2j0ap.js +479 -0
- package/dist/vue_ui_spark_trend-BHMQ6_1p.js +82 -0
- package/dist/vue_ui_sparkbar-BR6hbuDE.js +64 -0
- package/dist/vue_ui_sparkgauge-xfPRHnMv.js +90 -0
- package/dist/vue_ui_sparkhistogram-CJRENZ1C.js +123 -0
- package/dist/vue_ui_sparkline-wgk7yO7E.js +151 -0
- package/dist/vue_ui_sparkstackbar-C5qZMmAl.js +175 -0
- package/dist/vue_ui_stackbar-BW_C3MXw.js +412 -0
- package/dist/vue_ui_stackline-DpI2LnjO.js +426 -0
- package/dist/vue_ui_strip_plot-8ZelqC5b.js +301 -0
- package/dist/vue_ui_table_heatmap-BGUjA0WA.js +80 -0
- package/dist/vue_ui_table_sparkline-i0Q-N_we.js +124 -0
- package/dist/vue_ui_thermometer-CuN7Gpez.js +123 -0
- package/dist/vue_ui_tiremarks-A6UHC0c3.js +122 -0
- package/dist/vue_ui_treemap-BQp06q-g.js +328 -0
- package/dist/vue_ui_vertical_bar-CJSD1FZS.js +247 -0
- package/dist/vue_ui_waffle-C_Ev4l7B.js +292 -0
- package/dist/vue_ui_wheel-DdkTPXJU.js +133 -0
- package/dist/vue_ui_word_cloud-B1PbsYPc.js +254 -0
- package/dist/vue_ui_xy-BYPqfYyx.js +482 -0
- package/dist/vue_ui_xy_canvas-CMHGNrLf.js +408 -0
- package/package.json +7 -7
- package/dist/A11yDataTable-BpmuNomI.js +0 -54
- package/dist/Arrow-dSvLFssU.js +0 -101
- package/dist/BaseDraggableDialog-Di8Hlru3.js +0 -249
- package/dist/BaseIcon-DX0hTWa-.js +0 -476
- package/dist/BaseLegendToggle-cMP8M2u0.js +0 -47
- package/dist/BaseScanner-C2j3TsSY.js +0 -36
- package/dist/BaseZoomControls-CVSC1-SU.js +0 -123
- package/dist/ColorPicker-bAxGcXK0.js +0 -271
- package/dist/DataTable-cMnb68Ik.js +0 -145
- package/dist/Legend-DGN5lY60.js +0 -104
- package/dist/NonSvgPenAndPaper-B6E0zEYe.js +0 -573
- package/dist/PackageVersion-BfrCAH6_.js +0 -10
- package/dist/PenAndPaper-CJDoB5H9.js +0 -527
- package/dist/RecursiveCircles-BE6GoMmo.js +0 -101
- package/dist/RecursiveLabels-BhQMS9Sm.js +0 -55
- package/dist/RecursiveLinks-BDwyYfP-.js +0 -83
- package/dist/Shape-CxJ5_Rre.js +0 -116
- package/dist/Slicer-D7UcO8sN.js +0 -1145
- package/dist/SlicerPreview-D_CgrN_7.js +0 -1580
- package/dist/SparkTooltip-D4bM-kfz.js +0 -68
- package/dist/Title-BbKoiBk2.js +0 -88
- package/dist/Tooltip-Cvt7Fi0Q.js +0 -299
- package/dist/UserOptions-DVduN6X7.js +0 -1474
- package/dist/_plugin-vue_export-helper-CHgC5LLL.js +0 -9
- package/dist/dom-to-png-DGvx6i5V.js +0 -262
- package/dist/exposedLib-sJvY1pST.js +0 -22
- package/dist/geoProjections-BFq2sOBY.js +0 -162
- package/dist/img-CjTQXS0U.js +0 -57
- package/dist/labelUtils-DX9oyq3C.js +0 -26
- package/dist/lib-DMzrGQHK.js +0 -2477
- package/dist/patternUtils-BINhU4Ky.js +0 -615
- package/dist/pdf-C4H4o1Cj.js +0 -88
- package/dist/useAutoSizeLabelsInsideViewbox-izlGDfwu.js +0 -55
- package/dist/useChartAccessibility-cp6XQtqi.js +0 -15
- package/dist/useConfig-CG4HT3wS.js +0 -7901
- package/dist/useFitSvgText-2crs6Fv5.js +0 -69
- package/dist/useNestedProp-DH0BEVVS.js +0 -13
- package/dist/useObjectBindings-Dixg-RIe.js +0 -228
- package/dist/usePanZoom-BbDhcKWf.js +0 -141
- package/dist/usePrefersMotion-Co0nj1eS.js +0 -17
- package/dist/usePrinter-C4t8DdQ-.js +0 -51
- package/dist/useResponsive-DfdjqQps.js +0 -195
- package/dist/useStableElementSize-C48ZVcZQ.js +0 -77
- package/dist/useSvgExport-BTG4hVPO.js +0 -870
- package/dist/useTableResponsive-BpfiEtzR.js +0 -26
- package/dist/useThemeCheck-C9Ccl7U9.js +0 -36
- package/dist/useTimeLabelCollider-D3JeJ6Ye.js +0 -86
- package/dist/useTimeLabels-Cv0tD9In.js +0 -307
- package/dist/useUserOptionState-B7Ej974k.js +0 -19
- package/dist/vClickOutside-C6WiFswA.js +0 -13
- package/dist/vue-data-ui-D1ZI7Y4l.js +0 -433
- package/dist/vue-ui-3d-bar-DEjKYzI5.js +0 -1824
- package/dist/vue-ui-accordion-DFtpH_16.js +0 -92
- package/dist/vue-ui-age-pyramid-LiC9hTjP.js +0 -1179
- package/dist/vue-ui-annotator-DrKnQoHf.js +0 -2991
- package/dist/vue-ui-bullet-DdxEINdq.js +0 -769
- package/dist/vue-ui-bump-CdgO1V7z.js +0 -1250
- package/dist/vue-ui-candlestick-DxJnPwto.js +0 -1775
- package/dist/vue-ui-carousel-table-CMefu5TI.js +0 -487
- package/dist/vue-ui-chestnut-BnGN72PO.js +0 -2001
- package/dist/vue-ui-chord-DWyar45U.js +0 -1457
- package/dist/vue-ui-circle-pack-CQ8vF2XH.js +0 -1076
- package/dist/vue-ui-cursor-HHOdkmyB.js +0 -260
- package/dist/vue-ui-dag-BDWPBElq.js +0 -3209
- package/dist/vue-ui-dashboard-Dg_I3X2a.js +0 -627
- package/dist/vue-ui-digits-CZmdir8V.js +0 -211
- package/dist/vue-ui-donut-BKegKHxj.js +0 -2608
- package/dist/vue-ui-donut-evolution-047dE4Lu.js +0 -1578
- package/dist/vue-ui-dumbbell-BL4ZMChj.js +0 -1552
- package/dist/vue-ui-flow-BAqtyunQ.js +0 -1279
- package/dist/vue-ui-funnel-Pl2sEOZs.js +0 -823
- package/dist/vue-ui-galaxy-CBF5Wsax.js +0 -1108
- package/dist/vue-ui-gauge-COV_S0Vp.js +0 -955
- package/dist/vue-ui-geo-CaPXElPf.js +0 -1510
- package/dist/vue-ui-gizmo-Csn7up96.js +0 -238
- package/dist/vue-ui-heatmap-Cpb0BYLa.js +0 -1694
- package/dist/vue-ui-history-plot-ZZEdzFCE.js +0 -1564
- package/dist/vue-ui-horizontal-bar-BonPYUZf.js +0 -1735
- package/dist/vue-ui-kpi-DoHhSsDK.js +0 -130
- package/dist/vue-ui-mini-loader-DOTBVCLE.js +0 -138
- package/dist/vue-ui-molecule-mVYnXouV.js +0 -945
- package/dist/vue-ui-mood-radar-DPvwnc3z.js +0 -1197
- package/dist/vue-ui-nested-donuts-C7E6TXrZ.js +0 -1702
- package/dist/vue-ui-onion-BGIlFhGB.js +0 -1207
- package/dist/vue-ui-parallel-coordinate-plot-C6G_A9ua.js +0 -1432
- package/dist/vue-ui-pattern-mXZW_pvA.js +0 -146
- package/dist/vue-ui-pattern-seed-BcNlxb2i.js +0 -36
- package/dist/vue-ui-quadrant-CVpIeYOB.js +0 -1918
- package/dist/vue-ui-quick-chart-CcV8qn9-.js +0 -2514
- package/dist/vue-ui-radar-G4AV1rBo.js +0 -1259
- package/dist/vue-ui-rating-CqPlP88P.js +0 -370
- package/dist/vue-ui-relation-circle-CkZ8oFVV.js +0 -856
- package/dist/vue-ui-ridgeline-CBTyYn6Q.js +0 -1737
- package/dist/vue-ui-rings-CSIOqFiP.js +0 -1256
- package/dist/vue-ui-scatter-AuC46ufT.js +0 -2345
- package/dist/vue-ui-skeleton-YD6rZjY_.js +0 -2475
- package/dist/vue-ui-smiley-CY0WFv2j.js +0 -391
- package/dist/vue-ui-spark-trend-D8KGIt-R.js +0 -423
- package/dist/vue-ui-sparkbar-BjWGJjzN.js +0 -424
- package/dist/vue-ui-sparkgauge-Dab5mss7.js +0 -285
- package/dist/vue-ui-sparkhistogram-D0rsmiPh.js +0 -559
- package/dist/vue-ui-sparkline-BCaauQuX.js +0 -1550
- package/dist/vue-ui-sparkstackbar-NT5yD6xA.js +0 -672
- package/dist/vue-ui-stackbar-ChBk_A1c.js +0 -2393
- package/dist/vue-ui-stackline-Cujamlze.js +0 -2490
- package/dist/vue-ui-strip-plot-CGBumG6I.js +0 -1293
- package/dist/vue-ui-table-BX2iMku4.js +0 -1726
- package/dist/vue-ui-table-heatmap-KXgXYVXm.js +0 -353
- package/dist/vue-ui-table-sparkline-C3NWnry0.js +0 -803
- package/dist/vue-ui-thermometer-DvdceZB1.js +0 -743
- package/dist/vue-ui-timer-XWAbvuAY.js +0 -504
- package/dist/vue-ui-tiremarks-B-YI1RlT.js +0 -578
- package/dist/vue-ui-treemap-AzorGfmd.js +0 -1757
- package/dist/vue-ui-waffle-CKtUvdTE.js +0 -1442
- package/dist/vue-ui-wheel-CnsLEArZ.js +0 -908
- package/dist/vue-ui-word-cloud-iAme2ihe.js +0 -1644
- package/dist/vue-ui-world-D5rrC9rw.js +0 -14452
- package/dist/vue-ui-xy-C_Q9chQe.js +0 -4468
- package/dist/vue-ui-xy-canvas-DG0299qE.js +0 -2107
- package/dist/vue_ui_3d_bar-CL0iX8Qi.js +0 -22
- package/dist/vue_ui_age_pyramid-8H8WSL7J.js +0 -22
- package/dist/vue_ui_bullet-Ckqieba5.js +0 -22
- package/dist/vue_ui_bump-CIht647H.js +0 -22
- package/dist/vue_ui_candlestick-BAMn-VGw.js +0 -22
- package/dist/vue_ui_chestnut-BloFvDuV.js +0 -22
- package/dist/vue_ui_chord-Bc1_ocwK.js +0 -22
- package/dist/vue_ui_circle_pack-CLmw8nHe.js +0 -22
- package/dist/vue_ui_dag-ZOwuDBZ8.js +0 -22
- package/dist/vue_ui_donut-CA4dgV8J.js +0 -22
- package/dist/vue_ui_donut_evolution-DFQU-rqE.js +0 -22
- package/dist/vue_ui_dumbbell-BCOHDiPk.js +0 -22
- package/dist/vue_ui_flow-BErINgox.js +0 -22
- package/dist/vue_ui_funnel-yuaMZ-yb.js +0 -22
- package/dist/vue_ui_galaxy-D95AN4FT.js +0 -22
- package/dist/vue_ui_gauge-BMEuRC4J.js +0 -22
- package/dist/vue_ui_geo--kg4VoVX.js +0 -22
- package/dist/vue_ui_heatmap-C9u993qE.js +0 -22
- package/dist/vue_ui_history_plot-BCKk1CrQ.js +0 -22
- package/dist/vue_ui_horizontal_bar-BEagrV0T.js +0 -22
- package/dist/vue_ui_molecule-BtvlINUh.js +0 -22
- package/dist/vue_ui_mood_radar-BUs6Fdn8.js +0 -22
- package/dist/vue_ui_nested_donuts-DvTrWT_C.js +0 -22
- package/dist/vue_ui_onion-CxWH9_OZ.js +0 -22
- package/dist/vue_ui_parallel_coordinate_plot-DH3cFJ3n.js +0 -22
- package/dist/vue_ui_quadrant-DjRs--Uz.js +0 -22
- package/dist/vue_ui_quick_chart-DMCjEjPe.js +0 -22
- package/dist/vue_ui_radar-DryGBOrz.js +0 -22
- package/dist/vue_ui_relation_circle-CCroen7h.js +0 -22
- package/dist/vue_ui_ridgeline-j4rVmpEp.js +0 -22
- package/dist/vue_ui_rings-CxOrekqA.js +0 -22
- package/dist/vue_ui_scatter-Bu1EAy9H.js +0 -22
- package/dist/vue_ui_spark_trend-3BjrSprO.js +0 -22
- package/dist/vue_ui_sparkbar-BsMzz5Um.js +0 -22
- package/dist/vue_ui_sparkgauge-KnjASOZs.js +0 -22
- package/dist/vue_ui_sparkhistogram-GBdzIVvS.js +0 -22
- package/dist/vue_ui_sparkline-CQ8DJVJx.js +0 -22
- package/dist/vue_ui_sparkstackbar-BSexvOuM.js +0 -22
- package/dist/vue_ui_stackbar-CuDC4O4b.js +0 -22
- package/dist/vue_ui_stackline-QTh-nuxE.js +0 -22
- package/dist/vue_ui_strip_plot-B9ypi_F3.js +0 -22
- package/dist/vue_ui_table_heatmap-CkvipPVy.js +0 -16
- package/dist/vue_ui_table_sparkline-yQdijcyJ.js +0 -22
- package/dist/vue_ui_thermometer-BTmjRBH8.js +0 -22
- package/dist/vue_ui_tiremarks-DBotWfi8.js +0 -22
- package/dist/vue_ui_treemap-D9-AIkT-.js +0 -22
- package/dist/vue_ui_vertical_bar-CELc39b8.js +0 -18
- package/dist/vue_ui_waffle-M2h-uJQ_.js +0 -22
- package/dist/vue_ui_wheel-LqBz3lv4.js +0 -22
- package/dist/vue_ui_word_cloud-mKAtBxHR.js +0 -22
- package/dist/vue_ui_xy-esktmpg-.js +0 -22
- package/dist/vue_ui_xy_canvas-6BBDSowT.js +0 -22
|
@@ -1,3209 +0,0 @@
|
|
|
1
|
-
import { ref as C, watchEffect as Bo, unref as y, defineAsyncComponent as _t, computed as I, toRefs as zo, onMounted as vn, nextTick as Se, watch as ze, onBeforeUnmount as gn, openBlock as S, createElementBlock as L, normalizeStyle as Le, normalizeClass as pn, createElementVNode as X, toDisplayString as Me, createBlock as oe, createCommentVNode as $, withCtx as V, renderSlot as R, normalizeProps as H, guardReactiveProps as W, createSlots as Vo, createVNode as Ct, Fragment as ge, renderList as Ve, mergeProps as Te, withModifiers as yn, createTextVNode as Ho, Transition as wn, Teleport as bn } from "vue";
|
|
2
|
-
import { j as $t, aE as Wo, t as kn, o as Go, q as En, s as _n, X as jo, as as Yo } from "./lib-DMzrGQHK.js";
|
|
3
|
-
import { t as Uo, u as Zo } from "./useResponsive-DfdjqQps.js";
|
|
4
|
-
import { u as Xo } from "./usePanZoom-BbDhcKWf.js";
|
|
5
|
-
import { u as Ko } from "./useConfig-CG4HT3wS.js";
|
|
6
|
-
import { u as qo, B as Jo } from "./BaseScanner-C2j3TsSY.js";
|
|
7
|
-
import { u as Qo } from "./usePrinter-C4t8DdQ-.js";
|
|
8
|
-
import { u as es } from "./useSvgExport-BTG4hVPO.js";
|
|
9
|
-
import { u as xt } from "./useNestedProp-DH0BEVVS.js";
|
|
10
|
-
import { u as ts } from "./useThemeCheck-C9Ccl7U9.js";
|
|
11
|
-
import { u as ns } from "./useUserOptionState-B7Ej974k.js";
|
|
12
|
-
import { u as os } from "./useChartAccessibility-cp6XQtqi.js";
|
|
13
|
-
import ss from "./img-CjTQXS0U.js";
|
|
14
|
-
import is from "./Title-BbKoiBk2.js";
|
|
15
|
-
import rs from "./vue_ui_dag-ZOwuDBZ8.js";
|
|
16
|
-
import { A as as } from "./A11yDataTable-BpmuNomI.js";
|
|
17
|
-
import { B as Cn } from "./BaseZoomControls-CVSC1-SU.js";
|
|
18
|
-
import { _ as ls } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
19
|
-
const us = "\0", pe = "\0", xn = "";
|
|
20
|
-
class ue {
|
|
21
|
-
_isDirected = !0;
|
|
22
|
-
_isMultigraph = !1;
|
|
23
|
-
_isCompound = !1;
|
|
24
|
-
// Label for the graph itself
|
|
25
|
-
_label;
|
|
26
|
-
// Defaults to be set when creating a new node
|
|
27
|
-
_defaultNodeLabelFn = () => {
|
|
28
|
-
};
|
|
29
|
-
// Defaults to be set when creating a new edge
|
|
30
|
-
_defaultEdgeLabelFn = () => {
|
|
31
|
-
};
|
|
32
|
-
// v -> label
|
|
33
|
-
_nodes = {};
|
|
34
|
-
// v -> edgeObj
|
|
35
|
-
_in = {};
|
|
36
|
-
// u -> v -> Number
|
|
37
|
-
_preds = {};
|
|
38
|
-
// v -> edgeObj
|
|
39
|
-
_out = {};
|
|
40
|
-
// v -> w -> Number
|
|
41
|
-
_sucs = {};
|
|
42
|
-
// e -> edgeObj
|
|
43
|
-
_edgeObjs = {};
|
|
44
|
-
// e -> label
|
|
45
|
-
_edgeLabels = {};
|
|
46
|
-
/* Number of nodes in the graph. Should only be changed by the implementation. */
|
|
47
|
-
_nodeCount = 0;
|
|
48
|
-
/* Number of edges in the graph. Should only be changed by the implementation. */
|
|
49
|
-
_edgeCount = 0;
|
|
50
|
-
_parent;
|
|
51
|
-
_children;
|
|
52
|
-
constructor(t) {
|
|
53
|
-
t && (this._isDirected = Object.hasOwn(t, "directed") ? t.directed : !0, this._isMultigraph = Object.hasOwn(t, "multigraph") ? t.multigraph : !1, this._isCompound = Object.hasOwn(t, "compound") ? t.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[pe] = {});
|
|
54
|
-
}
|
|
55
|
-
/* === Graph functions ========= */
|
|
56
|
-
/**
|
|
57
|
-
* Whether graph was created with 'directed' flag set to true or not.
|
|
58
|
-
*/
|
|
59
|
-
isDirected() {
|
|
60
|
-
return this._isDirected;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Whether graph was created with 'multigraph' flag set to true or not.
|
|
64
|
-
*/
|
|
65
|
-
isMultigraph() {
|
|
66
|
-
return this._isMultigraph;
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Whether graph was created with 'compound' flag set to true or not.
|
|
70
|
-
*/
|
|
71
|
-
isCompound() {
|
|
72
|
-
return this._isCompound;
|
|
73
|
-
}
|
|
74
|
-
/**
|
|
75
|
-
* Sets the label of the graph.
|
|
76
|
-
*/
|
|
77
|
-
setGraph(t) {
|
|
78
|
-
return this._label = t, this;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Gets the graph label.
|
|
82
|
-
*/
|
|
83
|
-
graph() {
|
|
84
|
-
return this._label;
|
|
85
|
-
}
|
|
86
|
-
/* === Node functions ========== */
|
|
87
|
-
/**
|
|
88
|
-
* Sets the default node label. If newDefault is a function, it will be
|
|
89
|
-
* invoked each time when setting a label for a node. Otherwise, this label
|
|
90
|
-
* will be assigned as default label in case if no label was specified while
|
|
91
|
-
* setting a node.
|
|
92
|
-
* Complexity: O(1).
|
|
93
|
-
*/
|
|
94
|
-
setDefaultNodeLabel(t) {
|
|
95
|
-
return this._defaultNodeLabelFn = t, typeof t != "function" && (this._defaultNodeLabelFn = () => t), this;
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Gets the number of nodes in the graph.
|
|
99
|
-
* Complexity: O(1).
|
|
100
|
-
*/
|
|
101
|
-
nodeCount() {
|
|
102
|
-
return this._nodeCount;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* Gets all nodes of the graph. Note, the in case of compound graph subnodes are
|
|
106
|
-
* not included in list.
|
|
107
|
-
* Complexity: O(1).
|
|
108
|
-
*/
|
|
109
|
-
nodes() {
|
|
110
|
-
return Object.keys(this._nodes);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Gets list of nodes without in-edges.
|
|
114
|
-
* Complexity: O(|V|).
|
|
115
|
-
*/
|
|
116
|
-
sources() {
|
|
117
|
-
const t = this;
|
|
118
|
-
return this.nodes().filter(
|
|
119
|
-
(n) => Object.keys(t._in[n]).length === 0
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
/**
|
|
123
|
-
* Gets list of nodes without out-edges.
|
|
124
|
-
* Complexity: O(|V|).
|
|
125
|
-
*/
|
|
126
|
-
sinks() {
|
|
127
|
-
const t = this;
|
|
128
|
-
return this.nodes().filter(
|
|
129
|
-
(n) => Object.keys(t._out[n]).length === 0
|
|
130
|
-
);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Invokes setNode method for each node in names list.
|
|
134
|
-
* Complexity: O(|names|).
|
|
135
|
-
*/
|
|
136
|
-
setNodes(t, n) {
|
|
137
|
-
const o = arguments, s = this;
|
|
138
|
-
return t.forEach((r) => {
|
|
139
|
-
o.length > 1 ? s.setNode(r, n) : s.setNode(r);
|
|
140
|
-
}), this;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Creates or updates the value for the node v in the graph. If value is supplied
|
|
144
|
-
* it is set as the value for the node. If value is not supplied and the node was
|
|
145
|
-
* created by this call then the default node label will be assigned.
|
|
146
|
-
* Complexity: O(1).
|
|
147
|
-
*/
|
|
148
|
-
setNode(t, n) {
|
|
149
|
-
return Object.hasOwn(this._nodes, t) ? (arguments.length > 1 && (this._nodes[t] = n), this) : (this._nodes[t] = arguments.length > 1 ? n : this._defaultNodeLabelFn(t), this._isCompound && (this._parent[t] = pe, this._children[t] = {}, this._children[pe][t] = !0), this._in[t] = {}, this._preds[t] = {}, this._out[t] = {}, this._sucs[t] = {}, ++this._nodeCount, this);
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Gets the label of node with specified name.
|
|
153
|
-
* Complexity: O(1).
|
|
154
|
-
*/
|
|
155
|
-
node(t) {
|
|
156
|
-
return this._nodes[t];
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Detects whether graph has a node with specified name or not.
|
|
160
|
-
*/
|
|
161
|
-
hasNode(t) {
|
|
162
|
-
return Object.hasOwn(this._nodes, t);
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Remove the node with the name from the graph or do nothing if the node is not in
|
|
166
|
-
* the graph. If the node was removed this function also removes any incident
|
|
167
|
-
* edges.
|
|
168
|
-
* Complexity: O(1).
|
|
169
|
-
*/
|
|
170
|
-
removeNode(t) {
|
|
171
|
-
const n = this;
|
|
172
|
-
if (Object.hasOwn(this._nodes, t)) {
|
|
173
|
-
const o = (s) => n.removeEdge(n._edgeObjs[s]);
|
|
174
|
-
delete this._nodes[t], this._isCompound && (this._removeFromParentsChildList(t), delete this._parent[t], this.children(t).forEach((s) => {
|
|
175
|
-
n.setParent(s);
|
|
176
|
-
}), delete this._children[t]), Object.keys(this._in[t]).forEach(o), delete this._in[t], delete this._preds[t], Object.keys(this._out[t]).forEach(o), delete this._out[t], delete this._sucs[t], --this._nodeCount;
|
|
177
|
-
}
|
|
178
|
-
return this;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Sets node parentId as a parent for node nodeId if it is defined, or removes the
|
|
182
|
-
* parent for nodeId if parentId is undefined. Method throws an exception in case of
|
|
183
|
-
* invoking it in context of noncompound graph.
|
|
184
|
-
* Average-case complexity: O(1).
|
|
185
|
-
*/
|
|
186
|
-
setParent(t, n) {
|
|
187
|
-
if (!this._isCompound)
|
|
188
|
-
throw new Error("Cannot set parent in a non-compound graph");
|
|
189
|
-
if (n === void 0)
|
|
190
|
-
n = pe;
|
|
191
|
-
else {
|
|
192
|
-
n += "";
|
|
193
|
-
for (let o = n; o !== void 0; o = this.parent(o))
|
|
194
|
-
if (o === t)
|
|
195
|
-
throw new Error(
|
|
196
|
-
"Setting " + n + " as parent of " + t + " would create a cycle"
|
|
197
|
-
);
|
|
198
|
-
this.setNode(n);
|
|
199
|
-
}
|
|
200
|
-
return this.setNode(t), this._removeFromParentsChildList(t), this._parent[t] = n, this._children[n][t] = !0, this;
|
|
201
|
-
}
|
|
202
|
-
_removeFromParentsChildList(t) {
|
|
203
|
-
delete this._children[this._parent[t]][t];
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Gets parent node for node nodeId.
|
|
207
|
-
* Complexity: O(1).
|
|
208
|
-
*/
|
|
209
|
-
parent(t) {
|
|
210
|
-
if (this._isCompound) {
|
|
211
|
-
const n = this._parent[t];
|
|
212
|
-
if (n !== pe)
|
|
213
|
-
return n;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
/**
|
|
217
|
-
* Gets list of direct children of node nodeId.
|
|
218
|
-
* Complexity: O(1).
|
|
219
|
-
*/
|
|
220
|
-
children(t = pe) {
|
|
221
|
-
if (this._isCompound) {
|
|
222
|
-
const n = this._children[t];
|
|
223
|
-
if (n)
|
|
224
|
-
return Object.keys(n);
|
|
225
|
-
} else {
|
|
226
|
-
if (t === pe)
|
|
227
|
-
return this.nodes();
|
|
228
|
-
if (this.hasNode(t))
|
|
229
|
-
return [];
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
/**
|
|
233
|
-
* Return all nodes that are predecessors of the specified node or undefined if nodeId is not in
|
|
234
|
-
* the graph. Behavior is undefined for undirected graphs - use neighbors instead.
|
|
235
|
-
* Complexity: O(|V|).
|
|
236
|
-
*/
|
|
237
|
-
predecessors(t) {
|
|
238
|
-
const n = this._preds[t];
|
|
239
|
-
if (n)
|
|
240
|
-
return Object.keys(n);
|
|
241
|
-
}
|
|
242
|
-
/**
|
|
243
|
-
* Return all nodes that are successors of the specified node or undefined if nodeId is not in
|
|
244
|
-
* the graph. Behavior is undefined for undirected graphs - use neighbors instead.
|
|
245
|
-
* Complexity: O(|V|).
|
|
246
|
-
*/
|
|
247
|
-
successors(t) {
|
|
248
|
-
const n = this._sucs[t];
|
|
249
|
-
if (n)
|
|
250
|
-
return Object.keys(n);
|
|
251
|
-
}
|
|
252
|
-
/**
|
|
253
|
-
* Return all nodes that are predecessors or successors of the specified node or undefined if
|
|
254
|
-
* nodeId is not in the graph.
|
|
255
|
-
* Complexity: O(|V|).
|
|
256
|
-
*/
|
|
257
|
-
neighbors(t) {
|
|
258
|
-
const n = this.predecessors(t);
|
|
259
|
-
if (n) {
|
|
260
|
-
const o = new Set(n);
|
|
261
|
-
for (const s of this.successors(t))
|
|
262
|
-
o.add(s);
|
|
263
|
-
return Array.from(o.values());
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
isLeaf(t) {
|
|
267
|
-
let n;
|
|
268
|
-
return this.isDirected() ? n = this.successors(t) : n = this.neighbors(t), n.length === 0;
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Creates new graph with nodes filtered via filter. Edges incident to rejected node
|
|
272
|
-
* are also removed. In case of compound graph, if parent is rejected by filter,
|
|
273
|
-
* then all its children are rejected too.
|
|
274
|
-
* Average-case complexity: O(|E|+|V|).
|
|
275
|
-
*/
|
|
276
|
-
filterNodes(t) {
|
|
277
|
-
const n = new this.constructor({
|
|
278
|
-
directed: this._isDirected,
|
|
279
|
-
multigraph: this._isMultigraph,
|
|
280
|
-
compound: this._isCompound
|
|
281
|
-
});
|
|
282
|
-
n.setGraph(this.graph());
|
|
283
|
-
const o = this;
|
|
284
|
-
Object.entries(this._nodes).forEach(([i, l]) => {
|
|
285
|
-
t(i) && n.setNode(i, l);
|
|
286
|
-
}), Object.values(this._edgeObjs).forEach((i) => {
|
|
287
|
-
n.hasNode(i.v) && n.hasNode(i.w) && n.setEdge(i, o.edge(i));
|
|
288
|
-
});
|
|
289
|
-
const s = {};
|
|
290
|
-
function r(i) {
|
|
291
|
-
const l = o.parent(i);
|
|
292
|
-
return l === void 0 || n.hasNode(l) ? (s[i] = l, l) : l in s ? s[l] : r(l);
|
|
293
|
-
}
|
|
294
|
-
return this._isCompound && n.nodes().forEach(
|
|
295
|
-
(i) => n.setParent(i, r(i))
|
|
296
|
-
), n;
|
|
297
|
-
}
|
|
298
|
-
/* === Edge functions ========== */
|
|
299
|
-
/**
|
|
300
|
-
* Sets the default edge label or factory function. This label will be
|
|
301
|
-
* assigned as default label in case if no label was specified while setting
|
|
302
|
-
* an edge or this function will be invoked each time when setting an edge
|
|
303
|
-
* with no label specified and returned value will be used as a label for edge.
|
|
304
|
-
* Complexity: O(1).
|
|
305
|
-
*/
|
|
306
|
-
setDefaultEdgeLabel(t) {
|
|
307
|
-
return this._defaultEdgeLabelFn = t, typeof t != "function" && (this._defaultEdgeLabelFn = () => t), this;
|
|
308
|
-
}
|
|
309
|
-
/**
|
|
310
|
-
* Gets the number of edges in the graph.
|
|
311
|
-
* Complexity: O(1).
|
|
312
|
-
*/
|
|
313
|
-
edgeCount() {
|
|
314
|
-
return this._edgeCount;
|
|
315
|
-
}
|
|
316
|
-
/**
|
|
317
|
-
* Gets edges of the graph. In case of compound graph subgraphs are not considered.
|
|
318
|
-
* Complexity: O(|E|).
|
|
319
|
-
*/
|
|
320
|
-
edges() {
|
|
321
|
-
return Object.values(this._edgeObjs);
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Establish an edges path over the nodes in nodeIds list. If some edge already
|
|
325
|
-
* exists, it will update its label, otherwise it will create an edge between pair
|
|
326
|
-
* of nodes with label provided or default label if no label provided.
|
|
327
|
-
* Complexity: O(|nodeIds|).
|
|
328
|
-
*/
|
|
329
|
-
setPath(t, n) {
|
|
330
|
-
const o = this, s = arguments;
|
|
331
|
-
return t.reduce((r, i) => (s.length > 1 ? o.setEdge(r, i, n) : o.setEdge(r, i), i)), this;
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Creates or updates the label for the edge (v, w) with the optionally supplied
|
|
335
|
-
* name. If value is supplied it is set as the value for the edge. If value is not
|
|
336
|
-
* supplied and the edge was created by this call then the default edge label will
|
|
337
|
-
* be assigned. The name parameter is only useful with multigraphs.
|
|
338
|
-
*/
|
|
339
|
-
setEdge() {
|
|
340
|
-
let t, n, o, s, r = !1;
|
|
341
|
-
const i = arguments[0];
|
|
342
|
-
typeof i == "object" && i !== null && "v" in i ? (t = i.v, n = i.w, o = i.name, arguments.length === 2 && (s = arguments[1], r = !0)) : (t = i, n = arguments[1], o = arguments[3], arguments.length > 2 && (s = arguments[2], r = !0)), t = "" + t, n = "" + n, o !== void 0 && (o = "" + o);
|
|
343
|
-
let l = He(this._isDirected, t, n, o);
|
|
344
|
-
if (Object.hasOwn(this._edgeLabels, l))
|
|
345
|
-
return r && (this._edgeLabels[l] = s), this;
|
|
346
|
-
if (o !== void 0 && !this._isMultigraph)
|
|
347
|
-
throw new Error(
|
|
348
|
-
"Cannot set a named edge when isMultigraph = false"
|
|
349
|
-
);
|
|
350
|
-
this.setNode(t), this.setNode(n), this._edgeLabels[l] = r ? s : this._defaultEdgeLabelFn(t, n, o);
|
|
351
|
-
const u = cs(this._isDirected, t, n, o);
|
|
352
|
-
return t = u.v, n = u.w, Object.freeze(u), this._edgeObjs[l] = u, Nn(this._preds[n], t), Nn(this._sucs[t], n), this._in[n][l] = u, this._out[t][l] = u, this._edgeCount++, this;
|
|
353
|
-
}
|
|
354
|
-
/**
|
|
355
|
-
* Gets the label for the specified edge.
|
|
356
|
-
* Complexity: O(1).
|
|
357
|
-
*/
|
|
358
|
-
edge(t, n, o) {
|
|
359
|
-
const s = arguments.length === 1 ? Nt(this._isDirected, arguments[0]) : He(this._isDirected, t, n, o);
|
|
360
|
-
return this._edgeLabels[s];
|
|
361
|
-
}
|
|
362
|
-
/**
|
|
363
|
-
* Gets the label for the specified edge and converts it to an object.
|
|
364
|
-
* Complexity: O(1)
|
|
365
|
-
*/
|
|
366
|
-
edgeAsObj() {
|
|
367
|
-
const t = this.edge(...arguments);
|
|
368
|
-
return typeof t != "object" ? { label: t } : t;
|
|
369
|
-
}
|
|
370
|
-
/**
|
|
371
|
-
* Detects whether the graph contains specified edge or not. No subgraphs are considered.
|
|
372
|
-
* Complexity: O(1).
|
|
373
|
-
*/
|
|
374
|
-
hasEdge(t, n, o) {
|
|
375
|
-
const s = arguments.length === 1 ? Nt(this._isDirected, arguments[0]) : He(this._isDirected, t, n, o);
|
|
376
|
-
return Object.hasOwn(this._edgeLabels, s);
|
|
377
|
-
}
|
|
378
|
-
/**
|
|
379
|
-
* Removes the specified edge from the graph. No subgraphs are considered.
|
|
380
|
-
* Complexity: O(1).
|
|
381
|
-
*/
|
|
382
|
-
removeEdge(t, n, o) {
|
|
383
|
-
const s = arguments.length === 1 ? Nt(this._isDirected, arguments[0]) : He(this._isDirected, t, n, o), r = this._edgeObjs[s];
|
|
384
|
-
return r && (t = r.v, n = r.w, delete this._edgeLabels[s], delete this._edgeObjs[s], Sn(this._preds[n], t), Sn(this._sucs[t], n), delete this._in[n][s], delete this._out[t][s], this._edgeCount--), this;
|
|
385
|
-
}
|
|
386
|
-
/**
|
|
387
|
-
* Return all edges that point to the node v. Optionally filters those edges down to just those
|
|
388
|
-
* coming from node u. Behavior is undefined for undirected graphs - use nodeEdges instead.
|
|
389
|
-
* Complexity: O(|E|).
|
|
390
|
-
*/
|
|
391
|
-
inEdges(t, n) {
|
|
392
|
-
const o = this._in[t];
|
|
393
|
-
if (o) {
|
|
394
|
-
const s = Object.values(o);
|
|
395
|
-
return n ? s.filter((r) => r.v === n) : s;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Return all edges that are pointed at by node v. Optionally filters those edges down to just
|
|
400
|
-
* those pointing to w. Behavior is undefined for undirected graphs - use nodeEdges instead.
|
|
401
|
-
* Complexity: O(|E|).
|
|
402
|
-
*/
|
|
403
|
-
outEdges(t, n) {
|
|
404
|
-
const o = this._out[t];
|
|
405
|
-
if (o) {
|
|
406
|
-
const s = Object.values(o);
|
|
407
|
-
return n ? s.filter((r) => r.w === n) : s;
|
|
408
|
-
}
|
|
409
|
-
}
|
|
410
|
-
/**
|
|
411
|
-
* Returns all edges to or from node v regardless of direction. Optionally filters those edges
|
|
412
|
-
* down to just those between nodes v and w regardless of direction.
|
|
413
|
-
* Complexity: O(|E|).
|
|
414
|
-
*/
|
|
415
|
-
nodeEdges(t, n) {
|
|
416
|
-
const o = this.inEdges(t, n);
|
|
417
|
-
if (o)
|
|
418
|
-
return o.concat(this.outEdges(t, n));
|
|
419
|
-
}
|
|
420
|
-
}
|
|
421
|
-
function Nn(e, t) {
|
|
422
|
-
e[t] ? e[t]++ : e[t] = 1;
|
|
423
|
-
}
|
|
424
|
-
function Sn(e, t) {
|
|
425
|
-
--e[t] || delete e[t];
|
|
426
|
-
}
|
|
427
|
-
function He(e, t, n, o) {
|
|
428
|
-
let s = "" + t, r = "" + n;
|
|
429
|
-
if (!e && s > r) {
|
|
430
|
-
const i = s;
|
|
431
|
-
s = r, r = i;
|
|
432
|
-
}
|
|
433
|
-
return s + xn + r + xn + (o === void 0 ? us : o);
|
|
434
|
-
}
|
|
435
|
-
function cs(e, t, n, o) {
|
|
436
|
-
let s = "" + t, r = "" + n;
|
|
437
|
-
if (!e && s > r) {
|
|
438
|
-
const l = s;
|
|
439
|
-
s = r, r = l;
|
|
440
|
-
}
|
|
441
|
-
const i = { v: s, w: r };
|
|
442
|
-
return o && (i.name = o), i;
|
|
443
|
-
}
|
|
444
|
-
function Nt(e, t) {
|
|
445
|
-
return He(e, t.v, t.w, t.name);
|
|
446
|
-
}
|
|
447
|
-
class ds {
|
|
448
|
-
constructor() {
|
|
449
|
-
const t = {};
|
|
450
|
-
t._next = t._prev = t, this._sentinel = t;
|
|
451
|
-
}
|
|
452
|
-
dequeue() {
|
|
453
|
-
const t = this._sentinel, n = t._prev;
|
|
454
|
-
if (n !== t)
|
|
455
|
-
return Ln(n), n;
|
|
456
|
-
}
|
|
457
|
-
enqueue(t) {
|
|
458
|
-
const n = this._sentinel;
|
|
459
|
-
t._prev && t._next && Ln(t), t._next = n._next, n._next._prev = t, n._next = t, t._prev = n;
|
|
460
|
-
}
|
|
461
|
-
toString() {
|
|
462
|
-
const t = [], n = this._sentinel;
|
|
463
|
-
let o = n._prev;
|
|
464
|
-
for (; o !== n; )
|
|
465
|
-
t.push(JSON.stringify(o, fs)), o = o._prev;
|
|
466
|
-
return "[" + t.join(", ") + "]";
|
|
467
|
-
}
|
|
468
|
-
}
|
|
469
|
-
function Ln(e) {
|
|
470
|
-
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
471
|
-
}
|
|
472
|
-
function fs(e, t) {
|
|
473
|
-
if (e !== "_next" && e !== "_prev")
|
|
474
|
-
return t;
|
|
475
|
-
}
|
|
476
|
-
const hs = () => 1;
|
|
477
|
-
function ms(e, t) {
|
|
478
|
-
if (e.nodeCount() <= 1)
|
|
479
|
-
return [];
|
|
480
|
-
const n = gs(e, t || hs);
|
|
481
|
-
return vs(
|
|
482
|
-
n.graph,
|
|
483
|
-
n.buckets,
|
|
484
|
-
n.zeroIndex
|
|
485
|
-
).flatMap((s) => e.outEdges(s.v, s.w));
|
|
486
|
-
}
|
|
487
|
-
function vs(e, t, n) {
|
|
488
|
-
let o = [];
|
|
489
|
-
const s = t[t.length - 1], r = t[0];
|
|
490
|
-
let i;
|
|
491
|
-
for (; e.nodeCount(); ) {
|
|
492
|
-
for (; i = r.dequeue(); )
|
|
493
|
-
St(e, t, n, i);
|
|
494
|
-
for (; i = s.dequeue(); )
|
|
495
|
-
St(e, t, n, i);
|
|
496
|
-
if (e.nodeCount()) {
|
|
497
|
-
for (let l = t.length - 2; l > 0; --l)
|
|
498
|
-
if (i = t[l].dequeue(), i) {
|
|
499
|
-
o = o.concat(
|
|
500
|
-
St(e, t, n, i, !0)
|
|
501
|
-
);
|
|
502
|
-
break;
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
}
|
|
506
|
-
return o;
|
|
507
|
-
}
|
|
508
|
-
function St(e, t, n, o, s) {
|
|
509
|
-
const r = s ? [] : void 0;
|
|
510
|
-
return e.inEdges(o.v).forEach((i) => {
|
|
511
|
-
const l = e.edge(i), u = e.node(i.v);
|
|
512
|
-
s && r.push({ v: i.v, w: i.w }), u.out -= l, Rt(t, n, u);
|
|
513
|
-
}), e.outEdges(o.v).forEach((i) => {
|
|
514
|
-
const l = e.edge(i), u = e.node(i.w);
|
|
515
|
-
u.in -= l, Rt(t, n, u);
|
|
516
|
-
}), e.removeNode(o.v), r;
|
|
517
|
-
}
|
|
518
|
-
function gs(e, t) {
|
|
519
|
-
const n = new ue();
|
|
520
|
-
let o = 0, s = 0;
|
|
521
|
-
e.nodes().forEach((l) => {
|
|
522
|
-
n.setNode(l, { v: l, in: 0, out: 0 });
|
|
523
|
-
}), e.edges().forEach((l) => {
|
|
524
|
-
const u = n.edge(l.v, l.w) || 0, f = t(l), h = u + f;
|
|
525
|
-
n.setEdge(l.v, l.w, h), s = Math.max(
|
|
526
|
-
s,
|
|
527
|
-
n.node(l.v).out += f
|
|
528
|
-
), o = Math.max(
|
|
529
|
-
o,
|
|
530
|
-
n.node(l.w).in += f
|
|
531
|
-
);
|
|
532
|
-
});
|
|
533
|
-
const r = ps(s + o + 3).map(
|
|
534
|
-
() => new ds()
|
|
535
|
-
), i = o + 1;
|
|
536
|
-
return n.nodes().forEach((l) => {
|
|
537
|
-
Rt(r, i, n.node(l));
|
|
538
|
-
}), {
|
|
539
|
-
graph: n,
|
|
540
|
-
buckets: r,
|
|
541
|
-
zeroIndex: i
|
|
542
|
-
};
|
|
543
|
-
}
|
|
544
|
-
function Rt(e, t, n) {
|
|
545
|
-
n.out ? n.in ? e[n.out - n.in + t].enqueue(n) : e[e.length - 1].enqueue(n) : e[0].enqueue(n);
|
|
546
|
-
}
|
|
547
|
-
function ps(e) {
|
|
548
|
-
const t = [];
|
|
549
|
-
for (let n = 0; n < e; n++)
|
|
550
|
-
t.push(n);
|
|
551
|
-
return t;
|
|
552
|
-
}
|
|
553
|
-
function $e(e, t, n, o) {
|
|
554
|
-
let s = o;
|
|
555
|
-
for (; e.hasNode(s); )
|
|
556
|
-
s = Je(o);
|
|
557
|
-
return n.dummy = t, e.setNode(s, n), s;
|
|
558
|
-
}
|
|
559
|
-
function Bn(e) {
|
|
560
|
-
const t = new ue().setGraph(e.graph());
|
|
561
|
-
return e.nodes().forEach((n) => {
|
|
562
|
-
t.setNode(n, e.node(n));
|
|
563
|
-
}), e.edges().forEach((n) => {
|
|
564
|
-
const o = t.edge(n.v, n.w) || {
|
|
565
|
-
weight: 0,
|
|
566
|
-
minlen: 1
|
|
567
|
-
}, s = e.edge(n);
|
|
568
|
-
t.setEdge(n.v, n.w, {
|
|
569
|
-
weight: o.weight + s.weight,
|
|
570
|
-
minlen: Math.max(o.minlen, s.minlen)
|
|
571
|
-
});
|
|
572
|
-
}), t;
|
|
573
|
-
}
|
|
574
|
-
function Dt(e) {
|
|
575
|
-
const t = new ue({ multigraph: e.isMultigraph() }).setGraph(
|
|
576
|
-
e.graph()
|
|
577
|
-
);
|
|
578
|
-
return e.nodes().forEach((n) => {
|
|
579
|
-
e.children(n).length || t.setNode(n, e.node(n));
|
|
580
|
-
}), e.edges().forEach((n) => {
|
|
581
|
-
t.setEdge(n, e.edge(n));
|
|
582
|
-
}), t;
|
|
583
|
-
}
|
|
584
|
-
function ys(e) {
|
|
585
|
-
const t = e.nodes().map((n) => {
|
|
586
|
-
const o = {};
|
|
587
|
-
return e.outEdges(n).forEach((s) => {
|
|
588
|
-
o[s.w] = (o[s.w] || 0) + e.edge(s).weight;
|
|
589
|
-
}), o;
|
|
590
|
-
});
|
|
591
|
-
return Qe(e.nodes(), t);
|
|
592
|
-
}
|
|
593
|
-
function ws(e) {
|
|
594
|
-
const t = e.nodes().map((n) => {
|
|
595
|
-
const o = {};
|
|
596
|
-
return e.inEdges(n).forEach((s) => {
|
|
597
|
-
o[s.v] = (o[s.v] || 0) + e.edge(s).weight;
|
|
598
|
-
}), o;
|
|
599
|
-
});
|
|
600
|
-
return Qe(e.nodes(), t);
|
|
601
|
-
}
|
|
602
|
-
function Pt(e, t) {
|
|
603
|
-
let n = e.x, o = e.y;
|
|
604
|
-
const s = t.x - n, r = t.y - o;
|
|
605
|
-
let i = e.width / 2, l = e.height / 2;
|
|
606
|
-
if (!s && !r)
|
|
607
|
-
throw new Error(
|
|
608
|
-
"Not possible to find intersection inside of the rectangle"
|
|
609
|
-
);
|
|
610
|
-
let u, f;
|
|
611
|
-
return Math.abs(r) * i > Math.abs(s) * l ? (r < 0 && (l = -l), u = l * s / r, f = l) : (s < 0 && (i = -i), u = i, f = i * r / s), { x: n + u, y: o + f };
|
|
612
|
-
}
|
|
613
|
-
function Ge(e) {
|
|
614
|
-
const t = Oe(At(e) + 1).map(() => []);
|
|
615
|
-
return e.nodes().forEach((n) => {
|
|
616
|
-
const o = e.node(n), s = o.rank;
|
|
617
|
-
s !== void 0 && (t[s][o.order] = n);
|
|
618
|
-
}), t;
|
|
619
|
-
}
|
|
620
|
-
function zn(e) {
|
|
621
|
-
const t = e.nodes().map((o) => {
|
|
622
|
-
const s = e.node(o).rank;
|
|
623
|
-
return s === void 0 ? Number.MAX_VALUE : s;
|
|
624
|
-
}), n = J(Math.min, t);
|
|
625
|
-
e.nodes().forEach((o) => {
|
|
626
|
-
const s = e.node(o);
|
|
627
|
-
Object.hasOwn(s, "rank") && (s.rank -= n);
|
|
628
|
-
});
|
|
629
|
-
}
|
|
630
|
-
function Vn(e) {
|
|
631
|
-
const t = e.nodes().map((i) => e.node(i).rank).filter((i) => i !== void 0), n = J(Math.min, t), o = [];
|
|
632
|
-
e.nodes().forEach((i) => {
|
|
633
|
-
const l = e.node(i).rank - n;
|
|
634
|
-
o[l] || (o[l] = []), o[l].push(i);
|
|
635
|
-
});
|
|
636
|
-
let s = 0;
|
|
637
|
-
const r = e.graph().nodeRankFactor;
|
|
638
|
-
Array.from(o).forEach((i, l) => {
|
|
639
|
-
i === void 0 && l % r !== 0 ? --s : i !== void 0 && s && i.forEach((u) => {
|
|
640
|
-
e.node(u).rank += s;
|
|
641
|
-
});
|
|
642
|
-
});
|
|
643
|
-
}
|
|
644
|
-
function bs(e, t, n, o) {
|
|
645
|
-
const s = {
|
|
646
|
-
width: 0,
|
|
647
|
-
height: 0
|
|
648
|
-
};
|
|
649
|
-
return arguments.length >= 4 && (s.rank = n, s.order = o), $e(e, "border", s, t);
|
|
650
|
-
}
|
|
651
|
-
const Hn = 65535;
|
|
652
|
-
function ks(e, t = Hn) {
|
|
653
|
-
const n = [];
|
|
654
|
-
for (let o = 0; o < e.length; o += t) {
|
|
655
|
-
const s = e.slice(o, o + t);
|
|
656
|
-
n.push(s);
|
|
657
|
-
}
|
|
658
|
-
return n;
|
|
659
|
-
}
|
|
660
|
-
function J(e, t) {
|
|
661
|
-
if (t.length > Hn) {
|
|
662
|
-
const n = ks(t);
|
|
663
|
-
return e.apply(
|
|
664
|
-
null,
|
|
665
|
-
n.map((o) => e.apply(null, o))
|
|
666
|
-
);
|
|
667
|
-
} else
|
|
668
|
-
return e.apply(null, t);
|
|
669
|
-
}
|
|
670
|
-
function At(e) {
|
|
671
|
-
const n = e.nodes().map((o) => {
|
|
672
|
-
const s = e.node(o).rank;
|
|
673
|
-
return s === void 0 ? Number.MIN_VALUE : s;
|
|
674
|
-
});
|
|
675
|
-
return J(Math.max, n);
|
|
676
|
-
}
|
|
677
|
-
function Wn(e, t) {
|
|
678
|
-
const n = { lhs: [], rhs: [] };
|
|
679
|
-
return e.forEach((o) => {
|
|
680
|
-
t(o) ? n.lhs.push(o) : n.rhs.push(o);
|
|
681
|
-
}), n;
|
|
682
|
-
}
|
|
683
|
-
function Gn(e, t) {
|
|
684
|
-
const n = Date.now();
|
|
685
|
-
try {
|
|
686
|
-
return t();
|
|
687
|
-
} finally {
|
|
688
|
-
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
689
|
-
}
|
|
690
|
-
}
|
|
691
|
-
function jn(e, t) {
|
|
692
|
-
return t();
|
|
693
|
-
}
|
|
694
|
-
let Es = 0;
|
|
695
|
-
function Je(e) {
|
|
696
|
-
const t = ++Es;
|
|
697
|
-
return e + String(t);
|
|
698
|
-
}
|
|
699
|
-
function Oe(e, t, n = 1) {
|
|
700
|
-
t == null && (t = e, e = 0);
|
|
701
|
-
let o = (r) => r < t;
|
|
702
|
-
n < 0 && (o = (r) => t < r);
|
|
703
|
-
const s = [];
|
|
704
|
-
for (let r = e; o(r); r += n)
|
|
705
|
-
s.push(r);
|
|
706
|
-
return s;
|
|
707
|
-
}
|
|
708
|
-
function We(e, t) {
|
|
709
|
-
const n = {};
|
|
710
|
-
for (const o of t)
|
|
711
|
-
e[o] !== void 0 && (n[o] = e[o]);
|
|
712
|
-
return n;
|
|
713
|
-
}
|
|
714
|
-
function je(e, t) {
|
|
715
|
-
let n = t;
|
|
716
|
-
if (typeof t == "string") {
|
|
717
|
-
const o = t;
|
|
718
|
-
n = (s) => s[o];
|
|
719
|
-
}
|
|
720
|
-
return Object.entries(e).reduce((o, [s, r]) => (o[s] = n(r, s), o), {});
|
|
721
|
-
}
|
|
722
|
-
function Qe(e, t) {
|
|
723
|
-
return e.reduce((n, o, s) => (n[o] = t[s], n), {});
|
|
724
|
-
}
|
|
725
|
-
const qe = {
|
|
726
|
-
addBorderNode: bs,
|
|
727
|
-
addDummyNode: $e,
|
|
728
|
-
applyWithChunking: J,
|
|
729
|
-
asNonCompoundGraph: Dt,
|
|
730
|
-
buildLayerMatrix: Ge,
|
|
731
|
-
intersectRect: Pt,
|
|
732
|
-
mapValues: je,
|
|
733
|
-
maxRank: At,
|
|
734
|
-
normalizeRanks: zn,
|
|
735
|
-
notime: jn,
|
|
736
|
-
partition: Wn,
|
|
737
|
-
pick: We,
|
|
738
|
-
predecessorWeights: ws,
|
|
739
|
-
range: Oe,
|
|
740
|
-
removeEmptyRanks: Vn,
|
|
741
|
-
simplify: Bn,
|
|
742
|
-
successorWeights: ys,
|
|
743
|
-
time: Gn,
|
|
744
|
-
uniqueId: Je,
|
|
745
|
-
zipObject: Qe
|
|
746
|
-
};
|
|
747
|
-
function _s(e) {
|
|
748
|
-
(e.graph().acyclicer === "greedy" ? ms(e, n(e)) : xs(e)).forEach((o) => {
|
|
749
|
-
const s = e.edge(o);
|
|
750
|
-
e.removeEdge(o), s.forwardName = o.name, s.reversed = !0, e.setEdge(o.w, o.v, s, Je("rev"));
|
|
751
|
-
});
|
|
752
|
-
function n(o) {
|
|
753
|
-
return (s) => o.edge(s).weight;
|
|
754
|
-
}
|
|
755
|
-
}
|
|
756
|
-
function Cs(e) {
|
|
757
|
-
e.edges().forEach((t) => {
|
|
758
|
-
const n = e.edge(t);
|
|
759
|
-
if (n.reversed) {
|
|
760
|
-
e.removeEdge(t);
|
|
761
|
-
const o = n.forwardName;
|
|
762
|
-
delete n.reversed, delete n.forwardName, e.setEdge(t.w, t.v, n, o);
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
function xs(e) {
|
|
767
|
-
const t = [], n = {}, o = {};
|
|
768
|
-
function s(r) {
|
|
769
|
-
Object.hasOwn(o, r) || (o[r] = !0, n[r] = !0, e.outEdges(r).forEach((i) => {
|
|
770
|
-
Object.hasOwn(n, i.w) ? t.push(i) : s(i.w);
|
|
771
|
-
}), delete n[r]);
|
|
772
|
-
}
|
|
773
|
-
return e.nodes().forEach(s), t;
|
|
774
|
-
}
|
|
775
|
-
function Ns(e) {
|
|
776
|
-
e.graph().dummyChains = [], e.edges().forEach((t) => Ss(e, t));
|
|
777
|
-
}
|
|
778
|
-
function Ss(e, t) {
|
|
779
|
-
let n = t.v, o = e.node(n).rank;
|
|
780
|
-
const s = t.w, r = e.node(s).rank, i = t.name, l = e.edge(t), u = l.labelRank;
|
|
781
|
-
if (r === o + 1)
|
|
782
|
-
return;
|
|
783
|
-
e.removeEdge(t);
|
|
784
|
-
let f, h, m;
|
|
785
|
-
for (m = 0, ++o; o < r; ++m, ++o)
|
|
786
|
-
l.points = [], h = {
|
|
787
|
-
width: 0,
|
|
788
|
-
height: 0,
|
|
789
|
-
edgeLabel: l,
|
|
790
|
-
edgeObj: t,
|
|
791
|
-
rank: o
|
|
792
|
-
}, f = $e(e, "edge", h, "_d"), o === u && (h.width = l.width, h.height = l.height, h.dummy = "edge-label", h.labelpos = l.labelpos), e.setEdge(n, f, { weight: l.weight }, i), m === 0 && e.graph().dummyChains.push(f), n = f;
|
|
793
|
-
e.setEdge(n, s, { weight: l.weight }, i);
|
|
794
|
-
}
|
|
795
|
-
function Ls(e) {
|
|
796
|
-
e.graph().dummyChains.forEach((t) => {
|
|
797
|
-
let n = e.node(t);
|
|
798
|
-
const o = n.edgeLabel;
|
|
799
|
-
e.setEdge(n.edgeObj, o);
|
|
800
|
-
let s;
|
|
801
|
-
for (; n.dummy; )
|
|
802
|
-
s = e.successors(t)[0], e.removeNode(t), o.points.push({ x: n.x, y: n.y }), n.dummy === "edge-label" && (o.x = n.x, o.y = n.y, o.width = n.width, o.height = n.height), t = s, n = e.node(t);
|
|
803
|
-
});
|
|
804
|
-
}
|
|
805
|
-
function Yn(e) {
|
|
806
|
-
function t(n) {
|
|
807
|
-
const o = e.node(n);
|
|
808
|
-
if (o && Object.prototype.hasOwnProperty.call(o, "rank"))
|
|
809
|
-
return o.rank;
|
|
810
|
-
const s = e.outEdges(n) || [];
|
|
811
|
-
if (!s.length)
|
|
812
|
-
return o && (o.rank = 0), 0;
|
|
813
|
-
const r = s.map((l) => {
|
|
814
|
-
if (!e.node(l.w))
|
|
815
|
-
return Number.POSITIVE_INFINITY;
|
|
816
|
-
const f = t(l.w), h = e.edge(l).minlen;
|
|
817
|
-
return f - h;
|
|
818
|
-
});
|
|
819
|
-
let i = J(Math.min, r);
|
|
820
|
-
return i === Number.POSITIVE_INFINITY && (i = 0), o && (o.rank = i), i;
|
|
821
|
-
}
|
|
822
|
-
(e.sources() || []).forEach(t);
|
|
823
|
-
}
|
|
824
|
-
function Ms(e, t) {
|
|
825
|
-
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
826
|
-
}
|
|
827
|
-
function Ts(e) {
|
|
828
|
-
Os(e);
|
|
829
|
-
const t = new ue();
|
|
830
|
-
e.nodes().forEach((r) => {
|
|
831
|
-
t.setNode(r, {});
|
|
832
|
-
});
|
|
833
|
-
const n = e.nodes();
|
|
834
|
-
if (!n.length)
|
|
835
|
-
return t;
|
|
836
|
-
const o = n[0], s = /* @__PURE__ */ new Set([o]);
|
|
837
|
-
for (; s.size < n.length; ) {
|
|
838
|
-
const r = $s(e, s);
|
|
839
|
-
if (!r) {
|
|
840
|
-
const h = n.find((m) => !s.has(m));
|
|
841
|
-
s.add(h), t.setNode(h, {});
|
|
842
|
-
continue;
|
|
843
|
-
}
|
|
844
|
-
const { edgeObject: i, delta: l, attachFrom: u, attachTo: f } = r;
|
|
845
|
-
Rs(e, s, u, l), t.setEdge(i.v, i.w, {}), s.add(f);
|
|
846
|
-
}
|
|
847
|
-
return t;
|
|
848
|
-
}
|
|
849
|
-
function Os(e) {
|
|
850
|
-
e.nodes().forEach((t) => {
|
|
851
|
-
const n = e.node(t) || {};
|
|
852
|
-
Object.prototype.hasOwnProperty.call(n, "rank") || (n.rank = 0, e.setNode(t, n));
|
|
853
|
-
});
|
|
854
|
-
}
|
|
855
|
-
function $s(e, t) {
|
|
856
|
-
let n = null;
|
|
857
|
-
return e.edges().forEach((o) => {
|
|
858
|
-
const s = t.has(o.v), r = t.has(o.w);
|
|
859
|
-
if (s === r)
|
|
860
|
-
return;
|
|
861
|
-
const i = Ms(e, o), l = Math.abs(i);
|
|
862
|
-
if (!n || l < n.absoluteSlack) {
|
|
863
|
-
const u = s ? o.v : o.w, f = s ? o.w : o.v, h = s ? i : -i;
|
|
864
|
-
n = {
|
|
865
|
-
edgeObject: o,
|
|
866
|
-
delta: h,
|
|
867
|
-
attachFrom: u,
|
|
868
|
-
attachTo: f,
|
|
869
|
-
absoluteSlack: l
|
|
870
|
-
};
|
|
871
|
-
}
|
|
872
|
-
}), n;
|
|
873
|
-
}
|
|
874
|
-
function Rs(e, t, n, o) {
|
|
875
|
-
o && e.nodes().forEach((s) => {
|
|
876
|
-
if (!t.has(s)) {
|
|
877
|
-
const r = e.node(s);
|
|
878
|
-
r.rank += o;
|
|
879
|
-
}
|
|
880
|
-
});
|
|
881
|
-
}
|
|
882
|
-
function Re(e) {
|
|
883
|
-
const t = Bn(e);
|
|
884
|
-
return Yn(t), t.nodes().forEach((n) => {
|
|
885
|
-
const o = t.node(n), s = e.node(n) || {};
|
|
886
|
-
s.rank = o.rank, e.setNode(n, s);
|
|
887
|
-
}), e;
|
|
888
|
-
}
|
|
889
|
-
function Ps(e, t) {
|
|
890
|
-
}
|
|
891
|
-
function Ds(e, t) {
|
|
892
|
-
}
|
|
893
|
-
function As(e, t, n) {
|
|
894
|
-
return 0;
|
|
895
|
-
}
|
|
896
|
-
function Fs(e) {
|
|
897
|
-
return null;
|
|
898
|
-
}
|
|
899
|
-
function Is(e, t) {
|
|
900
|
-
return null;
|
|
901
|
-
}
|
|
902
|
-
Re.initLowLimValues = Ps;
|
|
903
|
-
Re.initCutValues = Ds;
|
|
904
|
-
Re.calcCutValue = As;
|
|
905
|
-
Re.leaveEdge = Fs;
|
|
906
|
-
Re.enterEdge = Is;
|
|
907
|
-
const Un = Yn;
|
|
908
|
-
function Bs(e) {
|
|
909
|
-
const t = e.graph().ranker;
|
|
910
|
-
if (t instanceof Function)
|
|
911
|
-
return t(e);
|
|
912
|
-
switch (e.graph().ranker) {
|
|
913
|
-
case "network-simplex":
|
|
914
|
-
Mn(e);
|
|
915
|
-
break;
|
|
916
|
-
case "tight-tree":
|
|
917
|
-
Vs(e);
|
|
918
|
-
break;
|
|
919
|
-
case "longest-path":
|
|
920
|
-
zs(e);
|
|
921
|
-
break;
|
|
922
|
-
case "none":
|
|
923
|
-
break;
|
|
924
|
-
default:
|
|
925
|
-
Mn(e);
|
|
926
|
-
}
|
|
927
|
-
}
|
|
928
|
-
const zs = Un;
|
|
929
|
-
function Vs(e) {
|
|
930
|
-
Un(e), Ts(e);
|
|
931
|
-
}
|
|
932
|
-
function Mn(e) {
|
|
933
|
-
Re(e);
|
|
934
|
-
}
|
|
935
|
-
function Hs(e) {
|
|
936
|
-
const t = Gs(e);
|
|
937
|
-
e.graph().dummyChains.forEach((n) => {
|
|
938
|
-
let o = e.node(n);
|
|
939
|
-
const s = o.edgeObj, r = Ws(
|
|
940
|
-
e,
|
|
941
|
-
t,
|
|
942
|
-
s.v,
|
|
943
|
-
s.w
|
|
944
|
-
), i = r.path, l = r.lca;
|
|
945
|
-
let u = 0, f = i[u], h = !0, m = n;
|
|
946
|
-
for (; m !== s.w; ) {
|
|
947
|
-
if (o = e.node(m), h) {
|
|
948
|
-
for (; (f = i[u]) !== l && e.node(f).maxRank < o.rank; )
|
|
949
|
-
u++;
|
|
950
|
-
f === l && (h = !1);
|
|
951
|
-
}
|
|
952
|
-
if (!h) {
|
|
953
|
-
for (; u < i.length - 1 && e.node(f = i[u + 1]).minRank <= o.rank; )
|
|
954
|
-
u++;
|
|
955
|
-
f = i[u];
|
|
956
|
-
}
|
|
957
|
-
e.setParent(m, f), m = e.successors(m)[0];
|
|
958
|
-
}
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
|
-
function Ws(e, t, n, o) {
|
|
962
|
-
const s = [], r = [], i = Math.min(t[n].low, t[o].low), l = Math.max(t[n].lim, t[o].lim);
|
|
963
|
-
let u, f;
|
|
964
|
-
u = n;
|
|
965
|
-
do
|
|
966
|
-
u = e.parent(u), s.push(u);
|
|
967
|
-
while (u && (t[u].low > i || l > t[u].lim));
|
|
968
|
-
for (f = u, u = o; (u = e.parent(u)) !== f; )
|
|
969
|
-
r.push(u);
|
|
970
|
-
return {
|
|
971
|
-
path: s.concat(r.reverse()),
|
|
972
|
-
lca: f
|
|
973
|
-
};
|
|
974
|
-
}
|
|
975
|
-
function Gs(e) {
|
|
976
|
-
const t = {};
|
|
977
|
-
let n = 0;
|
|
978
|
-
function o(s) {
|
|
979
|
-
const r = n;
|
|
980
|
-
e.children(s).forEach(o), t[s] = { low: r, lim: n++ };
|
|
981
|
-
}
|
|
982
|
-
return e.children().forEach(o), t;
|
|
983
|
-
}
|
|
984
|
-
function js(e) {
|
|
985
|
-
const t = qe.addDummyNode(e, "root", {}, "_root"), n = Ys(e), o = Object.values(n), s = qe.applyWithChunking(Math.max, o) - 1, r = 2 * s + 1;
|
|
986
|
-
e.graph().nestingRoot = t, e.edges().forEach((l) => {
|
|
987
|
-
e.edge(l).minlen *= r;
|
|
988
|
-
});
|
|
989
|
-
const i = Us(e) + 1;
|
|
990
|
-
e.children().forEach((l) => {
|
|
991
|
-
Zn(
|
|
992
|
-
e,
|
|
993
|
-
t,
|
|
994
|
-
r,
|
|
995
|
-
i,
|
|
996
|
-
s,
|
|
997
|
-
n,
|
|
998
|
-
l
|
|
999
|
-
);
|
|
1000
|
-
}), e.graph().nodeRankFactor = r;
|
|
1001
|
-
}
|
|
1002
|
-
function Zn(e, t, n, o, s, r, i) {
|
|
1003
|
-
const l = e.children(i);
|
|
1004
|
-
if (!l.length) {
|
|
1005
|
-
i !== t && e.setEdge(t, i, { weight: 0, minlen: n });
|
|
1006
|
-
return;
|
|
1007
|
-
}
|
|
1008
|
-
const u = qe.addBorderNode(e, "_bt"), f = qe.addBorderNode(e, "_bb"), h = e.node(i);
|
|
1009
|
-
e.setParent(u, i), h.borderTop = u, e.setParent(f, i), h.borderBottom = f, l.forEach((m) => {
|
|
1010
|
-
Zn(
|
|
1011
|
-
e,
|
|
1012
|
-
t,
|
|
1013
|
-
n,
|
|
1014
|
-
o,
|
|
1015
|
-
s,
|
|
1016
|
-
r,
|
|
1017
|
-
m
|
|
1018
|
-
);
|
|
1019
|
-
const p = e.node(m), _ = p.borderTop ? p.borderTop : m, O = p.borderBottom ? p.borderBottom : m, M = p.borderTop ? o : 2 * o, z = _ !== O ? 1 : s - r[i] + 1;
|
|
1020
|
-
e.setEdge(u, _, {
|
|
1021
|
-
weight: M,
|
|
1022
|
-
minlen: z,
|
|
1023
|
-
nestingEdge: !0
|
|
1024
|
-
}), e.setEdge(O, f, {
|
|
1025
|
-
weight: M,
|
|
1026
|
-
minlen: z,
|
|
1027
|
-
nestingEdge: !0
|
|
1028
|
-
});
|
|
1029
|
-
}), e.parent(i) || e.setEdge(t, u, {
|
|
1030
|
-
weight: 0,
|
|
1031
|
-
minlen: s + r[i]
|
|
1032
|
-
});
|
|
1033
|
-
}
|
|
1034
|
-
function Ys(e) {
|
|
1035
|
-
const t = {};
|
|
1036
|
-
function n(o, s) {
|
|
1037
|
-
const r = e.children(o);
|
|
1038
|
-
r && r.length && r.forEach((i) => n(i, s + 1)), t[o] = s;
|
|
1039
|
-
}
|
|
1040
|
-
return e.children().forEach((o) => n(o, 1)), t;
|
|
1041
|
-
}
|
|
1042
|
-
function Us(e) {
|
|
1043
|
-
return e.edges().reduce((t, n) => t + e.edge(n).weight, 0);
|
|
1044
|
-
}
|
|
1045
|
-
function Zs(e) {
|
|
1046
|
-
const t = e.graph();
|
|
1047
|
-
e.removeNode(t.nestingRoot), delete t.nestingRoot, e.edges().forEach((n) => {
|
|
1048
|
-
e.edge(n).nestingEdge && e.removeEdge(n);
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
function Xs(e) {
|
|
1052
|
-
function t(n) {
|
|
1053
|
-
const o = e.children(n), s = e.node(n);
|
|
1054
|
-
if (o.length && o.forEach(t), Object.hasOwn(s, "minRank")) {
|
|
1055
|
-
s.borderLeft = [], s.borderRight = [];
|
|
1056
|
-
for (let r = s.minRank, i = s.maxRank + 1; r < i; ++r)
|
|
1057
|
-
Tn(e, "borderLeft", "_bl", n, s, r), Tn(e, "borderRight", "_br", n, s, r);
|
|
1058
|
-
}
|
|
1059
|
-
}
|
|
1060
|
-
e.children().forEach(t);
|
|
1061
|
-
}
|
|
1062
|
-
function Tn(e, t, n, o, s, r) {
|
|
1063
|
-
const i = {
|
|
1064
|
-
width: 0,
|
|
1065
|
-
height: 0,
|
|
1066
|
-
rank: r,
|
|
1067
|
-
borderType: t
|
|
1068
|
-
}, l = s[t][r - 1], u = $e(e, "border", i, n);
|
|
1069
|
-
s[t][r] = u, e.setParent(u, o), l && e.setEdge(l, u, { weight: 1 });
|
|
1070
|
-
}
|
|
1071
|
-
function Ks(e) {
|
|
1072
|
-
const t = e.graph().rankdir.toLowerCase();
|
|
1073
|
-
(t === "lr" || t === "rl") && Xn(e);
|
|
1074
|
-
}
|
|
1075
|
-
function qs(e) {
|
|
1076
|
-
const t = e.graph().rankdir.toLowerCase();
|
|
1077
|
-
(t === "bt" || t === "rl") && Js(e), (t === "lr" || t === "rl") && (Qs(e), Xn(e));
|
|
1078
|
-
}
|
|
1079
|
-
function Xn(e) {
|
|
1080
|
-
e.nodes().forEach((t) => {
|
|
1081
|
-
On(e.node(t));
|
|
1082
|
-
}), e.edges().forEach((t) => {
|
|
1083
|
-
On(e.edge(t));
|
|
1084
|
-
});
|
|
1085
|
-
}
|
|
1086
|
-
function On(e) {
|
|
1087
|
-
const t = e.width;
|
|
1088
|
-
e.width = e.height, e.height = t;
|
|
1089
|
-
}
|
|
1090
|
-
function Js(e) {
|
|
1091
|
-
e.nodes().forEach((t) => {
|
|
1092
|
-
Lt(e.node(t));
|
|
1093
|
-
}), e.edges().forEach((t) => {
|
|
1094
|
-
const n = e.edge(t);
|
|
1095
|
-
n.points.forEach(Lt), Object.hasOwn(n, "y") && Lt(n);
|
|
1096
|
-
});
|
|
1097
|
-
}
|
|
1098
|
-
function Lt(e) {
|
|
1099
|
-
e.y = -e.y;
|
|
1100
|
-
}
|
|
1101
|
-
function Qs(e) {
|
|
1102
|
-
e.nodes().forEach((t) => {
|
|
1103
|
-
Mt(e.node(t));
|
|
1104
|
-
}), e.edges().forEach((t) => {
|
|
1105
|
-
const n = e.edge(t);
|
|
1106
|
-
n.points.forEach(Mt), Object.hasOwn(n, "x") && Mt(n);
|
|
1107
|
-
});
|
|
1108
|
-
}
|
|
1109
|
-
function Mt(e) {
|
|
1110
|
-
const t = e.x;
|
|
1111
|
-
e.x = e.y, e.y = t;
|
|
1112
|
-
}
|
|
1113
|
-
const $n = {
|
|
1114
|
-
adjust: Ks,
|
|
1115
|
-
undo: qs
|
|
1116
|
-
};
|
|
1117
|
-
function ei(e) {
|
|
1118
|
-
const t = {}, n = e.nodes().filter((u) => e.children(u).length === 0), o = n.map((u) => e.node(u).rank), s = J(Math.max, o), r = Oe(s + 1).map(() => []);
|
|
1119
|
-
function i(u) {
|
|
1120
|
-
if (t[u]) return;
|
|
1121
|
-
t[u] = !0;
|
|
1122
|
-
const f = e.node(u);
|
|
1123
|
-
r[f.rank].push(u), e.successors(u).forEach(i);
|
|
1124
|
-
}
|
|
1125
|
-
return n.sort(
|
|
1126
|
-
(u, f) => e.node(u).rank - e.node(f).rank
|
|
1127
|
-
).forEach(i), r;
|
|
1128
|
-
}
|
|
1129
|
-
function ti(e, t) {
|
|
1130
|
-
let n = 0;
|
|
1131
|
-
for (let o = 1; o < t.length; ++o)
|
|
1132
|
-
n += ni(e, t[o - 1], t[o]);
|
|
1133
|
-
return n;
|
|
1134
|
-
}
|
|
1135
|
-
function ni(e, t, n) {
|
|
1136
|
-
const o = Qe(
|
|
1137
|
-
n,
|
|
1138
|
-
n.map((f, h) => h)
|
|
1139
|
-
), s = t.flatMap((f) => e.outEdges(f).map((h) => ({
|
|
1140
|
-
pos: o[h.w],
|
|
1141
|
-
weight: e.edge(h).weight
|
|
1142
|
-
})).sort((h, m) => h.pos - m.pos));
|
|
1143
|
-
let r = 1;
|
|
1144
|
-
for (; r < n.length; ) r <<= 1;
|
|
1145
|
-
const i = 2 * r - 1;
|
|
1146
|
-
r -= 1;
|
|
1147
|
-
const l = new Array(i).fill(0);
|
|
1148
|
-
let u = 0;
|
|
1149
|
-
return s.forEach((f) => {
|
|
1150
|
-
let h = f.pos + r;
|
|
1151
|
-
l[h] += f.weight;
|
|
1152
|
-
let m = 0;
|
|
1153
|
-
for (; h > 0; )
|
|
1154
|
-
h % 2 && (m += l[h + 1]), h = h - 1 >> 1, l[h] += f.weight;
|
|
1155
|
-
u += f.weight * m;
|
|
1156
|
-
}), u;
|
|
1157
|
-
}
|
|
1158
|
-
function oi(e, t = []) {
|
|
1159
|
-
return t.map((n) => {
|
|
1160
|
-
const o = e.inEdges(n);
|
|
1161
|
-
if (!o.length)
|
|
1162
|
-
return { v: n };
|
|
1163
|
-
const s = o.reduce(
|
|
1164
|
-
(r, i) => {
|
|
1165
|
-
const l = e.edge(i), u = e.node(i.v);
|
|
1166
|
-
return {
|
|
1167
|
-
sum: r.sum + l.weight * u.order,
|
|
1168
|
-
weight: r.weight + l.weight
|
|
1169
|
-
};
|
|
1170
|
-
},
|
|
1171
|
-
{ sum: 0, weight: 0 }
|
|
1172
|
-
);
|
|
1173
|
-
return {
|
|
1174
|
-
v: n,
|
|
1175
|
-
barycenter: s.sum / s.weight,
|
|
1176
|
-
weight: s.weight
|
|
1177
|
-
};
|
|
1178
|
-
});
|
|
1179
|
-
}
|
|
1180
|
-
function si(e, t) {
|
|
1181
|
-
const n = {};
|
|
1182
|
-
e.forEach((s, r) => {
|
|
1183
|
-
const i = n[s.v] = {
|
|
1184
|
-
indegree: 0,
|
|
1185
|
-
in: [],
|
|
1186
|
-
out: [],
|
|
1187
|
-
vs: [s.v],
|
|
1188
|
-
i: r
|
|
1189
|
-
};
|
|
1190
|
-
s.barycenter !== void 0 && (i.barycenter = s.barycenter, i.weight = s.weight);
|
|
1191
|
-
}), t.edges().forEach((s) => {
|
|
1192
|
-
const r = n[s.v], i = n[s.w];
|
|
1193
|
-
r !== void 0 && i !== void 0 && (i.indegree++, r.out.push(i));
|
|
1194
|
-
});
|
|
1195
|
-
const o = Object.values(n).filter(
|
|
1196
|
-
(s) => !s.indegree
|
|
1197
|
-
);
|
|
1198
|
-
return ii(o);
|
|
1199
|
-
}
|
|
1200
|
-
function ii(e) {
|
|
1201
|
-
const t = [];
|
|
1202
|
-
function n(s) {
|
|
1203
|
-
return (r) => {
|
|
1204
|
-
r.merged || (r.barycenter === void 0 || s.barycenter === void 0 || r.barycenter >= s.barycenter) && ri(s, r);
|
|
1205
|
-
};
|
|
1206
|
-
}
|
|
1207
|
-
function o(s) {
|
|
1208
|
-
return (r) => {
|
|
1209
|
-
r.in.push(s), --r.indegree === 0 && e.push(r);
|
|
1210
|
-
};
|
|
1211
|
-
}
|
|
1212
|
-
for (; e.length; ) {
|
|
1213
|
-
const s = e.pop();
|
|
1214
|
-
t.push(s), s.in.reverse().forEach(n(s)), s.out.forEach(o(s));
|
|
1215
|
-
}
|
|
1216
|
-
return t.filter((s) => !s.merged).map((s) => We(s, ["vs", "i", "barycenter", "weight"]));
|
|
1217
|
-
}
|
|
1218
|
-
function ri(e, t) {
|
|
1219
|
-
let n = 0, o = 0;
|
|
1220
|
-
e.weight && (n += e.barycenter * e.weight, o += e.weight), t.weight && (n += t.barycenter * t.weight, o += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / o, e.weight = o, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
1221
|
-
}
|
|
1222
|
-
function ai(e, t) {
|
|
1223
|
-
const n = Wn(e, (h) => Object.hasOwn(h, "barycenter")), o = n.lhs, s = n.rhs.sort((h, m) => m.i - h.i), r = [];
|
|
1224
|
-
let i = 0, l = 0, u = 0;
|
|
1225
|
-
o.sort(li(!!t)), u = Rn(r, s, u), o.forEach((h) => {
|
|
1226
|
-
u += h.vs.length, r.push(h.vs), i += h.barycenter * h.weight, l += h.weight, u = Rn(r, s, u);
|
|
1227
|
-
});
|
|
1228
|
-
const f = { vs: r.flat(!0) };
|
|
1229
|
-
return l && (f.barycenter = i / l, f.weight = l), f;
|
|
1230
|
-
}
|
|
1231
|
-
function Rn(e, t, n) {
|
|
1232
|
-
let o;
|
|
1233
|
-
for (; t.length && (o = t[t.length - 1]).i <= n; )
|
|
1234
|
-
t.pop(), e.push(o.vs), n++;
|
|
1235
|
-
return n;
|
|
1236
|
-
}
|
|
1237
|
-
function li(e) {
|
|
1238
|
-
return (t, n) => t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
|
|
1239
|
-
}
|
|
1240
|
-
function Kn(e, t, n, o) {
|
|
1241
|
-
let s = e.children(t);
|
|
1242
|
-
const r = e.node(t), i = r ? r.borderLeft : void 0, l = r ? r.borderRight : void 0, u = {};
|
|
1243
|
-
i && (s = s.filter((p) => p !== i && p !== l));
|
|
1244
|
-
const f = oi(e, s);
|
|
1245
|
-
f.forEach((p) => {
|
|
1246
|
-
if (e.children(p.v).length) {
|
|
1247
|
-
const _ = Kn(e, p.v, n, o);
|
|
1248
|
-
u[p.v] = _, Object.hasOwn(_, "barycenter") && ci(p, _);
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
|
-
let h = si(f, n);
|
|
1252
|
-
ui(h, u);
|
|
1253
|
-
const m = ai(h, o);
|
|
1254
|
-
if (i && (m.vs = [i, m.vs, l].flat(!0), e.predecessors(i).length)) {
|
|
1255
|
-
const p = e.node(e.predecessors(i)[0]), _ = e.node(e.predecessors(l)[0]);
|
|
1256
|
-
Object.hasOwn(m, "barycenter") || (m.barycenter = 0, m.weight = 0), m.barycenter = (m.barycenter * m.weight + p.order + _.order) / (m.weight + 2), m.weight += 2;
|
|
1257
|
-
}
|
|
1258
|
-
return m;
|
|
1259
|
-
}
|
|
1260
|
-
function ui(e, t) {
|
|
1261
|
-
e.forEach((n) => {
|
|
1262
|
-
n.vs = n.vs.flatMap((o) => t[o] ? t[o].vs : o);
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
function ci(e, t) {
|
|
1266
|
-
e.barycenter !== void 0 ? (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight) : (e.barycenter = t.barycenter, e.weight = t.weight);
|
|
1267
|
-
}
|
|
1268
|
-
function di(e, t, n, o) {
|
|
1269
|
-
o || (o = e.nodes());
|
|
1270
|
-
const s = fi(e), r = new ue({ compound: !0 }).setGraph({ root: s }).setDefaultNodeLabel((i) => e.node(i));
|
|
1271
|
-
return o.forEach((i) => {
|
|
1272
|
-
const l = e.node(i), u = e.parent(i);
|
|
1273
|
-
(l.rank === t || l.minRank <= t && t <= l.maxRank) && (r.setNode(i), r.setParent(i, u || s), e[n](i).forEach((h) => {
|
|
1274
|
-
const m = h.v === i ? h.w : h.v, p = r.edge(m, i), _ = p ? p.weight : 0;
|
|
1275
|
-
r.setEdge(m, i, {
|
|
1276
|
-
weight: e.edge(h).weight + _
|
|
1277
|
-
});
|
|
1278
|
-
}), Object.hasOwn(l, "minRank") && r.setNode(i, {
|
|
1279
|
-
borderLeft: l.borderLeft[t],
|
|
1280
|
-
borderRight: l.borderRight[t]
|
|
1281
|
-
}));
|
|
1282
|
-
}), r;
|
|
1283
|
-
}
|
|
1284
|
-
function fi(e) {
|
|
1285
|
-
let t;
|
|
1286
|
-
for (; e.hasNode(t = Je("_root")); ) ;
|
|
1287
|
-
return t;
|
|
1288
|
-
}
|
|
1289
|
-
function hi(e, t, n) {
|
|
1290
|
-
let o = {}, s;
|
|
1291
|
-
n.forEach((r) => {
|
|
1292
|
-
let i = e.parent(r), l, u;
|
|
1293
|
-
for (; i; ) {
|
|
1294
|
-
if (l = e.parent(i), l ? (u = o[l], o[l] = i) : (u = s, s = i), u && u !== i) {
|
|
1295
|
-
t.setEdge(u, i);
|
|
1296
|
-
return;
|
|
1297
|
-
}
|
|
1298
|
-
i = l;
|
|
1299
|
-
}
|
|
1300
|
-
});
|
|
1301
|
-
}
|
|
1302
|
-
function qn(e, t = {}) {
|
|
1303
|
-
if (typeof t.customOrder == "function") {
|
|
1304
|
-
t.customOrder(e, qn);
|
|
1305
|
-
return;
|
|
1306
|
-
}
|
|
1307
|
-
const n = At(e), o = Pn(
|
|
1308
|
-
e,
|
|
1309
|
-
Oe(1, n + 1),
|
|
1310
|
-
"inEdges"
|
|
1311
|
-
), s = Pn(
|
|
1312
|
-
e,
|
|
1313
|
-
Oe(n - 1, -1, -1),
|
|
1314
|
-
"outEdges"
|
|
1315
|
-
);
|
|
1316
|
-
let r = ei(e);
|
|
1317
|
-
if (Dn(e, r), t.disableOptimalOrderHeuristic)
|
|
1318
|
-
return;
|
|
1319
|
-
let i = Number.POSITIVE_INFINITY, l;
|
|
1320
|
-
const u = t.constraints || [];
|
|
1321
|
-
for (let f = 0, h = 0; h < 4; ++f, ++h) {
|
|
1322
|
-
const m = f % 2 === 0 ? o : s, p = f % 4 >= 2;
|
|
1323
|
-
mi(m, p, u), r = Ge(e);
|
|
1324
|
-
const _ = ti(e, r);
|
|
1325
|
-
_ < i ? (i = _, h = 0, l = structuredClone(r)) : _ === i && (l = structuredClone(r));
|
|
1326
|
-
}
|
|
1327
|
-
Dn(e, l);
|
|
1328
|
-
}
|
|
1329
|
-
function Pn(e, t, n) {
|
|
1330
|
-
const o = /* @__PURE__ */ new Map();
|
|
1331
|
-
function s(r, i) {
|
|
1332
|
-
o.has(r) || o.set(r, []), o.get(r).push(i);
|
|
1333
|
-
}
|
|
1334
|
-
for (const r of e.nodes()) {
|
|
1335
|
-
const i = e.node(r);
|
|
1336
|
-
if (typeof i.rank == "number" && s(i.rank, r), typeof i.minRank == "number" && typeof i.maxRank == "number")
|
|
1337
|
-
for (let l = i.minRank; l <= i.maxRank; l++)
|
|
1338
|
-
l !== i.rank && s(l, r);
|
|
1339
|
-
}
|
|
1340
|
-
return t.map(
|
|
1341
|
-
(r) => di(e, r, n, o.get(r) || [])
|
|
1342
|
-
);
|
|
1343
|
-
}
|
|
1344
|
-
function mi(e, t, n) {
|
|
1345
|
-
const o = new ue();
|
|
1346
|
-
e.forEach((s) => {
|
|
1347
|
-
n.forEach((l) => o.setEdge(l.left, l.right));
|
|
1348
|
-
const r = s.graph().root, i = Kn(s, r, o, t);
|
|
1349
|
-
i.vs.forEach((l, u) => {
|
|
1350
|
-
s.node(l).order = u;
|
|
1351
|
-
}), hi(s, o, i.vs);
|
|
1352
|
-
});
|
|
1353
|
-
}
|
|
1354
|
-
function Dn(e, t) {
|
|
1355
|
-
Object.values(t).forEach((n) => {
|
|
1356
|
-
n.forEach((o, s) => {
|
|
1357
|
-
e.node(o).order = s;
|
|
1358
|
-
});
|
|
1359
|
-
});
|
|
1360
|
-
}
|
|
1361
|
-
function vi(e, t) {
|
|
1362
|
-
const n = {};
|
|
1363
|
-
function o(s, r) {
|
|
1364
|
-
let i = 0, l = 0;
|
|
1365
|
-
const u = s.length, f = r[r.length - 1];
|
|
1366
|
-
return r.forEach((h, m) => {
|
|
1367
|
-
const p = pi(e, h), _ = p ? e.node(p).order : u;
|
|
1368
|
-
(p || h === f) && (r.slice(l, m + 1).forEach((O) => {
|
|
1369
|
-
e.predecessors(O).forEach((M) => {
|
|
1370
|
-
const z = e.node(M), se = z.order;
|
|
1371
|
-
(se < i || _ < se) && !(z.dummy && e.node(O).dummy) && Jn(n, M, O);
|
|
1372
|
-
});
|
|
1373
|
-
}), l = m + 1, i = _);
|
|
1374
|
-
}), r;
|
|
1375
|
-
}
|
|
1376
|
-
return t.length && t.reduce(o), n;
|
|
1377
|
-
}
|
|
1378
|
-
function gi(e, t) {
|
|
1379
|
-
const n = {};
|
|
1380
|
-
function o(r, i, l, u, f) {
|
|
1381
|
-
let h;
|
|
1382
|
-
Oe(i, l).forEach((m) => {
|
|
1383
|
-
h = r[m], e.node(h).dummy && e.predecessors(h).forEach((p) => {
|
|
1384
|
-
const _ = e.node(p);
|
|
1385
|
-
_.dummy && (_.order < u || _.order > f) && Jn(n, p, h);
|
|
1386
|
-
});
|
|
1387
|
-
});
|
|
1388
|
-
}
|
|
1389
|
-
function s(r, i) {
|
|
1390
|
-
let l = -1, u, f = 0;
|
|
1391
|
-
return i.forEach((h, m) => {
|
|
1392
|
-
if (e.node(h).dummy === "border") {
|
|
1393
|
-
const p = e.predecessors(h);
|
|
1394
|
-
p.length && (u = e.node(p[0]).order, o(
|
|
1395
|
-
i,
|
|
1396
|
-
f,
|
|
1397
|
-
m,
|
|
1398
|
-
l,
|
|
1399
|
-
u
|
|
1400
|
-
), f = m, l = u);
|
|
1401
|
-
}
|
|
1402
|
-
o(i, f, i.length, u, r.length);
|
|
1403
|
-
}), i;
|
|
1404
|
-
}
|
|
1405
|
-
return t.length && t.reduce(s), n;
|
|
1406
|
-
}
|
|
1407
|
-
function pi(e, t) {
|
|
1408
|
-
if (e.node(t).dummy)
|
|
1409
|
-
return e.predecessors(t).find((n) => e.node(n).dummy);
|
|
1410
|
-
}
|
|
1411
|
-
function Jn(e, t, n) {
|
|
1412
|
-
if (t > n) {
|
|
1413
|
-
const s = t;
|
|
1414
|
-
t = n, n = s;
|
|
1415
|
-
}
|
|
1416
|
-
let o = e[t];
|
|
1417
|
-
o || (e[t] = o = {}), o[n] = !0;
|
|
1418
|
-
}
|
|
1419
|
-
function yi(e, t, n) {
|
|
1420
|
-
if (t > n) {
|
|
1421
|
-
const o = t;
|
|
1422
|
-
t = n, n = o;
|
|
1423
|
-
}
|
|
1424
|
-
return !!e[t] && Object.hasOwn(e[t], n);
|
|
1425
|
-
}
|
|
1426
|
-
function wi(e, t, n, o) {
|
|
1427
|
-
const s = {}, r = {}, i = {};
|
|
1428
|
-
return t.forEach((l) => {
|
|
1429
|
-
l.forEach((u, f) => {
|
|
1430
|
-
s[u] = u, r[u] = u, i[u] = f;
|
|
1431
|
-
});
|
|
1432
|
-
}), t.forEach((l) => {
|
|
1433
|
-
let u = -1;
|
|
1434
|
-
l.forEach((f) => {
|
|
1435
|
-
let h = o(f);
|
|
1436
|
-
if (h.length) {
|
|
1437
|
-
h = h.sort((p, _) => i[p] - i[_]);
|
|
1438
|
-
const m = (h.length - 1) / 2;
|
|
1439
|
-
for (let p = Math.floor(m), _ = Math.ceil(m); p <= _; ++p) {
|
|
1440
|
-
const O = h[p];
|
|
1441
|
-
r[f] === f && u < i[O] && !yi(n, f, O) && (r[O] = f, r[f] = s[f] = s[O], u = i[O]);
|
|
1442
|
-
}
|
|
1443
|
-
}
|
|
1444
|
-
});
|
|
1445
|
-
}), { root: s, align: r };
|
|
1446
|
-
}
|
|
1447
|
-
function bi(e, t, n, o, s) {
|
|
1448
|
-
const r = {}, i = ki(e, t, n, s), l = s ? "borderLeft" : "borderRight";
|
|
1449
|
-
function u(m, p) {
|
|
1450
|
-
const _ = i.nodes().slice(), O = {};
|
|
1451
|
-
let M = _.pop();
|
|
1452
|
-
for (; M; ) {
|
|
1453
|
-
if (O[M])
|
|
1454
|
-
m(M);
|
|
1455
|
-
else {
|
|
1456
|
-
O[M] = !0, _.push(M);
|
|
1457
|
-
for (const z of p(M))
|
|
1458
|
-
_.push(z);
|
|
1459
|
-
}
|
|
1460
|
-
M = _.pop();
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
function f(m) {
|
|
1464
|
-
r[m] = i.inEdges(m).reduce((p, _) => Math.max(p, r[_.v] + i.edge(_)), 0);
|
|
1465
|
-
}
|
|
1466
|
-
function h(m) {
|
|
1467
|
-
const p = i.outEdges(m).reduce((O, M) => Math.min(O, r[M.w] - i.edge(M)), Number.POSITIVE_INFINITY), _ = e.node(m);
|
|
1468
|
-
p !== Number.POSITIVE_INFINITY && _.borderType !== l && (r[m] = Math.max(r[m], p));
|
|
1469
|
-
}
|
|
1470
|
-
return u(f, i.predecessors.bind(i)), u(h, i.successors.bind(i)), Object.keys(o).forEach((m) => {
|
|
1471
|
-
r[m] = r[n[m]];
|
|
1472
|
-
}), r;
|
|
1473
|
-
}
|
|
1474
|
-
function ki(e, t, n, o) {
|
|
1475
|
-
const s = new e.constructor(), r = e.graph(), i = Ni(r.nodesep, r.edgesep, o);
|
|
1476
|
-
return t.forEach((l) => {
|
|
1477
|
-
let u;
|
|
1478
|
-
l.forEach((f) => {
|
|
1479
|
-
const h = n[f];
|
|
1480
|
-
if (s.setNode(h), u) {
|
|
1481
|
-
const m = n[u], p = s.edge(m, h);
|
|
1482
|
-
s.setEdge(
|
|
1483
|
-
m,
|
|
1484
|
-
h,
|
|
1485
|
-
Math.max(i(e, f, u), p || 0)
|
|
1486
|
-
);
|
|
1487
|
-
}
|
|
1488
|
-
u = f;
|
|
1489
|
-
});
|
|
1490
|
-
}), s;
|
|
1491
|
-
}
|
|
1492
|
-
function Ei(e, t) {
|
|
1493
|
-
return Object.values(t).reduce(
|
|
1494
|
-
(n, o) => {
|
|
1495
|
-
let s = Number.NEGATIVE_INFINITY, r = Number.POSITIVE_INFINITY;
|
|
1496
|
-
Object.entries(o).forEach(([l, u]) => {
|
|
1497
|
-
const f = Si(e, l) / 2;
|
|
1498
|
-
s = Math.max(u + f, s), r = Math.min(u - f, r);
|
|
1499
|
-
});
|
|
1500
|
-
const i = s - r;
|
|
1501
|
-
return i < n[0] && (n = [i, o]), n;
|
|
1502
|
-
},
|
|
1503
|
-
[Number.POSITIVE_INFINITY, null]
|
|
1504
|
-
)[1];
|
|
1505
|
-
}
|
|
1506
|
-
function _i(e, t) {
|
|
1507
|
-
const n = Object.values(t), o = J(Math.min, n), s = J(Math.max, n);
|
|
1508
|
-
["u", "d"].forEach((r) => {
|
|
1509
|
-
["l", "r"].forEach((i) => {
|
|
1510
|
-
const l = r + i;
|
|
1511
|
-
let u = e[l];
|
|
1512
|
-
if (u === t) return;
|
|
1513
|
-
const f = Object.values(u);
|
|
1514
|
-
let h = o - J(Math.min, f);
|
|
1515
|
-
i !== "l" && (h = s - J(Math.max, f)), h && (u = je(u, (m) => m + h), e[l] = u);
|
|
1516
|
-
});
|
|
1517
|
-
});
|
|
1518
|
-
}
|
|
1519
|
-
function Ci(e, t) {
|
|
1520
|
-
return je(e.ul, (n, o) => {
|
|
1521
|
-
if (t)
|
|
1522
|
-
return e[t.toLowerCase()][o];
|
|
1523
|
-
const s = Object.values(e).map((r) => r[o]).sort((r, i) => r - i);
|
|
1524
|
-
return (s[1] + s[2]) / 2;
|
|
1525
|
-
});
|
|
1526
|
-
}
|
|
1527
|
-
function xi(e) {
|
|
1528
|
-
const t = Ge(e), n = Object.assign(
|
|
1529
|
-
vi(e, t),
|
|
1530
|
-
gi(e, t)
|
|
1531
|
-
), o = {};
|
|
1532
|
-
let s;
|
|
1533
|
-
["u", "d"].forEach((i) => {
|
|
1534
|
-
s = i === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((l) => {
|
|
1535
|
-
let u = s;
|
|
1536
|
-
l === "r" && (u = u.map(
|
|
1537
|
-
(p) => Object.values(p).reverse()
|
|
1538
|
-
));
|
|
1539
|
-
const f = (i === "u" ? e.predecessors : e.successors).bind(e), h = wi(
|
|
1540
|
-
e,
|
|
1541
|
-
u,
|
|
1542
|
-
n,
|
|
1543
|
-
f
|
|
1544
|
-
);
|
|
1545
|
-
let m = bi(
|
|
1546
|
-
e,
|
|
1547
|
-
u,
|
|
1548
|
-
h.root,
|
|
1549
|
-
h.align,
|
|
1550
|
-
l === "r"
|
|
1551
|
-
);
|
|
1552
|
-
l === "r" && (m = je(m, (p) => -p)), o[i + l] = m;
|
|
1553
|
-
});
|
|
1554
|
-
});
|
|
1555
|
-
const r = Ei(e, o);
|
|
1556
|
-
return _i(o, r), Ci(o, e.graph().align);
|
|
1557
|
-
}
|
|
1558
|
-
function Ni(e, t, n) {
|
|
1559
|
-
return (o, s, r) => {
|
|
1560
|
-
const i = o.node(s), l = o.node(r);
|
|
1561
|
-
let u = 0, f;
|
|
1562
|
-
if (u += i.width / 2, Object.hasOwn(i, "labelpos"))
|
|
1563
|
-
switch (i.labelpos.toLowerCase()) {
|
|
1564
|
-
case "l":
|
|
1565
|
-
f = -i.width / 2;
|
|
1566
|
-
break;
|
|
1567
|
-
case "r":
|
|
1568
|
-
f = i.width / 2;
|
|
1569
|
-
break;
|
|
1570
|
-
}
|
|
1571
|
-
if (f && (u += n ? f : -f), f = 0, u += (i.dummy ? t : e) / 2, u += (l.dummy ? t : e) / 2, u += l.width / 2, Object.hasOwn(l, "labelpos"))
|
|
1572
|
-
switch (l.labelpos.toLowerCase()) {
|
|
1573
|
-
case "l":
|
|
1574
|
-
f = l.width / 2;
|
|
1575
|
-
break;
|
|
1576
|
-
case "r":
|
|
1577
|
-
f = -l.width / 2;
|
|
1578
|
-
break;
|
|
1579
|
-
}
|
|
1580
|
-
return f && (u += n ? f : -f), f = 0, u;
|
|
1581
|
-
};
|
|
1582
|
-
}
|
|
1583
|
-
function Si(e, t) {
|
|
1584
|
-
return e.node(t).width;
|
|
1585
|
-
}
|
|
1586
|
-
function Li(e) {
|
|
1587
|
-
const t = Dt(e);
|
|
1588
|
-
Mi(t);
|
|
1589
|
-
const n = xi(t);
|
|
1590
|
-
Object.entries(n).forEach(([o, s]) => {
|
|
1591
|
-
e.node(o).x = s;
|
|
1592
|
-
});
|
|
1593
|
-
}
|
|
1594
|
-
function Mi(e) {
|
|
1595
|
-
const t = Ge(e), n = e.graph().ranksep;
|
|
1596
|
-
let o = 0;
|
|
1597
|
-
t.forEach((s) => {
|
|
1598
|
-
const r = s.reduce((i, l) => {
|
|
1599
|
-
const u = e.node(l).height;
|
|
1600
|
-
return i > u ? i : u;
|
|
1601
|
-
}, 0);
|
|
1602
|
-
s.forEach((i) => {
|
|
1603
|
-
e.node(i).y = o + r / 2;
|
|
1604
|
-
}), o += r + n;
|
|
1605
|
-
});
|
|
1606
|
-
}
|
|
1607
|
-
function Ti(e, t = {}) {
|
|
1608
|
-
const n = t.debugTiming ? Gn : jn;
|
|
1609
|
-
return n("layout", () => {
|
|
1610
|
-
const o = n(
|
|
1611
|
-
" buildLayoutGraph",
|
|
1612
|
-
() => zi(e)
|
|
1613
|
-
);
|
|
1614
|
-
return n(" runLayout", () => Oi(o, n, t)), n(
|
|
1615
|
-
" updateInputGraph",
|
|
1616
|
-
() => $i(e, o)
|
|
1617
|
-
), o;
|
|
1618
|
-
});
|
|
1619
|
-
}
|
|
1620
|
-
function Oi(e, t, n) {
|
|
1621
|
-
t(" makeSpaceForEdgeLabels", () => Vi(e)), t(" removeSelfEdges", () => Ki(e)), t(" acyclic", () => _s(e)), t(" nestingGraph.run", () => js(e)), t(" rank", () => Bs(Dt(e))), t(" injectEdgeLabelProxies", () => Hi(e)), t(" removeEmptyRanks", () => Vn(e)), t(" nestingGraph.cleanup", () => Zs(e)), t(" normalizeRanks", () => zn(e)), t(" assignRankMinMax", () => Wi(e)), t(" removeEdgeLabelProxies", () => Gi(e)), t(" normalize.run", () => Ns(e)), t(" parentDummyChains", () => Hs(e)), t(" addBorderSegments", () => Xs(e)), t(" order", () => qn(e, n)), t(" insertSelfEdges", () => qi(e)), t(" adjustCoordinateSystem", () => $n.adjust(e)), t(" position", () => Li(e)), t(" positionSelfEdges", () => Ji(e)), t(" removeBorderNodes", () => Xi(e)), t(" normalize.undo", () => Ls(e)), t(" fixupEdgeLabelCoords", () => Ui(e)), t(" undoCoordinateSystem", () => $n.undo(e)), t(" translateGraph", () => ji(e)), t(" assignNodeIntersects", () => Yi(e)), t(" reversePoints", () => Zi(e)), t(" acyclic.undo", () => Cs(e));
|
|
1622
|
-
}
|
|
1623
|
-
function $i(e, t) {
|
|
1624
|
-
e.nodes().forEach((s) => {
|
|
1625
|
-
const r = e.node(s), i = t.node(s);
|
|
1626
|
-
r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(s).length && (r.width = i.width, r.height = i.height));
|
|
1627
|
-
}), e.edges().forEach((s) => {
|
|
1628
|
-
const r = e.edge(s), i = t.edge(s);
|
|
1629
|
-
r.points = i.points, Object.hasOwn(i, "x") && (r.x = i.x, r.y = i.y);
|
|
1630
|
-
});
|
|
1631
|
-
const n = t.graph(), o = e.graph();
|
|
1632
|
-
o.width = n.width, o.height = n.height;
|
|
1633
|
-
}
|
|
1634
|
-
const Ri = ["nodesep", "edgesep", "ranksep", "marginx", "marginy"], Pi = { ranksep: 50, edgesep: 20, nodesep: 50, rankdir: "tb" }, Di = ["acyclicer", "ranker", "rankdir", "align"], Ai = ["width", "height", "rank"], An = { width: 0, height: 0 }, Fi = ["minlen", "weight", "width", "height", "labeloffset"], Ii = {
|
|
1635
|
-
minlen: 1,
|
|
1636
|
-
weight: 1,
|
|
1637
|
-
width: 0,
|
|
1638
|
-
height: 0,
|
|
1639
|
-
labeloffset: 10,
|
|
1640
|
-
labelpos: "r"
|
|
1641
|
-
}, Bi = ["labelpos", "arrowshape"];
|
|
1642
|
-
function zi(e) {
|
|
1643
|
-
const t = Ot(e.graph()), n = {
|
|
1644
|
-
...Pi,
|
|
1645
|
-
...Tt(t, Ri),
|
|
1646
|
-
...We(t, Di)
|
|
1647
|
-
}, o = new ue({ multigraph: !0, compound: !0 });
|
|
1648
|
-
return o.setGraph(n), e.nodes().forEach((s) => {
|
|
1649
|
-
const r = Ot(e.node(s)), i = Tt(r, Ai);
|
|
1650
|
-
Object.keys(An).forEach((l) => {
|
|
1651
|
-
i[l] === void 0 && (i[l] = An[l]);
|
|
1652
|
-
}), o.setNode(s, i), o.setParent(s, e.parent(s));
|
|
1653
|
-
}), e.edges().forEach((s) => {
|
|
1654
|
-
const r = Ot(e.edge(s));
|
|
1655
|
-
o.setEdge(s, {
|
|
1656
|
-
...Ii,
|
|
1657
|
-
...Tt(r, Fi),
|
|
1658
|
-
...We(r, Bi)
|
|
1659
|
-
});
|
|
1660
|
-
}), o;
|
|
1661
|
-
}
|
|
1662
|
-
function Vi(e) {
|
|
1663
|
-
const t = e.graph();
|
|
1664
|
-
t.ranksep /= 2, e.edges().forEach((n) => {
|
|
1665
|
-
const o = e.edge(n);
|
|
1666
|
-
o.minlen *= 2, o.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? o.width += o.labeloffset : o.height += o.labeloffset);
|
|
1667
|
-
});
|
|
1668
|
-
}
|
|
1669
|
-
function Hi(e) {
|
|
1670
|
-
e.edges().forEach((t) => {
|
|
1671
|
-
const n = e.edge(t);
|
|
1672
|
-
if (n.width && n.height) {
|
|
1673
|
-
const o = e.node(t.v), r = {
|
|
1674
|
-
rank: (e.node(t.w).rank - o.rank) / 2 + o.rank,
|
|
1675
|
-
e: t
|
|
1676
|
-
};
|
|
1677
|
-
$e(e, "edge-proxy", r, "_ep");
|
|
1678
|
-
}
|
|
1679
|
-
});
|
|
1680
|
-
}
|
|
1681
|
-
function Wi(e) {
|
|
1682
|
-
let t = 0;
|
|
1683
|
-
e.nodes().forEach((n) => {
|
|
1684
|
-
const o = e.node(n);
|
|
1685
|
-
o.borderTop && (o.minRank = e.node(o.borderTop).rank, o.maxRank = e.node(o.borderBottom).rank, t = Math.max(t, o.maxRank));
|
|
1686
|
-
}), e.graph().maxRank = t;
|
|
1687
|
-
}
|
|
1688
|
-
function Gi(e) {
|
|
1689
|
-
e.nodes().forEach((t) => {
|
|
1690
|
-
const n = e.node(t);
|
|
1691
|
-
n.dummy === "edge-proxy" && (e.edge(n.e).labelRank = n.rank, e.removeNode(t));
|
|
1692
|
-
});
|
|
1693
|
-
}
|
|
1694
|
-
function ji(e) {
|
|
1695
|
-
let t = Number.POSITIVE_INFINITY, n = 0, o = Number.POSITIVE_INFINITY, s = 0;
|
|
1696
|
-
const r = e.graph(), i = r.marginx || 0, l = r.marginy || 0;
|
|
1697
|
-
function u(f) {
|
|
1698
|
-
const h = f.x, m = f.y, p = f.width, _ = f.height;
|
|
1699
|
-
t = Math.min(t, h - p / 2), n = Math.max(n, h + p / 2), o = Math.min(o, m - _ / 2), s = Math.max(s, m + _ / 2);
|
|
1700
|
-
}
|
|
1701
|
-
e.nodes().forEach((f) => u(e.node(f))), e.edges().forEach((f) => {
|
|
1702
|
-
const h = e.edge(f);
|
|
1703
|
-
Object.hasOwn(h, "x") && u(h);
|
|
1704
|
-
}), t -= i, o -= l, e.nodes().forEach((f) => {
|
|
1705
|
-
const h = e.node(f);
|
|
1706
|
-
h.x -= t, h.y -= o;
|
|
1707
|
-
}), e.edges().forEach((f) => {
|
|
1708
|
-
const h = e.edge(f);
|
|
1709
|
-
h.points.forEach((m) => {
|
|
1710
|
-
m.x -= t, m.y -= o;
|
|
1711
|
-
}), Object.hasOwn(h, "x") && (h.x -= t), Object.hasOwn(h, "y") && (h.y -= o);
|
|
1712
|
-
}), r.width = n - t + i, r.height = s - o + l;
|
|
1713
|
-
}
|
|
1714
|
-
function Fn(e, t, n) {
|
|
1715
|
-
if (!t)
|
|
1716
|
-
return e;
|
|
1717
|
-
const o = t.x - e.x, s = t.y - e.y, r = Math.sqrt(o * o + s * s);
|
|
1718
|
-
if (!r || r <= n)
|
|
1719
|
-
return e;
|
|
1720
|
-
const i = n / r;
|
|
1721
|
-
return {
|
|
1722
|
-
x: e.x + o * i,
|
|
1723
|
-
y: e.y + s * i
|
|
1724
|
-
};
|
|
1725
|
-
}
|
|
1726
|
-
function Yi(e) {
|
|
1727
|
-
e.edges().forEach((n) => {
|
|
1728
|
-
const o = e.edge(n), s = e.node(n.v), r = e.node(n.w);
|
|
1729
|
-
let i, l;
|
|
1730
|
-
!o.points || !o.points.length ? (o.points = [], i = r, l = s) : (i = o.points[0], l = o.points[o.points.length - 1]);
|
|
1731
|
-
const u = Pt(s, i), f = Pt(r, l), h = o.points.length ? o.points[0] : i, m = o.points.length ? o.points[o.points.length - 1] : l, p = o.arrowshape, _ = p === "normal" || p === "vee", O = !!o.reversed;
|
|
1732
|
-
let M = u, z = f;
|
|
1733
|
-
_ && (O ? M = Fn(
|
|
1734
|
-
u,
|
|
1735
|
-
h,
|
|
1736
|
-
4
|
|
1737
|
-
) : z = Fn(
|
|
1738
|
-
f,
|
|
1739
|
-
m,
|
|
1740
|
-
4
|
|
1741
|
-
)), o.points.unshift(M), o.points.push(z);
|
|
1742
|
-
});
|
|
1743
|
-
}
|
|
1744
|
-
function Ui(e) {
|
|
1745
|
-
e.edges().forEach((t) => {
|
|
1746
|
-
const n = e.edge(t);
|
|
1747
|
-
if (Object.hasOwn(n, "x"))
|
|
1748
|
-
switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
|
|
1749
|
-
case "l":
|
|
1750
|
-
n.x -= n.width / 2 + n.labeloffset;
|
|
1751
|
-
break;
|
|
1752
|
-
case "r":
|
|
1753
|
-
n.x += n.width / 2 + n.labeloffset;
|
|
1754
|
-
break;
|
|
1755
|
-
}
|
|
1756
|
-
});
|
|
1757
|
-
}
|
|
1758
|
-
function Zi(e) {
|
|
1759
|
-
e.edges().forEach((t) => {
|
|
1760
|
-
const n = e.edge(t);
|
|
1761
|
-
n.reversed && n.points.reverse();
|
|
1762
|
-
});
|
|
1763
|
-
}
|
|
1764
|
-
function Xi(e) {
|
|
1765
|
-
e.nodes().forEach((t) => {
|
|
1766
|
-
if (e.children(t).length) {
|
|
1767
|
-
const n = e.node(t), o = e.node(n.borderTop), s = e.node(n.borderBottom), r = e.node(
|
|
1768
|
-
n.borderLeft[n.borderLeft.length - 1]
|
|
1769
|
-
), i = e.node(
|
|
1770
|
-
n.borderRight[n.borderRight.length - 1]
|
|
1771
|
-
);
|
|
1772
|
-
n.width = Math.abs(i.x - r.x), n.height = Math.abs(s.y - o.y), n.x = r.x + n.width / 2, n.y = o.y + n.height / 2;
|
|
1773
|
-
}
|
|
1774
|
-
}), e.nodes().forEach((t) => {
|
|
1775
|
-
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1776
|
-
});
|
|
1777
|
-
}
|
|
1778
|
-
function Ki(e) {
|
|
1779
|
-
e.edges().forEach((t) => {
|
|
1780
|
-
if (t.v === t.w) {
|
|
1781
|
-
const n = e.node(t.v);
|
|
1782
|
-
n.selfEdges || (n.selfEdges = []), n.selfEdges.push({ e: t, label: e.edge(t) }), e.removeEdge(t);
|
|
1783
|
-
}
|
|
1784
|
-
});
|
|
1785
|
-
}
|
|
1786
|
-
function qi(e) {
|
|
1787
|
-
Ge(e).forEach((n) => {
|
|
1788
|
-
let o = 0;
|
|
1789
|
-
n.forEach((s, r) => {
|
|
1790
|
-
const i = e.node(s);
|
|
1791
|
-
i.order = r + o, (i.selfEdges || []).forEach((l) => {
|
|
1792
|
-
$e(
|
|
1793
|
-
e,
|
|
1794
|
-
"selfedge",
|
|
1795
|
-
{
|
|
1796
|
-
width: l.label.width,
|
|
1797
|
-
height: l.label.height,
|
|
1798
|
-
rank: i.rank,
|
|
1799
|
-
order: r + ++o,
|
|
1800
|
-
e: l.e,
|
|
1801
|
-
label: l.label
|
|
1802
|
-
},
|
|
1803
|
-
"_se"
|
|
1804
|
-
);
|
|
1805
|
-
}), delete i.selfEdges;
|
|
1806
|
-
});
|
|
1807
|
-
});
|
|
1808
|
-
}
|
|
1809
|
-
function Ji(e) {
|
|
1810
|
-
e.nodes().forEach((t) => {
|
|
1811
|
-
const n = e.node(t);
|
|
1812
|
-
if (n.dummy === "selfedge") {
|
|
1813
|
-
const o = e.node(n.e.v), s = o.x + o.width / 2, r = o.y, i = n.x - s, l = o.height / 2;
|
|
1814
|
-
e.setEdge(n.e, n.label), e.removeNode(t), n.label.points = [
|
|
1815
|
-
{ x: s + 2 * i / 3, y: r - l },
|
|
1816
|
-
{ x: s + 5 * i / 6, y: r - l },
|
|
1817
|
-
{ x: s + i, y: r },
|
|
1818
|
-
{ x: s + 5 * i / 6, y: r + l },
|
|
1819
|
-
{ x: s + 2 * i / 3, y: r + l }
|
|
1820
|
-
], n.label.x = n.x, n.label.y = n.y;
|
|
1821
|
-
}
|
|
1822
|
-
});
|
|
1823
|
-
}
|
|
1824
|
-
function Tt(e, t) {
|
|
1825
|
-
return je(We(e, t), Number);
|
|
1826
|
-
}
|
|
1827
|
-
function Ot(e) {
|
|
1828
|
-
const t = {};
|
|
1829
|
-
return e && Object.entries(e).forEach(([n, o]) => {
|
|
1830
|
-
let s = n;
|
|
1831
|
-
typeof s == "string" && (s = s.toLowerCase()), t[s] = o;
|
|
1832
|
-
}), t;
|
|
1833
|
-
}
|
|
1834
|
-
const Qi = {
|
|
1835
|
-
rankDirection: "TB",
|
|
1836
|
-
// "TB", "BT", "LR", "RL"
|
|
1837
|
-
nodeSeparation: 50,
|
|
1838
|
-
rankSeparation: 50,
|
|
1839
|
-
edgeSeparation: 10,
|
|
1840
|
-
// "UL", "UR", "DL", "DR" or undefined force one of four extreme alignment strategies (Up/Down × Left/Right).
|
|
1841
|
-
align: void 0,
|
|
1842
|
-
nodeWidth: 100,
|
|
1843
|
-
nodeHeight: 40,
|
|
1844
|
-
curvedEdges: !1,
|
|
1845
|
-
padding: 20,
|
|
1846
|
-
// "undirected" | "normal" | "vee"
|
|
1847
|
-
arrowShape: "normal",
|
|
1848
|
-
arrowSize: 10
|
|
1849
|
-
};
|
|
1850
|
-
function er(e) {
|
|
1851
|
-
return e.length ? e.map(
|
|
1852
|
-
(t, n) => `${n === 0 ? "M" : "L"} ${t.x} ${t.y}`
|
|
1853
|
-
).join(" ") : "";
|
|
1854
|
-
}
|
|
1855
|
-
function tr(e) {
|
|
1856
|
-
if (!e.length) return "";
|
|
1857
|
-
if (e.length === 1) {
|
|
1858
|
-
const s = e[0];
|
|
1859
|
-
return `M ${s.x} ${s.y}`;
|
|
1860
|
-
}
|
|
1861
|
-
if (e.length === 2)
|
|
1862
|
-
return `M ${e[0].x} ${e[0].y} L ${e[1].x} ${e[1].y}`;
|
|
1863
|
-
const [t] = e;
|
|
1864
|
-
let n = `M ${t.x} ${t.y}`;
|
|
1865
|
-
for (let s = 1; s < e.length - 1; s += 1) {
|
|
1866
|
-
e[s - 1];
|
|
1867
|
-
const r = e[s], i = e[s + 1], l = r.x, u = r.y, f = (r.x + i.x) / 2, h = (r.y + i.y) / 2;
|
|
1868
|
-
n += ` Q ${l} ${u} ${f} ${h}`;
|
|
1869
|
-
}
|
|
1870
|
-
const o = e[e.length - 1];
|
|
1871
|
-
return n += ` L ${o.x} ${o.y}`, n;
|
|
1872
|
-
}
|
|
1873
|
-
function nr(e) {
|
|
1874
|
-
const { nodes: t, edges: n, configuration: o } = e, s = C(null), r = C(null), i = `dag-arrow-${$t()}`;
|
|
1875
|
-
function l(u, f, h) {
|
|
1876
|
-
r.value = null, s.value = null;
|
|
1877
|
-
const m = {
|
|
1878
|
-
...Qi,
|
|
1879
|
-
...h
|
|
1880
|
-
}, p = new ue({ multigraph: !0, compound: !0 });
|
|
1881
|
-
p.setGraph({
|
|
1882
|
-
rankdir: m.rankDirection,
|
|
1883
|
-
nodesep: m.nodeSeparation,
|
|
1884
|
-
ranksep: m.rankSeparation,
|
|
1885
|
-
edgesep: m.edgeSeparation,
|
|
1886
|
-
align: m.align
|
|
1887
|
-
}), u.forEach((k) => {
|
|
1888
|
-
p.setNode(k.id, {
|
|
1889
|
-
label: k.label,
|
|
1890
|
-
width: k.width ?? m.nodeWidth,
|
|
1891
|
-
height: k.height ?? m.nodeHeight
|
|
1892
|
-
});
|
|
1893
|
-
}), f.forEach((k) => {
|
|
1894
|
-
p.setEdge(k.from, k.to, {
|
|
1895
|
-
weight: k.weight ?? 1,
|
|
1896
|
-
minlen: k.minLength ?? 1,
|
|
1897
|
-
arrowShape: m.arrowShape ?? "normal"
|
|
1898
|
-
});
|
|
1899
|
-
}), Ti(p);
|
|
1900
|
-
const _ = u.map((k) => {
|
|
1901
|
-
const F = p.node(k.id);
|
|
1902
|
-
return {
|
|
1903
|
-
id: k.id,
|
|
1904
|
-
label: k.label,
|
|
1905
|
-
x: F.x,
|
|
1906
|
-
y: F.y,
|
|
1907
|
-
width: F.width,
|
|
1908
|
-
height: F.height,
|
|
1909
|
-
original: k
|
|
1910
|
-
};
|
|
1911
|
-
}), O = p.edges().map((k) => {
|
|
1912
|
-
const F = p.edge(k), G = F.points || [];
|
|
1913
|
-
if (!G.length)
|
|
1914
|
-
return null;
|
|
1915
|
-
const K = m.curvedEdges ? tr(G) : er(G), De = m.arrowShape !== "undirected" ? `url(#${i})` : null, be = f.find(
|
|
1916
|
-
(c) => c?.from === k.v && c?.to === k.w
|
|
1917
|
-
);
|
|
1918
|
-
return {
|
|
1919
|
-
id: `${k.v}->${k.w}->${$t()}`,
|
|
1920
|
-
from: k.v,
|
|
1921
|
-
to: k.w,
|
|
1922
|
-
points: G,
|
|
1923
|
-
pathData: K,
|
|
1924
|
-
markerEnd: De,
|
|
1925
|
-
original: {
|
|
1926
|
-
...be,
|
|
1927
|
-
...F
|
|
1928
|
-
}
|
|
1929
|
-
};
|
|
1930
|
-
}).filter(Boolean), M = m.padding;
|
|
1931
|
-
if (!_.length) {
|
|
1932
|
-
s.value = {
|
|
1933
|
-
nodes: [],
|
|
1934
|
-
edges: O,
|
|
1935
|
-
viewBox: "0 0 0 0",
|
|
1936
|
-
arrowShape: m.arrowShape,
|
|
1937
|
-
arrowSize: m.arrowSize
|
|
1938
|
-
};
|
|
1939
|
-
return;
|
|
1940
|
-
}
|
|
1941
|
-
const z = _.flatMap((k) => [
|
|
1942
|
-
k.x - k.width / 2,
|
|
1943
|
-
k.x + k.width / 2
|
|
1944
|
-
]), se = _.flatMap((k) => [
|
|
1945
|
-
k.y - k.height / 2,
|
|
1946
|
-
k.y + k.height / 2
|
|
1947
|
-
]), Pe = Math.min(...z) - M, ye = Math.max(...z) + M, ce = Math.min(...se) - M, we = Math.max(...se) + M;
|
|
1948
|
-
s.value = {
|
|
1949
|
-
nodes: _,
|
|
1950
|
-
edges: O.map((k) => ({
|
|
1951
|
-
...k,
|
|
1952
|
-
midpoint: k.pathData ? Wo(k.pathData) : { x: 0, y: 0 }
|
|
1953
|
-
})),
|
|
1954
|
-
viewBox: `${Pe} ${ce} ${ye - Pe} ${we - ce}`,
|
|
1955
|
-
arrowShape: m.arrowShape,
|
|
1956
|
-
arrowSize: m.arrowSize
|
|
1957
|
-
};
|
|
1958
|
-
}
|
|
1959
|
-
return Bo(() => {
|
|
1960
|
-
try {
|
|
1961
|
-
const u = y(t) || [], f = y(n) || [], h = y(o) || {};
|
|
1962
|
-
l(u, f, h);
|
|
1963
|
-
} catch (u) {
|
|
1964
|
-
console.error("[useDag] layout error:", u), r.value = u, s.value = null;
|
|
1965
|
-
}
|
|
1966
|
-
}), {
|
|
1967
|
-
layoutData: s,
|
|
1968
|
-
lastError: r,
|
|
1969
|
-
arrowMarkerIdentifier: i,
|
|
1970
|
-
recomputeLayout: () => {
|
|
1971
|
-
const u = y(t) || [], f = y(n) || [], h = y(o) || {};
|
|
1972
|
-
l(u, f, h);
|
|
1973
|
-
}
|
|
1974
|
-
};
|
|
1975
|
-
}
|
|
1976
|
-
const or = ["id"], sr = ["id"], ir = {
|
|
1977
|
-
key: 1,
|
|
1978
|
-
class: "dag-chart-error"
|
|
1979
|
-
}, rr = { style: { position: "relative" } }, ar = ["viewBox", "xmlns", "aria-describedby"], lr = { key: 0 }, ur = ["id", "width", "height"], cr = ["cx", "cy", "r", "fill"], dr = ["x", "y", "width", "height", "fill"], fr = { key: 2 }, hr = ["id", "markerWidth", "markerHeight", "refX", "refY"], mr = ["d", "fill", "stroke"], vr = ["d", "fill", "stroke"], gr = { class: "vue-ui-dag-edges" }, pr = ["data-a11y-midpoint-id", "aria-label", "onMouseenter"], yr = { class: "vue-ui-dag-nodes" }, wr = ["onClick", "onMouseenter", "onMouseleave"], br = ["data-a11y-node-id", "aria-label"], kr = ["x", "y", "width", "height"], Er = { class: "vue-ui-dag-edges" }, _r = ["d", "stroke-width", "marker-end"], Cr = { class: "vue-ui-dag-node-labels" }, xr = ["onClick", "onMouseenter", "onMouseleave"], Nr = ["x", "y", "font-size", "fill", "font-weight"], Sr = ["x", "y", "font-size", "fill", "font-weight", "innerHTML"], Lr = { key: 1 }, Mr = {
|
|
1980
|
-
key: 1,
|
|
1981
|
-
style: { position: "absolute", top: "100%", left: "0", width: "100%" },
|
|
1982
|
-
"data-dom-to-png-ignore": "",
|
|
1983
|
-
"aria-hidden": "true"
|
|
1984
|
-
}, Tr = {
|
|
1985
|
-
key: 6,
|
|
1986
|
-
class: "vue-data-ui-watermark"
|
|
1987
|
-
}, Or = ["data-position"], $r = { key: 0 }, Rr = ["data-position"], Pr = { key: 0 }, In = 1.5, Dr = {
|
|
1988
|
-
__name: "vue-ui-dag",
|
|
1989
|
-
props: {
|
|
1990
|
-
dataset: {
|
|
1991
|
-
type: Object,
|
|
1992
|
-
default() {
|
|
1993
|
-
return {
|
|
1994
|
-
nodes: [],
|
|
1995
|
-
edges: []
|
|
1996
|
-
};
|
|
1997
|
-
}
|
|
1998
|
-
},
|
|
1999
|
-
config: {
|
|
2000
|
-
type: Object,
|
|
2001
|
-
default() {
|
|
2002
|
-
return {};
|
|
2003
|
-
}
|
|
2004
|
-
}
|
|
2005
|
-
},
|
|
2006
|
-
emits: [
|
|
2007
|
-
"onNodeClick",
|
|
2008
|
-
"onMidpointEnter",
|
|
2009
|
-
"onMidpointLeave",
|
|
2010
|
-
"copyAlt",
|
|
2011
|
-
"rotate"
|
|
2012
|
-
],
|
|
2013
|
-
setup(e, { expose: t, emit: n }) {
|
|
2014
|
-
const o = _t(
|
|
2015
|
-
() => import("./PenAndPaper-CJDoB5H9.js")
|
|
2016
|
-
), s = _t(
|
|
2017
|
-
() => import("./UserOptions-DVduN6X7.js")
|
|
2018
|
-
), r = _t(
|
|
2019
|
-
() => import("./PackageVersion-BfrCAH6_.js")
|
|
2020
|
-
), { vue_ui_dag: i } = Ko(), { isThemeValid: l, warnInvalidTheme: u } = ts(), f = e, h = n, m = C(null), p = C($t()), _ = C(null), O = C(null), M = C(null), z = C(0), se = C(0), Pe = C(!1), ye = C(!1), ce = C(!1), we = C(!1), k = C(null), F = C(null), G = C(null), K = C(null), et = C(null), De = C("pointer"), be = C(!1), c = C(lt()), tt = I(
|
|
2021
|
-
() => c.value.userOptions.useCursorPointer
|
|
2022
|
-
), nt = C(c.value.style.chart.width), ot = C(c.value.style.chart.height), Ft = C({ x: 0, y: 0 }), Y = C(null), st = C(null), It = C({ left: "0px", top: "0px" }), Bt = C("top"), ie = C(!1), zt = C({ x: 0, y: 0 }), Vt = C({ x: 0, y: 0 }), Ae = C(null), it = C(null), rt = C({ left: "0px", top: "0px" }), Ht = C("top"), de = C(!1), ke = C(!1), { svgRef: Q } = os({
|
|
2023
|
-
config: c.value.style.chart.title
|
|
2024
|
-
}), { userOptionsVisible: at, setUserOptionsVisibility: Wt, keepUserOptionState: Gt } = ns({ config: c.value }), ee = C(c.value.style.chart.layout.rankDirection), Qn = I(() => kn({
|
|
2025
|
-
defaultConfig: {
|
|
2026
|
-
userOptions: { show: !1 },
|
|
2027
|
-
style: {
|
|
2028
|
-
chart: {
|
|
2029
|
-
backgroundColor: "#99999930",
|
|
2030
|
-
nodes: {
|
|
2031
|
-
stroke: "#CCCCCC",
|
|
2032
|
-
backgroundColor: "#DDDDDD50"
|
|
2033
|
-
},
|
|
2034
|
-
edges: {
|
|
2035
|
-
stroke: "#CCCCCC"
|
|
2036
|
-
},
|
|
2037
|
-
midpoints: {
|
|
2038
|
-
stroke: "#CCCCCC",
|
|
2039
|
-
fill: "#CCCCCC"
|
|
2040
|
-
}
|
|
2041
|
-
}
|
|
2042
|
-
}
|
|
2043
|
-
},
|
|
2044
|
-
userConfig: c.value.skeletonConfig ?? {}
|
|
2045
|
-
})), { loading: Fe, FINAL_DATASET: Ye, manualLoading: jt } = qo({
|
|
2046
|
-
...zo(f),
|
|
2047
|
-
FINAL_CONFIG: c,
|
|
2048
|
-
prepareConfig: lt,
|
|
2049
|
-
skeletonDataset: f.config?.skeletonDataset ?? {
|
|
2050
|
-
nodes: [
|
|
2051
|
-
{ id: "A", label: "" },
|
|
2052
|
-
{ id: "B", label: "" },
|
|
2053
|
-
{ id: "C", label: "" }
|
|
2054
|
-
],
|
|
2055
|
-
edges: [
|
|
2056
|
-
{ from: "A", to: "B" },
|
|
2057
|
-
{ from: "A", to: "C" }
|
|
2058
|
-
]
|
|
2059
|
-
},
|
|
2060
|
-
skeletonConfig: kn({
|
|
2061
|
-
defaultConfig: c.value,
|
|
2062
|
-
userConfig: Qn.value
|
|
2063
|
-
})
|
|
2064
|
-
});
|
|
2065
|
-
function lt() {
|
|
2066
|
-
const a = xt({
|
|
2067
|
-
userConfig: f.config,
|
|
2068
|
-
defaultConfig: i
|
|
2069
|
-
}), v = a.theme;
|
|
2070
|
-
if (!v) return a;
|
|
2071
|
-
if (!l.value(a))
|
|
2072
|
-
return u(a), a;
|
|
2073
|
-
const d = xt({
|
|
2074
|
-
userConfig: rs[v] || f.config,
|
|
2075
|
-
defaultConfig: a
|
|
2076
|
-
});
|
|
2077
|
-
return xt({
|
|
2078
|
-
userConfig: f.config,
|
|
2079
|
-
defaultConfig: d
|
|
2080
|
-
});
|
|
2081
|
-
}
|
|
2082
|
-
const ut = I(() => !!c.value.debug);
|
|
2083
|
-
vn(async () => {
|
|
2084
|
-
Go(f.dataset) && (En({
|
|
2085
|
-
componentName: "VueUiDag",
|
|
2086
|
-
type: "dataset",
|
|
2087
|
-
debug: ut.value
|
|
2088
|
-
}), ye.value = !1, jt.value = !0), f.dataset.nodes || (En({
|
|
2089
|
-
componentName: "VueUiDag",
|
|
2090
|
-
type: "datasetAttributeEmpty",
|
|
2091
|
-
property: "nodes",
|
|
2092
|
-
index: 0,
|
|
2093
|
-
debug: ut.value
|
|
2094
|
-
}), ye.value = !1, jt.value = !0), ye.value = !0, await Se(), rn();
|
|
2095
|
-
}), ze(
|
|
2096
|
-
() => f.config,
|
|
2097
|
-
async (a) => {
|
|
2098
|
-
Fe.value || (c.value = lt()), at.value = !c.value.userOptions.showOnChartHover, z.value += 1, ee.value = c.value.style.chart.layout.rankDirection, nt.value = c.value.style.chart.width, ot.value = c.value.style.chart.height, Ee.value = c.value.style.chart.zoom.active, await Se(), rn();
|
|
2099
|
-
},
|
|
2100
|
-
{ deep: !0 }
|
|
2101
|
-
);
|
|
2102
|
-
const { isPrinting: ct, isImaging: dt, generatePdf: Yt, generateImage: Ut } = Qo({
|
|
2103
|
-
elementId: `dag_${p.value}`,
|
|
2104
|
-
fileName: c.value.style.chart.title.text || "vue-ui-dag",
|
|
2105
|
-
options: c.value.userOptions.print
|
|
2106
|
-
}), eo = I(() => c.value.style.chart.backgroundColor), to = I(() => c.value.style.chart.title), { exportSvg: no, getSvg: oo } = es({
|
|
2107
|
-
svg: Q,
|
|
2108
|
-
title: to,
|
|
2109
|
-
legend: void 0,
|
|
2110
|
-
legendItems: void 0,
|
|
2111
|
-
backgroundColor: eo
|
|
2112
|
-
});
|
|
2113
|
-
async function Zt({ isCb: a }) {
|
|
2114
|
-
we.value = !0, await Se();
|
|
2115
|
-
try {
|
|
2116
|
-
if (a) {
|
|
2117
|
-
const { blob: v, url: d, text: g, dataUrl: b } = await oo();
|
|
2118
|
-
await Promise.resolve(
|
|
2119
|
-
c.value.userOptions.callbacks.svg({
|
|
2120
|
-
blob: v,
|
|
2121
|
-
url: d,
|
|
2122
|
-
text: g,
|
|
2123
|
-
dataUrl: b
|
|
2124
|
-
})
|
|
2125
|
-
);
|
|
2126
|
-
} else
|
|
2127
|
-
await Promise.resolve(no());
|
|
2128
|
-
} finally {
|
|
2129
|
-
we.value = !1;
|
|
2130
|
-
}
|
|
2131
|
-
}
|
|
2132
|
-
function so() {
|
|
2133
|
-
Pe.value = !0, Wt(!0);
|
|
2134
|
-
}
|
|
2135
|
-
function io() {
|
|
2136
|
-
Wt(!1), Pe.value = !1;
|
|
2137
|
-
}
|
|
2138
|
-
function Xt({
|
|
2139
|
-
tooltipRef: a,
|
|
2140
|
-
isVisibleRef: v,
|
|
2141
|
-
anchorRef: d,
|
|
2142
|
-
styleRef: g,
|
|
2143
|
-
placementRef: b,
|
|
2144
|
-
offsetRef: E,
|
|
2145
|
-
margin: w = 24
|
|
2146
|
-
}) {
|
|
2147
|
-
return function() {
|
|
2148
|
-
const A = a.value;
|
|
2149
|
-
if (!A || !v.value) return;
|
|
2150
|
-
const T = A.getBoundingClientRect(), B = window.innerWidth, j = window.innerHeight, te = d.value.x, U = d.value.y, ne = E?.value?.x ?? 0, ve = E?.value?.y ?? 0;
|
|
2151
|
-
let P = U - ve - T.height - w, Z = te - T.width / 2, Ie = "top";
|
|
2152
|
-
if (P < w) {
|
|
2153
|
-
const Ne = U + ve + w;
|
|
2154
|
-
Ne + T.height <= j - w ? (P = Ne, Ie = "bottom") : (P = U - T.height / 2, P < w && (P = w), P + T.height > j - w && (P = j - T.height - w), Ie = "center");
|
|
2155
|
-
}
|
|
2156
|
-
Z < w && (Z = w), Z + T.width > B - w && (Z = B - T.width - w);
|
|
2157
|
-
const Ao = Z <= w, Fo = Z + T.width >= B - w;
|
|
2158
|
-
if ((Ao || Fo) && Ie !== "center") {
|
|
2159
|
-
let Ne, Be;
|
|
2160
|
-
const Io = te - ne - w;
|
|
2161
|
-
B - (te + ne) - w >= Io ? (Ne = "right", Be = te + ne + w) : (Ne = "left", Be = te - ne - w - T.width), Be >= w && Be + T.width <= B - w && (Z = Be, P = U - T.height / 2, P < w && (P = w), P + T.height > j - w && (P = j - T.height - w), Ie = Ne);
|
|
2162
|
-
}
|
|
2163
|
-
b.value = Ie, g.value = {
|
|
2164
|
-
left: `${Z}px`,
|
|
2165
|
-
top: `${P}px`
|
|
2166
|
-
};
|
|
2167
|
-
};
|
|
2168
|
-
}
|
|
2169
|
-
const ro = I(
|
|
2170
|
-
() => Ye.value.nodes.map((a) => ({
|
|
2171
|
-
...a,
|
|
2172
|
-
backgroundColor: a.backgroundColor ? _n(a.backgroundColor) : c.value.style.chart.nodes.backgroundColor,
|
|
2173
|
-
color: a.color ? _n(a.color) : c.value.style.chart.nodes.labels.color
|
|
2174
|
-
}))
|
|
2175
|
-
), ao = I(() => Ye.value.edges), lo = I(() => ({
|
|
2176
|
-
...c.value.style.chart.layout,
|
|
2177
|
-
rankDirection: ee.value
|
|
2178
|
-
})), { layoutData: x, lastError: Kt, arrowMarkerIdentifier: uo } = nr({
|
|
2179
|
-
nodes: ro,
|
|
2180
|
-
edges: ao,
|
|
2181
|
-
configuration: lo
|
|
2182
|
-
});
|
|
2183
|
-
function re(a) {
|
|
2184
|
-
return x.value ? x.value.nodes.find((v) => v.id === a) : null;
|
|
2185
|
-
}
|
|
2186
|
-
I(() => {
|
|
2187
|
-
if (!x.value) return [];
|
|
2188
|
-
const a = c.value.style.chart.edges.stroke, v = /* @__PURE__ */ new Set();
|
|
2189
|
-
return x.value.edges.forEach((d) => {
|
|
2190
|
-
v.add({
|
|
2191
|
-
id: d.id,
|
|
2192
|
-
from: d.from,
|
|
2193
|
-
to: d.to,
|
|
2194
|
-
color: d.original?.color || a
|
|
2195
|
-
});
|
|
2196
|
-
}), Array.from(v);
|
|
2197
|
-
});
|
|
2198
|
-
const qt = I(() => {
|
|
2199
|
-
const a = nt.value, v = ot.value, d = Number(a), g = Number(v), b = Number.isFinite(d) && d > 0, E = Number.isFinite(g) && g > 0;
|
|
2200
|
-
return !b && !E ? null : {
|
|
2201
|
-
width: b ? d : null,
|
|
2202
|
-
height: E ? g : null
|
|
2203
|
-
};
|
|
2204
|
-
}), Ee = C(c.value.style.chart.zoom.active), {
|
|
2205
|
-
viewBox: _e,
|
|
2206
|
-
resetZoom: Ue,
|
|
2207
|
-
setInitialViewBox: co,
|
|
2208
|
-
scale: Jt,
|
|
2209
|
-
zoomByFactor: Qt
|
|
2210
|
-
} = Xo(
|
|
2211
|
-
Q,
|
|
2212
|
-
{ x: 0, y: 0, width: 100, height: 100 },
|
|
2213
|
-
1,
|
|
2214
|
-
Ee,
|
|
2215
|
-
() => {
|
|
2216
|
-
ie.value = !1;
|
|
2217
|
-
}
|
|
2218
|
-
);
|
|
2219
|
-
function fo() {
|
|
2220
|
-
Ee.value = !Ee.value;
|
|
2221
|
-
}
|
|
2222
|
-
function en() {
|
|
2223
|
-
const a = x.value && x.value.viewBox;
|
|
2224
|
-
if (!a) return;
|
|
2225
|
-
const v = String(a).split(" ").map(Number);
|
|
2226
|
-
if (v.length !== 4) return;
|
|
2227
|
-
const [d, g, b, E] = v;
|
|
2228
|
-
if (!Number.isFinite(d) || !Number.isFinite(g) || !Number.isFinite(b) || !Number.isFinite(E))
|
|
2229
|
-
return;
|
|
2230
|
-
let w = b, N = E, A = d, T = g;
|
|
2231
|
-
const B = qt.value;
|
|
2232
|
-
B && (B.width !== null && (w = B.width), B.height !== null && (N = B.height), A = d - (w - b) / 2, T = g - (N - E) / 2), co(
|
|
2233
|
-
{ x: A, y: T, width: w, height: N },
|
|
2234
|
-
{ overwriteCurrentIfNotZoomed: !0 }
|
|
2235
|
-
);
|
|
2236
|
-
}
|
|
2237
|
-
ze(
|
|
2238
|
-
() => x.value && x.value.viewBox,
|
|
2239
|
-
() => {
|
|
2240
|
-
en();
|
|
2241
|
-
},
|
|
2242
|
-
{ immediate: !0 }
|
|
2243
|
-
), ze(
|
|
2244
|
-
() => qt.value,
|
|
2245
|
-
() => {
|
|
2246
|
-
en();
|
|
2247
|
-
}
|
|
2248
|
-
), ze(
|
|
2249
|
-
() => ke.value,
|
|
2250
|
-
(a) => {
|
|
2251
|
-
Ee.value = !a;
|
|
2252
|
-
}
|
|
2253
|
-
);
|
|
2254
|
-
const ho = I(() => {
|
|
2255
|
-
const a = _e.value;
|
|
2256
|
-
return a ? `${a.x} ${a.y} ${a.width} ${a.height}` : "0 0 0 0";
|
|
2257
|
-
}), fe = C(!1);
|
|
2258
|
-
function tn(a) {
|
|
2259
|
-
fe.value = a, se.value += 1;
|
|
2260
|
-
}
|
|
2261
|
-
function ft() {
|
|
2262
|
-
ke.value = !ke.value;
|
|
2263
|
-
}
|
|
2264
|
-
function ht() {
|
|
2265
|
-
Qt(In, !0);
|
|
2266
|
-
}
|
|
2267
|
-
function mt() {
|
|
2268
|
-
Qt(1 / In, !0);
|
|
2269
|
-
}
|
|
2270
|
-
const vt = ["TB", "RL", "BT", "LR"];
|
|
2271
|
-
function gt() {
|
|
2272
|
-
ee.value = vt[(vt.indexOf(ee.value) + 1) % vt.length], Ue(), h("rotate", ee.value);
|
|
2273
|
-
}
|
|
2274
|
-
const mo = Xt({
|
|
2275
|
-
tooltipRef: st,
|
|
2276
|
-
isVisibleRef: de,
|
|
2277
|
-
anchorRef: Ft,
|
|
2278
|
-
styleRef: It,
|
|
2279
|
-
placementRef: Bt
|
|
2280
|
-
}), vo = Xt({
|
|
2281
|
-
tooltipRef: it,
|
|
2282
|
-
isVisibleRef: ie,
|
|
2283
|
-
anchorRef: zt,
|
|
2284
|
-
styleRef: rt,
|
|
2285
|
-
placementRef: Ht,
|
|
2286
|
-
offsetRef: Vt
|
|
2287
|
-
}), q = C(null);
|
|
2288
|
-
async function nn(a) {
|
|
2289
|
-
h("onMidpointEnter", a);
|
|
2290
|
-
const v = Q.value;
|
|
2291
|
-
if (!v || !a?.midpoint) return;
|
|
2292
|
-
const d = v.createSVGPoint();
|
|
2293
|
-
d.x = a.midpoint.x, d.y = a.midpoint.y;
|
|
2294
|
-
const g = v.getScreenCTM();
|
|
2295
|
-
if (!g) return;
|
|
2296
|
-
const b = d.matrixTransform(g);
|
|
2297
|
-
Ft.value = {
|
|
2298
|
-
x: b.x,
|
|
2299
|
-
y: b.y
|
|
2300
|
-
}, Y.value = a, de.value = !0, c.value.style.chart.midpoints.selectedEdge.animated === !0 && (q.value = a.id, he()), await Se(), mo();
|
|
2301
|
-
}
|
|
2302
|
-
function ae() {
|
|
2303
|
-
de.value = !1, Y.value = null, h("onMidpointLeave"), c.value.style.chart.midpoints.selectedEdge.animated === !0 && (q.value = null, he());
|
|
2304
|
-
}
|
|
2305
|
-
async function pt(a) {
|
|
2306
|
-
if (h("onNodeClick", a), !c.value.style.chart.nodes.tooltip.showOnClick) return;
|
|
2307
|
-
const v = Q.value;
|
|
2308
|
-
if (!v) return;
|
|
2309
|
-
const d = v.createSVGPoint();
|
|
2310
|
-
d.x = a.x, d.y = a.y;
|
|
2311
|
-
const g = v.getScreenCTM();
|
|
2312
|
-
if (!g) return;
|
|
2313
|
-
const b = d.matrixTransform(g), E = c.value.style.chart.layout.nodeWidth, w = c.value.style.chart.layout.nodeHeight, N = g.a, A = g.d, T = E * N, B = w * A;
|
|
2314
|
-
Vt.value = {
|
|
2315
|
-
x: T / 2,
|
|
2316
|
-
y: B / 2
|
|
2317
|
-
}, zt.value = {
|
|
2318
|
-
x: b.x,
|
|
2319
|
-
y: b.y
|
|
2320
|
-
}, Ae.value = a, ie.value = !0, await Se(), vo();
|
|
2321
|
-
}
|
|
2322
|
-
function Ce() {
|
|
2323
|
-
ie.value = !1, Ae.value = null;
|
|
2324
|
-
}
|
|
2325
|
-
function on(a) {
|
|
2326
|
-
if (!(ie.value || de.value)) return;
|
|
2327
|
-
const d = it.value;
|
|
2328
|
-
if (d && d.contains(a.target))
|
|
2329
|
-
return;
|
|
2330
|
-
const g = st.value;
|
|
2331
|
-
if (g && g.contains(a.target))
|
|
2332
|
-
return;
|
|
2333
|
-
const b = Q.value;
|
|
2334
|
-
if (b && b.contains(a.target)) {
|
|
2335
|
-
const E = a.target.closest(".vue-ui-dag-node"), w = a.target.closest(
|
|
2336
|
-
".vue-ui-dag-edge-midpoint"
|
|
2337
|
-
);
|
|
2338
|
-
if (E || w)
|
|
2339
|
-
return;
|
|
2340
|
-
}
|
|
2341
|
-
Ce(), ae(), be.value || Xe();
|
|
2342
|
-
}
|
|
2343
|
-
function sn(a) {
|
|
2344
|
-
a.key === "Escape" && (ie.value && Ce(), de.value && ae());
|
|
2345
|
-
}
|
|
2346
|
-
vn(() => {
|
|
2347
|
-
document.addEventListener("mousedown", on), document.addEventListener("keydown", sn);
|
|
2348
|
-
}), gn(() => {
|
|
2349
|
-
document.removeEventListener("mousedown", on), document.removeEventListener("keydown", sn), k.value && (F.value && k.value.unobserve(F.value), k.value.disconnect());
|
|
2350
|
-
});
|
|
2351
|
-
function rn() {
|
|
2352
|
-
if (!c.value.responsive) {
|
|
2353
|
-
k.value && (F.value && k.value.unobserve(F.value), k.value.disconnect(), k.value = null, F.value = null);
|
|
2354
|
-
return;
|
|
2355
|
-
}
|
|
2356
|
-
const a = Uo(() => {
|
|
2357
|
-
if (!m.value) return;
|
|
2358
|
-
const { width: v, height: d } = Zo({
|
|
2359
|
-
chart: m.value,
|
|
2360
|
-
title: c.value.style.chart.title.text ? _.value : null,
|
|
2361
|
-
legend: c.value.style.chart.controls.show ? M.value?.$el : null,
|
|
2362
|
-
source: O.value
|
|
2363
|
-
});
|
|
2364
|
-
requestAnimationFrame(() => {
|
|
2365
|
-
nt.value = Math.max(0.1, v), ot.value = Math.max(0.1, d - 12);
|
|
2366
|
-
});
|
|
2367
|
-
});
|
|
2368
|
-
k.value && (F.value && k.value.unobserve(F.value), k.value.disconnect()), k.value = new ResizeObserver(a), F.value = m.value ? m.value.parentNode : null, F.value && k.value.observe(F.value), a();
|
|
2369
|
-
}
|
|
2370
|
-
function go(a, v = {}) {
|
|
2371
|
-
const {
|
|
2372
|
-
direction: d = -1,
|
|
2373
|
-
mode: g = "oneLapNearest",
|
|
2374
|
-
dasharray: b = null
|
|
2375
|
-
} = v;
|
|
2376
|
-
if (!a || typeof a.getTotalLength != "function")
|
|
2377
|
-
return ut.value && console.warn(
|
|
2378
|
-
"VueUiDag @getIdealDashoffsetDelta: invalid path element",
|
|
2379
|
-
a
|
|
2380
|
-
), 0;
|
|
2381
|
-
const E = a.getTotalLength(), w = b ?? a.getAttribute("stroke-dasharray") ?? (typeof getComputedStyle == "function" ? getComputedStyle(a).strokeDasharray : ""), N = te(w);
|
|
2382
|
-
if (!Number.isFinite(N) || N <= 0)
|
|
2383
|
-
return d * E;
|
|
2384
|
-
const A = Math.max(1, Math.round(E / N)), T = Math.max(1, Math.ceil(E / N)), B = Math.max(1, Math.floor(E / N));
|
|
2385
|
-
let j;
|
|
2386
|
-
return g === "pattern" ? j = N : g === "oneLapCeil" ? j = T * N : g === "oneLapFloor" ? j = B * N : j = A * N, d * j;
|
|
2387
|
-
function te(U) {
|
|
2388
|
-
if (!U || U === "none") return NaN;
|
|
2389
|
-
const ne = String(U).replace(/,/g, " ").trim().split(/\s+/).map((P) => Number.parseFloat(P)).filter((P) => Number.isFinite(P));
|
|
2390
|
-
if (!ne.length) return NaN;
|
|
2391
|
-
const ve = ne.reduce(
|
|
2392
|
-
(P, Z) => P + Z,
|
|
2393
|
-
0
|
|
2394
|
-
);
|
|
2395
|
-
return ne.length % 2 === 1 ? ve * 2 : ve;
|
|
2396
|
-
}
|
|
2397
|
-
}
|
|
2398
|
-
const yt = C(/* @__PURE__ */ new Map()), wt = C(/* @__PURE__ */ new Map());
|
|
2399
|
-
function po(a) {
|
|
2400
|
-
return function(d) {
|
|
2401
|
-
d ? yt.value.set(a, d) : yt.value.delete(a);
|
|
2402
|
-
};
|
|
2403
|
-
}
|
|
2404
|
-
function an() {
|
|
2405
|
-
wt.value.forEach((a) => {
|
|
2406
|
-
try {
|
|
2407
|
-
a.cancel();
|
|
2408
|
-
} catch {
|
|
2409
|
-
}
|
|
2410
|
-
}), wt.value.clear();
|
|
2411
|
-
}
|
|
2412
|
-
function he() {
|
|
2413
|
-
an();
|
|
2414
|
-
const a = x.value?.edges ?? [];
|
|
2415
|
-
if (!a.length) return;
|
|
2416
|
-
const v = c.value.style.chart.edges.animations, d = Number(v.referenceDistance) > 0 ? Number(v.referenceDistance) : 24;
|
|
2417
|
-
a.forEach((g) => {
|
|
2418
|
-
const b = c.value.style.chart.midpoints.selectedEdge.animated === !0 && q.value != null && g.id === q.value, E = !!g?.original?.animated || !!g?.animated || b, w = yt.value.get(g.id);
|
|
2419
|
-
if (!w) return;
|
|
2420
|
-
if (!E) {
|
|
2421
|
-
w.style.strokeDasharray = "0", w.style.strokeDashoffset = "0";
|
|
2422
|
-
return;
|
|
2423
|
-
}
|
|
2424
|
-
const N = g?.original?.dasharray ?? v.dasharray;
|
|
2425
|
-
w.style.strokeDasharray = String(N), w.style.strokeDashoffset = "0";
|
|
2426
|
-
const A = ![void 0, null].includes(
|
|
2427
|
-
g?.original?.animationDirection
|
|
2428
|
-
), T = ![void 0, null].includes(
|
|
2429
|
-
v.animationDirection
|
|
2430
|
-
), B = A ? Number(g.original.animationDirection) : T ? Number(v.animationDirection) : -1, j = go(w, {
|
|
2431
|
-
direction: B,
|
|
2432
|
-
mode: "oneLapNearest",
|
|
2433
|
-
dasharray: String(N)
|
|
2434
|
-
}), te = g?.original?.animationDurationMs ?? v.animationDurationMs ?? 1e3, U = Number(te), ve = Number.isFinite(U) && U > 0 ? d / U : d / 1e3, P = Math.max(
|
|
2435
|
-
1,
|
|
2436
|
-
Math.round(
|
|
2437
|
-
Math.abs(j) / Math.max(1e-9, ve)
|
|
2438
|
-
)
|
|
2439
|
-
), Z = w.animate(
|
|
2440
|
-
[{ strokeDashoffset: 0 }, { strokeDashoffset: j }],
|
|
2441
|
-
{
|
|
2442
|
-
duration: P,
|
|
2443
|
-
iterations: 1 / 0,
|
|
2444
|
-
easing: "linear"
|
|
2445
|
-
}
|
|
2446
|
-
);
|
|
2447
|
-
wt.value.set(g.id, Z);
|
|
2448
|
-
});
|
|
2449
|
-
}
|
|
2450
|
-
ze(
|
|
2451
|
-
() => x.value && x.value.edges,
|
|
2452
|
-
async () => {
|
|
2453
|
-
await Se(), he();
|
|
2454
|
-
},
|
|
2455
|
-
{ deep: !0, immediate: !0 }
|
|
2456
|
-
), gn(() => {
|
|
2457
|
-
an();
|
|
2458
|
-
});
|
|
2459
|
-
async function yo({ scale: a = 2 } = {}) {
|
|
2460
|
-
if (!m.value) return;
|
|
2461
|
-
const { width: v, height: d } = m.value.getBoundingClientRect(), g = v / d, { imageUri: b, base64: E } = await ss({
|
|
2462
|
-
domElement: m.value,
|
|
2463
|
-
base64: !0,
|
|
2464
|
-
img: !0,
|
|
2465
|
-
scale: a
|
|
2466
|
-
});
|
|
2467
|
-
return {
|
|
2468
|
-
imageUri: b,
|
|
2469
|
-
base64: E,
|
|
2470
|
-
title: c.value.style.chart.title.text ?? "vue-ui-dag",
|
|
2471
|
-
width: v,
|
|
2472
|
-
height: d,
|
|
2473
|
-
aspectRatio: g
|
|
2474
|
-
};
|
|
2475
|
-
}
|
|
2476
|
-
const me = I(() => {
|
|
2477
|
-
const a = Number(c.value.style.chart.layout.nodeHeight);
|
|
2478
|
-
return Number.isFinite(a) && a > 0 ? a / c.value.style.chart.backgroundPattern.spacingRatio : 12;
|
|
2479
|
-
}), wo = I(() => me.value * (c.value.style.chart.backgroundPattern.dotRadiusRatio / 100)), D = C(null);
|
|
2480
|
-
let xe = null, ln = 0;
|
|
2481
|
-
function bt(a) {
|
|
2482
|
-
xe && (clearTimeout(xe), xe = null), D.value !== a && (D.value = a, (c.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || c.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && he());
|
|
2483
|
-
}
|
|
2484
|
-
function bo(a) {
|
|
2485
|
-
De.value = "pointer", q.value = null, bt(a);
|
|
2486
|
-
}
|
|
2487
|
-
async function ko(a) {
|
|
2488
|
-
De.value = "pointer", D.value = null, await nn(a);
|
|
2489
|
-
}
|
|
2490
|
-
function un(a) {
|
|
2491
|
-
const v = ++ln;
|
|
2492
|
-
xe && clearTimeout(xe), xe = setTimeout(() => {
|
|
2493
|
-
v === ln && D.value === a && (D.value = null, (c.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || c.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && he());
|
|
2494
|
-
}, 20);
|
|
2495
|
-
}
|
|
2496
|
-
function Eo(a) {
|
|
2497
|
-
const v = a.from === D.value, d = a.to === D.value, g = K.value === "midpoint" && G.value === a.id, b = q.value === a.id || Y.value?.id === a.id || g;
|
|
2498
|
-
let E = a.original.color ?? c.value.style.chart.edges.stroke;
|
|
2499
|
-
if (b && c.value.style.chart.midpoints.selectedEdge.stroke != null ? E = c.value.style.chart.midpoints.selectedEdge.stroke : v && c.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? E = c.value.style.chart.nodes.selected.downstreamEdges.stroke : d && c.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (E = c.value.style.chart.nodes.selected.upstreamEdges.stroke), v && c.value.style.chart.nodes.selected.downstreamEdges.animated === !0)
|
|
2500
|
-
a.animated = !0;
|
|
2501
|
-
else if (d && c.value.style.chart.nodes.selected.upstreamEdges.animated === !0)
|
|
2502
|
-
a.animated = !0;
|
|
2503
|
-
else if (g && c.value.style.chart.midpoints.selectedEdge.animated === !0)
|
|
2504
|
-
a.animated = !0;
|
|
2505
|
-
else {
|
|
2506
|
-
const w = x.value?.edges.find((N) => N.id === a.id);
|
|
2507
|
-
a.animated = w?.original?.animated ?? !1;
|
|
2508
|
-
}
|
|
2509
|
-
return {
|
|
2510
|
-
d: a.pathData,
|
|
2511
|
-
fill: "none",
|
|
2512
|
-
stroke: E,
|
|
2513
|
-
"stroke-width": c.value.style.chart.edges.strokeWidth * (b || a.from === D.value ? 2 : 1),
|
|
2514
|
-
"stroke-linecap": "round",
|
|
2515
|
-
"stroke-linejoin": "round"
|
|
2516
|
-
};
|
|
2517
|
-
}
|
|
2518
|
-
function cn(a) {
|
|
2519
|
-
return K.value === "node" && G.value === a;
|
|
2520
|
-
}
|
|
2521
|
-
function _o(a) {
|
|
2522
|
-
const v = D.value === a.id, d = K.value === "node" && G.value === a.id, g = v || d, b = g && c.value.style.chart.nodes.selected.backgroundColor != null ? c.value.style.chart.nodes.selected.backgroundColor : a.original.backgroundColor, E = g && c.value.style.chart.nodes.selected.stroke != null ? c.value.style.chart.nodes.selected.stroke : c.value.style.chart.nodes.stroke, w = g && c.value.style.chart.nodes.selected.strokeWidth != null ? c.value.style.chart.nodes.selected.strokeWidth : c.value.style.chart.nodes.strokeWidth;
|
|
2523
|
-
return {
|
|
2524
|
-
x: a.x - a.width / 2,
|
|
2525
|
-
y: a.y - a.height / 2,
|
|
2526
|
-
width: a.width,
|
|
2527
|
-
height: a.height,
|
|
2528
|
-
rx: c.value.style.chart.nodes.borderRadius,
|
|
2529
|
-
fill: b,
|
|
2530
|
-
stroke: E,
|
|
2531
|
-
"stroke-width": w
|
|
2532
|
-
};
|
|
2533
|
-
}
|
|
2534
|
-
function Co(a) {
|
|
2535
|
-
const v = a.from === D.value, d = a.to === D.value, g = K.value === "midpoint" && G.value === a.id, b = q.value === a.id || Y.value?.id === a.id || g;
|
|
2536
|
-
let E = a.original.color ?? c.value.style.chart.edges.stroke;
|
|
2537
|
-
return b && c.value.style.chart.midpoints.selectedEdge.stroke != null ? E = c.value.style.chart.midpoints.selectedEdge.stroke : v && c.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? E = c.value.style.chart.nodes.selected.downstreamEdges.stroke : d && c.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (E = c.value.style.chart.nodes.selected.upstreamEdges.stroke), {
|
|
2538
|
-
cx: a.midpoint.x,
|
|
2539
|
-
cy: a.midpoint.y,
|
|
2540
|
-
r: c.value.style.chart.midpoints.radius,
|
|
2541
|
-
fill: g ? c.value.style.chart.midpoints.selectedEdge.stroke ?? c.value.style.chart.midpoints.fill : c.value.style.chart.midpoints.fill,
|
|
2542
|
-
stroke: E,
|
|
2543
|
-
"stroke-width": c.value.style.chart.edges.strokeWidth * (b || a.from === D.value ? 2 : 1)
|
|
2544
|
-
};
|
|
2545
|
-
}
|
|
2546
|
-
function Ze(a) {
|
|
2547
|
-
const v = a.from === D.value, d = a.to === D.value, g = K.value === "midpoint" && G.value === a.id, b = q.value === a.id || Y.value?.id === a.id || g;
|
|
2548
|
-
let E = a.color ?? a.original?.color ?? c.value.style.chart.edges.stroke;
|
|
2549
|
-
return b && c.value.style.chart.midpoints.selectedEdge.stroke != null ? E = c.value.style.chart.midpoints.selectedEdge.stroke : v && c.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? E = c.value.style.chart.nodes.selected.downstreamEdges.stroke : d && c.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (E = c.value.style.chart.nodes.selected.upstreamEdges.stroke), E;
|
|
2550
|
-
}
|
|
2551
|
-
function dn(a) {
|
|
2552
|
-
return `${uo}-${String(a).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2553
|
-
}
|
|
2554
|
-
function xo() {
|
|
2555
|
-
return x.value;
|
|
2556
|
-
}
|
|
2557
|
-
function No(a) {
|
|
2558
|
-
if (a?.stage === "start") {
|
|
2559
|
-
ce.value = !0;
|
|
2560
|
-
return;
|
|
2561
|
-
}
|
|
2562
|
-
if (a?.stage === "end") {
|
|
2563
|
-
ce.value = !1;
|
|
2564
|
-
return;
|
|
2565
|
-
}
|
|
2566
|
-
Ut();
|
|
2567
|
-
}
|
|
2568
|
-
async function fn() {
|
|
2569
|
-
if (h("copyAlt", {
|
|
2570
|
-
config: c.value,
|
|
2571
|
-
dataset: Ye.value
|
|
2572
|
-
}), !c.value.userOptions.callbacks.altCopy) {
|
|
2573
|
-
console.warn(
|
|
2574
|
-
"Vue Data UI - A callback must be set for `altCopy` in userOptions."
|
|
2575
|
-
);
|
|
2576
|
-
return;
|
|
2577
|
-
}
|
|
2578
|
-
await Promise.resolve(
|
|
2579
|
-
c.value.userOptions.callbacks.altCopy({
|
|
2580
|
-
config: c.value,
|
|
2581
|
-
dataset: Ye.value
|
|
2582
|
-
})
|
|
2583
|
-
);
|
|
2584
|
-
}
|
|
2585
|
-
const So = I(() => (x.value?.nodes ?? []).map((v) => ({
|
|
2586
|
-
id: v.id,
|
|
2587
|
-
type: "node",
|
|
2588
|
-
x: v.x,
|
|
2589
|
-
y: v.y,
|
|
2590
|
-
label: v.label ?? v.id,
|
|
2591
|
-
raw: v
|
|
2592
|
-
}))), Lo = I(() => c.value.style.chart.midpoints.show ? (x.value?.edges ?? []).filter((v) => v?.midpoint).map((v) => ({
|
|
2593
|
-
id: v.id,
|
|
2594
|
-
type: "midpoint",
|
|
2595
|
-
x: v.midpoint.x,
|
|
2596
|
-
y: v.midpoint.y,
|
|
2597
|
-
label: `${re(v.from)?.label ?? v.from} → ${re(v.to)?.label ?? v.to}`,
|
|
2598
|
-
raw: v
|
|
2599
|
-
})) : []), le = I(() => [...So.value, ...Lo.value].sort((a, v) => a.x === v.x ? a.y - v.y : a.x - v.x)), Mo = I(() => {
|
|
2600
|
-
const a = /* @__PURE__ */ new Map();
|
|
2601
|
-
return le.value.forEach((v, d) => {
|
|
2602
|
-
a.set(`${v.type}:${v.id}`, d);
|
|
2603
|
-
}), a;
|
|
2604
|
-
}), kt = I(() => {
|
|
2605
|
-
const a = x.value?.nodes ?? [], v = x.value?.edges ?? [], d = [
|
|
2606
|
-
c.value.a11y?.translations?.node ?? "Node",
|
|
2607
|
-
c.value.a11y?.translations?.parents ?? "Parents",
|
|
2608
|
-
c.value.a11y?.translations?.children ?? "Children"
|
|
2609
|
-
], g = a.map((b) => {
|
|
2610
|
-
const E = v.filter((N) => N.to === b.id).map((N) => re(N.from)?.label ?? N.from).join(", "), w = v.filter((N) => N.from === b.id).map((N) => re(N.to)?.label ?? N.to).join(", ");
|
|
2611
|
-
return [b.label ?? b.id, E || "—", w || "—"];
|
|
2612
|
-
});
|
|
2613
|
-
return { headers: d, rows: g };
|
|
2614
|
-
});
|
|
2615
|
-
function Et(a) {
|
|
2616
|
-
return `${a.type}:${a.id}`;
|
|
2617
|
-
}
|
|
2618
|
-
function To() {
|
|
2619
|
-
return G.value == null || K.value == null ? null : le.value.find(
|
|
2620
|
-
(a) => a.id === G.value && a.type === K.value
|
|
2621
|
-
) ?? null;
|
|
2622
|
-
}
|
|
2623
|
-
async function hn(a) {
|
|
2624
|
-
if (a) {
|
|
2625
|
-
if (a.type === "node") {
|
|
2626
|
-
ae();
|
|
2627
|
-
return;
|
|
2628
|
-
}
|
|
2629
|
-
a.type === "midpoint" && (Ce(), await nn(a.raw));
|
|
2630
|
-
}
|
|
2631
|
-
}
|
|
2632
|
-
function mn(a) {
|
|
2633
|
-
if (a) {
|
|
2634
|
-
if (G.value = a.id, K.value = a.type, et.value = Mo.value.get(Et(a)) ?? null, a.type === "node") {
|
|
2635
|
-
bt(a.id), q.value = null;
|
|
2636
|
-
return;
|
|
2637
|
-
}
|
|
2638
|
-
a.type === "midpoint" && (D.value = null, q.value = a.id, c.value.style.chart.midpoints.selectedEdge.animated === !0 && he());
|
|
2639
|
-
}
|
|
2640
|
-
}
|
|
2641
|
-
function Xe() {
|
|
2642
|
-
G.value = null, K.value = null, et.value = null, ie.value || (D.value = null), de.value || (q.value = null, c.value.style.chart.midpoints.selectedEdge.animated === !0 && he());
|
|
2643
|
-
}
|
|
2644
|
-
function Oo() {
|
|
2645
|
-
be.value = !0, Xe();
|
|
2646
|
-
}
|
|
2647
|
-
function $o() {
|
|
2648
|
-
be.value = !1, Ce(), ae(), Xe();
|
|
2649
|
-
}
|
|
2650
|
-
function Ro(a, v, d) {
|
|
2651
|
-
const g = v.x - a.x, b = v.y - a.y;
|
|
2652
|
-
return d === "right" && g <= 0 || d === "left" && g >= 0 || d === "down" && b <= 0 || d === "up" && b >= 0 ? 1 / 0 : d === "right" || d === "left" ? Math.abs(g) * 1e3 + Math.abs(b) : Math.abs(b) * 1e3 + Math.abs(g);
|
|
2653
|
-
}
|
|
2654
|
-
function Ke(a, v) {
|
|
2655
|
-
const d = le.value.filter(
|
|
2656
|
-
(E) => Et(E) !== Et(a)
|
|
2657
|
-
);
|
|
2658
|
-
if (!d.length) return null;
|
|
2659
|
-
let g = null, b = 1 / 0;
|
|
2660
|
-
return d.forEach((E) => {
|
|
2661
|
-
const w = Ro(
|
|
2662
|
-
a,
|
|
2663
|
-
E,
|
|
2664
|
-
v
|
|
2665
|
-
);
|
|
2666
|
-
w < b && (b = w, g = E);
|
|
2667
|
-
}), g || (v === "right" || v === "down" ? le.value[0] ?? null : le.value[le.value.length - 1] ?? null);
|
|
2668
|
-
}
|
|
2669
|
-
async function Po(a) {
|
|
2670
|
-
a && (De.value = "keyboard", a.type === "node" && (ae(), await pt(a.raw)));
|
|
2671
|
-
}
|
|
2672
|
-
async function Do(a) {
|
|
2673
|
-
if (!Q.value || ke.value || document.activeElement !== Q.value || !le.value.length) return;
|
|
2674
|
-
const v = a.key === "ArrowLeft", d = a.key === "ArrowRight", g = a.key === "ArrowUp", b = a.key === "ArrowDown", E = a.key === "Enter" || a.key === " ", w = a.key === "Escape";
|
|
2675
|
-
if (!v && !d && !g && !b && !E && !w)
|
|
2676
|
-
return;
|
|
2677
|
-
if (a.preventDefault(), a.stopPropagation(), w) {
|
|
2678
|
-
Ce(), ae(), Xe();
|
|
2679
|
-
return;
|
|
2680
|
-
}
|
|
2681
|
-
let N = To();
|
|
2682
|
-
if (E) {
|
|
2683
|
-
if (!N) return;
|
|
2684
|
-
N.type === "node" && await Po(N);
|
|
2685
|
-
return;
|
|
2686
|
-
}
|
|
2687
|
-
if (!N) {
|
|
2688
|
-
const T = le.value[0];
|
|
2689
|
-
if (!T) return;
|
|
2690
|
-
mn(T), await hn(T);
|
|
2691
|
-
return;
|
|
2692
|
-
}
|
|
2693
|
-
let A = null;
|
|
2694
|
-
d ? A = Ke(N, "right") : v ? A = Ke(N, "left") : b ? A = Ke(N, "down") : g && (A = Ke(N, "up")), A && (Ce(), ae(), mn(A), await hn(A));
|
|
2695
|
-
}
|
|
2696
|
-
return t({
|
|
2697
|
-
getData: xo,
|
|
2698
|
-
getImage: yo,
|
|
2699
|
-
generatePdf: Yt,
|
|
2700
|
-
generateSvg: Zt,
|
|
2701
|
-
generateImage: Ut,
|
|
2702
|
-
toggleAnnotator: ft,
|
|
2703
|
-
toggleFullscreen: tn,
|
|
2704
|
-
zoomIn: ht,
|
|
2705
|
-
zoomOut: mt,
|
|
2706
|
-
resetZoom: Ue,
|
|
2707
|
-
switchDirection: gt,
|
|
2708
|
-
copyAlt: fn
|
|
2709
|
-
}), (a, v) => (S(), L("div", {
|
|
2710
|
-
class: pn(`vue-data-ui-component vue-ui-dag ${fe.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${c.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2711
|
-
id: `dag_${p.value}`,
|
|
2712
|
-
ref_key: "dagChart",
|
|
2713
|
-
ref: m,
|
|
2714
|
-
style: Le({
|
|
2715
|
-
fontFamily: c.value.style.fontFamily,
|
|
2716
|
-
backgroundColor: c.value.style.chart.backgroundColor,
|
|
2717
|
-
padding: "0.5rem"
|
|
2718
|
-
}),
|
|
2719
|
-
onMouseenter: so,
|
|
2720
|
-
onMouseleave: io
|
|
2721
|
-
}, [
|
|
2722
|
-
X("div", {
|
|
2723
|
-
id: `chart-instructions-${p.value}`,
|
|
2724
|
-
class: "sr-only"
|
|
2725
|
-
}, [
|
|
2726
|
-
X("p", null, Me(c.value.a11y.translations.keyboardNavigation), 1)
|
|
2727
|
-
], 8, sr),
|
|
2728
|
-
kt.value?.rows?.length ? (S(), oe(as, {
|
|
2729
|
-
key: 0,
|
|
2730
|
-
uid: p.value,
|
|
2731
|
-
head: kt.value.headers,
|
|
2732
|
-
body: kt.value.rows,
|
|
2733
|
-
notice: c.value.a11y.translations.tableAvailable,
|
|
2734
|
-
caption: c.value.a11y.translations.tableCaption
|
|
2735
|
-
}, null, 8, ["uid", "head", "body", "notice", "caption"])) : $("", !0),
|
|
2736
|
-
y(Kt) ? (S(), L("div", ir, Me(String(y(Kt))), 1)) : $("", !0),
|
|
2737
|
-
c.value.userOptions.buttons.annotator ? (S(), oe(y(o), {
|
|
2738
|
-
key: 2,
|
|
2739
|
-
svgRef: y(Q),
|
|
2740
|
-
backgroundColor: c.value.style.chart.backgroundColor,
|
|
2741
|
-
color: c.value.style.chart.color,
|
|
2742
|
-
active: ke.value,
|
|
2743
|
-
isCursorPointer: tt.value,
|
|
2744
|
-
onClose: ft
|
|
2745
|
-
}, {
|
|
2746
|
-
"annotator-action-close": V(() => [
|
|
2747
|
-
R(a.$slots, "annotator-action-close", {}, void 0, !0)
|
|
2748
|
-
]),
|
|
2749
|
-
"annotator-action-color": V(({ color: d }) => [
|
|
2750
|
-
R(a.$slots, "annotator-action-color", H(W({ color: d })), void 0, !0)
|
|
2751
|
-
]),
|
|
2752
|
-
"annotator-action-draw": V(({ mode: d }) => [
|
|
2753
|
-
R(a.$slots, "annotator-action-draw", H(W({ mode: d })), void 0, !0)
|
|
2754
|
-
]),
|
|
2755
|
-
"annotator-action-undo": V(({ disabled: d }) => [
|
|
2756
|
-
R(a.$slots, "annotator-action-undo", H(W({ disabled: d })), void 0, !0)
|
|
2757
|
-
]),
|
|
2758
|
-
"annotator-action-redo": V(({ disabled: d }) => [
|
|
2759
|
-
R(a.$slots, "annotator-action-redo", H(W({ disabled: d })), void 0, !0)
|
|
2760
|
-
]),
|
|
2761
|
-
"annotator-action-delete": V(({ disabled: d }) => [
|
|
2762
|
-
R(a.$slots, "annotator-action-delete", H(W({ disabled: d })), void 0, !0)
|
|
2763
|
-
]),
|
|
2764
|
-
_: 3
|
|
2765
|
-
}, 8, ["svgRef", "backgroundColor", "color", "active", "isCursorPointer"])) : $("", !0),
|
|
2766
|
-
c.value.userOptions.show && ye.value && (y(Gt) || y(at)) ? (S(), oe(y(s), {
|
|
2767
|
-
ref: "userOptionsRef",
|
|
2768
|
-
key: `user_option_${se.value}`,
|
|
2769
|
-
backgroundColor: c.value.style.chart.backgroundColor,
|
|
2770
|
-
color: c.value.style.chart.color,
|
|
2771
|
-
isPrinting: y(ct),
|
|
2772
|
-
isImaging: y(dt),
|
|
2773
|
-
uid: p.value,
|
|
2774
|
-
hasTooltip: !1,
|
|
2775
|
-
hasTable: !1,
|
|
2776
|
-
hasXls: !1,
|
|
2777
|
-
hasLabel: !1,
|
|
2778
|
-
hasPdf: c.value.userOptions.buttons.pdf,
|
|
2779
|
-
hasImg: c.value.userOptions.buttons.img,
|
|
2780
|
-
hasSvg: c.value.userOptions.buttons.svg,
|
|
2781
|
-
hasFullscreen: c.value.userOptions.buttons.fullscreen,
|
|
2782
|
-
hasAltCopy: c.value.userOptions.buttons.altCopy,
|
|
2783
|
-
isFullscreen: fe.value,
|
|
2784
|
-
chartElement: m.value,
|
|
2785
|
-
position: c.value.userOptions.position,
|
|
2786
|
-
titles: { ...c.value.userOptions.buttonTitles },
|
|
2787
|
-
hasAnnotator: c.value.userOptions.buttons.annotator,
|
|
2788
|
-
isAnnotation: ke.value,
|
|
2789
|
-
callbacks: c.value.userOptions.callbacks,
|
|
2790
|
-
printScale: c.value.userOptions.print.scale,
|
|
2791
|
-
hasZoom: c.value.userOptions.buttons.zoom,
|
|
2792
|
-
isZoom: Ee.value,
|
|
2793
|
-
isCursorPointer: tt.value,
|
|
2794
|
-
onToggleFullscreen: tn,
|
|
2795
|
-
onGeneratePdf: y(Yt),
|
|
2796
|
-
onGenerateImage: No,
|
|
2797
|
-
onGenerateSvg: Zt,
|
|
2798
|
-
onToggleAnnotator: ft,
|
|
2799
|
-
onToggleZoom: fo,
|
|
2800
|
-
onCopyAlt: fn,
|
|
2801
|
-
style: Le({
|
|
2802
|
-
visibility: y(Gt) ? y(at) ? "visible" : "hidden" : "visible"
|
|
2803
|
-
})
|
|
2804
|
-
}, Vo({ _: 2 }, [
|
|
2805
|
-
a.$slots.menuIcon ? {
|
|
2806
|
-
name: "menuIcon",
|
|
2807
|
-
fn: V(({ isOpen: d, color: g }) => [
|
|
2808
|
-
R(a.$slots, "menuIcon", H(W({ isOpen: d, color: g })), void 0, !0)
|
|
2809
|
-
]),
|
|
2810
|
-
key: "0"
|
|
2811
|
-
} : void 0,
|
|
2812
|
-
a.$slots.optionPdf ? {
|
|
2813
|
-
name: "optionPdf",
|
|
2814
|
-
fn: V(() => [
|
|
2815
|
-
R(a.$slots, "optionPdf", {}, void 0, !0)
|
|
2816
|
-
]),
|
|
2817
|
-
key: "1"
|
|
2818
|
-
} : void 0,
|
|
2819
|
-
a.$slots.optionImg ? {
|
|
2820
|
-
name: "optionImg",
|
|
2821
|
-
fn: V(() => [
|
|
2822
|
-
R(a.$slots, "optionImg", {}, void 0, !0)
|
|
2823
|
-
]),
|
|
2824
|
-
key: "2"
|
|
2825
|
-
} : void 0,
|
|
2826
|
-
a.$slots.optionSvg ? {
|
|
2827
|
-
name: "optionSvg",
|
|
2828
|
-
fn: V(() => [
|
|
2829
|
-
R(a.$slots, "optionSvg", {}, void 0, !0)
|
|
2830
|
-
]),
|
|
2831
|
-
key: "3"
|
|
2832
|
-
} : void 0,
|
|
2833
|
-
a.$slots.optionFullscreen ? {
|
|
2834
|
-
name: "optionFullscreen",
|
|
2835
|
-
fn: V(({ toggleFullscreen: d, isFullscreen: g }) => [
|
|
2836
|
-
R(a.$slots, "optionFullscreen", H(W({ toggleFullscreen: d, isFullscreen: g })), void 0, !0)
|
|
2837
|
-
]),
|
|
2838
|
-
key: "4"
|
|
2839
|
-
} : void 0,
|
|
2840
|
-
a.$slots.optionAnnotator ? {
|
|
2841
|
-
name: "optionAnnotator",
|
|
2842
|
-
fn: V(({ toggleAnnotator: d, isAnnotator: g }) => [
|
|
2843
|
-
R(a.$slots, "optionAnnotator", H(W({ toggleAnnotator: d, isAnnotator: g })), void 0, !0)
|
|
2844
|
-
]),
|
|
2845
|
-
key: "5"
|
|
2846
|
-
} : void 0,
|
|
2847
|
-
a.$slots.optionZoom ? {
|
|
2848
|
-
name: "optionZoom",
|
|
2849
|
-
fn: V(({ toggleZoom: d, isZoomLocked: g }) => [
|
|
2850
|
-
R(a.$slots, "optionZoom", H(W({ toggleZoom: d, isZoomLocked: g })), void 0, !0)
|
|
2851
|
-
]),
|
|
2852
|
-
key: "6"
|
|
2853
|
-
} : void 0,
|
|
2854
|
-
a.$slots.optionAltCopy ? {
|
|
2855
|
-
name: "optionAltCopy",
|
|
2856
|
-
fn: V(({ altCopy: d }) => [
|
|
2857
|
-
R(a.$slots, "optionAltCopy", H(W({ altCopy: d })), void 0, !0)
|
|
2858
|
-
]),
|
|
2859
|
-
key: "7"
|
|
2860
|
-
} : void 0
|
|
2861
|
-
]), 1032, ["backgroundColor", "color", "isPrinting", "isImaging", "uid", "hasPdf", "hasImg", "hasSvg", "hasFullscreen", "hasAltCopy", "isFullscreen", "chartElement", "position", "titles", "hasAnnotator", "isAnnotation", "callbacks", "printScale", "hasZoom", "isZoom", "isCursorPointer", "onGeneratePdf", "style"])) : $("", !0),
|
|
2862
|
-
c.value.style.chart.title.text ? (S(), L("div", {
|
|
2863
|
-
key: 4,
|
|
2864
|
-
ref_key: "chartTitle",
|
|
2865
|
-
ref: _,
|
|
2866
|
-
style: "width:100%;background:transparent;"
|
|
2867
|
-
}, [
|
|
2868
|
-
(S(), oe(is, {
|
|
2869
|
-
key: `title_${z.value}`,
|
|
2870
|
-
config: {
|
|
2871
|
-
title: {
|
|
2872
|
-
cy: "dag-title",
|
|
2873
|
-
...c.value.style.chart.title
|
|
2874
|
-
},
|
|
2875
|
-
subtitle: {
|
|
2876
|
-
cy: "dag-subtitle",
|
|
2877
|
-
...c.value.style.chart.title.subtitle
|
|
2878
|
-
}
|
|
2879
|
-
}
|
|
2880
|
-
}, null, 8, ["config"]))
|
|
2881
|
-
], 512)) : $("", !0),
|
|
2882
|
-
c.value.style.chart.controls.position === "top" && !y(Fe) && c.value.style.chart.controls.show ? (S(), oe(Cn, {
|
|
2883
|
-
key: 5,
|
|
2884
|
-
ref_key: "zoomControls",
|
|
2885
|
-
ref: M,
|
|
2886
|
-
config: c.value,
|
|
2887
|
-
scale: y(Jt),
|
|
2888
|
-
isFullscreen: fe.value,
|
|
2889
|
-
withDirection: "",
|
|
2890
|
-
onZoomIn: ht,
|
|
2891
|
-
onZoomOut: mt,
|
|
2892
|
-
onResetZoom: v[0] || (v[0] = () => y(Ue)(!0)),
|
|
2893
|
-
onSwitchDirection: gt
|
|
2894
|
-
}, null, 8, ["config", "scale", "isFullscreen"])) : $("", !0),
|
|
2895
|
-
X("div", rr, [
|
|
2896
|
-
y(x) ? (S(), L("svg", {
|
|
2897
|
-
key: 0,
|
|
2898
|
-
ref_key: "svgRef",
|
|
2899
|
-
ref: Q,
|
|
2900
|
-
class: pn({
|
|
2901
|
-
"vue-ui-dag-svg": !0,
|
|
2902
|
-
"vue-data-ui-loading": y(Fe)
|
|
2903
|
-
}),
|
|
2904
|
-
viewBox: ho.value,
|
|
2905
|
-
xmlns: y(jo),
|
|
2906
|
-
style: Le({
|
|
2907
|
-
backgroundColor: c.value.style.chart.backgroundColor,
|
|
2908
|
-
height: "100%",
|
|
2909
|
-
width: "100%"
|
|
2910
|
-
}),
|
|
2911
|
-
tabindex: "0",
|
|
2912
|
-
"aria-describedby": `chart-instructions-${p.value}`,
|
|
2913
|
-
onFocus: Oo,
|
|
2914
|
-
onBlur: $o,
|
|
2915
|
-
onKeydown: Do
|
|
2916
|
-
}, [
|
|
2917
|
-
Ct(y(r)),
|
|
2918
|
-
c.value.style.chart.backgroundPattern.show ? (S(), L("defs", lr, [
|
|
2919
|
-
X("pattern", {
|
|
2920
|
-
id: `dag_bg_pattern_${p.value}`,
|
|
2921
|
-
patternUnits: "userSpaceOnUse",
|
|
2922
|
-
width: me.value,
|
|
2923
|
-
height: me.value
|
|
2924
|
-
}, [
|
|
2925
|
-
R(a.$slots, "background-pattern", H(W({
|
|
2926
|
-
x: me.value / 2,
|
|
2927
|
-
y: me.value / 2,
|
|
2928
|
-
color: c.value.style.chart.backgroundPattern.dotColor
|
|
2929
|
-
})), () => [
|
|
2930
|
-
X("circle", {
|
|
2931
|
-
cx: me.value / 2,
|
|
2932
|
-
cy: me.value / 2,
|
|
2933
|
-
r: wo.value,
|
|
2934
|
-
fill: c.value.style.chart.backgroundPattern.dotColor
|
|
2935
|
-
}, null, 8, cr)
|
|
2936
|
-
], !0)
|
|
2937
|
-
], 8, ur)
|
|
2938
|
-
])) : $("", !0),
|
|
2939
|
-
c.value.style.chart.backgroundPattern.show ? (S(), L("rect", {
|
|
2940
|
-
key: 1,
|
|
2941
|
-
x: y(_e)?.x ?? 0,
|
|
2942
|
-
y: y(_e)?.y ?? 0,
|
|
2943
|
-
width: y(_e)?.width ?? 0,
|
|
2944
|
-
height: y(_e)?.height ?? 0,
|
|
2945
|
-
fill: `url(#dag_bg_pattern_${p.value})`,
|
|
2946
|
-
style: Le({
|
|
2947
|
-
pointerEvents: "none",
|
|
2948
|
-
opacity: c.value.style.chart.backgroundPattern.opacity
|
|
2949
|
-
})
|
|
2950
|
-
}, null, 12, dr)) : $("", !0),
|
|
2951
|
-
y(x).arrowShape !== "undirected" ? (S(), L("defs", fr, [
|
|
2952
|
-
(S(!0), L(ge, null, Ve(y(x).edges, (d) => (S(), L("marker", {
|
|
2953
|
-
key: `marker_${d.id}`,
|
|
2954
|
-
id: dn(d.id),
|
|
2955
|
-
markerWidth: y(x).arrowSize,
|
|
2956
|
-
markerHeight: y(x).arrowSize,
|
|
2957
|
-
refX: y(x).arrowSize - 3,
|
|
2958
|
-
refY: y(x).arrowSize / 2,
|
|
2959
|
-
orient: "auto",
|
|
2960
|
-
markerUnits: "strokeWidth"
|
|
2961
|
-
}, [
|
|
2962
|
-
y(x).arrowShape === "normal" ? (S(), L("path", {
|
|
2963
|
-
key: 0,
|
|
2964
|
-
d: `M 0 0 L ${y(x).arrowSize} ${y(x).arrowSize / 2} L 0 ${y(x).arrowSize} Z`,
|
|
2965
|
-
fill: Ze(d),
|
|
2966
|
-
stroke: Ze(d),
|
|
2967
|
-
"stroke-width": "0",
|
|
2968
|
-
style: { transition: `stroke 0.2s ease-in-out,
|
|
2969
|
-
fill 0.2s ease-in-out,
|
|
2970
|
-
stroke-width 0.2s ease-in-out` }
|
|
2971
|
-
}, null, 8, mr)) : (S(), L("path", {
|
|
2972
|
-
key: 1,
|
|
2973
|
-
d: `M 0 0 L ${y(x).arrowSize} ${y(x).arrowSize / 2} L 0 ${y(x).arrowSize} L ${y(x).arrowSize / 3} ${y(x).arrowSize / 2} Z`,
|
|
2974
|
-
fill: Ze(d),
|
|
2975
|
-
stroke: Ze(d),
|
|
2976
|
-
"stroke-width": "0",
|
|
2977
|
-
style: { transition: `stroke 0.2s ease-in-out,
|
|
2978
|
-
fill 0.2s ease-in-out,
|
|
2979
|
-
stroke-width 0.2s ease-in-out` }
|
|
2980
|
-
}, null, 8, vr))
|
|
2981
|
-
], 8, hr))), 128))
|
|
2982
|
-
])) : $("", !0),
|
|
2983
|
-
X("g", gr, [
|
|
2984
|
-
(S(!0), L(ge, null, Ve(y(x).edges, (d) => (S(), L(ge, {
|
|
2985
|
-
key: d.id
|
|
2986
|
-
}, [
|
|
2987
|
-
X("path", Te({
|
|
2988
|
-
"data-cy-edge": "",
|
|
2989
|
-
ref_for: !0,
|
|
2990
|
-
ref: po(d.id)
|
|
2991
|
-
}, { ref_for: !0 }, Eo(d), { style: { "pointer-events": "none", transition: `stroke-width 0.2s ease-in-out,
|
|
2992
|
-
stroke 0.2s ease-in-out` } }), null, 16),
|
|
2993
|
-
c.value.style.chart.midpoints.show ? (S(), L("circle", Te({
|
|
2994
|
-
key: 0,
|
|
2995
|
-
"data-cy-midpoint": "",
|
|
2996
|
-
class: "vue-ui-dag-edge-midpoint",
|
|
2997
|
-
"data-a11y-midpoint-id": d.id
|
|
2998
|
-
}, { ref_for: !0 }, Co(d), {
|
|
2999
|
-
"aria-label": `${re(d.from)?.label ?? d.from} to ${re(d.to)?.label ?? d.to}`,
|
|
3000
|
-
style: { transition: `stroke-width 0.2s ease-in-out,
|
|
3001
|
-
stroke 0.2s ease-in-out,
|
|
3002
|
-
fill 0.2s ease-in-out` },
|
|
3003
|
-
onMouseenter: (g) => ko(d),
|
|
3004
|
-
onMouseleave: ae
|
|
3005
|
-
}), null, 16, pr)) : $("", !0)
|
|
3006
|
-
], 64))), 128))
|
|
3007
|
-
]),
|
|
3008
|
-
X("g", yr, [
|
|
3009
|
-
(S(!0), L(ge, null, Ve(y(x).nodes, (d) => (S(), L("g", {
|
|
3010
|
-
key: d.id,
|
|
3011
|
-
class: "vue-ui-dag-node",
|
|
3012
|
-
onClick: yn((g) => c.value.style.chart.nodes.tooltip.showOnClick && pt(d), ["stop"]),
|
|
3013
|
-
onMouseenter: (g) => bo(d.id),
|
|
3014
|
-
onMouseleave: (g) => un(d.id)
|
|
3015
|
-
}, [
|
|
3016
|
-
a.$slots.node ? $("", !0) : (S(), L("rect", Te({
|
|
3017
|
-
key: 0,
|
|
3018
|
-
"data-cy-node": ""
|
|
3019
|
-
}, { ref_for: !0 }, _o(d), {
|
|
3020
|
-
"data-a11y-node-id": d.id,
|
|
3021
|
-
"aria-label": `${d.label ?? d.id}`,
|
|
3022
|
-
style: {
|
|
3023
|
-
cursor: c.value.style.chart.nodes.tooltip.showOnClick && tt.value ? "pointer" : "default",
|
|
3024
|
-
transition: "stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out"
|
|
3025
|
-
}
|
|
3026
|
-
}), null, 16, br)),
|
|
3027
|
-
a.$slots.node ? (S(), L("foreignObject", {
|
|
3028
|
-
key: 1,
|
|
3029
|
-
x: d.x - d.width / 2,
|
|
3030
|
-
y: d.y - d.height / 2,
|
|
3031
|
-
width: d.width,
|
|
3032
|
-
height: d.height
|
|
3033
|
-
}, [
|
|
3034
|
-
R(a.$slots, "node", Te({ ref_for: !0 }, { node: d, orientation: ee.value }), void 0, !0)
|
|
3035
|
-
], 8, kr)) : $("", !0)
|
|
3036
|
-
], 40, wr))), 128))
|
|
3037
|
-
]),
|
|
3038
|
-
X("g", Er, [
|
|
3039
|
-
(S(!0), L(ge, null, Ve(y(x).edges, (d) => (S(), L("path", {
|
|
3040
|
-
key: d.id,
|
|
3041
|
-
d: d.pathData,
|
|
3042
|
-
fill: "none",
|
|
3043
|
-
stroke: "transparent",
|
|
3044
|
-
"stroke-width": c.value.style.chart.edges.strokeWidth * (d.from === D.value || d.id === Y.value?.id ? 1.3 : 1),
|
|
3045
|
-
"stroke-linecap": "round",
|
|
3046
|
-
"stroke-linejoin": "round",
|
|
3047
|
-
"marker-end": y(x).arrowShape === "undirected" ? null : `url(#${dn(d.id)})`,
|
|
3048
|
-
style: { "pointer-events": "none", transition: `stroke-width 0.2s ease-in-out,
|
|
3049
|
-
stroke 0.2s ease-in-out` }
|
|
3050
|
-
}, null, 8, _r))), 128))
|
|
3051
|
-
]),
|
|
3052
|
-
X("g", Cr, [
|
|
3053
|
-
(S(!0), L(ge, null, Ve(y(x).nodes, (d) => (S(), L("g", {
|
|
3054
|
-
key: d.id,
|
|
3055
|
-
onClick: yn((g) => c.value.style.chart.nodes.tooltip.showOnClick && pt(d), ["stop"]),
|
|
3056
|
-
onMouseenter: (g) => bt(d.id),
|
|
3057
|
-
onMouseleave: (g) => un(d.id)
|
|
3058
|
-
}, [
|
|
3059
|
-
a.$slots["free-node-label"] ? $("", !0) : (S(), L(ge, { key: 0 }, [
|
|
3060
|
-
a.$slots["node-label"] ? (S(), L("text", {
|
|
3061
|
-
key: 0,
|
|
3062
|
-
x: d.x,
|
|
3063
|
-
y: d.y + c.value.style.chart.nodes.labels.fontSize / 3,
|
|
3064
|
-
"text-anchor": "middle",
|
|
3065
|
-
"font-size": c.value.style.chart.nodes.labels.fontSize,
|
|
3066
|
-
fill: D.value === d.id && c.value.style.chart.nodes.selected.labelColor != null ? c.value.style.chart.nodes.selected.labelColor : d.original.color,
|
|
3067
|
-
"font-weight": c.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
3068
|
-
style: { transition: "fill 0.2s ease-in-out" }
|
|
3069
|
-
}, [
|
|
3070
|
-
R(a.$slots, "node-label", Te({ ref_for: !0 }, { node: d, orientation: ee.value }), () => [
|
|
3071
|
-
Ho(Me(d.label), 1)
|
|
3072
|
-
], !0)
|
|
3073
|
-
], 8, Nr)) : !a.$slots["free-node-label"] && !a.$slots.node ? (S(), L("text", {
|
|
3074
|
-
key: 1,
|
|
3075
|
-
"data-cy-node-label": "",
|
|
3076
|
-
x: d.x,
|
|
3077
|
-
y: d.y + c.value.style.chart.nodes.labels.fontSize / 3,
|
|
3078
|
-
"text-anchor": "middle",
|
|
3079
|
-
"font-size": c.value.style.chart.nodes.labels.fontSize,
|
|
3080
|
-
fill: (D.value === d.id || cn(d.id)) && c.value.style.chart.nodes.selected.labelColor != null ? c.value.style.chart.nodes.selected.labelColor : d.original.color,
|
|
3081
|
-
"font-weight": c.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
3082
|
-
style: { transition: "fill 0.2s ease-in-out" },
|
|
3083
|
-
innerHTML: y(Yo)({
|
|
3084
|
-
content: d.label,
|
|
3085
|
-
fontSize: c.value.style.chart.nodes.labels.fontSize,
|
|
3086
|
-
fontWeight: c.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
3087
|
-
fill: (D.value === d.id || cn(d.id)) && c.value.style.chart.nodes.selected.labelColor != null ? c.value.style.chart.nodes.selected.labelColor : d.original.color,
|
|
3088
|
-
x: d.x,
|
|
3089
|
-
y: d.y,
|
|
3090
|
-
autoOffset: !0
|
|
3091
|
-
})
|
|
3092
|
-
}, null, 8, Sr)) : $("", !0)
|
|
3093
|
-
], 64)),
|
|
3094
|
-
a.$slots["free-node-label"] ? (S(), L("g", Lr, [
|
|
3095
|
-
R(a.$slots, "free-node-label", Te({ ref_for: !0 }, {
|
|
3096
|
-
node: d,
|
|
3097
|
-
layoutData: y(x),
|
|
3098
|
-
orientation: ee.value
|
|
3099
|
-
}), void 0, !0)
|
|
3100
|
-
])) : $("", !0)
|
|
3101
|
-
], 40, xr))), 128))
|
|
3102
|
-
]),
|
|
3103
|
-
R(a.$slots, "svg", {
|
|
3104
|
-
svg: {
|
|
3105
|
-
drawingArea: y(_e),
|
|
3106
|
-
data: y(x),
|
|
3107
|
-
orientation: ee.value,
|
|
3108
|
-
isPrintingImg: y(ct) | y(dt) | ce.value,
|
|
3109
|
-
isPrintingSvg: we.value
|
|
3110
|
-
}
|
|
3111
|
-
}, void 0, !0)
|
|
3112
|
-
], 46, ar)) : $("", !0),
|
|
3113
|
-
a.$slots.hint ? (S(), L("div", Mr, [
|
|
3114
|
-
R(a.$slots, "hint", H(W({
|
|
3115
|
-
hint: c.value.a11y.translations.keyboardNavigation,
|
|
3116
|
-
isVisible: be.value
|
|
3117
|
-
})), void 0, !0)
|
|
3118
|
-
])) : $("", !0)
|
|
3119
|
-
]),
|
|
3120
|
-
a.$slots.watermark ? (S(), L("div", Tr, [
|
|
3121
|
-
R(a.$slots, "watermark", H(W({
|
|
3122
|
-
isPrinting: y(ct) || y(dt) || ce.value || we.value
|
|
3123
|
-
})), void 0, !0)
|
|
3124
|
-
])) : $("", !0),
|
|
3125
|
-
Ct(wn, { name: "fade" }, {
|
|
3126
|
-
default: V(() => [
|
|
3127
|
-
de.value ? (S(), oe(bn, {
|
|
3128
|
-
key: 0,
|
|
3129
|
-
to: fe.value ? m.value : "body"
|
|
3130
|
-
}, [
|
|
3131
|
-
X("div", {
|
|
3132
|
-
"data-cy-tooltip-midpoint": "",
|
|
3133
|
-
ref_key: "tooltipRef",
|
|
3134
|
-
ref: st,
|
|
3135
|
-
class: "vue-ui-dag-tooltip",
|
|
3136
|
-
style: Le({
|
|
3137
|
-
...It.value,
|
|
3138
|
-
maxWidth: c.value.style.chart.midpoints.tooltip.maxWidth,
|
|
3139
|
-
"--vue-data-ui-dag-tooltip-background": c.value.style.chart.midpoints.tooltip.backgroundColor,
|
|
3140
|
-
"--vue-data-ui-dag-tooltip-color": c.value.style.chart.midpoints.tooltip.color
|
|
3141
|
-
}),
|
|
3142
|
-
"data-position": Bt.value
|
|
3143
|
-
}, [
|
|
3144
|
-
R(a.$slots, "tooltip-midpoint", H(W({ edge: Y.value, layoutData: y(x) })), () => [
|
|
3145
|
-
Y.value ? (S(), L("div", $r, Me(re(Y.value.from)?.label ?? Y.value.from) + " → " + Me(re(Y.value.to)?.label ?? Y.value.to), 1)) : $("", !0)
|
|
3146
|
-
], !0)
|
|
3147
|
-
], 12, Or)
|
|
3148
|
-
], 8, ["to"])) : $("", !0)
|
|
3149
|
-
]),
|
|
3150
|
-
_: 3
|
|
3151
|
-
}),
|
|
3152
|
-
Ct(wn, { name: "fade" }, {
|
|
3153
|
-
default: V(() => [
|
|
3154
|
-
ie.value ? (S(), oe(bn, {
|
|
3155
|
-
key: 0,
|
|
3156
|
-
to: fe.value ? m.value : "body"
|
|
3157
|
-
}, [
|
|
3158
|
-
X("div", {
|
|
3159
|
-
"data-cy-tooltip-node": "",
|
|
3160
|
-
ref_key: "nodeTooltipRef",
|
|
3161
|
-
ref: it,
|
|
3162
|
-
class: "vue-ui-dag-node-tooltip",
|
|
3163
|
-
style: Le({
|
|
3164
|
-
maxWidth: c.value.style.chart.nodes.tooltip.maxWidth,
|
|
3165
|
-
left: rt.value.left,
|
|
3166
|
-
top: rt.value.top,
|
|
3167
|
-
"--vue-data-ui-dag-node-tooltip-background": c.value.style.chart.nodes.tooltip.backgroundColor,
|
|
3168
|
-
"--vue-data-ui-dag-node-tooltip-color": c.value.style.chart.nodes.tooltip.color
|
|
3169
|
-
}),
|
|
3170
|
-
"data-position": Ht.value
|
|
3171
|
-
}, [
|
|
3172
|
-
R(a.$slots, "tooltip-node", H(W({ node: Ae.value, layoutData: y(x) })), () => [
|
|
3173
|
-
Ae.value ? (S(), L("div", Pr, Me(Ae.value.label), 1)) : $("", !0)
|
|
3174
|
-
], !0)
|
|
3175
|
-
], 12, Rr)
|
|
3176
|
-
], 8, ["to"])) : $("", !0)
|
|
3177
|
-
]),
|
|
3178
|
-
_: 3
|
|
3179
|
-
}),
|
|
3180
|
-
c.value.style.chart.controls.position === "bottom" && !y(Fe) && c.value.style.chart.controls.show ? (S(), oe(Cn, {
|
|
3181
|
-
key: 7,
|
|
3182
|
-
ref_key: "zoomControls",
|
|
3183
|
-
ref: M,
|
|
3184
|
-
config: c.value,
|
|
3185
|
-
scale: y(Jt),
|
|
3186
|
-
isFullscreen: fe.value,
|
|
3187
|
-
withDirection: "",
|
|
3188
|
-
onZoomIn: ht,
|
|
3189
|
-
onZoomOut: mt,
|
|
3190
|
-
onResetZoom: v[1] || (v[1] = () => y(Ue)(!0)),
|
|
3191
|
-
onSwitchDirection: gt
|
|
3192
|
-
}, null, 8, ["config", "scale", "isFullscreen"])) : $("", !0),
|
|
3193
|
-
a.$slots.source ? (S(), L("div", {
|
|
3194
|
-
key: 8,
|
|
3195
|
-
ref_key: "source",
|
|
3196
|
-
ref: O,
|
|
3197
|
-
dir: "auto"
|
|
3198
|
-
}, [
|
|
3199
|
-
R(a.$slots, "source", {}, void 0, !0)
|
|
3200
|
-
], 512)) : $("", !0),
|
|
3201
|
-
R(a.$slots, "skeleton", {}, () => [
|
|
3202
|
-
y(Fe) ? (S(), oe(Jo, { key: 0 })) : $("", !0)
|
|
3203
|
-
], !0)
|
|
3204
|
-
], 46, or));
|
|
3205
|
-
}
|
|
3206
|
-
}, ta = /* @__PURE__ */ ls(Dr, [["__scopeId", "data-v-98d4f33d"]]);
|
|
3207
|
-
export {
|
|
3208
|
-
ta as default
|
|
3209
|
-
};
|