vue-data-ui 3.23.10 → 3.23.12
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 +40 -40
- package/dist/{Arrow-bwmME0jw.js → Arrow-DrF4NNJO.js} +1 -1
- package/dist/{BaseDraggableDialog-DBVHlhQZ.js → BaseDraggableDialog-Dr_Q6Yt5.js} +2 -2
- package/dist/{BaseIcon-B4n7br_R.js → BaseIcon-BbElSC8_.js} +1 -1
- package/dist/{BaseLegendToggle-wRhcG_-q.js → BaseLegendToggle-CtEdLr4R.js} +1 -1
- package/dist/{BaseZoomControls-BZjzzyQo.js → BaseZoomControls-Cvq4UmNG.js} +2 -2
- package/dist/{ColorPicker-B9kUMLSz.js → ColorPicker-ChOgAmCi.js} +2 -2
- package/dist/{DataTable-DMsScfkx.js → DataTable-CmyEubtT.js} +2 -2
- package/dist/{HillActions-IWPfuceW.js → HillActions-3HneGJhS.js} +1 -1
- package/dist/{Legend-DWEFXq9E.js → Legend-BJtY2RA9.js} +2 -2
- package/dist/{NonSvgPenAndPaper-Crs4-xWz.js → NonSvgPenAndPaper-DmxzHJtV.js} +3 -3
- package/dist/{PackageVersion-DNTJUKh1.js → PackageVersion-CT8FfP7h.js} +1 -1
- package/dist/{PenAndPaper-DJ607Hx6.js → PenAndPaper-CIa1F5Jq.js} +3 -3
- package/dist/{Shape-BAhF1ToV.js → Shape-BAL5bQmA.js} +1 -1
- package/dist/{SlicerPreview-sXtk2ZZ2.js → SlicerPreview-BRRyc1p7.js} +426 -426
- package/dist/{SparkTooltip-BE50SZQH.js → SparkTooltip-Bou05CV_.js} +1 -1
- package/dist/{Title-BGLPsoA9.js → Title-CaVA8EIw.js} +1 -1
- package/dist/{Tooltip-DO4-MVhc.js → Tooltip-CVxJe3UW.js} +1 -1
- package/dist/{UserOptions-HQyukyl2.js → UserOptions-WH7-49V0.js} +2 -2
- package/dist/components/arrow.js +1 -1
- package/dist/components/vue-ui-3d-bar.js +1 -1
- package/dist/components/vue-ui-accordion.js +1 -1
- package/dist/components/vue-ui-age-pyramid.js +1 -1
- package/dist/components/vue-ui-annotator.js +1 -1
- package/dist/components/vue-ui-bullet.js +1 -1
- package/dist/components/vue-ui-bump.js +1 -1
- package/dist/components/vue-ui-candlestick.js +1 -1
- package/dist/components/vue-ui-carousel-table.js +1 -1
- package/dist/components/vue-ui-chestnut.js +1 -1
- package/dist/components/vue-ui-chord.js +1 -1
- package/dist/components/vue-ui-circle-pack.js +1 -1
- package/dist/components/vue-ui-cursor.js +1 -1
- package/dist/components/vue-ui-dag.js +1 -1
- package/dist/components/vue-ui-dashboard.js +1 -1
- package/dist/components/vue-ui-digits.js +1 -1
- package/dist/components/vue-ui-donut-evolution.js +1 -1
- package/dist/components/vue-ui-donut.js +1 -1
- package/dist/components/vue-ui-dumbbell.js +1 -1
- package/dist/components/vue-ui-flow.js +1 -1
- package/dist/components/vue-ui-funnel.js +1 -1
- package/dist/components/vue-ui-galaxy.js +1 -1
- package/dist/components/vue-ui-gauge.js +1 -1
- package/dist/components/vue-ui-geo.js +1 -1
- package/dist/components/vue-ui-gizmo.js +1 -1
- package/dist/components/vue-ui-heatmap.js +1 -1
- package/dist/components/vue-ui-hill.js +1 -1
- package/dist/components/vue-ui-history-plot.js +1 -1
- package/dist/components/vue-ui-horizontal-bar.js +1 -1
- package/dist/components/vue-ui-icon.js +1 -1
- package/dist/components/vue-ui-kpi.js +1 -1
- package/dist/components/vue-ui-mini-loader.js +1 -1
- package/dist/components/vue-ui-molecule.js +1 -1
- package/dist/components/vue-ui-mood-radar.js +1 -1
- package/dist/components/vue-ui-nested-donuts.js +1 -1
- package/dist/components/vue-ui-onion.js +1 -1
- package/dist/components/vue-ui-parallel-coordinate-plot.js +1 -1
- package/dist/components/vue-ui-quadrant.js +1 -1
- package/dist/components/vue-ui-quick-chart.js +1 -1
- package/dist/components/vue-ui-radar.js +1 -1
- package/dist/components/vue-ui-rating.js +1 -1
- package/dist/components/vue-ui-relation-circle.js +1 -1
- package/dist/components/vue-ui-ridgeline.js +1 -1
- package/dist/components/vue-ui-rings.js +1 -1
- package/dist/components/vue-ui-scatter.js +1 -1
- package/dist/components/vue-ui-skeleton.js +1 -1
- package/dist/components/vue-ui-smiley.js +1 -1
- package/dist/components/vue-ui-spark-trend.js +1 -1
- package/dist/components/vue-ui-sparkbar.js +1 -1
- package/dist/components/vue-ui-sparkgauge.js +1 -1
- package/dist/components/vue-ui-sparkhistogram.js +1 -1
- package/dist/components/vue-ui-sparkline.js +1 -1
- package/dist/components/vue-ui-sparkstackbar.js +1 -1
- package/dist/components/vue-ui-stackbar.js +1 -1
- package/dist/components/vue-ui-stackline.js +1 -1
- package/dist/components/vue-ui-strip-plot.js +1 -1
- package/dist/components/vue-ui-table-heatmap.js +1 -1
- package/dist/components/vue-ui-table-sparkline.js +1 -1
- package/dist/components/vue-ui-table.js +1 -1
- package/dist/components/vue-ui-thermometer.js +1 -1
- package/dist/components/vue-ui-timer.js +1 -1
- package/dist/components/vue-ui-tiremarks.js +1 -1
- package/dist/components/vue-ui-treemap.js +1 -1
- package/dist/components/vue-ui-vertical-bar.js +1 -1
- package/dist/components/vue-ui-waffle.js +1 -1
- package/dist/components/vue-ui-wheel.js +1 -1
- package/dist/components/vue-ui-word-cloud.js +1 -1
- package/dist/components/vue-ui-world.js +1 -1
- package/dist/components/vue-ui-xy-canvas.js +1 -1
- package/dist/components/vue-ui-xy.js +1 -1
- package/dist/{dom-to-png-Cg_3vpOo.js → dom-to-png-COvyU2SG.js} +1 -1
- package/dist/exposedLib-DrUEXSyf.js +28 -0
- package/dist/{img-tU9mMt9W.js → img-Bkzj3lDD.js} +1 -1
- package/dist/{labelUtils-C_lMnQRs.js → labelUtils-iX76cA2-.js} +1 -1
- package/dist/{lib-AT2PUyyh.js → lib-Dqr_-I6Y.js} +165 -162
- package/dist/{package-enC-Nivt.js → package-CXgp_UWC.js} +1 -1
- package/dist/{pdf-ColHHJFH.js → pdf-Bk_9lTdQ.js} +1 -1
- package/dist/{render-common-CqcoYfCA.js → render-common-D9TESN6N.js} +12 -12
- package/dist/ssr/vue-ui-donut.js +1 -1
- package/dist/ssr/vue-ui-xy.js +1 -1
- package/dist/ssr.js +2 -2
- package/dist/style.css +1 -1
- package/dist/types/vue-data-ui.d.ts +13 -2
- package/dist/types/vue-ui-dag.d.ts +2 -0
- package/dist/{useNestedProp-CW0vJS1B.js → useNestedProp-CulPqtou.js} +1 -1
- package/dist/{usePrinter-BFS7d6eb.js → usePrinter-CEiH1b6R.js} +2 -2
- package/dist/utils.js +9 -9
- package/dist/{vue-data-ui-DD7J3yor.js → vue-data-ui-BTHfxD0A.js} +69 -69
- package/dist/vue-data-ui.js +73 -73
- package/dist/vue-ui-3d-bar-qYgLQzCk.js +1829 -0
- package/dist/{vue-ui-accordion-DJNjilyy.js → vue-ui-accordion-C6L7glHU.js} +3 -3
- package/dist/{vue-ui-age-pyramid-DI8b5E2H.js → vue-ui-age-pyramid-DlDqWHMv.js} +27 -27
- package/dist/{vue-ui-annotator-7ZVfFskI.js → vue-ui-annotator-BwIu0JUV.js} +9 -9
- package/dist/vue-ui-bullet-KPROgHpN.js +700 -0
- package/dist/{vue-ui-bump-DzB3WQnq.js → vue-ui-bump-_ccDjRda.js} +237 -237
- package/dist/{vue-ui-candlestick--YWEtek_.js → vue-ui-candlestick-C_21KIXE.js} +245 -245
- package/dist/{vue-ui-carousel-table-Dn3RZU0p.js → vue-ui-carousel-table--JukD8gC.js} +108 -108
- package/dist/{vue-ui-chestnut-BIsXeXiU.js → vue-ui-chestnut-BWvgfxnY.js} +86 -86
- package/dist/vue-ui-chord-CGkWt2XK.js +1345 -0
- package/dist/vue-ui-circle-pack-BWaN2mEB.js +1633 -0
- package/dist/{vue-ui-cursor-C-P2D5i6.js → vue-ui-cursor-YbxnsOd1.js} +3 -3
- package/dist/{vue-ui-dag-CThnMMWA.js → vue-ui-dag-B-X2eE3W.js} +923 -885
- package/dist/{vue-ui-dashboard-D0NNTRO3.js → vue-ui-dashboard-DgayqETw.js} +69 -69
- package/dist/{vue-ui-digits-9tGjGzZh.js → vue-ui-digits-1ULOKtDh.js} +3 -3
- package/dist/{vue-ui-donut-EZu8p7HF.js → vue-ui-donut-Bz2ZI_vO.js} +85 -85
- package/dist/{vue-ui-donut-DLN9uPOi.js → vue-ui-donut-Ci2MsJLu.js} +64 -64
- package/dist/{vue-ui-donut-evolution-mu-iGTIn.js → vue-ui-donut-evolution-Bo54mlFQ.js} +347 -347
- package/dist/{vue-ui-dumbbell-Dvldi3Oo.js → vue-ui-dumbbell-D2bJ_P7K.js} +229 -229
- package/dist/vue-ui-flow-D9m-k3tM.js +1214 -0
- package/dist/vue-ui-funnel-DyETq2KE.js +747 -0
- package/dist/{vue-ui-galaxy-D6eYN8Ut.js → vue-ui-galaxy-pjGKZLrq.js} +64 -64
- package/dist/vue-ui-gauge-BO5lLCyJ.js +932 -0
- package/dist/{vue-ui-geo-CQqNemR6.js → vue-ui-geo-DpyLvk_B.js} +34 -34
- package/dist/{vue-ui-gizmo-ClunTUxX.js → vue-ui-gizmo-CUl8dgmV.js} +10 -10
- package/dist/{vue-ui-heatmap-B_pSQNzO.js → vue-ui-heatmap-CiV3kCrx.js} +472 -472
- package/dist/{vue-ui-hill-Byp0Tnny.js → vue-ui-hill-CkMtYGo2.js} +10 -10
- package/dist/vue-ui-history-plot-X2gQI4TY.js +1695 -0
- package/dist/vue-ui-horizontal-bar-DVT1wthh.js +1708 -0
- package/dist/{vue-ui-kpi-BKw5t-rX.js → vue-ui-kpi-CWPmkLKR.js} +3 -3
- package/dist/{vue-ui-mini-loader-BNm0MQDw.js → vue-ui-mini-loader-BVSIAFYi.js} +2 -2
- package/dist/{vue-ui-molecule-DRwQV5hN.js → vue-ui-molecule-DnW5HYZP.js} +176 -176
- package/dist/{vue-ui-mood-radar-Bj3KTWYj.js → vue-ui-mood-radar-FovwTDLw.js} +20 -20
- package/dist/{vue-ui-nested-donuts-83Wh2w6z.js → vue-ui-nested-donuts-DHCOlxTO.js} +104 -104
- package/dist/vue-ui-onion-CzAEqZ0B.js +1233 -0
- package/dist/vue-ui-parallel-coordinate-plot-BZN75P6u.js +1430 -0
- package/dist/{vue-ui-quadrant-_J-Qr7-K.js → vue-ui-quadrant-CNeP5WEC.js} +32 -32
- package/dist/{vue-ui-quick-chart-DcOUq4ym.js → vue-ui-quick-chart-Bnj8oh82.js} +153 -153
- package/dist/{vue-ui-radar-FlRlsoAd.js → vue-ui-radar-DMyMAtx7.js} +41 -41
- package/dist/{vue-ui-rating-eCxEZD8C.js → vue-ui-rating-dBCk6ECe.js} +26 -26
- package/dist/vue-ui-relation-circle-DFj5V39I.js +903 -0
- package/dist/vue-ui-ridgeline-BaplQZZK.js +1614 -0
- package/dist/vue-ui-rings-B9QJ1Rnb.js +1250 -0
- package/dist/vue-ui-scatter-UH0wqUO5.js +2403 -0
- package/dist/{vue-ui-skeleton-CNOam3kC.js → vue-ui-skeleton-DkoEclfa.js} +3 -3
- package/dist/{vue-ui-smiley-YdyidjBH.js → vue-ui-smiley-D1pW2Fdy.js} +23 -23
- package/dist/{vue-ui-spark-trend-CS5GLtYL.js → vue-ui-spark-trend-BW8WYOva.js} +23 -23
- package/dist/{vue-ui-sparkbar-DDHwgP4k.js → vue-ui-sparkbar-ADRsH-GZ.js} +24 -24
- package/dist/{vue-ui-sparkgauge-BcQu9V3h.js → vue-ui-sparkgauge-BYs1L6I7.js} +61 -61
- package/dist/{vue-ui-sparkhistogram-CPsA5P6c.js → vue-ui-sparkhistogram-D1Paq9X0.js} +15 -15
- package/dist/vue-ui-sparkline-D2Hf_NP-.js +1584 -0
- package/dist/{vue-ui-sparkstackbar-4tsTxMe2.js → vue-ui-sparkstackbar-Uy6Q0X15.js} +207 -207
- package/dist/vue-ui-stackbar-Vt9AjazE.js +2332 -0
- package/dist/{vue-ui-stackline-BNCWO_jG.js → vue-ui-stackline-CBIGhWpn.js} +605 -605
- package/dist/{vue-ui-strip-plot-2Y1c02Ek.js → vue-ui-strip-plot-DhZV1Sl6.js} +57 -57
- package/dist/vue-ui-table-DqMxdgj4.js +1352 -0
- package/dist/{vue-ui-table-heatmap-BacaEjQy.js → vue-ui-table-heatmap-CglQqfWH.js} +84 -84
- package/dist/{vue-ui-table-sparkline-B8oAU5yr.js → vue-ui-table-sparkline-2KZ2UoEA.js} +11 -11
- package/dist/vue-ui-thermometer-mVP2GqO7.js +756 -0
- package/dist/{vue-ui-timer-CWZgSpP8.js → vue-ui-timer-CGrqG8H3.js} +12 -12
- package/dist/{vue-ui-tiremarks-LLVCPyg9.js → vue-ui-tiremarks-DyFUPB5s.js} +12 -12
- package/dist/{vue-ui-treemap-ehBl9JMC.js → vue-ui-treemap-BVFHSTfq.js} +44 -44
- package/dist/vue-ui-waffle-DNZsc5x0.js +1619 -0
- package/dist/{vue-ui-wheel-C4OHPrtC.js → vue-ui-wheel-Cg4oNFmH.js} +28 -28
- package/dist/{vue-ui-word-cloud-CDHn3Kwa.js → vue-ui-word-cloud-CUf1h_L1.js} +32 -32
- package/dist/{vue-ui-world-ao1xf04I.js → vue-ui-world-CIcrI3zP.js} +116 -116
- package/dist/{vue-ui-xy-DmJDCl3c.js → vue-ui-xy-8V-CU7No.js} +99 -99
- package/dist/{vue-ui-xy-_U3wmtCf.js → vue-ui-xy-CJ5ZixIL.js} +304 -304
- package/dist/vue-ui-xy-canvas-BHpBO5dS.js +1823 -0
- package/package.json +1 -1
- package/dist/exposedLib-vfRiIvq_.js +0 -28
- package/dist/vue-ui-3d-bar-DgrcdAgz.js +0 -1829
- package/dist/vue-ui-bullet-Dyd5F1Wa.js +0 -700
- package/dist/vue-ui-chord-BimXqVsF.js +0 -1345
- package/dist/vue-ui-circle-pack-DKQEhL-L.js +0 -1633
- package/dist/vue-ui-flow-DYZBT5Cb.js +0 -1214
- package/dist/vue-ui-funnel--NaxO0cZ.js +0 -747
- package/dist/vue-ui-gauge-DTIEl2Xb.js +0 -932
- package/dist/vue-ui-history-plot-CMu8ST1E.js +0 -1695
- package/dist/vue-ui-horizontal-bar-BQn7WxQ-.js +0 -1708
- package/dist/vue-ui-onion-C27GpneA.js +0 -1233
- package/dist/vue-ui-parallel-coordinate-plot-BklOszr1.js +0 -1430
- package/dist/vue-ui-relation-circle-DnsxHv7t.js +0 -903
- package/dist/vue-ui-ridgeline-TopTLyaE.js +0 -1614
- package/dist/vue-ui-rings-obVfb09j.js +0 -1250
- package/dist/vue-ui-scatter-BHSuA506.js +0 -2403
- package/dist/vue-ui-sparkline-CnbO-GkM.js +0 -1584
- package/dist/vue-ui-stackbar-2_SrMFNT.js +0 -2332
- package/dist/vue-ui-table-DJZxHo5N.js +0 -1352
- package/dist/vue-ui-thermometer-BGtxNU9T.js +0 -756
- package/dist/vue-ui-waffle-DpBAXbhh.js +0 -1610
- package/dist/vue-ui-xy-canvas-Bx-9y53V.js +0 -1823
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
import { n as
|
|
7
|
-
import { t as
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { l as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { t as
|
|
17
|
-
import { t as
|
|
18
|
-
import { t as
|
|
19
|
-
import { t as
|
|
20
|
-
import { Fragment as
|
|
2
|
+
import { K as t, Nt as n, S as r, Xt as i, _t as a, et as o, kt as s, nt as c, q as l, t as u } from "./lib-Dqr_-I6Y.js";
|
|
3
|
+
import { n as d, t as f } from "./useHints-Dq_w2E8B.js";
|
|
4
|
+
import { t as p } from "./useConfig-DwdGsXTx.js";
|
|
5
|
+
import { t as m } from "./usePrinter-CEiH1b6R.js";
|
|
6
|
+
import { n as h, t as g } from "./BaseScanner-DZvpgOjM.js";
|
|
7
|
+
import { t as _ } from "./useNestedProp-CulPqtou.js";
|
|
8
|
+
import { t as ee } from "./useThemeCheck-C43Tcqmk.js";
|
|
9
|
+
import { t as te } from "./useChartExport-DNiwdPmb.js";
|
|
10
|
+
import { t as ne } from "./img-Bkzj3lDD.js";
|
|
11
|
+
import { n as re } from "./Title-CaVA8EIw.js";
|
|
12
|
+
import { t as ie } from "./_plugin-vue_export-helper-B3ysoDQm.js";
|
|
13
|
+
import { l as ae, t as oe } from "./useResponsive-ZtArZtUf.js";
|
|
14
|
+
import { t as se } from "./A11yDataTable-DdRsVULz.js";
|
|
15
|
+
import { t as ce } from "./useUserOptionState-DK-_1ddE.js";
|
|
16
|
+
import { t as le } from "./useChartAccessibility-DYqac8yF.js";
|
|
17
|
+
import { t as ue } from "./usePanZoom-CYU3B4T3.js";
|
|
18
|
+
import { t as de } from "./BaseZoomControls-Cvq4UmNG.js";
|
|
19
|
+
import { t as fe } from "./vue_ui_dag-TsJ_azQq.js";
|
|
20
|
+
import { Fragment as pe, Teleport as me, Transition as he, computed as v, createBlock as y, createCommentVNode as b, createElementBlock as x, createElementVNode as S, createSlots as ge, createTextVNode as _e, createVNode as ve, defineAsyncComponent as ye, guardReactiveProps as C, mergeProps as be, nextTick as xe, normalizeClass as Se, normalizeProps as w, normalizeStyle as Ce, onBeforeUnmount as we, onMounted as Te, openBlock as T, ref as E, renderList as Ee, renderSlot as D, toDisplayString as De, toRefs as Oe, unref as O, watch as ke, watchEffect as Ae, withCtx as k, withModifiers as je } from "vue";
|
|
21
21
|
//#region src/DAG/graph.js
|
|
22
|
-
var
|
|
22
|
+
var Me = "\0", Ne = "\0", Pe = "", A = class {
|
|
23
23
|
_isDirected = !0;
|
|
24
24
|
_isMultigraph = !1;
|
|
25
25
|
_isCompound = !1;
|
|
@@ -38,7 +38,7 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
38
38
|
_parent;
|
|
39
39
|
_children;
|
|
40
40
|
constructor(e) {
|
|
41
|
-
e && (this._isDirected = !Object.hasOwn(e, "directed") || e.directed, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[
|
|
41
|
+
e && (this._isDirected = !Object.hasOwn(e, "directed") || e.directed, this._isMultigraph = Object.hasOwn(e, "multigraph") ? e.multigraph : !1, this._isCompound = Object.hasOwn(e, "compound") ? e.compound : !1), this._isCompound && (this._parent = {}, this._children = {}, this._children[Ne] = {});
|
|
42
42
|
}
|
|
43
43
|
isDirected() {
|
|
44
44
|
return this._isDirected;
|
|
@@ -79,7 +79,7 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
79
79
|
}), this;
|
|
80
80
|
}
|
|
81
81
|
setNode(e, t) {
|
|
82
|
-
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] =
|
|
82
|
+
return Object.hasOwn(this._nodes, e) ? (arguments.length > 1 && (this._nodes[e] = t), this) : (this._nodes[e] = arguments.length > 1 ? t : this._defaultNodeLabelFn(e), this._isCompound && (this._parent[e] = Ne, this._children[e] = {}, this._children[Ne][e] = !0), this._in[e] = {}, this._preds[e] = {}, this._out[e] = {}, this._sucs[e] = {}, ++this._nodeCount, this);
|
|
83
83
|
}
|
|
84
84
|
node(e) {
|
|
85
85
|
return this._nodes[e];
|
|
@@ -99,7 +99,7 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
99
99
|
}
|
|
100
100
|
setParent(e, t) {
|
|
101
101
|
if (!this._isCompound) throw Error("Cannot set parent in a non-compound graph");
|
|
102
|
-
if (t === void 0) t =
|
|
102
|
+
if (t === void 0) t = Ne;
|
|
103
103
|
else {
|
|
104
104
|
t += "";
|
|
105
105
|
for (let n = t; n !== void 0; n = this.parent(n)) if (n === e) throw Error("Setting " + t + " as parent of " + e + " would create a cycle");
|
|
@@ -113,14 +113,14 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
113
113
|
parent(e) {
|
|
114
114
|
if (this._isCompound) {
|
|
115
115
|
let t = this._parent[e];
|
|
116
|
-
if (t !==
|
|
116
|
+
if (t !== Ne) return t;
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
|
-
children(e =
|
|
119
|
+
children(e = Ne) {
|
|
120
120
|
if (this._isCompound) {
|
|
121
121
|
let t = this._children[e];
|
|
122
122
|
if (t) return Object.keys(t);
|
|
123
|
-
} else if (e ===
|
|
123
|
+
} else if (e === Ne) return this.nodes();
|
|
124
124
|
else if (this.hasNode(e)) return [];
|
|
125
125
|
}
|
|
126
126
|
predecessors(e) {
|
|
@@ -179,15 +179,15 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
179
179
|
setEdge() {
|
|
180
180
|
let e, t, n, r, i = !1, a = arguments[0];
|
|
181
181
|
typeof a == "object" && a && "v" in a ? (e = a.v, t = a.w, n = a.name, arguments.length === 2 && (r = arguments[1], i = !0)) : (e = a, t = arguments[1], n = arguments[3], arguments.length > 2 && (r = arguments[2], i = !0)), e = "" + e, t = "" + t, n !== void 0 && (n = "" + n);
|
|
182
|
-
let o =
|
|
182
|
+
let o = M(this._isDirected, e, t, n);
|
|
183
183
|
if (Object.hasOwn(this._edgeLabels, o)) return i && (this._edgeLabels[o] = r), this;
|
|
184
184
|
if (n !== void 0 && !this._isMultigraph) throw Error("Cannot set a named edge when isMultigraph = false");
|
|
185
185
|
this.setNode(e), this.setNode(t), this._edgeLabels[o] = i ? r : this._defaultEdgeLabelFn(e, t, n);
|
|
186
|
-
let s =
|
|
187
|
-
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s,
|
|
186
|
+
let s = N(this._isDirected, e, t, n);
|
|
187
|
+
return e = s.v, t = s.w, Object.freeze(s), this._edgeObjs[o] = s, Fe(this._preds[t], e), Fe(this._sucs[e], t), this._in[t][o] = s, this._out[e][o] = s, this._edgeCount++, this;
|
|
188
188
|
}
|
|
189
189
|
edge(e, t, n) {
|
|
190
|
-
let r = arguments.length === 1 ?
|
|
190
|
+
let r = arguments.length === 1 ? P(this._isDirected, arguments[0]) : M(this._isDirected, e, t, n);
|
|
191
191
|
return this._edgeLabels[r];
|
|
192
192
|
}
|
|
193
193
|
edgeAsObj() {
|
|
@@ -195,12 +195,12 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
195
195
|
return typeof e == "object" ? e : { label: e };
|
|
196
196
|
}
|
|
197
197
|
hasEdge(e, t, n) {
|
|
198
|
-
let r = arguments.length === 1 ?
|
|
198
|
+
let r = arguments.length === 1 ? P(this._isDirected, arguments[0]) : M(this._isDirected, e, t, n);
|
|
199
199
|
return Object.hasOwn(this._edgeLabels, r);
|
|
200
200
|
}
|
|
201
201
|
removeEdge(e, t, n) {
|
|
202
|
-
let r = arguments.length === 1 ?
|
|
203
|
-
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r],
|
|
202
|
+
let r = arguments.length === 1 ? P(this._isDirected, arguments[0]) : M(this._isDirected, e, t, n), i = this._edgeObjs[r];
|
|
203
|
+
return i && (e = i.v, t = i.w, delete this._edgeLabels[r], delete this._edgeObjs[r], j(this._preds[t], e), j(this._sucs[e], t), delete this._in[t][r], delete this._out[e][r], this._edgeCount--), this;
|
|
204
204
|
}
|
|
205
205
|
inEdges(e, t) {
|
|
206
206
|
let n = this._in[e];
|
|
@@ -221,21 +221,21 @@ var je = "\0", Me = "\0", Ne = "", k = class {
|
|
|
221
221
|
if (n) return n.concat(this.outEdges(e, t));
|
|
222
222
|
}
|
|
223
223
|
};
|
|
224
|
-
function
|
|
224
|
+
function Fe(e, t) {
|
|
225
225
|
e[t] ? e[t]++ : e[t] = 1;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function j(e, t) {
|
|
228
228
|
--e[t] || delete e[t];
|
|
229
229
|
}
|
|
230
|
-
function
|
|
230
|
+
function M(e, t, n, r) {
|
|
231
231
|
let i = "" + t, a = "" + n;
|
|
232
232
|
if (!e && i > a) {
|
|
233
233
|
let e = i;
|
|
234
234
|
i = a, a = e;
|
|
235
235
|
}
|
|
236
|
-
return i +
|
|
236
|
+
return i + Pe + a + Pe + (r === void 0 ? Me : r);
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function N(e, t, n, r) {
|
|
239
239
|
let i = "" + t, a = "" + n;
|
|
240
240
|
if (!e && i > a) {
|
|
241
241
|
let e = i;
|
|
@@ -247,73 +247,73 @@ function M(e, t, n, r) {
|
|
|
247
247
|
};
|
|
248
248
|
return r && (o.name = r), o;
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
return
|
|
250
|
+
function P(e, t) {
|
|
251
|
+
return M(e, t.v, t.w, t.name);
|
|
252
252
|
}
|
|
253
253
|
//#endregion
|
|
254
254
|
//#region src/DAG/data/list.js
|
|
255
|
-
var
|
|
255
|
+
var Ie = class {
|
|
256
256
|
constructor() {
|
|
257
257
|
let e = {};
|
|
258
258
|
e._next = e._prev = e, this._sentinel = e;
|
|
259
259
|
}
|
|
260
260
|
dequeue() {
|
|
261
261
|
let e = this._sentinel, t = e._prev;
|
|
262
|
-
if (t !== e) return
|
|
262
|
+
if (t !== e) return Le(t), t;
|
|
263
263
|
}
|
|
264
264
|
enqueue(e) {
|
|
265
265
|
let t = this._sentinel;
|
|
266
|
-
e._prev && e._next &&
|
|
266
|
+
e._prev && e._next && Le(e), e._next = t._next, t._next._prev = e, t._next = e, e._prev = t;
|
|
267
267
|
}
|
|
268
268
|
toString() {
|
|
269
269
|
let e = [], t = this._sentinel, n = t._prev;
|
|
270
|
-
for (; n !== t;) e.push(JSON.stringify(n,
|
|
270
|
+
for (; n !== t;) e.push(JSON.stringify(n, Re)), n = n._prev;
|
|
271
271
|
return "[" + e.join(", ") + "]";
|
|
272
272
|
}
|
|
273
273
|
};
|
|
274
|
-
function
|
|
274
|
+
function Le(e) {
|
|
275
275
|
e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
|
|
276
276
|
}
|
|
277
|
-
function
|
|
277
|
+
function Re(e, t) {
|
|
278
278
|
if (e !== "_next" && e !== "_prev") return t;
|
|
279
279
|
}
|
|
280
280
|
//#endregion
|
|
281
281
|
//#region src/DAG/greedy-fas.js
|
|
282
|
-
var
|
|
283
|
-
function
|
|
282
|
+
var ze = () => 1;
|
|
283
|
+
function Be(e, t) {
|
|
284
284
|
if (e.nodeCount() <= 1) return [];
|
|
285
|
-
let n =
|
|
286
|
-
return
|
|
285
|
+
let n = F(e, t || ze);
|
|
286
|
+
return Ve(n.graph, n.buckets, n.zeroIndex).flatMap((t) => e.outEdges(t.v, t.w));
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function Ve(e, t, n) {
|
|
289
289
|
let r = [], i = t[t.length - 1], a = t[0], o;
|
|
290
290
|
for (; e.nodeCount();) {
|
|
291
|
-
for (; o = a.dequeue();)
|
|
292
|
-
for (; o = i.dequeue();)
|
|
291
|
+
for (; o = a.dequeue();) He(e, t, n, o);
|
|
292
|
+
for (; o = i.dequeue();) He(e, t, n, o);
|
|
293
293
|
if (e.nodeCount()) {
|
|
294
294
|
for (let i = t.length - 2; i > 0; --i) if (o = t[i].dequeue(), o) {
|
|
295
|
-
r = r.concat(
|
|
295
|
+
r = r.concat(He(e, t, n, o, !0));
|
|
296
296
|
break;
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
return r;
|
|
301
301
|
}
|
|
302
|
-
function
|
|
302
|
+
function He(e, t, n, r, i) {
|
|
303
303
|
let a = i ? [] : void 0;
|
|
304
304
|
return e.inEdges(r.v).forEach((r) => {
|
|
305
305
|
let o = e.edge(r), s = e.node(r.v);
|
|
306
306
|
i && a.push({
|
|
307
307
|
v: r.v,
|
|
308
308
|
w: r.w
|
|
309
|
-
}), s.out -= o,
|
|
309
|
+
}), s.out -= o, I(t, n, s);
|
|
310
310
|
}), e.outEdges(r.v).forEach((r) => {
|
|
311
311
|
let i = e.edge(r), a = e.node(r.w);
|
|
312
|
-
a.in -= i,
|
|
312
|
+
a.in -= i, I(t, n, a);
|
|
313
313
|
}), e.removeNode(r.v), a;
|
|
314
314
|
}
|
|
315
|
-
function
|
|
316
|
-
let n = new
|
|
315
|
+
function F(e, t) {
|
|
316
|
+
let n = new A(), r = 0, i = 0;
|
|
317
317
|
e.nodes().forEach((e) => {
|
|
318
318
|
n.setNode(e, {
|
|
319
319
|
v: e,
|
|
@@ -324,32 +324,32 @@ function P(e, t) {
|
|
|
324
324
|
let a = n.edge(e.v, e.w) || 0, o = t(e), s = a + o;
|
|
325
325
|
n.setEdge(e.v, e.w, s), i = Math.max(i, n.node(e.v).out += o), r = Math.max(r, n.node(e.w).in += o);
|
|
326
326
|
});
|
|
327
|
-
let a =
|
|
327
|
+
let a = L(i + r + 3).map(() => new Ie()), o = r + 1;
|
|
328
328
|
return n.nodes().forEach((e) => {
|
|
329
|
-
|
|
329
|
+
I(a, o, n.node(e));
|
|
330
330
|
}), {
|
|
331
331
|
graph: n,
|
|
332
332
|
buckets: a,
|
|
333
333
|
zeroIndex: o
|
|
334
334
|
};
|
|
335
335
|
}
|
|
336
|
-
function
|
|
336
|
+
function I(e, t, n) {
|
|
337
337
|
n.out ? n.in ? e[n.out - n.in + t].enqueue(n) : e[e.length - 1].enqueue(n) : e[0].enqueue(n);
|
|
338
338
|
}
|
|
339
|
-
function
|
|
339
|
+
function L(e) {
|
|
340
340
|
let t = [];
|
|
341
341
|
for (let n = 0; n < e; n++) t.push(n);
|
|
342
342
|
return t;
|
|
343
343
|
}
|
|
344
344
|
//#endregion
|
|
345
345
|
//#region src/DAG/util.js
|
|
346
|
-
function
|
|
346
|
+
function R(e, t, n, r) {
|
|
347
347
|
let i = r;
|
|
348
|
-
for (; e.hasNode(i);) i =
|
|
348
|
+
for (; e.hasNode(i);) i = nt(r);
|
|
349
349
|
return n.dummy = t, e.setNode(i, n), i;
|
|
350
350
|
}
|
|
351
|
-
function
|
|
352
|
-
let t = new
|
|
351
|
+
function Ue(e) {
|
|
352
|
+
let t = new A().setGraph(e.graph());
|
|
353
353
|
return e.nodes().forEach((n) => {
|
|
354
354
|
t.setNode(n, e.node(n));
|
|
355
355
|
}), e.edges().forEach((n) => {
|
|
@@ -363,33 +363,33 @@ function He(e) {
|
|
|
363
363
|
});
|
|
364
364
|
}), t;
|
|
365
365
|
}
|
|
366
|
-
function
|
|
367
|
-
let t = new
|
|
366
|
+
function We(e) {
|
|
367
|
+
let t = new A({ multigraph: e.isMultigraph() }).setGraph(e.graph());
|
|
368
368
|
return e.nodes().forEach((n) => {
|
|
369
369
|
e.children(n).length || t.setNode(n, e.node(n));
|
|
370
370
|
}), e.edges().forEach((n) => {
|
|
371
371
|
t.setEdge(n, e.edge(n));
|
|
372
372
|
}), t;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function Ge(e) {
|
|
375
375
|
let t = e.nodes().map((t) => {
|
|
376
376
|
let n = {};
|
|
377
377
|
return e.outEdges(t).forEach((t) => {
|
|
378
378
|
n[t.w] = (n[t.w] || 0) + e.edge(t).weight;
|
|
379
379
|
}), n;
|
|
380
380
|
});
|
|
381
|
-
return
|
|
381
|
+
return G(e.nodes(), t);
|
|
382
382
|
}
|
|
383
|
-
function
|
|
383
|
+
function z(e) {
|
|
384
384
|
let t = e.nodes().map((t) => {
|
|
385
385
|
let n = {};
|
|
386
386
|
return e.inEdges(t).forEach((t) => {
|
|
387
387
|
n[t.v] = (n[t.v] || 0) + e.edge(t).weight;
|
|
388
388
|
}), n;
|
|
389
389
|
});
|
|
390
|
-
return
|
|
390
|
+
return G(e.nodes(), t);
|
|
391
391
|
}
|
|
392
|
-
function
|
|
392
|
+
function Ke(e, t) {
|
|
393
393
|
let n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
|
|
394
394
|
if (!i && !a) throw Error("Not possible to find intersection inside of the rectangle");
|
|
395
395
|
let c, l;
|
|
@@ -398,25 +398,25 @@ function Ge(e, t) {
|
|
|
398
398
|
y: r + l
|
|
399
399
|
};
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
let t =
|
|
401
|
+
function qe(e) {
|
|
402
|
+
let t = rt(H(e) + 1).map(() => []);
|
|
403
403
|
return e.nodes().forEach((n) => {
|
|
404
404
|
let r = e.node(n), i = r.rank;
|
|
405
405
|
i !== void 0 && (t[i][r.order] = n);
|
|
406
406
|
}), t;
|
|
407
407
|
}
|
|
408
|
-
function
|
|
408
|
+
function Je(e) {
|
|
409
409
|
let t = e.nodes().map((t) => {
|
|
410
410
|
let n = e.node(t).rank;
|
|
411
411
|
return n === void 0 ? Number.MAX_VALUE : n;
|
|
412
|
-
}), n =
|
|
412
|
+
}), n = V(Math.min, t);
|
|
413
413
|
e.nodes().forEach((t) => {
|
|
414
414
|
let r = e.node(t);
|
|
415
415
|
Object.hasOwn(r, "rank") && (r.rank -= n);
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
|
-
function
|
|
419
|
-
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n =
|
|
418
|
+
function Ye(e) {
|
|
419
|
+
let t = e.nodes().map((t) => e.node(t).rank).filter((e) => e !== void 0), n = V(Math.min, t), r = [];
|
|
420
420
|
e.nodes().forEach((t) => {
|
|
421
421
|
let i = e.node(t).rank - n;
|
|
422
422
|
r[i] || (r[i] = []), r[i].push(t);
|
|
@@ -428,15 +428,15 @@ function Je(e) {
|
|
|
428
428
|
});
|
|
429
429
|
});
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function B(e, t, n, r) {
|
|
432
432
|
let i = {
|
|
433
433
|
width: 0,
|
|
434
434
|
height: 0
|
|
435
435
|
};
|
|
436
|
-
return arguments.length >= 4 && (i.rank = n, i.order = r),
|
|
436
|
+
return arguments.length >= 4 && (i.rank = n, i.order = r), R(e, "border", i, t);
|
|
437
437
|
}
|
|
438
|
-
var
|
|
439
|
-
function
|
|
438
|
+
var Xe = 65535;
|
|
439
|
+
function Ze(e, t = Xe) {
|
|
440
440
|
let n = [];
|
|
441
441
|
for (let r = 0; r < e.length; r += t) {
|
|
442
442
|
let i = e.slice(r, r + t);
|
|
@@ -444,21 +444,21 @@ function Xe(e, t = Ye) {
|
|
|
444
444
|
}
|
|
445
445
|
return n;
|
|
446
446
|
}
|
|
447
|
-
function
|
|
448
|
-
if (t.length >
|
|
449
|
-
let n =
|
|
447
|
+
function V(e, t) {
|
|
448
|
+
if (t.length > Xe) {
|
|
449
|
+
let n = Ze(t);
|
|
450
450
|
return e.apply(null, n.map((t) => e.apply(null, t)));
|
|
451
451
|
}
|
|
452
452
|
return e.apply(null, t);
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function H(e) {
|
|
455
455
|
let t = e.nodes().map((t) => {
|
|
456
456
|
let n = e.node(t).rank;
|
|
457
457
|
return n === void 0 ? Number.MIN_VALUE : n;
|
|
458
458
|
});
|
|
459
|
-
return
|
|
459
|
+
return V(Math.max, t);
|
|
460
460
|
}
|
|
461
|
-
function
|
|
461
|
+
function Qe(e, t) {
|
|
462
462
|
let n = {
|
|
463
463
|
lhs: [],
|
|
464
464
|
rhs: []
|
|
@@ -467,7 +467,7 @@ function Ze(e, t) {
|
|
|
467
467
|
t(e) ? n.lhs.push(e) : n.rhs.push(e);
|
|
468
468
|
}), n;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function $e(e, t) {
|
|
471
471
|
let n = Date.now();
|
|
472
472
|
try {
|
|
473
473
|
return t();
|
|
@@ -475,15 +475,15 @@ function Qe(e, t) {
|
|
|
475
475
|
console.log(e + " time: " + (Date.now() - n) + "ms");
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function et(e, t) {
|
|
479
479
|
return t();
|
|
480
480
|
}
|
|
481
|
-
var
|
|
482
|
-
function
|
|
483
|
-
let t = ++
|
|
481
|
+
var tt = 0;
|
|
482
|
+
function nt(e) {
|
|
483
|
+
let t = ++tt;
|
|
484
484
|
return e + String(t);
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function rt(e, t, n = 1) {
|
|
487
487
|
t ?? (t = e, e = 0);
|
|
488
488
|
let r = (e) => e < t;
|
|
489
489
|
n < 0 && (r = (e) => t < e);
|
|
@@ -491,12 +491,12 @@ function nt(e, t, n = 1) {
|
|
|
491
491
|
for (let t = e; r(t); t += n) i.push(t);
|
|
492
492
|
return i;
|
|
493
493
|
}
|
|
494
|
-
function
|
|
494
|
+
function U(e, t) {
|
|
495
495
|
let n = {};
|
|
496
496
|
for (let r of t) e[r] !== void 0 && (n[r] = e[r]);
|
|
497
497
|
return n;
|
|
498
498
|
}
|
|
499
|
-
function
|
|
499
|
+
function W(e, t) {
|
|
500
500
|
let n = t;
|
|
501
501
|
if (typeof t == "string") {
|
|
502
502
|
let e = t;
|
|
@@ -504,43 +504,43 @@ function U(e, t) {
|
|
|
504
504
|
}
|
|
505
505
|
return Object.entries(e).reduce((e, [t, r]) => (e[t] = n(r, t), e), {});
|
|
506
506
|
}
|
|
507
|
-
function
|
|
507
|
+
function G(e, t) {
|
|
508
508
|
return e.reduce((e, n, r) => (e[n] = t[r], e), {});
|
|
509
509
|
}
|
|
510
|
-
var
|
|
511
|
-
addBorderNode:
|
|
512
|
-
addDummyNode:
|
|
513
|
-
applyWithChunking:
|
|
514
|
-
asNonCompoundGraph:
|
|
515
|
-
buildLayerMatrix:
|
|
516
|
-
intersectRect:
|
|
517
|
-
mapValues:
|
|
518
|
-
maxRank:
|
|
519
|
-
normalizeRanks:
|
|
520
|
-
notime:
|
|
521
|
-
partition:
|
|
522
|
-
pick:
|
|
523
|
-
predecessorWeights:
|
|
524
|
-
range:
|
|
525
|
-
removeEmptyRanks:
|
|
526
|
-
simplify:
|
|
527
|
-
successorWeights:
|
|
528
|
-
time:
|
|
529
|
-
uniqueId:
|
|
530
|
-
zipObject:
|
|
510
|
+
var it = {
|
|
511
|
+
addBorderNode: B,
|
|
512
|
+
addDummyNode: R,
|
|
513
|
+
applyWithChunking: V,
|
|
514
|
+
asNonCompoundGraph: We,
|
|
515
|
+
buildLayerMatrix: qe,
|
|
516
|
+
intersectRect: Ke,
|
|
517
|
+
mapValues: W,
|
|
518
|
+
maxRank: H,
|
|
519
|
+
normalizeRanks: Je,
|
|
520
|
+
notime: et,
|
|
521
|
+
partition: Qe,
|
|
522
|
+
pick: U,
|
|
523
|
+
predecessorWeights: z,
|
|
524
|
+
range: rt,
|
|
525
|
+
removeEmptyRanks: Ye,
|
|
526
|
+
simplify: Ue,
|
|
527
|
+
successorWeights: Ge,
|
|
528
|
+
time: $e,
|
|
529
|
+
uniqueId: nt,
|
|
530
|
+
zipObject: G
|
|
531
531
|
};
|
|
532
532
|
//#endregion
|
|
533
533
|
//#region src/DAG/acyclic.js
|
|
534
|
-
function
|
|
535
|
-
(e.graph().acyclicer === "greedy" ?
|
|
534
|
+
function at(e) {
|
|
535
|
+
(e.graph().acyclicer === "greedy" ? Be(e, t(e)) : K(e)).forEach((t) => {
|
|
536
536
|
let n = e.edge(t);
|
|
537
|
-
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n,
|
|
537
|
+
e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n, nt("rev"));
|
|
538
538
|
});
|
|
539
539
|
function t(e) {
|
|
540
540
|
return (t) => e.edge(t).weight;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function ot(e) {
|
|
544
544
|
e.edges().forEach((t) => {
|
|
545
545
|
let n = e.edge(t);
|
|
546
546
|
if (n.reversed) {
|
|
@@ -550,7 +550,7 @@ function at(e) {
|
|
|
550
550
|
}
|
|
551
551
|
});
|
|
552
552
|
}
|
|
553
|
-
function
|
|
553
|
+
function K(e) {
|
|
554
554
|
let t = [], n = {}, r = {};
|
|
555
555
|
function i(a) {
|
|
556
556
|
Object.hasOwn(r, a) || (r[a] = !0, n[a] = !0, e.outEdges(a).forEach((e) => {
|
|
@@ -561,10 +561,10 @@ function G(e) {
|
|
|
561
561
|
}
|
|
562
562
|
//#endregion
|
|
563
563
|
//#region src/DAG/normalize.js
|
|
564
|
-
function
|
|
565
|
-
e.graph().dummyChains = [], e.edges().forEach((t) =>
|
|
564
|
+
function st(e) {
|
|
565
|
+
e.graph().dummyChains = [], e.edges().forEach((t) => ct(e, t));
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function ct(e, t) {
|
|
568
568
|
let n = t.v, r = e.node(n).rank, i = t.w, a = e.node(i).rank, o = t.name, s = e.edge(t), c = s.labelRank;
|
|
569
569
|
if (a === r + 1) return;
|
|
570
570
|
e.removeEdge(t);
|
|
@@ -575,10 +575,10 @@ function st(e, t) {
|
|
|
575
575
|
edgeLabel: s,
|
|
576
576
|
edgeObj: t,
|
|
577
577
|
rank: r
|
|
578
|
-
}, l =
|
|
578
|
+
}, l = R(e, "edge", u, "_d"), r === c && (u.width = s.width, u.height = s.height, u.dummy = "edge-label", u.labelpos = s.labelpos), e.setEdge(n, l, { weight: s.weight }, o), d === 0 && e.graph().dummyChains.push(l), n = l;
|
|
579
579
|
e.setEdge(n, i, { weight: s.weight }, o);
|
|
580
580
|
}
|
|
581
|
-
function
|
|
581
|
+
function lt(e) {
|
|
582
582
|
e.graph().dummyChains.forEach((t) => {
|
|
583
583
|
let n = e.node(t), r = n.edgeLabel;
|
|
584
584
|
e.setEdge(n.edgeObj, r);
|
|
@@ -591,25 +591,25 @@ function ct(e) {
|
|
|
591
591
|
}
|
|
592
592
|
//#endregion
|
|
593
593
|
//#region src/DAG/rank/util.js
|
|
594
|
-
function
|
|
594
|
+
function ut(e) {
|
|
595
595
|
function t(n) {
|
|
596
596
|
let r = e.node(n);
|
|
597
597
|
if (r && Object.prototype.hasOwnProperty.call(r, "rank")) return r.rank;
|
|
598
598
|
let i = e.outEdges(n) || [];
|
|
599
599
|
if (!i.length) return r && (r.rank = 0), 0;
|
|
600
|
-
let a = i.map((n) => e.node(n.w) ? t(n.w) - e.edge(n).minlen : Infinity), o =
|
|
600
|
+
let a = i.map((n) => e.node(n.w) ? t(n.w) - e.edge(n).minlen : Infinity), o = V(Math.min, a);
|
|
601
601
|
return o === Infinity && (o = 0), r && (r.rank = o), o;
|
|
602
602
|
}
|
|
603
603
|
(e.sources() || []).forEach(t);
|
|
604
604
|
}
|
|
605
|
-
function
|
|
605
|
+
function dt(e, t) {
|
|
606
606
|
return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
|
|
607
607
|
}
|
|
608
608
|
//#endregion
|
|
609
609
|
//#region src/DAG/rank/feasible-tree.js
|
|
610
|
-
function
|
|
611
|
-
|
|
612
|
-
let t = new
|
|
610
|
+
function ft(e) {
|
|
611
|
+
pt(e);
|
|
612
|
+
let t = new A();
|
|
613
613
|
e.nodes().forEach((e) => {
|
|
614
614
|
t.setNode(e, {});
|
|
615
615
|
});
|
|
@@ -617,29 +617,29 @@ function dt(e) {
|
|
|
617
617
|
if (!n.length) return t;
|
|
618
618
|
let r = n[0], i = /* @__PURE__ */ new Set([r]);
|
|
619
619
|
for (; i.size < n.length;) {
|
|
620
|
-
let r =
|
|
620
|
+
let r = mt(e, i);
|
|
621
621
|
if (!r) {
|
|
622
622
|
let e = n.find((e) => !i.has(e));
|
|
623
623
|
i.add(e), t.setNode(e, {});
|
|
624
624
|
continue;
|
|
625
625
|
}
|
|
626
626
|
let { edgeObject: a, delta: o, attachFrom: s, attachTo: c } = r;
|
|
627
|
-
|
|
627
|
+
ht(e, i, s, o), t.setEdge(a.v, a.w, {}), i.add(c);
|
|
628
628
|
}
|
|
629
629
|
return t;
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function pt(e) {
|
|
632
632
|
e.nodes().forEach((t) => {
|
|
633
633
|
let n = e.node(t) || {};
|
|
634
634
|
Object.prototype.hasOwnProperty.call(n, "rank") || (n.rank = 0, e.setNode(t, n));
|
|
635
635
|
});
|
|
636
636
|
}
|
|
637
|
-
function
|
|
637
|
+
function mt(e, t) {
|
|
638
638
|
let n = null;
|
|
639
639
|
return e.edges().forEach((r) => {
|
|
640
640
|
let i = t.has(r.v);
|
|
641
641
|
if (i === t.has(r.w)) return;
|
|
642
|
-
let a =
|
|
642
|
+
let a = dt(e, r), o = Math.abs(a);
|
|
643
643
|
if (!n || o < n.absoluteSlack) {
|
|
644
644
|
let e = i ? r.v : r.w, t = i ? r.w : r.v;
|
|
645
645
|
n = {
|
|
@@ -652,7 +652,7 @@ function pt(e, t) {
|
|
|
652
652
|
}
|
|
653
653
|
}), n;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
655
|
+
function ht(e, t, n, r) {
|
|
656
656
|
r && e.nodes().forEach((n) => {
|
|
657
657
|
if (!t.has(n)) {
|
|
658
658
|
let t = e.node(n);
|
|
@@ -662,58 +662,58 @@ function mt(e, t, n, r) {
|
|
|
662
662
|
}
|
|
663
663
|
//#endregion
|
|
664
664
|
//#region src/DAG/rank/network-simplex.js
|
|
665
|
-
function
|
|
666
|
-
let t =
|
|
667
|
-
return
|
|
665
|
+
function gt(e) {
|
|
666
|
+
let t = Ue(e);
|
|
667
|
+
return ut(t), t.nodes().forEach((n) => {
|
|
668
668
|
let r = t.node(n), i = e.node(n) || {};
|
|
669
669
|
i.rank = r.rank, e.setNode(n, i);
|
|
670
670
|
}), e;
|
|
671
671
|
}
|
|
672
|
-
function gt(e, t) {}
|
|
673
672
|
function _t(e, t) {}
|
|
674
|
-
function vt(e, t
|
|
673
|
+
function vt(e, t) {}
|
|
674
|
+
function yt(e, t, n) {
|
|
675
675
|
return 0;
|
|
676
676
|
}
|
|
677
|
-
function
|
|
677
|
+
function bt(e) {
|
|
678
678
|
return null;
|
|
679
679
|
}
|
|
680
|
-
function
|
|
680
|
+
function xt(e, t) {
|
|
681
681
|
return null;
|
|
682
682
|
}
|
|
683
|
-
|
|
683
|
+
gt.initLowLimValues = _t, gt.initCutValues = vt, gt.calcCutValue = yt, gt.leaveEdge = bt, gt.enterEdge = xt;
|
|
684
684
|
//#endregion
|
|
685
685
|
//#region src/DAG/rank/index.js
|
|
686
|
-
var
|
|
687
|
-
function
|
|
686
|
+
var St = ut;
|
|
687
|
+
function Ct(e) {
|
|
688
688
|
let t = e.graph().ranker;
|
|
689
689
|
if (t instanceof Function) return t(e);
|
|
690
690
|
switch (e.graph().ranker) {
|
|
691
691
|
case "network-simplex":
|
|
692
|
-
|
|
692
|
+
q(e);
|
|
693
693
|
break;
|
|
694
694
|
case "tight-tree":
|
|
695
|
-
|
|
695
|
+
Tt(e);
|
|
696
696
|
break;
|
|
697
697
|
case "longest-path":
|
|
698
|
-
|
|
698
|
+
wt(e);
|
|
699
699
|
break;
|
|
700
700
|
case "none": break;
|
|
701
|
-
default:
|
|
701
|
+
default: q(e);
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
|
-
var
|
|
705
|
-
function
|
|
706
|
-
|
|
704
|
+
var wt = St;
|
|
705
|
+
function Tt(e) {
|
|
706
|
+
St(e), ft(e);
|
|
707
707
|
}
|
|
708
|
-
function
|
|
709
|
-
|
|
708
|
+
function q(e) {
|
|
709
|
+
gt(e);
|
|
710
710
|
}
|
|
711
711
|
//#endregion
|
|
712
712
|
//#region src/DAG/parent-dummy-chains.js
|
|
713
|
-
function
|
|
714
|
-
let t =
|
|
713
|
+
function Et(e) {
|
|
714
|
+
let t = J(e);
|
|
715
715
|
e.graph().dummyChains.forEach((n) => {
|
|
716
|
-
let r = e.node(n), i = r.edgeObj, a =
|
|
716
|
+
let r = e.node(n), i = r.edgeObj, a = Dt(e, t, i.v, i.w), o = a.path, s = a.lca, c = 0, l = o[c], u = !0, d = n;
|
|
717
717
|
for (; d !== i.w;) {
|
|
718
718
|
if (r = e.node(d), u) {
|
|
719
719
|
for (; (l = o[c]) !== s && e.node(l).maxRank < r.rank;) c++;
|
|
@@ -727,7 +727,7 @@ function Tt(e) {
|
|
|
727
727
|
}
|
|
728
728
|
});
|
|
729
729
|
}
|
|
730
|
-
function
|
|
730
|
+
function Dt(e, t, n, r) {
|
|
731
731
|
let i = [], a = [], o = Math.min(t[n].low, t[r].low), s = Math.max(t[n].lim, t[r].lim), c, l;
|
|
732
732
|
c = n;
|
|
733
733
|
do
|
|
@@ -739,7 +739,7 @@ function Et(e, t, n, r) {
|
|
|
739
739
|
lca: l
|
|
740
740
|
};
|
|
741
741
|
}
|
|
742
|
-
function
|
|
742
|
+
function J(e) {
|
|
743
743
|
let t = {}, n = 0;
|
|
744
744
|
function r(i) {
|
|
745
745
|
let a = n;
|
|
@@ -752,17 +752,17 @@ function q(e) {
|
|
|
752
752
|
}
|
|
753
753
|
//#endregion
|
|
754
754
|
//#region src/DAG/nested-graph.js
|
|
755
|
-
function
|
|
756
|
-
let t =
|
|
755
|
+
function Ot(e) {
|
|
756
|
+
let t = it.addDummyNode(e, "root", {}, "_root"), n = Y(e), r = Object.values(n), i = it.applyWithChunking(Math.max, r) - 1, a = 2 * i + 1;
|
|
757
757
|
e.graph().nestingRoot = t, e.edges().forEach((t) => {
|
|
758
758
|
e.edge(t).minlen *= a;
|
|
759
759
|
});
|
|
760
760
|
let o = At(e) + 1;
|
|
761
761
|
e.children().forEach((r) => {
|
|
762
|
-
|
|
762
|
+
kt(e, t, a, o, i, n, r);
|
|
763
763
|
}), e.graph().nodeRankFactor = a;
|
|
764
764
|
}
|
|
765
|
-
function
|
|
765
|
+
function kt(e, t, n, r, i, a, o) {
|
|
766
766
|
let s = e.children(o);
|
|
767
767
|
if (!s.length) {
|
|
768
768
|
o !== t && e.setEdge(t, o, {
|
|
@@ -771,9 +771,9 @@ function Ot(e, t, n, r, i, a, o) {
|
|
|
771
771
|
});
|
|
772
772
|
return;
|
|
773
773
|
}
|
|
774
|
-
let c =
|
|
774
|
+
let c = it.addBorderNode(e, "_bt"), l = it.addBorderNode(e, "_bb"), u = e.node(o);
|
|
775
775
|
e.setParent(c, o), u.borderTop = c, e.setParent(l, o), u.borderBottom = l, s.forEach((s) => {
|
|
776
|
-
|
|
776
|
+
kt(e, t, n, r, i, a, s);
|
|
777
777
|
let u = e.node(s), d = u.borderTop ? u.borderTop : s, f = u.borderBottom ? u.borderBottom : s, p = u.borderTop ? r : 2 * r, m = d === f ? i - a[o] + 1 : 1;
|
|
778
778
|
e.setEdge(c, d, {
|
|
779
779
|
weight: p,
|
|
@@ -789,7 +789,7 @@ function Ot(e, t, n, r, i, a, o) {
|
|
|
789
789
|
minlen: i + a[o]
|
|
790
790
|
});
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function Y(e) {
|
|
793
793
|
let t = {};
|
|
794
794
|
function n(r, i) {
|
|
795
795
|
let a = e.children(r);
|
|
@@ -824,7 +824,7 @@ function Nt(e, t, n, r, i, a) {
|
|
|
824
824
|
height: 0,
|
|
825
825
|
rank: a,
|
|
826
826
|
borderType: t
|
|
827
|
-
}, s = i[t][a - 1], c =
|
|
827
|
+
}, s = i[t][a - 1], c = R(e, "border", o, n);
|
|
828
828
|
i[t][a] = c, e.setParent(c, r), s && e.setEdge(s, c, { weight: 1 });
|
|
829
829
|
}
|
|
830
830
|
//#endregion
|
|
@@ -835,28 +835,28 @@ function Pt(e) {
|
|
|
835
835
|
}
|
|
836
836
|
function Ft(e) {
|
|
837
837
|
let t = e.graph().rankdir.toLowerCase();
|
|
838
|
-
(t === "bt" || t === "rl") &&
|
|
838
|
+
(t === "bt" || t === "rl") && Rt(e), (t === "lr" || t === "rl") && (zt(e), It(e));
|
|
839
839
|
}
|
|
840
840
|
function It(e) {
|
|
841
841
|
e.nodes().forEach((t) => {
|
|
842
|
-
|
|
842
|
+
Lt(e.node(t));
|
|
843
843
|
}), e.edges().forEach((t) => {
|
|
844
|
-
|
|
844
|
+
Lt(e.edge(t));
|
|
845
845
|
});
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Lt(e) {
|
|
848
848
|
let t = e.width;
|
|
849
849
|
e.width = e.height, e.height = t;
|
|
850
850
|
}
|
|
851
|
-
function
|
|
851
|
+
function Rt(e) {
|
|
852
852
|
e.nodes().forEach((t) => {
|
|
853
|
-
|
|
853
|
+
X(e.node(t));
|
|
854
854
|
}), e.edges().forEach((t) => {
|
|
855
855
|
let n = e.edge(t);
|
|
856
|
-
n.points.forEach(
|
|
856
|
+
n.points.forEach(X), Object.hasOwn(n, "y") && X(n);
|
|
857
857
|
});
|
|
858
858
|
}
|
|
859
|
-
function
|
|
859
|
+
function X(e) {
|
|
860
860
|
e.y = -e.y;
|
|
861
861
|
}
|
|
862
862
|
function zt(e) {
|
|
@@ -878,7 +878,7 @@ var Vt = {
|
|
|
878
878
|
//#endregion
|
|
879
879
|
//#region src/DAG/order/init-order.js
|
|
880
880
|
function Ht(e) {
|
|
881
|
-
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i =
|
|
881
|
+
let t = {}, n = e.nodes().filter((t) => e.children(t).length === 0), r = n.map((t) => e.node(t).rank), i = rt(V(Math.max, r) + 1).map(() => []);
|
|
882
882
|
function a(n) {
|
|
883
883
|
if (t[n]) return;
|
|
884
884
|
t[n] = !0;
|
|
@@ -895,7 +895,7 @@ function Ut(e, t) {
|
|
|
895
895
|
return n;
|
|
896
896
|
}
|
|
897
897
|
function Wt(e, t, n) {
|
|
898
|
-
let r =
|
|
898
|
+
let r = G(n, n.map((e, t) => t)), i = t.flatMap((t) => e.outEdges(t).map((t) => ({
|
|
899
899
|
pos: r[t.w],
|
|
900
900
|
weight: e.edge(t).weight
|
|
901
901
|
})).sort((e, t) => e.pos - t.pos)), a = 1;
|
|
@@ -913,7 +913,7 @@ function Wt(e, t, n) {
|
|
|
913
913
|
}
|
|
914
914
|
//#endregion
|
|
915
915
|
//#region src/DAG/order/barycenter.js
|
|
916
|
-
function
|
|
916
|
+
function Gt(e, t = []) {
|
|
917
917
|
return t.map((t) => {
|
|
918
918
|
let n = e.inEdges(t);
|
|
919
919
|
if (!n.length) return { v: t };
|
|
@@ -936,7 +936,7 @@ function Y(e, t = []) {
|
|
|
936
936
|
}
|
|
937
937
|
//#endregion
|
|
938
938
|
//#region src/DAG/order/resolve-conflicts.js
|
|
939
|
-
function
|
|
939
|
+
function Kt(e, t) {
|
|
940
940
|
let n = {};
|
|
941
941
|
return e.forEach((e, t) => {
|
|
942
942
|
let r = n[e.v] = {
|
|
@@ -950,13 +950,13 @@ function Gt(e, t) {
|
|
|
950
950
|
}), t.edges().forEach((e) => {
|
|
951
951
|
let t = n[e.v], r = n[e.w];
|
|
952
952
|
t !== void 0 && r !== void 0 && (r.indegree++, t.out.push(r));
|
|
953
|
-
}),
|
|
953
|
+
}), Z(Object.values(n).filter((e) => !e.indegree));
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Z(e) {
|
|
956
956
|
let t = [];
|
|
957
957
|
function n(e) {
|
|
958
958
|
return (t) => {
|
|
959
|
-
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) &&
|
|
959
|
+
t.merged || (t.barycenter === void 0 || e.barycenter === void 0 || t.barycenter >= e.barycenter) && qt(e, t);
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
962
|
function r(t) {
|
|
@@ -968,21 +968,21 @@ function X(e) {
|
|
|
968
968
|
let i = e.pop();
|
|
969
969
|
t.push(i), i.in.reverse().forEach(n(i)), i.out.forEach(r(i));
|
|
970
970
|
}
|
|
971
|
-
return t.filter((e) => !e.merged).map((e) =>
|
|
971
|
+
return t.filter((e) => !e.merged).map((e) => U(e, [
|
|
972
972
|
"vs",
|
|
973
973
|
"i",
|
|
974
974
|
"barycenter",
|
|
975
975
|
"weight"
|
|
976
976
|
]));
|
|
977
977
|
}
|
|
978
|
-
function
|
|
978
|
+
function qt(e, t) {
|
|
979
979
|
let n = 0, r = 0;
|
|
980
980
|
e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
|
|
981
981
|
}
|
|
982
982
|
//#endregion
|
|
983
983
|
//#region src/DAG/order/sort.js
|
|
984
|
-
function
|
|
985
|
-
let n =
|
|
984
|
+
function Q(e, t) {
|
|
985
|
+
let n = Qe(e, (e) => Object.hasOwn(e, "barycenter")), r = n.lhs, i = n.rhs.sort((e, t) => t.i - e.i), a = [], o = 0, s = 0, c = 0;
|
|
986
986
|
r.sort(Yt(!!t)), c = Jt(a, i, c), r.forEach((e) => {
|
|
987
987
|
c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c = Jt(a, i, c);
|
|
988
988
|
});
|
|
@@ -1002,16 +1002,16 @@ function Yt(e) {
|
|
|
1002
1002
|
function Xt(e, t, n, r) {
|
|
1003
1003
|
let i = e.children(t), a = e.node(t), o = a ? a.borderLeft : void 0, s = a ? a.borderRight : void 0, c = {};
|
|
1004
1004
|
o && (i = i.filter((e) => e !== o && e !== s));
|
|
1005
|
-
let l =
|
|
1005
|
+
let l = Gt(e, i);
|
|
1006
1006
|
l.forEach((t) => {
|
|
1007
1007
|
if (e.children(t.v).length) {
|
|
1008
1008
|
let i = Xt(e, t.v, n, r);
|
|
1009
1009
|
c[t.v] = i, Object.hasOwn(i, "barycenter") && Qt(t, i);
|
|
1010
1010
|
}
|
|
1011
1011
|
});
|
|
1012
|
-
let u =
|
|
1012
|
+
let u = Kt(l, n);
|
|
1013
1013
|
Zt(u, c);
|
|
1014
|
-
let d =
|
|
1014
|
+
let d = Q(u, r);
|
|
1015
1015
|
if (o && (d.vs = [
|
|
1016
1016
|
o,
|
|
1017
1017
|
d.vs,
|
|
@@ -1034,7 +1034,7 @@ function Qt(e, t) {
|
|
|
1034
1034
|
//#region src/DAG/order/build-layer-graph.js
|
|
1035
1035
|
function $t(e, t, n, r) {
|
|
1036
1036
|
r ||= e.nodes();
|
|
1037
|
-
let i = en(e), a = new
|
|
1037
|
+
let i = en(e), a = new A({ compound: !0 }).setGraph({ root: i }).setDefaultNodeLabel((t) => e.node(t));
|
|
1038
1038
|
return r.forEach((r) => {
|
|
1039
1039
|
let o = e.node(r), s = e.parent(r);
|
|
1040
1040
|
(o.rank === t || o.minRank <= t && t <= o.maxRank) && (a.setNode(r), a.setParent(r, s || i), e[n](r).forEach((t) => {
|
|
@@ -1048,7 +1048,7 @@ function $t(e, t, n, r) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
function en(e) {
|
|
1050
1050
|
let t;
|
|
1051
|
-
for (; e.hasNode(t =
|
|
1051
|
+
for (; e.hasNode(t = nt("_root")););
|
|
1052
1052
|
return t;
|
|
1053
1053
|
}
|
|
1054
1054
|
//#endregion
|
|
@@ -1068,22 +1068,22 @@ function tn(e, t, n) {
|
|
|
1068
1068
|
}
|
|
1069
1069
|
//#endregion
|
|
1070
1070
|
//#region src/DAG/order/index.js
|
|
1071
|
-
function
|
|
1071
|
+
function nn(e, t = {}) {
|
|
1072
1072
|
if (typeof t.customOrder == "function") {
|
|
1073
|
-
t.customOrder(e,
|
|
1073
|
+
t.customOrder(e, nn);
|
|
1074
1074
|
return;
|
|
1075
1075
|
}
|
|
1076
|
-
let n =
|
|
1077
|
-
if (
|
|
1076
|
+
let n = H(e), r = rn(e, rt(1, n + 1), "inEdges"), i = rn(e, rt(n - 1, -1, -1), "outEdges"), a = Ht(e);
|
|
1077
|
+
if (on(e, a), t.disableOptimalOrderHeuristic) return;
|
|
1078
1078
|
let o = Infinity, s, c = t.constraints || [];
|
|
1079
1079
|
for (let t = 0, n = 0; n < 4; ++t, ++n) {
|
|
1080
|
-
|
|
1080
|
+
an(t % 2 == 0 ? r : i, t % 4 >= 2, c), a = qe(e);
|
|
1081
1081
|
let l = Ut(e, a);
|
|
1082
1082
|
l < o ? (o = l, n = 0, s = structuredClone(a)) : l === o && (s = structuredClone(a));
|
|
1083
1083
|
}
|
|
1084
|
-
|
|
1084
|
+
on(e, s);
|
|
1085
1085
|
}
|
|
1086
|
-
function
|
|
1086
|
+
function rn(e, t, n) {
|
|
1087
1087
|
let r = /* @__PURE__ */ new Map();
|
|
1088
1088
|
function i(e, t) {
|
|
1089
1089
|
r.has(e) || r.set(e, []), r.get(e).push(t);
|
|
@@ -1094,8 +1094,8 @@ function nn(e, t, n) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return t.map((t) => $t(e, t, n, r.get(t) || []));
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1098
|
-
let r = new
|
|
1097
|
+
function an(e, t, n) {
|
|
1098
|
+
let r = new A();
|
|
1099
1099
|
e.forEach((e) => {
|
|
1100
1100
|
n.forEach((e) => r.setEdge(e.left, e.right));
|
|
1101
1101
|
let i = e.graph().root, a = Xt(e, i, r, t);
|
|
@@ -1104,7 +1104,7 @@ function rn(e, t, n) {
|
|
|
1104
1104
|
}), tn(e, r, a.vs);
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
|
-
function
|
|
1107
|
+
function on(e, t) {
|
|
1108
1108
|
Object.values(t).forEach((t) => {
|
|
1109
1109
|
t.forEach((t, n) => {
|
|
1110
1110
|
e.node(t).order = n;
|
|
@@ -1113,30 +1113,30 @@ function an(e, t) {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/DAG/position/bk.js
|
|
1116
|
-
function
|
|
1116
|
+
function sn(e, t) {
|
|
1117
1117
|
let n = {};
|
|
1118
1118
|
function r(t, r) {
|
|
1119
1119
|
let i = 0, a = 0, o = t.length, s = r[r.length - 1];
|
|
1120
1120
|
return r.forEach((t, c) => {
|
|
1121
|
-
let l =
|
|
1121
|
+
let l = $(e, t), u = l ? e.node(l).order : o;
|
|
1122
1122
|
(l || t === s) && (r.slice(a, c + 1).forEach((t) => {
|
|
1123
1123
|
e.predecessors(t).forEach((r) => {
|
|
1124
1124
|
let a = e.node(r), o = a.order;
|
|
1125
|
-
(o < i || u < o) && !(a.dummy && e.node(t).dummy) &&
|
|
1125
|
+
(o < i || u < o) && !(a.dummy && e.node(t).dummy) && ln(n, r, t);
|
|
1126
1126
|
});
|
|
1127
1127
|
}), a = c + 1, i = u);
|
|
1128
1128
|
}), r;
|
|
1129
1129
|
}
|
|
1130
1130
|
return t.length && t.reduce(r), n;
|
|
1131
1131
|
}
|
|
1132
|
-
function
|
|
1132
|
+
function cn(e, t) {
|
|
1133
1133
|
let n = {};
|
|
1134
1134
|
function r(t, r, i, a, o) {
|
|
1135
1135
|
let s;
|
|
1136
|
-
|
|
1136
|
+
rt(r, i).forEach((r) => {
|
|
1137
1137
|
s = t[r], e.node(s).dummy && e.predecessors(s).forEach((t) => {
|
|
1138
1138
|
let r = e.node(t);
|
|
1139
|
-
r.dummy && (r.order < a || r.order > o) &&
|
|
1139
|
+
r.dummy && (r.order < a || r.order > o) && ln(n, t, s);
|
|
1140
1140
|
});
|
|
1141
1141
|
});
|
|
1142
1142
|
}
|
|
@@ -1152,10 +1152,10 @@ function on(e, t) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
return t.length && t.reduce(i), n;
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1155
|
+
function $(e, t) {
|
|
1156
1156
|
if (e.node(t).dummy) return e.predecessors(t).find((t) => e.node(t).dummy);
|
|
1157
1157
|
}
|
|
1158
|
-
function
|
|
1158
|
+
function ln(e, t, n) {
|
|
1159
1159
|
if (t > n) {
|
|
1160
1160
|
let e = t;
|
|
1161
1161
|
t = n, n = e;
|
|
@@ -1163,14 +1163,14 @@ function cn(e, t, n) {
|
|
|
1163
1163
|
let r = e[t];
|
|
1164
1164
|
r || (e[t] = r = {}), r[n] = !0;
|
|
1165
1165
|
}
|
|
1166
|
-
function
|
|
1166
|
+
function un(e, t, n) {
|
|
1167
1167
|
if (t > n) {
|
|
1168
1168
|
let e = t;
|
|
1169
1169
|
t = n, n = e;
|
|
1170
1170
|
}
|
|
1171
1171
|
return !!e[t] && Object.hasOwn(e[t], n);
|
|
1172
1172
|
}
|
|
1173
|
-
function
|
|
1173
|
+
function dn(e, t, n, r) {
|
|
1174
1174
|
let i = {}, a = {}, o = {};
|
|
1175
1175
|
return t.forEach((e) => {
|
|
1176
1176
|
e.forEach((e, t) => {
|
|
@@ -1185,7 +1185,7 @@ function un(e, t, n, r) {
|
|
|
1185
1185
|
let r = (s.length - 1) / 2;
|
|
1186
1186
|
for (let c = Math.floor(r), l = Math.ceil(r); c <= l; ++c) {
|
|
1187
1187
|
let r = s[c];
|
|
1188
|
-
a[e] === e && t < o[r] && !
|
|
1188
|
+
a[e] === e && t < o[r] && !un(n, e, r) && (a[r] = e, a[e] = i[e] = i[r], t = o[r]);
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
1191
|
});
|
|
@@ -1194,8 +1194,8 @@ function un(e, t, n, r) {
|
|
|
1194
1194
|
align: a
|
|
1195
1195
|
};
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
let a = {}, o =
|
|
1197
|
+
function fn(e, t, n, r, i) {
|
|
1198
|
+
let a = {}, o = pn(e, t, n, i), s = i ? "borderLeft" : "borderRight";
|
|
1199
1199
|
function c(e, t) {
|
|
1200
1200
|
let n = o.nodes().slice(), r = {}, i = n.pop();
|
|
1201
1201
|
for (; i;) {
|
|
@@ -1218,8 +1218,8 @@ function dn(e, t, n, r, i) {
|
|
|
1218
1218
|
a[e] = a[n[e]];
|
|
1219
1219
|
}), a;
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
let i = new e.constructor(), a = e.graph(), o =
|
|
1221
|
+
function pn(e, t, n, r) {
|
|
1222
|
+
let i = new e.constructor(), a = e.graph(), o = vn(a.nodesep, a.edgesep, r);
|
|
1223
1223
|
return t.forEach((t) => {
|
|
1224
1224
|
let r;
|
|
1225
1225
|
t.forEach((t) => {
|
|
@@ -1232,47 +1232,47 @@ function fn(e, t, n, r) {
|
|
|
1232
1232
|
});
|
|
1233
1233
|
}), i;
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function mn(e, t) {
|
|
1236
1236
|
return Object.values(t).reduce((t, n) => {
|
|
1237
1237
|
let r = -Infinity, i = Infinity;
|
|
1238
1238
|
Object.entries(n).forEach(([t, n]) => {
|
|
1239
|
-
let a =
|
|
1239
|
+
let a = yn(e, t) / 2;
|
|
1240
1240
|
r = Math.max(n + a, r), i = Math.min(n - a, i);
|
|
1241
1241
|
});
|
|
1242
1242
|
let a = r - i;
|
|
1243
1243
|
return a < t[0] && (t = [a, n]), t;
|
|
1244
1244
|
}, [Infinity, null])[1];
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1247
|
-
let n = Object.values(t), r =
|
|
1246
|
+
function hn(e, t) {
|
|
1247
|
+
let n = Object.values(t), r = V(Math.min, n), i = V(Math.max, n);
|
|
1248
1248
|
["u", "d"].forEach((n) => {
|
|
1249
1249
|
["l", "r"].forEach((a) => {
|
|
1250
1250
|
let o = n + a, s = e[o];
|
|
1251
1251
|
if (s === t) return;
|
|
1252
|
-
let c = Object.values(s), l = r -
|
|
1253
|
-
a !== "l" && (l = i -
|
|
1252
|
+
let c = Object.values(s), l = r - V(Math.min, c);
|
|
1253
|
+
a !== "l" && (l = i - V(Math.max, c)), l && (s = W(s, (e) => e + l), e[o] = s);
|
|
1254
1254
|
});
|
|
1255
1255
|
});
|
|
1256
1256
|
}
|
|
1257
|
-
function
|
|
1258
|
-
return
|
|
1257
|
+
function gn(e, t) {
|
|
1258
|
+
return W(e.ul, (n, r) => {
|
|
1259
1259
|
if (t) return e[t.toLowerCase()][r];
|
|
1260
1260
|
let i = Object.values(e).map((e) => e[r]).sort((e, t) => e - t);
|
|
1261
1261
|
return (i[1] + i[2]) / 2;
|
|
1262
1262
|
});
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1265
|
-
let t =
|
|
1264
|
+
function _n(e) {
|
|
1265
|
+
let t = qe(e), n = Object.assign(sn(e, t), cn(e, t)), r = {}, i;
|
|
1266
1266
|
return ["u", "d"].forEach((a) => {
|
|
1267
1267
|
i = a === "u" ? t : Object.values(t).reverse(), ["l", "r"].forEach((t) => {
|
|
1268
1268
|
let o = i;
|
|
1269
1269
|
t === "r" && (o = o.map((e) => Object.values(e).reverse()));
|
|
1270
|
-
let s = (a === "u" ? e.predecessors : e.successors).bind(e), c =
|
|
1271
|
-
t === "r" && (l =
|
|
1270
|
+
let s = (a === "u" ? e.predecessors : e.successors).bind(e), c = dn(e, o, n, s), l = fn(e, o, c.root, c.align, t === "r");
|
|
1271
|
+
t === "r" && (l = W(l, (e) => -e)), r[a + t] = l;
|
|
1272
1272
|
});
|
|
1273
|
-
}),
|
|
1273
|
+
}), hn(r, mn(e, r)), gn(r, e.graph().align);
|
|
1274
1274
|
}
|
|
1275
|
-
function
|
|
1275
|
+
function vn(e, t, n) {
|
|
1276
1276
|
return (r, i, a) => {
|
|
1277
1277
|
let o = r.node(i), s = r.node(a), c = 0, l;
|
|
1278
1278
|
if (c += o.width / 2, Object.hasOwn(o, "labelpos")) switch (o.labelpos.toLowerCase()) {
|
|
@@ -1290,21 +1290,21 @@ function _n(e, t, n) {
|
|
|
1290
1290
|
return l && (c += n ? l : -l), l = 0, c;
|
|
1291
1291
|
};
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function yn(e, t) {
|
|
1294
1294
|
return e.node(t).width;
|
|
1295
1295
|
}
|
|
1296
1296
|
//#endregion
|
|
1297
1297
|
//#region src/DAG/position/index.js
|
|
1298
|
-
function
|
|
1299
|
-
let t =
|
|
1300
|
-
|
|
1301
|
-
let n =
|
|
1298
|
+
function bn(e) {
|
|
1299
|
+
let t = We(e);
|
|
1300
|
+
xn(t);
|
|
1301
|
+
let n = _n(t);
|
|
1302
1302
|
Object.entries(n).forEach(([t, n]) => {
|
|
1303
1303
|
e.node(t).x = n;
|
|
1304
1304
|
});
|
|
1305
1305
|
}
|
|
1306
|
-
function
|
|
1307
|
-
let t =
|
|
1306
|
+
function xn(e) {
|
|
1307
|
+
let t = qe(e), n = e.graph().ranksep, r = 0;
|
|
1308
1308
|
t.forEach((t) => {
|
|
1309
1309
|
let i = t.reduce((t, n) => {
|
|
1310
1310
|
let r = e.node(n).height;
|
|
@@ -1317,17 +1317,17 @@ function bn(e) {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
//#endregion
|
|
1319
1319
|
//#region src/DAG/layout.js
|
|
1320
|
-
function
|
|
1321
|
-
let n = t.debugTiming ?
|
|
1320
|
+
function Sn(e, t = {}) {
|
|
1321
|
+
let n = t.debugTiming ? $e : et;
|
|
1322
1322
|
return n("layout", () => {
|
|
1323
|
-
let r = n(" buildLayoutGraph", () =>
|
|
1324
|
-
return n(" runLayout", () =>
|
|
1323
|
+
let r = n(" buildLayoutGraph", () => Nn(e));
|
|
1324
|
+
return n(" runLayout", () => Cn(r, n, t)), n(" updateInputGraph", () => wn(e, r)), r;
|
|
1325
1325
|
});
|
|
1326
1326
|
}
|
|
1327
|
-
function
|
|
1328
|
-
t(" makeSpaceForEdgeLabels", () =>
|
|
1327
|
+
function Cn(e, t, n) {
|
|
1328
|
+
t(" makeSpaceForEdgeLabels", () => Pn(e)), t(" removeSelfEdges", () => Wn(e)), t(" acyclic", () => at(e)), t(" nestingGraph.run", () => Ot(e)), t(" rank", () => Ct(We(e))), t(" injectEdgeLabelProxies", () => Fn(e)), t(" removeEmptyRanks", () => Ye(e)), t(" nestingGraph.cleanup", () => jt(e)), t(" normalizeRanks", () => Je(e)), t(" assignRankMinMax", () => In(e)), t(" removeEdgeLabelProxies", () => Ln(e)), t(" normalize.run", () => st(e)), t(" parentDummyChains", () => Et(e)), t(" addBorderSegments", () => Mt(e)), t(" order", () => nn(e, n)), t(" insertSelfEdges", () => Gn(e)), t(" adjustCoordinateSystem", () => Vt.adjust(e)), t(" position", () => bn(e)), t(" positionSelfEdges", () => Kn(e)), t(" removeBorderNodes", () => Un(e)), t(" normalize.undo", () => lt(e)), t(" fixupEdgeLabelCoords", () => Vn(e)), t(" undoCoordinateSystem", () => Vt.undo(e)), t(" translateGraph", () => Rn(e)), t(" assignNodeIntersects", () => Bn(e)), t(" reversePoints", () => Hn(e)), t(" acyclic.undo", () => ot(e));
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function wn(e, t) {
|
|
1331
1331
|
e.nodes().forEach((n) => {
|
|
1332
1332
|
let r = e.node(n), i = t.node(n);
|
|
1333
1333
|
r && (r.x = i.x, r.y = i.y, r.order = i.order, r.rank = i.rank, t.children(n).length && (r.width = i.width, r.height = i.height));
|
|
@@ -1338,99 +1338,99 @@ function Sn(e, t) {
|
|
|
1338
1338
|
let n = t.graph(), r = e.graph();
|
|
1339
1339
|
r.width = n.width, r.height = n.height;
|
|
1340
1340
|
}
|
|
1341
|
-
var
|
|
1341
|
+
var Tn = [
|
|
1342
1342
|
"nodesep",
|
|
1343
1343
|
"edgesep",
|
|
1344
1344
|
"ranksep",
|
|
1345
1345
|
"marginx",
|
|
1346
1346
|
"marginy"
|
|
1347
|
-
],
|
|
1347
|
+
], En = {
|
|
1348
1348
|
ranksep: 50,
|
|
1349
1349
|
edgesep: 20,
|
|
1350
1350
|
nodesep: 50,
|
|
1351
1351
|
rankdir: "tb"
|
|
1352
|
-
},
|
|
1352
|
+
}, Dn = [
|
|
1353
1353
|
"acyclicer",
|
|
1354
1354
|
"ranker",
|
|
1355
1355
|
"rankdir",
|
|
1356
1356
|
"align"
|
|
1357
|
-
],
|
|
1357
|
+
], On = [
|
|
1358
1358
|
"width",
|
|
1359
1359
|
"height",
|
|
1360
1360
|
"rank"
|
|
1361
|
-
],
|
|
1361
|
+
], kn = {
|
|
1362
1362
|
width: 0,
|
|
1363
1363
|
height: 0
|
|
1364
|
-
},
|
|
1364
|
+
}, An = [
|
|
1365
1365
|
"minlen",
|
|
1366
1366
|
"weight",
|
|
1367
1367
|
"width",
|
|
1368
1368
|
"height",
|
|
1369
1369
|
"labeloffset"
|
|
1370
|
-
],
|
|
1370
|
+
], jn = {
|
|
1371
1371
|
minlen: 1,
|
|
1372
1372
|
weight: 1,
|
|
1373
1373
|
width: 0,
|
|
1374
1374
|
height: 0,
|
|
1375
1375
|
labeloffset: 10,
|
|
1376
1376
|
labelpos: "r"
|
|
1377
|
-
},
|
|
1378
|
-
function
|
|
1379
|
-
let t =
|
|
1380
|
-
...
|
|
1381
|
-
...
|
|
1382
|
-
...
|
|
1383
|
-
}, r = new
|
|
1377
|
+
}, Mn = ["labelpos", "arrowshape"];
|
|
1378
|
+
function Nn(e) {
|
|
1379
|
+
let t = Jn(e.graph()), n = {
|
|
1380
|
+
...En,
|
|
1381
|
+
...qn(t, Tn),
|
|
1382
|
+
...U(t, Dn)
|
|
1383
|
+
}, r = new A({
|
|
1384
1384
|
multigraph: !0,
|
|
1385
1385
|
compound: !0
|
|
1386
1386
|
});
|
|
1387
1387
|
return r.setGraph(n), e.nodes().forEach((t) => {
|
|
1388
|
-
let n =
|
|
1389
|
-
Object.keys(
|
|
1390
|
-
n[e] === void 0 && (n[e] =
|
|
1388
|
+
let n = qn(Jn(e.node(t)), On);
|
|
1389
|
+
Object.keys(kn).forEach((e) => {
|
|
1390
|
+
n[e] === void 0 && (n[e] = kn[e]);
|
|
1391
1391
|
}), r.setNode(t, n), r.setParent(t, e.parent(t));
|
|
1392
1392
|
}), e.edges().forEach((t) => {
|
|
1393
|
-
let n =
|
|
1393
|
+
let n = Jn(e.edge(t));
|
|
1394
1394
|
r.setEdge(t, {
|
|
1395
|
-
...
|
|
1396
|
-
...
|
|
1397
|
-
...
|
|
1395
|
+
...jn,
|
|
1396
|
+
...qn(n, An),
|
|
1397
|
+
...U(n, Mn)
|
|
1398
1398
|
});
|
|
1399
1399
|
}), r;
|
|
1400
1400
|
}
|
|
1401
|
-
function
|
|
1401
|
+
function Pn(e) {
|
|
1402
1402
|
let t = e.graph();
|
|
1403
1403
|
t.ranksep /= 2, e.edges().forEach((n) => {
|
|
1404
1404
|
let r = e.edge(n);
|
|
1405
1405
|
r.minlen *= 2, r.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? r.width += r.labeloffset : r.height += r.labeloffset);
|
|
1406
1406
|
});
|
|
1407
1407
|
}
|
|
1408
|
-
function
|
|
1408
|
+
function Fn(e) {
|
|
1409
1409
|
e.edges().forEach((t) => {
|
|
1410
1410
|
let n = e.edge(t);
|
|
1411
1411
|
if (n.width && n.height) {
|
|
1412
1412
|
let n = e.node(t.v);
|
|
1413
|
-
|
|
1413
|
+
R(e, "edge-proxy", {
|
|
1414
1414
|
rank: (e.node(t.w).rank - n.rank) / 2 + n.rank,
|
|
1415
1415
|
e: t
|
|
1416
1416
|
}, "_ep");
|
|
1417
1417
|
}
|
|
1418
1418
|
});
|
|
1419
1419
|
}
|
|
1420
|
-
function
|
|
1420
|
+
function In(e) {
|
|
1421
1421
|
let t = 0;
|
|
1422
1422
|
e.nodes().forEach((n) => {
|
|
1423
1423
|
let r = e.node(n);
|
|
1424
1424
|
r.borderTop && (r.minRank = e.node(r.borderTop).rank, r.maxRank = e.node(r.borderBottom).rank, t = Math.max(t, r.maxRank));
|
|
1425
1425
|
}), e.graph().maxRank = t;
|
|
1426
1426
|
}
|
|
1427
|
-
function
|
|
1427
|
+
function Ln(e) {
|
|
1428
1428
|
e.nodes().forEach((t) => {
|
|
1429
1429
|
let n = e.node(t);
|
|
1430
1430
|
n.dummy === "edge-proxy" && (e.edge(n.e).labelRank = n.rank, e.removeNode(t));
|
|
1431
1431
|
});
|
|
1432
1432
|
}
|
|
1433
|
-
function
|
|
1433
|
+
function Rn(e) {
|
|
1434
1434
|
let t = Infinity, n = 0, r = Infinity, i = 0, a = e.graph(), o = a.marginx || 0, s = a.marginy || 0;
|
|
1435
1435
|
function c(e) {
|
|
1436
1436
|
let a = e.x, o = e.y, s = e.width, c = e.height;
|
|
@@ -1449,7 +1449,7 @@ function In(e) {
|
|
|
1449
1449
|
}), Object.hasOwn(i, "x") && (i.x -= t), Object.hasOwn(i, "y") && (i.y -= r);
|
|
1450
1450
|
}), a.width = n - t + o, a.height = i - r + s;
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1452
|
+
function zn(e, t, n) {
|
|
1453
1453
|
if (!n || !t) return e;
|
|
1454
1454
|
let r = t.x - e.x, i = t.y - e.y, a = Math.sqrt(r * r + i * i);
|
|
1455
1455
|
if (!a || a <= n) return e;
|
|
@@ -1459,15 +1459,15 @@ function Ln(e, t, n) {
|
|
|
1459
1459
|
y: e.y + i * o
|
|
1460
1460
|
};
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function Bn(e) {
|
|
1463
1463
|
e.edges().forEach((t) => {
|
|
1464
1464
|
let n = e.edge(t), r = e.node(t.v), i = e.node(t.w), a, o;
|
|
1465
1465
|
!n.points || !n.points.length ? (n.points = [], a = i, o = r) : (a = n.points[0], o = n.points[n.points.length - 1]);
|
|
1466
|
-
let s =
|
|
1467
|
-
f && (p ? m =
|
|
1466
|
+
let s = Ke(r, a), c = Ke(i, o), l = n.points.length ? n.points[0] : a, u = n.points.length ? n.points[n.points.length - 1] : o, d = n.arrowshape, f = d === "normal" || d === "vee", p = !!n.reversed, m = s, h = c;
|
|
1467
|
+
f && (p ? m = zn(s, l, 4) : h = zn(c, u, 4)), n.points.unshift(m), n.points.push(h);
|
|
1468
1468
|
});
|
|
1469
1469
|
}
|
|
1470
|
-
function
|
|
1470
|
+
function Vn(e) {
|
|
1471
1471
|
e.edges().forEach((t) => {
|
|
1472
1472
|
let n = e.edge(t);
|
|
1473
1473
|
if (Object.hasOwn(n, "x")) switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
|
|
@@ -1478,13 +1478,13 @@ function zn(e) {
|
|
|
1478
1478
|
}
|
|
1479
1479
|
});
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1481
|
+
function Hn(e) {
|
|
1482
1482
|
e.edges().forEach((t) => {
|
|
1483
1483
|
let n = e.edge(t);
|
|
1484
1484
|
n.reversed && n.points.reverse();
|
|
1485
1485
|
});
|
|
1486
1486
|
}
|
|
1487
|
-
function
|
|
1487
|
+
function Un(e) {
|
|
1488
1488
|
e.nodes().forEach((t) => {
|
|
1489
1489
|
if (e.children(t).length) {
|
|
1490
1490
|
let n = e.node(t), r = e.node(n.borderTop), i = e.node(n.borderBottom), a = e.node(n.borderLeft[n.borderLeft.length - 1]), o = e.node(n.borderRight[n.borderRight.length - 1]);
|
|
@@ -1494,7 +1494,7 @@ function Vn(e) {
|
|
|
1494
1494
|
e.node(t).dummy === "border" && e.removeNode(t);
|
|
1495
1495
|
});
|
|
1496
1496
|
}
|
|
1497
|
-
function
|
|
1497
|
+
function Wn(e) {
|
|
1498
1498
|
e.edges().forEach((t) => {
|
|
1499
1499
|
if (t.v === t.w) {
|
|
1500
1500
|
let n = e.node(t.v);
|
|
@@ -1505,13 +1505,13 @@ function Hn(e) {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
});
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
1508
|
+
function Gn(e) {
|
|
1509
|
+
qe(e).forEach((t) => {
|
|
1510
1510
|
let n = 0;
|
|
1511
1511
|
t.forEach((t, r) => {
|
|
1512
1512
|
let i = e.node(t);
|
|
1513
1513
|
i.order = r + n, (i.selfEdges || []).forEach((t) => {
|
|
1514
|
-
|
|
1514
|
+
R(e, "selfedge", {
|
|
1515
1515
|
width: t.label.width,
|
|
1516
1516
|
height: t.label.height,
|
|
1517
1517
|
rank: i.rank,
|
|
@@ -1523,7 +1523,7 @@ function Un(e) {
|
|
|
1523
1523
|
});
|
|
1524
1524
|
});
|
|
1525
1525
|
}
|
|
1526
|
-
function
|
|
1526
|
+
function Kn(e) {
|
|
1527
1527
|
e.nodes().forEach((t) => {
|
|
1528
1528
|
let n = e.node(t);
|
|
1529
1529
|
if (n.dummy === "selfedge") {
|
|
@@ -1553,10 +1553,10 @@ function Wn(e) {
|
|
|
1553
1553
|
}
|
|
1554
1554
|
});
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1557
|
-
return U(
|
|
1556
|
+
function qn(e, t) {
|
|
1557
|
+
return W(U(e, t), Number);
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function Jn(e) {
|
|
1560
1560
|
let t = {};
|
|
1561
1561
|
return e && Object.entries(e).forEach(([e, n]) => {
|
|
1562
1562
|
let r = e;
|
|
@@ -1565,7 +1565,7 @@ function Kn(e) {
|
|
|
1565
1565
|
}
|
|
1566
1566
|
//#endregion
|
|
1567
1567
|
//#region src/useDag.js
|
|
1568
|
-
var
|
|
1568
|
+
var Yn = {
|
|
1569
1569
|
rankDirection: "TB",
|
|
1570
1570
|
nodeSeparation: 50,
|
|
1571
1571
|
rankSeparation: 50,
|
|
@@ -1578,10 +1578,10 @@ var qn = {
|
|
|
1578
1578
|
arrowShape: "normal",
|
|
1579
1579
|
arrowSize: 10
|
|
1580
1580
|
};
|
|
1581
|
-
function
|
|
1581
|
+
function Xn(e) {
|
|
1582
1582
|
return e.length ? e.map((e, t) => `${t === 0 ? "M" : "L"} ${e.x} ${e.y}`).join(" ") : "";
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1584
|
+
function Zn(e) {
|
|
1585
1585
|
if (!e.length) return "";
|
|
1586
1586
|
if (e.length === 1) {
|
|
1587
1587
|
let t = e[0];
|
|
@@ -1597,38 +1597,38 @@ function Yn(e) {
|
|
|
1597
1597
|
let r = e[e.length - 1];
|
|
1598
1598
|
return n += ` L ${r.x} ${r.y}`, n;
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1601
|
-
let { nodes: t, edges: n, configuration: r } = e,
|
|
1602
|
-
function
|
|
1603
|
-
|
|
1600
|
+
function Qn(e) {
|
|
1601
|
+
let { nodes: t, edges: n, configuration: r } = e, i = E(null), o = E(null), s = `dag-arrow-${l()}`;
|
|
1602
|
+
function c(e, t, n) {
|
|
1603
|
+
o.value = null, i.value = null;
|
|
1604
1604
|
let r = {
|
|
1605
|
-
...
|
|
1605
|
+
...Yn,
|
|
1606
1606
|
...n
|
|
1607
|
-
},
|
|
1607
|
+
}, c = new A({
|
|
1608
1608
|
multigraph: !0,
|
|
1609
1609
|
compound: !0
|
|
1610
1610
|
});
|
|
1611
|
-
|
|
1611
|
+
c.setGraph({
|
|
1612
1612
|
rankdir: r.rankDirection,
|
|
1613
1613
|
nodesep: r.nodeSeparation,
|
|
1614
1614
|
ranksep: r.rankSeparation,
|
|
1615
1615
|
edgesep: r.edgeSeparation,
|
|
1616
1616
|
align: r.align
|
|
1617
1617
|
}), e.forEach((e) => {
|
|
1618
|
-
|
|
1618
|
+
c.setNode(e.id, {
|
|
1619
1619
|
label: e.label,
|
|
1620
1620
|
width: e.width ?? r.nodeWidth,
|
|
1621
1621
|
height: e.height ?? r.nodeHeight
|
|
1622
1622
|
});
|
|
1623
1623
|
}), t.forEach((e) => {
|
|
1624
|
-
|
|
1624
|
+
c.setEdge(e.from, e.to, {
|
|
1625
1625
|
weight: e.weight ?? 1,
|
|
1626
1626
|
minlen: e.minLength ?? 1,
|
|
1627
1627
|
arrowShape: r.arrowShape ?? "normal"
|
|
1628
1628
|
});
|
|
1629
|
-
}),
|
|
1629
|
+
}), Sn(c);
|
|
1630
1630
|
let u = e.map((e) => {
|
|
1631
|
-
let t =
|
|
1631
|
+
let t = c.node(e.id);
|
|
1632
1632
|
return {
|
|
1633
1633
|
id: e.id,
|
|
1634
1634
|
label: e.label,
|
|
@@ -1638,17 +1638,17 @@ function Xn(e) {
|
|
|
1638
1638
|
height: t.height,
|
|
1639
1639
|
original: e
|
|
1640
1640
|
};
|
|
1641
|
-
}), d =
|
|
1642
|
-
let n =
|
|
1641
|
+
}), d = c.edges().map((e) => {
|
|
1642
|
+
let n = c.edge(e), i = n.points || [];
|
|
1643
1643
|
if (!i.length) return null;
|
|
1644
|
-
let a = r.curvedEdges ?
|
|
1644
|
+
let a = r.curvedEdges ? Zn(i) : Xn(i), o = r.arrowShape === "undirected" ? null : `url(#${s})`, u = t.find((t) => t?.from === e.v && t?.to === e.w);
|
|
1645
1645
|
return {
|
|
1646
|
-
id: `${e.v}->${e.w}->${
|
|
1646
|
+
id: `${e.v}->${e.w}->${l()}`,
|
|
1647
1647
|
from: e.v,
|
|
1648
1648
|
to: e.w,
|
|
1649
1649
|
points: i,
|
|
1650
1650
|
pathData: a,
|
|
1651
|
-
markerEnd:
|
|
1651
|
+
markerEnd: o,
|
|
1652
1652
|
original: {
|
|
1653
1653
|
...u,
|
|
1654
1654
|
...n
|
|
@@ -1656,7 +1656,7 @@ function Xn(e) {
|
|
|
1656
1656
|
};
|
|
1657
1657
|
}).filter(Boolean), f = r.padding;
|
|
1658
1658
|
if (!u.length) {
|
|
1659
|
-
|
|
1659
|
+
i.value = {
|
|
1660
1660
|
nodes: [],
|
|
1661
1661
|
edges: d,
|
|
1662
1662
|
viewBox: "0 0 0 0",
|
|
@@ -1665,109 +1665,109 @@ function Xn(e) {
|
|
|
1665
1665
|
};
|
|
1666
1666
|
return;
|
|
1667
1667
|
}
|
|
1668
|
-
let p = u.flatMap((e) => [e.x - e.width / 2, e.x + e.width / 2]), m = u.flatMap((e) => [e.y - e.height / 2, e.y + e.height / 2]), h = Math.min(...p) - f, g = Math.max(...p) + f,
|
|
1669
|
-
|
|
1668
|
+
let p = u.flatMap((e) => [e.x - e.width / 2, e.x + e.width / 2]), m = u.flatMap((e) => [e.y - e.height / 2, e.y + e.height / 2]), h = Math.min(...p) - f, g = Math.max(...p) + f, _ = Math.min(...m) - f, ee = Math.max(...m) + f;
|
|
1669
|
+
i.value = {
|
|
1670
1670
|
nodes: u,
|
|
1671
1671
|
edges: d.map((e) => ({
|
|
1672
1672
|
...e,
|
|
1673
|
-
midpoint: e.pathData ?
|
|
1673
|
+
midpoint: e.pathData ? a(e.pathData) : {
|
|
1674
1674
|
x: 0,
|
|
1675
1675
|
y: 0
|
|
1676
1676
|
}
|
|
1677
1677
|
})),
|
|
1678
|
-
viewBox: `${h} ${
|
|
1678
|
+
viewBox: `${h} ${_} ${g - h} ${ee - _}`,
|
|
1679
1679
|
arrowShape: r.arrowShape,
|
|
1680
1680
|
arrowSize: r.arrowSize
|
|
1681
1681
|
};
|
|
1682
1682
|
}
|
|
1683
|
-
return
|
|
1683
|
+
return Ae(() => {
|
|
1684
1684
|
try {
|
|
1685
|
-
|
|
1685
|
+
c(O(t) || [], O(n) || [], O(r) || {});
|
|
1686
1686
|
} catch (e) {
|
|
1687
|
-
console.error("[useDag] layout error:", e),
|
|
1687
|
+
console.error("[useDag] layout error:", e), o.value = e, i.value = null;
|
|
1688
1688
|
}
|
|
1689
1689
|
}), {
|
|
1690
|
-
layoutData:
|
|
1691
|
-
lastError:
|
|
1692
|
-
arrowMarkerIdentifier:
|
|
1690
|
+
layoutData: i,
|
|
1691
|
+
lastError: o,
|
|
1692
|
+
arrowMarkerIdentifier: s,
|
|
1693
1693
|
recomputeLayout: () => {
|
|
1694
|
-
|
|
1694
|
+
c(O(t) || [], O(n) || [], O(r) || {});
|
|
1695
1695
|
}
|
|
1696
1696
|
};
|
|
1697
1697
|
}
|
|
1698
1698
|
//#endregion
|
|
1699
1699
|
//#region src/components/vue-ui-dag.vue
|
|
1700
|
-
var
|
|
1700
|
+
var $n = /* @__PURE__ */ e({ default: () => Nr }), er = ["id"], tr = ["id"], nr = {
|
|
1701
1701
|
key: 1,
|
|
1702
1702
|
class: "dag-chart-error"
|
|
1703
|
-
},
|
|
1703
|
+
}, rr = { style: { position: "relative" } }, ir = [
|
|
1704
1704
|
"viewBox",
|
|
1705
1705
|
"xmlns",
|
|
1706
1706
|
"aria-describedby"
|
|
1707
|
-
],
|
|
1707
|
+
], ar = { key: 0 }, or = [
|
|
1708
1708
|
"id",
|
|
1709
1709
|
"width",
|
|
1710
1710
|
"height"
|
|
1711
|
-
],
|
|
1711
|
+
], sr = [
|
|
1712
1712
|
"cx",
|
|
1713
1713
|
"cy",
|
|
1714
1714
|
"r",
|
|
1715
1715
|
"fill"
|
|
1716
|
-
],
|
|
1716
|
+
], cr = [
|
|
1717
1717
|
"x",
|
|
1718
1718
|
"y",
|
|
1719
1719
|
"width",
|
|
1720
1720
|
"height",
|
|
1721
1721
|
"fill"
|
|
1722
|
-
],
|
|
1722
|
+
], lr = { key: 2 }, ur = [
|
|
1723
1723
|
"id",
|
|
1724
1724
|
"markerWidth",
|
|
1725
1725
|
"markerHeight",
|
|
1726
1726
|
"refX",
|
|
1727
1727
|
"refY"
|
|
1728
|
-
],
|
|
1728
|
+
], dr = [
|
|
1729
1729
|
"d",
|
|
1730
1730
|
"fill",
|
|
1731
1731
|
"stroke"
|
|
1732
|
-
],
|
|
1732
|
+
], fr = [
|
|
1733
1733
|
"d",
|
|
1734
1734
|
"fill",
|
|
1735
1735
|
"stroke"
|
|
1736
|
-
],
|
|
1736
|
+
], pr = { class: "vue-ui-dag-edges" }, mr = [
|
|
1737
1737
|
"data-a11y-midpoint-id",
|
|
1738
1738
|
"aria-label",
|
|
1739
1739
|
"onMouseenter"
|
|
1740
|
-
],
|
|
1740
|
+
], hr = { class: "vue-ui-dag-nodes" }, gr = [
|
|
1741
1741
|
"onClick",
|
|
1742
1742
|
"onMouseenter",
|
|
1743
1743
|
"onMouseleave"
|
|
1744
|
-
],
|
|
1744
|
+
], _r = ["data-a11y-node-id", "aria-label"], vr = [
|
|
1745
1745
|
"x",
|
|
1746
1746
|
"y",
|
|
1747
1747
|
"width",
|
|
1748
1748
|
"height"
|
|
1749
|
-
],
|
|
1749
|
+
], yr = { class: "vue-ui-dag-edges" }, br = [
|
|
1750
1750
|
"d",
|
|
1751
1751
|
"stroke-width",
|
|
1752
1752
|
"marker-end"
|
|
1753
|
-
],
|
|
1753
|
+
], xr = { class: "vue-ui-dag-node-labels" }, Sr = [
|
|
1754
1754
|
"onClick",
|
|
1755
1755
|
"onMouseenter",
|
|
1756
1756
|
"onMouseleave"
|
|
1757
|
-
],
|
|
1757
|
+
], Cr = [
|
|
1758
1758
|
"x",
|
|
1759
1759
|
"y",
|
|
1760
1760
|
"font-size",
|
|
1761
1761
|
"fill",
|
|
1762
1762
|
"font-weight"
|
|
1763
|
-
],
|
|
1763
|
+
], wr = [
|
|
1764
1764
|
"x",
|
|
1765
1765
|
"y",
|
|
1766
1766
|
"font-size",
|
|
1767
1767
|
"fill",
|
|
1768
1768
|
"font-weight",
|
|
1769
1769
|
"innerHTML"
|
|
1770
|
-
],
|
|
1770
|
+
], Tr = { key: 1 }, Er = {
|
|
1771
1771
|
key: 1,
|
|
1772
1772
|
style: {
|
|
1773
1773
|
position: "absolute",
|
|
@@ -1777,10 +1777,10 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1777
1777
|
},
|
|
1778
1778
|
"data-dom-to-png-ignore": "",
|
|
1779
1779
|
"aria-hidden": "true"
|
|
1780
|
-
},
|
|
1780
|
+
}, Dr = {
|
|
1781
1781
|
key: 6,
|
|
1782
1782
|
class: "vue-data-ui-watermark"
|
|
1783
|
-
},
|
|
1783
|
+
}, Or = ["data-position"], kr = { key: 0 }, Ar = ["data-position"], jr = { key: 0 }, Mr = 1.5, Nr = /*#__PURE__*/ ie({
|
|
1784
1784
|
__name: "vue-ui-dag",
|
|
1785
1785
|
props: {
|
|
1786
1786
|
dataset: {
|
|
@@ -1806,30 +1806,30 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1806
1806
|
"copyAlt",
|
|
1807
1807
|
"rotate"
|
|
1808
1808
|
],
|
|
1809
|
-
setup(e, { expose:
|
|
1810
|
-
let
|
|
1811
|
-
|
|
1812
|
-
config: () =>
|
|
1813
|
-
dataset: () =>
|
|
1809
|
+
setup(e, { expose: a, emit: ie }) {
|
|
1810
|
+
let Ae = ye(() => import("./PenAndPaper-CIa1F5Jq.js").then((e) => e.t)), Me = ye(() => import("./UserOptions-WH7-49V0.js").then((e) => e.n)), Ne = ye(() => import("./PackageVersion-CT8FfP7h.js").then((e) => e.t)), { vue_ui_dag: Pe } = p(), { isThemeValid: A, warnInvalidTheme: Fe } = ee(), j = e, M = ie, N = E(null), P = E(l()), Ie = E(null), Le = E(null), Re = E(null), ze = E(0), Be = E(0), Ve = E(!1), He = E(!1), F = E(null), I = E(null), L = E(null), R = E(null), Ue = E(null), We = E("pointer"), Ge = E(!1), z = E(dt());
|
|
1811
|
+
d({
|
|
1812
|
+
config: () => z.value,
|
|
1813
|
+
dataset: () => j.dataset,
|
|
1814
1814
|
component: "VueUiDag",
|
|
1815
|
-
rules: [
|
|
1815
|
+
rules: [f.noHint]
|
|
1816
1816
|
});
|
|
1817
|
-
let
|
|
1817
|
+
let Ke = v(() => z.value.userOptions.useCursorPointer), qe = E(z.value.style.chart.width), Je = E(z.value.style.chart.height), Ye = E({
|
|
1818
1818
|
x: 0,
|
|
1819
1819
|
y: 0
|
|
1820
|
-
}),
|
|
1820
|
+
}), B = E(null), Xe = E(null), Ze = E({
|
|
1821
1821
|
left: "0px",
|
|
1822
1822
|
top: "0px"
|
|
1823
|
-
}),
|
|
1823
|
+
}), V = E("top"), H = E(!1), Qe = E({
|
|
1824
1824
|
x: 0,
|
|
1825
1825
|
y: 0
|
|
1826
|
-
}),
|
|
1826
|
+
}), $e = E({
|
|
1827
1827
|
x: 0,
|
|
1828
1828
|
y: 0
|
|
1829
|
-
}),
|
|
1829
|
+
}), et = E(null), tt = E(null), nt = E({
|
|
1830
1830
|
left: "0px",
|
|
1831
1831
|
top: "0px"
|
|
1832
|
-
}),
|
|
1832
|
+
}), rt = E("top"), U = E(!1), W = E(!1), { svgRef: G } = le({ config: z.value.style.chart.title }), { userOptionsVisible: it, setUserOptionsVisibility: at, keepUserOptionState: ot } = ce({ config: z.value }), K = E(z.value.style.chart.layout.rankDirection), st = v(() => i({
|
|
1833
1833
|
defaultConfig: {
|
|
1834
1834
|
userOptions: { show: !1 },
|
|
1835
1835
|
style: { chart: {
|
|
@@ -1845,12 +1845,12 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1845
1845
|
}
|
|
1846
1846
|
} }
|
|
1847
1847
|
},
|
|
1848
|
-
userConfig:
|
|
1849
|
-
})), { loading:
|
|
1850
|
-
...
|
|
1851
|
-
FINAL_CONFIG:
|
|
1852
|
-
prepareConfig:
|
|
1853
|
-
skeletonDataset:
|
|
1848
|
+
userConfig: z.value.skeletonConfig ?? {}
|
|
1849
|
+
})), { loading: ct, FINAL_DATASET: lt, manualLoading: ut } = h({
|
|
1850
|
+
...Oe(j),
|
|
1851
|
+
FINAL_CONFIG: z,
|
|
1852
|
+
prepareConfig: dt,
|
|
1853
|
+
skeletonDataset: j.config?.skeletonDataset ?? {
|
|
1854
1854
|
nodes: [
|
|
1855
1855
|
{
|
|
1856
1856
|
id: "A",
|
|
@@ -1873,102 +1873,102 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1873
1873
|
to: "C"
|
|
1874
1874
|
}]
|
|
1875
1875
|
},
|
|
1876
|
-
skeletonConfig:
|
|
1877
|
-
defaultConfig:
|
|
1878
|
-
userConfig:
|
|
1876
|
+
skeletonConfig: i({
|
|
1877
|
+
defaultConfig: z.value,
|
|
1878
|
+
userConfig: st.value
|
|
1879
1879
|
})
|
|
1880
1880
|
});
|
|
1881
|
-
function
|
|
1882
|
-
let e =
|
|
1883
|
-
userConfig:
|
|
1884
|
-
defaultConfig:
|
|
1881
|
+
function dt() {
|
|
1882
|
+
let e = _({
|
|
1883
|
+
userConfig: j.config,
|
|
1884
|
+
defaultConfig: Pe
|
|
1885
1885
|
}), t = e.theme;
|
|
1886
1886
|
if (!t) return e;
|
|
1887
|
-
if (!
|
|
1888
|
-
let n =
|
|
1889
|
-
userConfig:
|
|
1887
|
+
if (!A.value(e)) return Fe(e), e;
|
|
1888
|
+
let n = _({
|
|
1889
|
+
userConfig: fe[t] || j.config,
|
|
1890
1890
|
defaultConfig: e
|
|
1891
1891
|
});
|
|
1892
|
-
return
|
|
1893
|
-
userConfig:
|
|
1892
|
+
return _({
|
|
1893
|
+
userConfig: j.config,
|
|
1894
1894
|
defaultConfig: n
|
|
1895
1895
|
});
|
|
1896
1896
|
}
|
|
1897
|
-
let
|
|
1898
|
-
|
|
1899
|
-
|
|
1897
|
+
let ft = v(() => z.value.debug);
|
|
1898
|
+
Te(async () => {
|
|
1899
|
+
n(j.dataset) && (c({
|
|
1900
1900
|
componentName: "VueUiDag",
|
|
1901
1901
|
type: "dataset",
|
|
1902
|
-
debug:
|
|
1903
|
-
}),
|
|
1902
|
+
debug: ft.value
|
|
1903
|
+
}), He.value = !1, ut.value = !0), (!j.dataset.nodes || j.dataset.nodes.length === 0) && (c({
|
|
1904
1904
|
componentName: "VueUiDag",
|
|
1905
1905
|
type: "datasetAttributeEmpty",
|
|
1906
1906
|
property: "nodes",
|
|
1907
1907
|
index: 0,
|
|
1908
|
-
debug:
|
|
1909
|
-
}),
|
|
1910
|
-
}),
|
|
1911
|
-
|
|
1908
|
+
debug: ft.value
|
|
1909
|
+
}), He.value = !1, ut.value = !0), He.value = !0, await xe(), Qt();
|
|
1910
|
+
}), ke(() => j.config, async (e) => {
|
|
1911
|
+
ct.value || (z.value = dt()), it.value = !z.value.userOptions.showOnChartHover, ze.value += 1, K.value = z.value.style.chart.layout.rankDirection, qe.value = z.value.style.chart.width, Je.value = z.value.style.chart.height, kt.value = z.value.style.chart.zoom.active, await xe(), Qt();
|
|
1912
1912
|
}, { deep: !0 });
|
|
1913
|
-
let { isPrinting:
|
|
1914
|
-
elementId: `dag_${
|
|
1915
|
-
fileName:
|
|
1916
|
-
options:
|
|
1917
|
-
}),
|
|
1918
|
-
svg:
|
|
1919
|
-
title:
|
|
1913
|
+
let { isPrinting: pt, isImaging: mt, generatePdf: ht, generateImage: gt } = m({
|
|
1914
|
+
elementId: `dag_${P.value}`,
|
|
1915
|
+
fileName: z.value.style.chart.title.text || "vue-ui-dag",
|
|
1916
|
+
options: z.value.userOptions.print
|
|
1917
|
+
}), _t = v(() => z.value.style.chart.backgroundColor), vt = v(() => z.value.style.chart.title), { isCallbackImaging: yt, isCallbackSvg: bt, generateSvg: xt, onGenerateImage: St } = te({
|
|
1918
|
+
svg: G,
|
|
1919
|
+
title: vt,
|
|
1920
1920
|
legend: null,
|
|
1921
1921
|
legendItems: null,
|
|
1922
|
-
backgroundColor:
|
|
1923
|
-
getSvgCallback: () =>
|
|
1924
|
-
generateImage:
|
|
1922
|
+
backgroundColor: _t,
|
|
1923
|
+
getSvgCallback: () => z.value.userOptions.callbacks.svg,
|
|
1924
|
+
generateImage: gt
|
|
1925
1925
|
});
|
|
1926
|
-
function St() {
|
|
1927
|
-
Be.value = !0, it(!0);
|
|
1928
|
-
}
|
|
1929
1926
|
function Ct() {
|
|
1930
|
-
|
|
1927
|
+
Ve.value = !0, at(!0);
|
|
1928
|
+
}
|
|
1929
|
+
function wt() {
|
|
1930
|
+
at(!1), Ve.value = !1;
|
|
1931
1931
|
}
|
|
1932
|
-
function
|
|
1932
|
+
function Tt({ tooltipRef: e, isVisibleRef: t, anchorRef: n, styleRef: r, placementRef: i, offsetRef: a, margin: o = 24 }) {
|
|
1933
1933
|
return function() {
|
|
1934
1934
|
let s = e.value;
|
|
1935
1935
|
if (!s || !t.value) return;
|
|
1936
|
-
let c = s.getBoundingClientRect(), l = window.innerWidth, u = window.innerHeight, d = n.value.x, f = n.value.y, p = a?.value?.x ?? 0, m = a?.value?.y ?? 0, h = f - m - c.height - o, g = d - c.width / 2,
|
|
1936
|
+
let c = s.getBoundingClientRect(), l = window.innerWidth, u = window.innerHeight, d = n.value.x, f = n.value.y, p = a?.value?.x ?? 0, m = a?.value?.y ?? 0, h = f - m - c.height - o, g = d - c.width / 2, _ = "top";
|
|
1937
1937
|
if (h < o) {
|
|
1938
1938
|
let e = f + m + o;
|
|
1939
|
-
e + c.height <= u - o ? (h = e,
|
|
1939
|
+
e + c.height <= u - o ? (h = e, _ = "bottom") : (h = f - c.height / 2, h < o && (h = o), h + c.height > u - o && (h = u - c.height - o), _ = "center");
|
|
1940
1940
|
}
|
|
1941
1941
|
g < o && (g = o), g + c.width > l - o && (g = l - c.width - o);
|
|
1942
|
-
let
|
|
1943
|
-
if ((
|
|
1942
|
+
let ee = g <= o, te = g + c.width >= l - o;
|
|
1943
|
+
if ((ee || te) && _ !== "center") {
|
|
1944
1944
|
let e, t, n = d - p - o;
|
|
1945
|
-
l - (d + p) - o >= n ? (e = "right", t = d + p + o) : (e = "left", t = d - p - o - c.width), t >= o && t + c.width <= l - o && (g = t, h = f - c.height / 2, h < o && (h = o), h + c.height > u - o && (h = u - c.height - o),
|
|
1945
|
+
l - (d + p) - o >= n ? (e = "right", t = d + p + o) : (e = "left", t = d - p - o - c.width), t >= o && t + c.width <= l - o && (g = t, h = f - c.height / 2, h < o && (h = o), h + c.height > u - o && (h = u - c.height - o), _ = e);
|
|
1946
1946
|
}
|
|
1947
|
-
i.value =
|
|
1947
|
+
i.value = _, r.value = {
|
|
1948
1948
|
left: `${g}px`,
|
|
1949
1949
|
top: `${h}px`
|
|
1950
1950
|
};
|
|
1951
1951
|
};
|
|
1952
1952
|
}
|
|
1953
|
-
let { layoutData:
|
|
1954
|
-
nodes:
|
|
1953
|
+
let { layoutData: q, lastError: Et, arrowMarkerIdentifier: Dt } = Qn({
|
|
1954
|
+
nodes: v(() => lt.value.nodes.map((e) => ({
|
|
1955
1955
|
...e,
|
|
1956
|
-
backgroundColor: e.backgroundColor ? r(e.backgroundColor) :
|
|
1957
|
-
color: e.color ? r(e.color) :
|
|
1956
|
+
backgroundColor: e.backgroundColor ? r(e.backgroundColor) : z.value.style.chart.nodes.backgroundColor,
|
|
1957
|
+
color: e.color ? r(e.color) : z.value.style.chart.nodes.labels.color
|
|
1958
1958
|
}))),
|
|
1959
|
-
edges:
|
|
1960
|
-
configuration:
|
|
1961
|
-
...
|
|
1962
|
-
rankDirection:
|
|
1959
|
+
edges: v(() => lt.value.edges),
|
|
1960
|
+
configuration: v(() => ({
|
|
1961
|
+
...z.value.style.chart.layout,
|
|
1962
|
+
rankDirection: K.value
|
|
1963
1963
|
}))
|
|
1964
1964
|
});
|
|
1965
|
-
function
|
|
1966
|
-
return
|
|
1965
|
+
function J(e) {
|
|
1966
|
+
return q.value ? q.value.nodes.find((t) => t.id === e) : null;
|
|
1967
1967
|
}
|
|
1968
|
-
|
|
1969
|
-
if (!
|
|
1970
|
-
let e =
|
|
1971
|
-
return
|
|
1968
|
+
v(() => {
|
|
1969
|
+
if (!q.value) return [];
|
|
1970
|
+
let e = z.value.style.chart.edges.stroke, t = /* @__PURE__ */ new Set();
|
|
1971
|
+
return q.value.edges.forEach((n) => {
|
|
1972
1972
|
t.add({
|
|
1973
1973
|
id: n.id,
|
|
1974
1974
|
from: n.from,
|
|
@@ -1977,31 +1977,68 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
1977
1977
|
});
|
|
1978
1978
|
}), Array.from(t);
|
|
1979
1979
|
});
|
|
1980
|
-
let
|
|
1981
|
-
let e =
|
|
1980
|
+
let Ot = v(() => {
|
|
1981
|
+
let e = qe.value, t = Je.value, n = Number(e), r = Number(t), i = Number.isFinite(n) && n > 0, a = Number.isFinite(r) && r > 0;
|
|
1982
1982
|
return !i && !a ? null : {
|
|
1983
1983
|
width: i ? n : null,
|
|
1984
1984
|
height: a ? r : null
|
|
1985
1985
|
};
|
|
1986
|
-
}),
|
|
1986
|
+
}), kt = E(z.value.style.chart.zoom.active), { viewBox: Y, resetZoom: At, setInitialViewBox: jt, scale: Mt, zoomByFactor: Nt } = ue(G, {
|
|
1987
1987
|
x: 0,
|
|
1988
1988
|
y: 0,
|
|
1989
1989
|
width: 100,
|
|
1990
1990
|
height: 100
|
|
1991
|
-
}, 1,
|
|
1992
|
-
|
|
1993
|
-
});
|
|
1994
|
-
function
|
|
1995
|
-
|
|
1991
|
+
}, 1, kt, () => {
|
|
1992
|
+
H.value = !1;
|
|
1993
|
+
}), Pt = null;
|
|
1994
|
+
async function Ft(e, { smooth: t = !0, duration: n = 300, zoomReset: r = !1, zoom: i = null } = {}) {
|
|
1995
|
+
let a = J(e);
|
|
1996
|
+
if (!a) return !1;
|
|
1997
|
+
let c = Y.value;
|
|
1998
|
+
if (!c) return !1;
|
|
1999
|
+
let l = {
|
|
2000
|
+
x: Number(c.x),
|
|
2001
|
+
y: Number(c.y),
|
|
2002
|
+
width: Number(c.width),
|
|
2003
|
+
height: Number(c.height)
|
|
2004
|
+
}, u = Mt.value, d = l.width, f = l.height, p = u;
|
|
2005
|
+
if (Number.isFinite(i) && i > 0 || r) {
|
|
2006
|
+
At(!1);
|
|
2007
|
+
let e = Y.value, t = Number.isFinite(i) && i > 0 ? i / 100 : 1;
|
|
2008
|
+
d = Number(e.width) / t, f = Number(e.height) / t, p = t, Y.value = { ...l }, Mt.value = u;
|
|
2009
|
+
}
|
|
2010
|
+
let m = Number(a.x), h = Number(a.y);
|
|
2011
|
+
if (!Number.isFinite(l.x) || !Number.isFinite(l.y) || !Number.isFinite(l.width) || !Number.isFinite(l.height) || !Number.isFinite(d) || !Number.isFinite(f) || !Number.isFinite(m) || !Number.isFinite(h)) return !1;
|
|
2012
|
+
let g = {
|
|
2013
|
+
x: m - d / 2,
|
|
2014
|
+
y: h - f / 2,
|
|
2015
|
+
width: d,
|
|
2016
|
+
height: f
|
|
2017
|
+
};
|
|
2018
|
+
if (Pt !== null && (cancelAnimationFrame(Pt), Pt = null), H.value = !1, !t || n <= 0) return Y.value = g, Mt.value = p, !0;
|
|
2019
|
+
let _ = performance.now();
|
|
2020
|
+
function ee(e) {
|
|
2021
|
+
let t = Math.min((e - _) / n, 1), r = o(t);
|
|
2022
|
+
Y.value = {
|
|
2023
|
+
x: s(l.x, g.x, r),
|
|
2024
|
+
y: s(l.y, g.y, r),
|
|
2025
|
+
width: s(l.width, g.width, r),
|
|
2026
|
+
height: s(l.height, g.height, r)
|
|
2027
|
+
}, Mt.value = s(u, p, r), t < 1 ? Pt = requestAnimationFrame(ee) : (Y.value = g, Mt.value = p, Pt = null);
|
|
2028
|
+
}
|
|
2029
|
+
return Pt = requestAnimationFrame(ee), !0;
|
|
1996
2030
|
}
|
|
1997
|
-
function
|
|
1998
|
-
|
|
2031
|
+
function It() {
|
|
2032
|
+
kt.value = !kt.value;
|
|
2033
|
+
}
|
|
2034
|
+
function Lt() {
|
|
2035
|
+
let e = q.value && q.value.viewBox;
|
|
1999
2036
|
if (!e) return;
|
|
2000
2037
|
let t = String(e).split(" ").map(Number);
|
|
2001
2038
|
if (t.length !== 4) return;
|
|
2002
2039
|
let [n, r, i, a] = t;
|
|
2003
2040
|
if (!Number.isFinite(n) || !Number.isFinite(r) || !Number.isFinite(i) || !Number.isFinite(a)) return;
|
|
2004
|
-
let o = i, s = a, c = n, l = r, u =
|
|
2041
|
+
let o = i, s = a, c = n, l = r, u = Ot.value;
|
|
2005
2042
|
u && (u.width !== null && (o = u.width), u.height !== null && (s = u.height), c = n - (o - i) / 2, l = r - (s - a) / 2), jt({
|
|
2006
2043
|
x: c,
|
|
2007
2044
|
y: l,
|
|
@@ -2009,133 +2046,133 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2009
2046
|
height: s
|
|
2010
2047
|
}, { overwriteCurrentIfNotZoomed: !0 });
|
|
2011
2048
|
}
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
}, { immediate: !0 }),
|
|
2015
|
-
|
|
2016
|
-
}),
|
|
2017
|
-
|
|
2049
|
+
ke(() => q.value && q.value.viewBox, () => {
|
|
2050
|
+
Lt();
|
|
2051
|
+
}, { immediate: !0 }), ke(() => Ot.value, () => {
|
|
2052
|
+
Lt();
|
|
2053
|
+
}), ke(() => W.value, (e) => {
|
|
2054
|
+
kt.value = !e;
|
|
2018
2055
|
});
|
|
2019
|
-
let
|
|
2020
|
-
let e =
|
|
2056
|
+
let Rt = v(() => {
|
|
2057
|
+
let e = Y.value;
|
|
2021
2058
|
return e ? `${e.x} ${e.y} ${e.width} ${e.height}` : "0 0 0 0";
|
|
2022
|
-
}),
|
|
2023
|
-
function
|
|
2024
|
-
|
|
2059
|
+
}), X = E(!1);
|
|
2060
|
+
function zt(e) {
|
|
2061
|
+
X.value = e, Be.value += 1;
|
|
2025
2062
|
}
|
|
2026
|
-
function
|
|
2027
|
-
|
|
2063
|
+
function Bt() {
|
|
2064
|
+
W.value = !W.value;
|
|
2028
2065
|
}
|
|
2029
|
-
function
|
|
2030
|
-
Nt(
|
|
2066
|
+
function Vt() {
|
|
2067
|
+
Nt(Mr, !0);
|
|
2031
2068
|
}
|
|
2032
|
-
function
|
|
2033
|
-
Nt(1 /
|
|
2069
|
+
function Ht() {
|
|
2070
|
+
Nt(1 / Mr, !0);
|
|
2034
2071
|
}
|
|
2035
|
-
let
|
|
2072
|
+
let Ut = [
|
|
2036
2073
|
"TB",
|
|
2037
2074
|
"RL",
|
|
2038
2075
|
"BT",
|
|
2039
2076
|
"LR"
|
|
2040
2077
|
];
|
|
2041
|
-
function
|
|
2042
|
-
|
|
2043
|
-
}
|
|
2044
|
-
let
|
|
2045
|
-
tooltipRef:
|
|
2046
|
-
isVisibleRef:
|
|
2047
|
-
anchorRef:
|
|
2048
|
-
styleRef:
|
|
2049
|
-
placementRef:
|
|
2078
|
+
function Wt() {
|
|
2079
|
+
K.value = Ut[(Ut.indexOf(K.value) + 1) % Ut.length], At(), M("rotate", K.value);
|
|
2080
|
+
}
|
|
2081
|
+
let Gt = Tt({
|
|
2082
|
+
tooltipRef: Xe,
|
|
2083
|
+
isVisibleRef: U,
|
|
2084
|
+
anchorRef: Ye,
|
|
2085
|
+
styleRef: Ze,
|
|
2086
|
+
placementRef: V,
|
|
2050
2087
|
isNode: !1
|
|
2051
|
-
}),
|
|
2052
|
-
tooltipRef:
|
|
2053
|
-
isVisibleRef:
|
|
2054
|
-
anchorRef:
|
|
2055
|
-
styleRef:
|
|
2056
|
-
placementRef:
|
|
2057
|
-
offsetRef:
|
|
2058
|
-
}),
|
|
2059
|
-
async function
|
|
2060
|
-
|
|
2061
|
-
let t =
|
|
2088
|
+
}), Kt = Tt({
|
|
2089
|
+
tooltipRef: tt,
|
|
2090
|
+
isVisibleRef: H,
|
|
2091
|
+
anchorRef: Qe,
|
|
2092
|
+
styleRef: nt,
|
|
2093
|
+
placementRef: rt,
|
|
2094
|
+
offsetRef: $e
|
|
2095
|
+
}), Z = E(null);
|
|
2096
|
+
async function qt(e) {
|
|
2097
|
+
M("onMidpointEnter", e);
|
|
2098
|
+
let t = G.value;
|
|
2062
2099
|
if (!t || !e?.midpoint) return;
|
|
2063
2100
|
let n = t.createSVGPoint();
|
|
2064
2101
|
n.x = e.midpoint.x, n.y = e.midpoint.y;
|
|
2065
2102
|
let r = t.getScreenCTM();
|
|
2066
2103
|
if (!r) return;
|
|
2067
2104
|
let i = n.matrixTransform(r);
|
|
2068
|
-
|
|
2105
|
+
Ye.value = {
|
|
2069
2106
|
x: i.x,
|
|
2070
2107
|
y: i.y
|
|
2071
|
-
},
|
|
2108
|
+
}, B.value = e, U.value = !0, z.value.style.chart.midpoints.selectedEdge.animated === !0 && (Z.value = e.id, an()), await xe(), Gt();
|
|
2072
2109
|
}
|
|
2073
|
-
function
|
|
2074
|
-
|
|
2110
|
+
function Q() {
|
|
2111
|
+
U.value = !1, B.value = null, M("onMidpointLeave"), z.value.style.chart.midpoints.selectedEdge.animated === !0 && (Z.value = null, an());
|
|
2075
2112
|
}
|
|
2076
|
-
async function
|
|
2077
|
-
if (
|
|
2078
|
-
let t =
|
|
2113
|
+
async function Jt(e) {
|
|
2114
|
+
if (M("onNodeClick", e), !z.value.style.chart.nodes.tooltip.showOnClick) return;
|
|
2115
|
+
let t = G.value;
|
|
2079
2116
|
if (!t) return;
|
|
2080
2117
|
let n = t.createSVGPoint();
|
|
2081
2118
|
n.x = e.x, n.y = e.y;
|
|
2082
2119
|
let r = t.getScreenCTM();
|
|
2083
2120
|
if (!r) return;
|
|
2084
|
-
let i = n.matrixTransform(r), a =
|
|
2085
|
-
|
|
2121
|
+
let i = n.matrixTransform(r), a = z.value.style.chart.layout.nodeWidth, o = z.value.style.chart.layout.nodeHeight, s = r.a, c = r.d, l = a * s, u = o * c;
|
|
2122
|
+
$e.value = {
|
|
2086
2123
|
x: l / 2,
|
|
2087
2124
|
y: u / 2
|
|
2088
|
-
},
|
|
2125
|
+
}, Qe.value = {
|
|
2089
2126
|
x: i.x,
|
|
2090
2127
|
y: i.y
|
|
2091
|
-
},
|
|
2128
|
+
}, et.value = e, H.value = !0, await xe(), Kt();
|
|
2092
2129
|
}
|
|
2093
|
-
function
|
|
2094
|
-
|
|
2130
|
+
function Yt() {
|
|
2131
|
+
H.value = !1, et.value = null;
|
|
2095
2132
|
}
|
|
2096
|
-
function
|
|
2097
|
-
if (!(
|
|
2098
|
-
let t =
|
|
2133
|
+
function Xt(e) {
|
|
2134
|
+
if (!(H.value || U.value)) return;
|
|
2135
|
+
let t = tt.value;
|
|
2099
2136
|
if (t && t.contains(e.target)) return;
|
|
2100
|
-
let n =
|
|
2137
|
+
let n = Xe.value;
|
|
2101
2138
|
if (n && n.contains(e.target)) return;
|
|
2102
|
-
let r =
|
|
2139
|
+
let r = G.value;
|
|
2103
2140
|
if (r && r.contains(e.target)) {
|
|
2104
2141
|
let t = e.target.closest(".vue-ui-dag-node"), n = e.target.closest(".vue-ui-dag-edge-midpoint");
|
|
2105
2142
|
if (t || n) return;
|
|
2106
2143
|
}
|
|
2107
|
-
|
|
2144
|
+
Yt(), Q(), Ge.value || Mn();
|
|
2108
2145
|
}
|
|
2109
|
-
function
|
|
2110
|
-
e.key === "Escape" && (
|
|
2146
|
+
function Zt(e) {
|
|
2147
|
+
e.key === "Escape" && (H.value && Yt(), U.value && Q());
|
|
2111
2148
|
}
|
|
2112
|
-
|
|
2113
|
-
document.addEventListener("mousedown",
|
|
2114
|
-
}),
|
|
2115
|
-
document.removeEventListener("mousedown",
|
|
2149
|
+
Te(() => {
|
|
2150
|
+
document.addEventListener("mousedown", Xt), document.addEventListener("keydown", Zt);
|
|
2151
|
+
}), we(() => {
|
|
2152
|
+
document.removeEventListener("mousedown", Xt), document.removeEventListener("keydown", Zt), F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect());
|
|
2116
2153
|
});
|
|
2117
|
-
function
|
|
2118
|
-
if (!
|
|
2119
|
-
|
|
2154
|
+
function Qt() {
|
|
2155
|
+
if (!z.value.responsive) {
|
|
2156
|
+
F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect(), F.value = null, I.value = null);
|
|
2120
2157
|
return;
|
|
2121
2158
|
}
|
|
2122
|
-
let e =
|
|
2123
|
-
if (!
|
|
2124
|
-
let { width: e, height: t } =
|
|
2125
|
-
chart:
|
|
2126
|
-
title:
|
|
2127
|
-
legend:
|
|
2128
|
-
source:
|
|
2159
|
+
let e = ae(() => {
|
|
2160
|
+
if (!N.value) return;
|
|
2161
|
+
let { width: e, height: t } = oe({
|
|
2162
|
+
chart: N.value,
|
|
2163
|
+
title: z.value.style.chart.title.text ? Ie.value : null,
|
|
2164
|
+
legend: z.value.style.chart.controls.show ? Re.value?.$el : null,
|
|
2165
|
+
source: Le.value
|
|
2129
2166
|
});
|
|
2130
2167
|
requestAnimationFrame(() => {
|
|
2131
|
-
|
|
2168
|
+
qe.value = Math.max(.1, e), Je.value = Math.max(.1, t - 12);
|
|
2132
2169
|
});
|
|
2133
2170
|
});
|
|
2134
|
-
|
|
2171
|
+
F.value && (I.value && F.value.unobserve(I.value), F.value.disconnect()), F.value = new ResizeObserver(e), I.value = N.value ? N.value.parentNode : null, I.value && F.value.observe(I.value), e();
|
|
2135
2172
|
}
|
|
2136
|
-
function
|
|
2173
|
+
function $t(e, t = {}) {
|
|
2137
2174
|
let { direction: n = -1, mode: r = "oneLapNearest", dasharray: i = null } = t;
|
|
2138
|
-
if (!e || typeof e.getTotalLength != "function") return
|
|
2175
|
+
if (!e || typeof e.getTotalLength != "function") return ft.value && console.warn("VueUiDag @getIdealDashoffsetDelta: invalid path element", e), 0;
|
|
2139
2176
|
let a = e.getTotalLength(), o = d(i ?? e.getAttribute("stroke-dasharray") ?? (typeof getComputedStyle == "function" ? getComputedStyle(e).strokeDasharray : ""));
|
|
2140
2177
|
if (!Number.isFinite(o) || o <= 0) return n * a;
|
|
2141
2178
|
let s = Math.max(1, Math.round(a / o)), c = Math.max(1, Math.ceil(a / o)), l = Math.max(1, Math.floor(a / o)), u;
|
|
@@ -2148,26 +2185,26 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2148
2185
|
return t.length % 2 == 1 ? n * 2 : n;
|
|
2149
2186
|
}
|
|
2150
2187
|
}
|
|
2151
|
-
let
|
|
2152
|
-
function
|
|
2188
|
+
let en = E(/* @__PURE__ */ new Map()), tn = E(/* @__PURE__ */ new Map());
|
|
2189
|
+
function nn(e) {
|
|
2153
2190
|
return function(t) {
|
|
2154
|
-
t ?
|
|
2191
|
+
t ? en.value.set(e, t) : en.value.delete(e);
|
|
2155
2192
|
};
|
|
2156
2193
|
}
|
|
2157
|
-
function
|
|
2158
|
-
|
|
2194
|
+
function rn() {
|
|
2195
|
+
tn.value.forEach((e) => {
|
|
2159
2196
|
try {
|
|
2160
2197
|
e.cancel();
|
|
2161
2198
|
} catch {}
|
|
2162
|
-
}),
|
|
2199
|
+
}), tn.value.clear();
|
|
2163
2200
|
}
|
|
2164
|
-
function
|
|
2165
|
-
|
|
2166
|
-
let e =
|
|
2201
|
+
function an() {
|
|
2202
|
+
rn();
|
|
2203
|
+
let e = q.value?.edges ?? [];
|
|
2167
2204
|
if (!e.length) return;
|
|
2168
|
-
let t =
|
|
2205
|
+
let t = z.value.style.chart.edges.animations, n = Number(t.referenceDistance) > 0 ? Number(t.referenceDistance) : 24;
|
|
2169
2206
|
e.forEach((e) => {
|
|
2170
|
-
let r =
|
|
2207
|
+
let r = z.value.style.chart.midpoints.selectedEdge.animated === !0 && Z.value != null && e.id === Z.value, i = !!e?.original?.animated || !!e?.animated || r, a = en.value.get(e.id);
|
|
2171
2208
|
if (!a) return;
|
|
2172
2209
|
if (!i) {
|
|
2173
2210
|
a.style.strokeDasharray = "0", a.style.strokeDashoffset = "0";
|
|
@@ -2175,7 +2212,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2175
2212
|
}
|
|
2176
2213
|
let o = e?.original?.dasharray ?? t.dasharray;
|
|
2177
2214
|
a.style.strokeDasharray = String(o), a.style.strokeDashoffset = "0";
|
|
2178
|
-
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l =
|
|
2215
|
+
let s = ![void 0, null].includes(e?.original?.animationDirection), c = ![void 0, null].includes(t.animationDirection), l = $t(a, {
|
|
2179
2216
|
direction: s ? Number(e.original.animationDirection) : c ? Number(t.animationDirection) : -1,
|
|
2180
2217
|
mode: "oneLapNearest",
|
|
2181
2218
|
dasharray: String(o)
|
|
@@ -2184,21 +2221,21 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2184
2221
|
iterations: Infinity,
|
|
2185
2222
|
easing: "linear"
|
|
2186
2223
|
});
|
|
2187
|
-
|
|
2224
|
+
tn.value.set(e.id, m);
|
|
2188
2225
|
});
|
|
2189
2226
|
}
|
|
2190
|
-
|
|
2191
|
-
await
|
|
2227
|
+
ke(() => q.value && q.value.edges, async () => {
|
|
2228
|
+
await xe(), an();
|
|
2192
2229
|
}, {
|
|
2193
2230
|
deep: !0,
|
|
2194
2231
|
immediate: !0
|
|
2195
|
-
}),
|
|
2196
|
-
|
|
2232
|
+
}), we(() => {
|
|
2233
|
+
rn();
|
|
2197
2234
|
});
|
|
2198
|
-
async function
|
|
2199
|
-
if (!
|
|
2200
|
-
let { width: t, height: n } =
|
|
2201
|
-
domElement:
|
|
2235
|
+
async function on({ scale: e = 2 } = {}) {
|
|
2236
|
+
if (!N.value) return;
|
|
2237
|
+
let { width: t, height: n } = N.value.getBoundingClientRect(), r = t / n, { imageUri: i, base64: a } = await ne({
|
|
2238
|
+
domElement: N.value,
|
|
2202
2239
|
base64: !0,
|
|
2203
2240
|
img: !0,
|
|
2204
2241
|
scale: e
|
|
@@ -2206,121 +2243,121 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2206
2243
|
return {
|
|
2207
2244
|
imageUri: i,
|
|
2208
2245
|
base64: a,
|
|
2209
|
-
title:
|
|
2246
|
+
title: z.value.style.chart.title.text ?? "vue-ui-dag",
|
|
2210
2247
|
width: t,
|
|
2211
2248
|
height: n,
|
|
2212
2249
|
aspectRatio: r
|
|
2213
2250
|
};
|
|
2214
2251
|
}
|
|
2215
|
-
let
|
|
2216
|
-
let e = Number(
|
|
2217
|
-
return Number.isFinite(e) && e > 0 ? e /
|
|
2218
|
-
}),
|
|
2219
|
-
function
|
|
2220
|
-
|
|
2252
|
+
let sn = v(() => {
|
|
2253
|
+
let e = Number(z.value.style.chart.layout.nodeHeight);
|
|
2254
|
+
return Number.isFinite(e) && e > 0 ? e / z.value.style.chart.backgroundPattern.spacingRatio : 12;
|
|
2255
|
+
}), cn = v(() => sn.value * (z.value.style.chart.backgroundPattern.dotRadiusRatio / 100)), $ = E(null), ln = null, un = 0;
|
|
2256
|
+
function dn(e) {
|
|
2257
|
+
ln &&= (clearTimeout(ln), null), $.value !== e && ($.value = e, (z.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || z.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && an());
|
|
2221
2258
|
}
|
|
2222
|
-
function
|
|
2223
|
-
|
|
2259
|
+
function fn(e) {
|
|
2260
|
+
We.value = "pointer", Z.value = null, dn(e);
|
|
2224
2261
|
}
|
|
2225
|
-
async function
|
|
2226
|
-
|
|
2262
|
+
async function pn(e) {
|
|
2263
|
+
We.value = "pointer", $.value = null, await qt(e);
|
|
2227
2264
|
}
|
|
2228
|
-
function
|
|
2229
|
-
let t = ++
|
|
2230
|
-
|
|
2231
|
-
t ===
|
|
2265
|
+
function mn(e) {
|
|
2266
|
+
let t = ++un;
|
|
2267
|
+
ln && clearTimeout(ln), ln = setTimeout(() => {
|
|
2268
|
+
t === un && $.value === e && ($.value = null, (z.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || z.value.style.chart.nodes.selected.upstreamEdges.animated === !0) && an());
|
|
2232
2269
|
}, 20);
|
|
2233
2270
|
}
|
|
2234
|
-
function
|
|
2235
|
-
let t = e.from ===
|
|
2236
|
-
return i &&
|
|
2271
|
+
function hn(e) {
|
|
2272
|
+
let t = e.from === $.value, n = e.to === $.value, r = R.value === "midpoint" && L.value === e.id, i = Z.value === e.id || B.value?.id === e.id || r, a = e.original.color ?? z.value.style.chart.edges.stroke;
|
|
2273
|
+
return i && z.value.style.chart.midpoints.selectedEdge.stroke != null ? a = z.value.style.chart.midpoints.selectedEdge.stroke : t && z.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = z.value.style.chart.nodes.selected.downstreamEdges.stroke : n && z.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = z.value.style.chart.nodes.selected.upstreamEdges.stroke), e.animated = t && z.value.style.chart.nodes.selected.downstreamEdges.animated === !0 || n && z.value.style.chart.nodes.selected.upstreamEdges.animated === !0 || r && z.value.style.chart.midpoints.selectedEdge.animated === !0 ? !0 : (q.value?.edges.find((t) => t.id === e.id))?.original?.animated ?? !1, {
|
|
2237
2274
|
d: e.pathData,
|
|
2238
2275
|
fill: "none",
|
|
2239
2276
|
stroke: a,
|
|
2240
|
-
"stroke-width":
|
|
2277
|
+
"stroke-width": z.value.style.chart.edges.strokeWidth * (i || e.from === $.value ? 2 : 1),
|
|
2241
2278
|
"stroke-linecap": "round",
|
|
2242
2279
|
"stroke-linejoin": "round"
|
|
2243
2280
|
};
|
|
2244
2281
|
}
|
|
2245
|
-
function
|
|
2246
|
-
return
|
|
2282
|
+
function gn(e) {
|
|
2283
|
+
return R.value === "node" && L.value === e;
|
|
2247
2284
|
}
|
|
2248
|
-
function
|
|
2249
|
-
let t =
|
|
2285
|
+
function _n(e) {
|
|
2286
|
+
let t = $.value === e.id, n = R.value === "node" && L.value === e.id, r = t || n, i = r && z.value.style.chart.nodes.selected.backgroundColor != null ? z.value.style.chart.nodes.selected.backgroundColor : e.original.backgroundColor, a = r && z.value.style.chart.nodes.selected.stroke != null ? z.value.style.chart.nodes.selected.stroke : z.value.style.chart.nodes.stroke, o = r && z.value.style.chart.nodes.selected.strokeWidth != null ? z.value.style.chart.nodes.selected.strokeWidth : z.value.style.chart.nodes.strokeWidth;
|
|
2250
2287
|
return {
|
|
2251
2288
|
x: e.x - e.width / 2,
|
|
2252
2289
|
y: e.y - e.height / 2,
|
|
2253
2290
|
width: e.width,
|
|
2254
2291
|
height: e.height,
|
|
2255
|
-
rx:
|
|
2292
|
+
rx: z.value.style.chart.nodes.borderRadius,
|
|
2256
2293
|
fill: i,
|
|
2257
2294
|
stroke: a,
|
|
2258
2295
|
"stroke-width": o
|
|
2259
2296
|
};
|
|
2260
2297
|
}
|
|
2261
|
-
function
|
|
2262
|
-
let t = e.from ===
|
|
2263
|
-
return i &&
|
|
2298
|
+
function vn(e) {
|
|
2299
|
+
let t = e.from === $.value, n = e.to === $.value, r = R.value === "midpoint" && L.value === e.id, i = Z.value === e.id || B.value?.id === e.id || r, a = e.original.color ?? z.value.style.chart.edges.stroke;
|
|
2300
|
+
return i && z.value.style.chart.midpoints.selectedEdge.stroke != null ? a = z.value.style.chart.midpoints.selectedEdge.stroke : t && z.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = z.value.style.chart.nodes.selected.downstreamEdges.stroke : n && z.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = z.value.style.chart.nodes.selected.upstreamEdges.stroke), {
|
|
2264
2301
|
cx: e?.midpoint?.x,
|
|
2265
2302
|
cy: e?.midpoint?.y,
|
|
2266
|
-
r:
|
|
2267
|
-
fill: r ?
|
|
2303
|
+
r: z.value.style.chart.midpoints.radius,
|
|
2304
|
+
fill: r ? z.value.style.chart.midpoints.selectedEdge.stroke ?? z.value.style.chart.midpoints.fill : z.value.style.chart.midpoints.fill,
|
|
2268
2305
|
stroke: a,
|
|
2269
|
-
"stroke-width":
|
|
2306
|
+
"stroke-width": z.value.style.chart.edges.strokeWidth * (i || e.from === $.value ? 2 : 1)
|
|
2270
2307
|
};
|
|
2271
2308
|
}
|
|
2272
|
-
function
|
|
2273
|
-
let t = e.from ===
|
|
2274
|
-
return i &&
|
|
2309
|
+
function yn(e) {
|
|
2310
|
+
let t = e.from === $.value, n = e.to === $.value, r = R.value === "midpoint" && L.value === e.id, i = Z.value === e.id || B.value?.id === e.id || r, a = e.color ?? e.original?.color ?? z.value.style.chart.edges.stroke;
|
|
2311
|
+
return i && z.value.style.chart.midpoints.selectedEdge.stroke != null ? a = z.value.style.chart.midpoints.selectedEdge.stroke : t && z.value.style.chart.nodes.selected.downstreamEdges.stroke != null ? a = z.value.style.chart.nodes.selected.downstreamEdges.stroke : n && z.value.style.chart.nodes.selected.upstreamEdges.stroke != null && (a = z.value.style.chart.nodes.selected.upstreamEdges.stroke), a;
|
|
2275
2312
|
}
|
|
2276
|
-
function
|
|
2277
|
-
return `${
|
|
2313
|
+
function bn(e) {
|
|
2314
|
+
return `${Dt}-${String(e).replace(/[^a-zA-Z0-9_-]/g, "_")}`;
|
|
2278
2315
|
}
|
|
2279
|
-
function
|
|
2280
|
-
return
|
|
2316
|
+
function xn() {
|
|
2317
|
+
return q.value;
|
|
2281
2318
|
}
|
|
2282
|
-
async function
|
|
2283
|
-
if (
|
|
2284
|
-
config:
|
|
2285
|
-
dataset:
|
|
2286
|
-
}), !
|
|
2319
|
+
async function Sn() {
|
|
2320
|
+
if (M("copyAlt", {
|
|
2321
|
+
config: z.value,
|
|
2322
|
+
dataset: lt.value
|
|
2323
|
+
}), !z.value.userOptions.callbacks.altCopy) {
|
|
2287
2324
|
console.warn("Vue Data UI - A callback must be set for `altCopy` in userOptions.");
|
|
2288
2325
|
return;
|
|
2289
2326
|
}
|
|
2290
|
-
await Promise.resolve(
|
|
2291
|
-
config:
|
|
2292
|
-
dataset:
|
|
2327
|
+
await Promise.resolve(z.value.userOptions.callbacks.altCopy({
|
|
2328
|
+
config: z.value,
|
|
2329
|
+
dataset: lt.value
|
|
2293
2330
|
}));
|
|
2294
2331
|
}
|
|
2295
|
-
let
|
|
2332
|
+
let Cn = v(() => (q.value?.nodes ?? []).map((e) => ({
|
|
2296
2333
|
id: e.id,
|
|
2297
2334
|
type: "node",
|
|
2298
2335
|
x: e.x,
|
|
2299
2336
|
y: e.y,
|
|
2300
2337
|
label: e.label ?? e.id,
|
|
2301
2338
|
raw: e
|
|
2302
|
-
}))),
|
|
2339
|
+
}))), wn = v(() => z.value.style.chart.midpoints.show ? (q.value?.edges ?? []).filter((e) => e?.midpoint).map((e) => ({
|
|
2303
2340
|
id: e.id,
|
|
2304
2341
|
type: "midpoint",
|
|
2305
2342
|
x: e.midpoint.x,
|
|
2306
2343
|
y: e.midpoint.y,
|
|
2307
|
-
label: `${
|
|
2344
|
+
label: `${J(e.from)?.label ?? e.from} → ${J(e.to)?.label ?? e.to}`,
|
|
2308
2345
|
raw: e
|
|
2309
|
-
})) : []),
|
|
2346
|
+
})) : []), Tn = v(() => [...Cn.value, ...wn.value].sort((e, t) => e.x === t.x ? e.y - t.y : e.x - t.x)), En = v(() => {
|
|
2310
2347
|
let e = /* @__PURE__ */ new Map();
|
|
2311
|
-
return
|
|
2348
|
+
return Tn.value.forEach((t, n) => {
|
|
2312
2349
|
e.set(`${t.type}:${t.id}`, n);
|
|
2313
2350
|
}), e;
|
|
2314
|
-
}),
|
|
2315
|
-
let e =
|
|
2351
|
+
}), Dn = v(() => {
|
|
2352
|
+
let e = q.value?.nodes ?? [], t = q.value?.edges ?? [];
|
|
2316
2353
|
return {
|
|
2317
2354
|
headers: [
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2355
|
+
z.value.a11y?.translations?.node ?? "Node",
|
|
2356
|
+
z.value.a11y?.translations?.parents ?? "Parents",
|
|
2357
|
+
z.value.a11y?.translations?.children ?? "Children"
|
|
2321
2358
|
],
|
|
2322
2359
|
rows: e.map((e) => {
|
|
2323
|
-
let n = t.filter((t) => t.to === e.id).map((e) =>
|
|
2360
|
+
let n = t.filter((t) => t.to === e.id).map((e) => J(e.from)?.label ?? e.from).join(", "), r = t.filter((t) => t.from === e.id).map((e) => J(e.to)?.label ?? e.to).join(", ");
|
|
2324
2361
|
return [
|
|
2325
2362
|
e.label ?? e.id,
|
|
2326
2363
|
n || "—",
|
|
@@ -2329,138 +2366,139 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2329
2366
|
})
|
|
2330
2367
|
};
|
|
2331
2368
|
});
|
|
2332
|
-
function
|
|
2369
|
+
function On(e) {
|
|
2333
2370
|
return `${e.type}:${e.id}`;
|
|
2334
2371
|
}
|
|
2335
|
-
function
|
|
2336
|
-
return
|
|
2372
|
+
function kn() {
|
|
2373
|
+
return L.value == null || R.value == null ? null : Tn.value.find((e) => e.id === L.value && e.type === R.value) ?? null;
|
|
2337
2374
|
}
|
|
2338
|
-
async function
|
|
2375
|
+
async function An(e) {
|
|
2339
2376
|
if (e) {
|
|
2340
2377
|
if (e.type === "node") {
|
|
2341
|
-
|
|
2378
|
+
Q();
|
|
2342
2379
|
return;
|
|
2343
2380
|
}
|
|
2344
|
-
e.type === "midpoint" && (
|
|
2381
|
+
e.type === "midpoint" && (Yt(), await qt(e.raw));
|
|
2345
2382
|
}
|
|
2346
2383
|
}
|
|
2347
|
-
function
|
|
2384
|
+
function jn(e) {
|
|
2348
2385
|
if (e) {
|
|
2349
|
-
if (
|
|
2350
|
-
|
|
2386
|
+
if (L.value = e.id, R.value = e.type, Ue.value = En.value.get(On(e)) ?? null, e.type === "node") {
|
|
2387
|
+
dn(e.id), Z.value = null;
|
|
2351
2388
|
return;
|
|
2352
2389
|
}
|
|
2353
|
-
e.type === "midpoint" && (
|
|
2390
|
+
e.type === "midpoint" && ($.value = null, Z.value = e.id, z.value.style.chart.midpoints.selectedEdge.animated === !0 && an());
|
|
2354
2391
|
}
|
|
2355
2392
|
}
|
|
2356
|
-
function
|
|
2357
|
-
|
|
2393
|
+
function Mn() {
|
|
2394
|
+
L.value = null, R.value = null, Ue.value = null, H.value || ($.value = null), U.value || (Z.value = null, z.value.style.chart.midpoints.selectedEdge.animated === !0 && an());
|
|
2358
2395
|
}
|
|
2359
|
-
function
|
|
2360
|
-
|
|
2396
|
+
function Nn() {
|
|
2397
|
+
Ge.value = !0, Mn();
|
|
2361
2398
|
}
|
|
2362
|
-
function
|
|
2363
|
-
|
|
2399
|
+
function Pn() {
|
|
2400
|
+
Ge.value = !1, Yt(), Q(), Mn();
|
|
2364
2401
|
}
|
|
2365
|
-
function
|
|
2402
|
+
function Fn(e, t, n) {
|
|
2366
2403
|
let r = t.x - e.x, i = t.y - e.y;
|
|
2367
2404
|
return n === "right" && r <= 0 || n === "left" && r >= 0 || n === "down" && i <= 0 || n === "up" && i >= 0 ? Infinity : n === "right" || n === "left" ? Math.abs(r) * 1e3 + Math.abs(i) : Math.abs(i) * 1e3 + Math.abs(r);
|
|
2368
2405
|
}
|
|
2369
|
-
function
|
|
2370
|
-
let n =
|
|
2406
|
+
function In(e, t) {
|
|
2407
|
+
let n = Tn.value.filter((t) => On(t) !== On(e));
|
|
2371
2408
|
if (!n.length) return null;
|
|
2372
2409
|
let r = null, i = Infinity;
|
|
2373
2410
|
return n.forEach((n) => {
|
|
2374
|
-
let a =
|
|
2411
|
+
let a = Fn(e, n, t);
|
|
2375
2412
|
a < i && (i = a, r = n);
|
|
2376
|
-
}), r || (t === "right" || t === "down" ?
|
|
2413
|
+
}), r || (t === "right" || t === "down" ? Tn.value[0] ?? null : Tn.value[Tn.value.length - 1] ?? null);
|
|
2377
2414
|
}
|
|
2378
|
-
async function
|
|
2379
|
-
e && (
|
|
2415
|
+
async function Ln(e) {
|
|
2416
|
+
e && (We.value = "keyboard", e.type === "node" && (Q(), await Jt(e.raw)));
|
|
2380
2417
|
}
|
|
2381
|
-
async function
|
|
2382
|
-
if (!
|
|
2418
|
+
async function Rn(e) {
|
|
2419
|
+
if (!G.value || W.value || document.activeElement !== G.value || !Tn.value.length) return;
|
|
2383
2420
|
let t = e.key === "ArrowLeft", n = e.key === "ArrowRight", r = e.key === "ArrowUp", i = e.key === "ArrowDown", a = e.key === "Enter" || e.key === " ", o = e.key === "Escape";
|
|
2384
2421
|
if (!t && !n && !r && !i && !a && !o) return;
|
|
2385
2422
|
if (e.preventDefault(), e.stopPropagation(), o) {
|
|
2386
|
-
|
|
2423
|
+
Yt(), Q(), Mn();
|
|
2387
2424
|
return;
|
|
2388
2425
|
}
|
|
2389
|
-
let s =
|
|
2426
|
+
let s = kn();
|
|
2390
2427
|
if (a) {
|
|
2391
2428
|
if (!s) return;
|
|
2392
|
-
s.type === "node" && await
|
|
2429
|
+
s.type === "node" && await Ln(s);
|
|
2393
2430
|
return;
|
|
2394
2431
|
}
|
|
2395
2432
|
if (!s) {
|
|
2396
|
-
let e =
|
|
2433
|
+
let e = Tn.value[0];
|
|
2397
2434
|
if (!e) return;
|
|
2398
|
-
|
|
2435
|
+
jn(e), await An(e);
|
|
2399
2436
|
return;
|
|
2400
2437
|
}
|
|
2401
2438
|
let c = null;
|
|
2402
|
-
n ? c =
|
|
2403
|
-
}
|
|
2404
|
-
return
|
|
2405
|
-
getData:
|
|
2406
|
-
getImage:
|
|
2407
|
-
generatePdf:
|
|
2408
|
-
generateSvg:
|
|
2409
|
-
generateImage:
|
|
2410
|
-
toggleAnnotator:
|
|
2411
|
-
toggleFullscreen:
|
|
2412
|
-
zoomIn:
|
|
2413
|
-
zoomOut:
|
|
2439
|
+
n ? c = In(s, "right") : t ? c = In(s, "left") : i ? c = In(s, "down") : r && (c = In(s, "up")), c && (Yt(), Q(), jn(c), await An(c));
|
|
2440
|
+
}
|
|
2441
|
+
return a({
|
|
2442
|
+
getData: xn,
|
|
2443
|
+
getImage: on,
|
|
2444
|
+
generatePdf: ht,
|
|
2445
|
+
generateSvg: xt,
|
|
2446
|
+
generateImage: gt,
|
|
2447
|
+
toggleAnnotator: Bt,
|
|
2448
|
+
toggleFullscreen: zt,
|
|
2449
|
+
zoomIn: Vt,
|
|
2450
|
+
zoomOut: Ht,
|
|
2414
2451
|
resetZoom: At,
|
|
2415
|
-
switchDirection:
|
|
2416
|
-
copyAlt:
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2452
|
+
switchDirection: Wt,
|
|
2453
|
+
copyAlt: Sn,
|
|
2454
|
+
focusOnNode: Ft
|
|
2455
|
+
}), (e, n) => (T(), x("div", {
|
|
2456
|
+
class: Se(`vue-data-ui-component vue-ui-dag ${X.value ? "vue-data-ui-wrapper-fullscreen" : ""} ${z.value.responsive ? "vue-ui-dag-responsive" : ""}`),
|
|
2457
|
+
id: `dag_${P.value}`,
|
|
2420
2458
|
ref_key: "dagChart",
|
|
2421
|
-
ref:
|
|
2422
|
-
style:
|
|
2423
|
-
fontFamily:
|
|
2424
|
-
backgroundColor:
|
|
2459
|
+
ref: N,
|
|
2460
|
+
style: Ce({
|
|
2461
|
+
fontFamily: z.value.style.fontFamily,
|
|
2462
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
2425
2463
|
padding: "0.5rem"
|
|
2426
2464
|
}),
|
|
2427
|
-
onMouseenter:
|
|
2428
|
-
onMouseleave:
|
|
2465
|
+
onMouseenter: Ct,
|
|
2466
|
+
onMouseleave: wt
|
|
2429
2467
|
}, [
|
|
2430
|
-
|
|
2431
|
-
id: `chart-instructions-${
|
|
2468
|
+
S("div", {
|
|
2469
|
+
id: `chart-instructions-${P.value}`,
|
|
2432
2470
|
class: "sr-only"
|
|
2433
|
-
}, [
|
|
2434
|
-
|
|
2471
|
+
}, [S("p", null, De(z.value.a11y.translations.keyboardNavigation), 1)], 8, tr),
|
|
2472
|
+
Dn.value?.rows?.length ? (T(), y(se, {
|
|
2435
2473
|
key: 0,
|
|
2436
|
-
uid:
|
|
2437
|
-
head:
|
|
2438
|
-
body:
|
|
2439
|
-
notice:
|
|
2440
|
-
caption:
|
|
2474
|
+
uid: P.value,
|
|
2475
|
+
head: Dn.value.headers,
|
|
2476
|
+
body: Dn.value.rows,
|
|
2477
|
+
notice: z.value.a11y.translations.tableAvailable,
|
|
2478
|
+
caption: z.value.a11y.translations.tableCaption
|
|
2441
2479
|
}, null, 8, [
|
|
2442
2480
|
"uid",
|
|
2443
2481
|
"head",
|
|
2444
2482
|
"body",
|
|
2445
2483
|
"notice",
|
|
2446
2484
|
"caption"
|
|
2447
|
-
])) :
|
|
2448
|
-
|
|
2449
|
-
|
|
2485
|
+
])) : b("", !0),
|
|
2486
|
+
O(Et) ? (T(), x("div", nr, De(String(O(Et))), 1)) : b("", !0),
|
|
2487
|
+
z.value.userOptions.buttons.annotator ? (T(), y(O(Ae), {
|
|
2450
2488
|
key: 2,
|
|
2451
|
-
svgRef:
|
|
2452
|
-
backgroundColor:
|
|
2453
|
-
color:
|
|
2454
|
-
active:
|
|
2455
|
-
isCursorPointer:
|
|
2456
|
-
onClose:
|
|
2489
|
+
svgRef: O(G),
|
|
2490
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
2491
|
+
color: z.value.style.chart.color,
|
|
2492
|
+
active: W.value,
|
|
2493
|
+
isCursorPointer: Ke.value,
|
|
2494
|
+
onClose: Bt
|
|
2457
2495
|
}, {
|
|
2458
|
-
"annotator-action-close":
|
|
2459
|
-
"annotator-action-color":
|
|
2460
|
-
"annotator-action-draw":
|
|
2461
|
-
"annotator-action-undo":
|
|
2462
|
-
"annotator-action-redo":
|
|
2463
|
-
"annotator-action-delete":
|
|
2496
|
+
"annotator-action-close": k(() => [D(e.$slots, "annotator-action-close", {}, void 0, !0)]),
|
|
2497
|
+
"annotator-action-color": k(({ color: t }) => [D(e.$slots, "annotator-action-color", w(C({ color: t })), void 0, !0)]),
|
|
2498
|
+
"annotator-action-draw": k(({ mode: t }) => [D(e.$slots, "annotator-action-draw", w(C({ mode: t })), void 0, !0)]),
|
|
2499
|
+
"annotator-action-undo": k(({ disabled: t }) => [D(e.$slots, "annotator-action-undo", w(C({ disabled: t })), void 0, !0)]),
|
|
2500
|
+
"annotator-action-redo": k(({ disabled: t }) => [D(e.$slots, "annotator-action-redo", w(C({ disabled: t })), void 0, !0)]),
|
|
2501
|
+
"annotator-action-delete": k(({ disabled: t }) => [D(e.$slots, "annotator-action-delete", w(C({ disabled: t })), void 0, !0)]),
|
|
2464
2502
|
_: 3
|
|
2465
2503
|
}, 8, [
|
|
2466
2504
|
"svgRef",
|
|
@@ -2468,47 +2506,47 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2468
2506
|
"color",
|
|
2469
2507
|
"active",
|
|
2470
2508
|
"isCursorPointer"
|
|
2471
|
-
])) :
|
|
2472
|
-
|
|
2509
|
+
])) : b("", !0),
|
|
2510
|
+
z.value.userOptions.show && He.value && (O(ot) || O(it)) ? (T(), y(O(Me), {
|
|
2473
2511
|
ref: "userOptionsRef",
|
|
2474
|
-
key: `user_option_${
|
|
2475
|
-
backgroundColor:
|
|
2476
|
-
color:
|
|
2477
|
-
isPrinting:
|
|
2478
|
-
isImaging:
|
|
2479
|
-
uid:
|
|
2512
|
+
key: `user_option_${Be.value}`,
|
|
2513
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
2514
|
+
color: z.value.style.chart.color,
|
|
2515
|
+
isPrinting: O(pt),
|
|
2516
|
+
isImaging: O(mt),
|
|
2517
|
+
uid: P.value,
|
|
2480
2518
|
hasTooltip: !1,
|
|
2481
2519
|
hasTable: !1,
|
|
2482
2520
|
hasXls: !1,
|
|
2483
2521
|
hasLabel: !1,
|
|
2484
|
-
hasPdf:
|
|
2485
|
-
hasImg:
|
|
2486
|
-
hasSvg:
|
|
2487
|
-
hasFullscreen:
|
|
2488
|
-
hasAltCopy:
|
|
2489
|
-
isFullscreen:
|
|
2490
|
-
chartElement:
|
|
2491
|
-
position:
|
|
2492
|
-
titles: { ...
|
|
2493
|
-
hasAnnotator:
|
|
2494
|
-
isAnnotation:
|
|
2495
|
-
callbacks:
|
|
2496
|
-
printScale:
|
|
2497
|
-
hasZoom:
|
|
2498
|
-
isZoom:
|
|
2499
|
-
isCursorPointer:
|
|
2500
|
-
onToggleFullscreen:
|
|
2501
|
-
onGeneratePdf:
|
|
2502
|
-
onGenerateImage:
|
|
2503
|
-
onGenerateSvg:
|
|
2504
|
-
onToggleAnnotator:
|
|
2505
|
-
onToggleZoom:
|
|
2506
|
-
onCopyAlt:
|
|
2507
|
-
style:
|
|
2508
|
-
},
|
|
2522
|
+
hasPdf: z.value.userOptions.buttons.pdf,
|
|
2523
|
+
hasImg: z.value.userOptions.buttons.img,
|
|
2524
|
+
hasSvg: z.value.userOptions.buttons.svg,
|
|
2525
|
+
hasFullscreen: z.value.userOptions.buttons.fullscreen,
|
|
2526
|
+
hasAltCopy: z.value.userOptions.buttons.altCopy,
|
|
2527
|
+
isFullscreen: X.value,
|
|
2528
|
+
chartElement: N.value,
|
|
2529
|
+
position: z.value.userOptions.position,
|
|
2530
|
+
titles: { ...z.value.userOptions.buttonTitles },
|
|
2531
|
+
hasAnnotator: z.value.userOptions.buttons.annotator,
|
|
2532
|
+
isAnnotation: W.value,
|
|
2533
|
+
callbacks: z.value.userOptions.callbacks,
|
|
2534
|
+
printScale: z.value.userOptions.print.scale,
|
|
2535
|
+
hasZoom: z.value.userOptions.buttons.zoom,
|
|
2536
|
+
isZoom: kt.value,
|
|
2537
|
+
isCursorPointer: Ke.value,
|
|
2538
|
+
onToggleFullscreen: zt,
|
|
2539
|
+
onGeneratePdf: O(ht),
|
|
2540
|
+
onGenerateImage: O(St),
|
|
2541
|
+
onGenerateSvg: O(xt),
|
|
2542
|
+
onToggleAnnotator: Bt,
|
|
2543
|
+
onToggleZoom: It,
|
|
2544
|
+
onCopyAlt: Sn,
|
|
2545
|
+
style: Ce({ visibility: O(ot) ? O(it) ? "visible" : "hidden" : "visible" })
|
|
2546
|
+
}, ge({ _: 2 }, [
|
|
2509
2547
|
e.$slots.menuIcon ? {
|
|
2510
2548
|
name: "menuIcon",
|
|
2511
|
-
fn:
|
|
2549
|
+
fn: k(({ isOpen: t, color: n }) => [D(e.$slots, "menuIcon", w(C({
|
|
2512
2550
|
isOpen: t,
|
|
2513
2551
|
color: n
|
|
2514
2552
|
})), void 0, !0)]),
|
|
@@ -2516,22 +2554,22 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2516
2554
|
} : void 0,
|
|
2517
2555
|
e.$slots.optionPdf ? {
|
|
2518
2556
|
name: "optionPdf",
|
|
2519
|
-
fn:
|
|
2557
|
+
fn: k(() => [D(e.$slots, "optionPdf", {}, void 0, !0)]),
|
|
2520
2558
|
key: "1"
|
|
2521
2559
|
} : void 0,
|
|
2522
2560
|
e.$slots.optionImg ? {
|
|
2523
2561
|
name: "optionImg",
|
|
2524
|
-
fn:
|
|
2562
|
+
fn: k(() => [D(e.$slots, "optionImg", {}, void 0, !0)]),
|
|
2525
2563
|
key: "2"
|
|
2526
2564
|
} : void 0,
|
|
2527
2565
|
e.$slots.optionSvg ? {
|
|
2528
2566
|
name: "optionSvg",
|
|
2529
|
-
fn:
|
|
2567
|
+
fn: k(() => [D(e.$slots, "optionSvg", {}, void 0, !0)]),
|
|
2530
2568
|
key: "3"
|
|
2531
2569
|
} : void 0,
|
|
2532
2570
|
e.$slots.optionFullscreen ? {
|
|
2533
2571
|
name: "optionFullscreen",
|
|
2534
|
-
fn:
|
|
2572
|
+
fn: k(({ toggleFullscreen: t, isFullscreen: n }) => [D(e.$slots, "optionFullscreen", w(C({
|
|
2535
2573
|
toggleFullscreen: t,
|
|
2536
2574
|
isFullscreen: n
|
|
2537
2575
|
})), void 0, !0)]),
|
|
@@ -2539,7 +2577,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2539
2577
|
} : void 0,
|
|
2540
2578
|
e.$slots.optionAnnotator ? {
|
|
2541
2579
|
name: "optionAnnotator",
|
|
2542
|
-
fn:
|
|
2580
|
+
fn: k(({ toggleAnnotator: t, isAnnotator: n }) => [D(e.$slots, "optionAnnotator", w(C({
|
|
2543
2581
|
toggleAnnotator: t,
|
|
2544
2582
|
isAnnotator: n
|
|
2545
2583
|
})), void 0, !0)]),
|
|
@@ -2547,7 +2585,7 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2547
2585
|
} : void 0,
|
|
2548
2586
|
e.$slots.optionZoom ? {
|
|
2549
2587
|
name: "optionZoom",
|
|
2550
|
-
fn:
|
|
2588
|
+
fn: k(({ toggleZoom: t, isZoomLocked: n }) => [D(e.$slots, "optionZoom", w(C({
|
|
2551
2589
|
toggleZoom: t,
|
|
2552
2590
|
isZoomLocked: n
|
|
2553
2591
|
})), void 0, !0)]),
|
|
@@ -2555,17 +2593,17 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2555
2593
|
} : void 0,
|
|
2556
2594
|
e.$slots.optionAltCopy ? {
|
|
2557
2595
|
name: "optionAltCopy",
|
|
2558
|
-
fn:
|
|
2596
|
+
fn: k(({ altCopy: t }) => [D(e.$slots, "optionAltCopy", w(C({ altCopy: t })), void 0, !0)]),
|
|
2559
2597
|
key: "7"
|
|
2560
2598
|
} : void 0,
|
|
2561
2599
|
e.$slots["custom-menu-before"] ? {
|
|
2562
2600
|
name: "custom-menu-before",
|
|
2563
|
-
fn:
|
|
2601
|
+
fn: k(() => [D(e.$slots, "custom-menu-before", {}, void 0, !0)]),
|
|
2564
2602
|
key: "8"
|
|
2565
2603
|
} : void 0,
|
|
2566
2604
|
e.$slots["custom-menu-after"] ? {
|
|
2567
2605
|
name: "custom-menu-after",
|
|
2568
|
-
fn:
|
|
2606
|
+
fn: k(() => [D(e.$slots, "custom-menu-after", {}, void 0, !0)]),
|
|
2569
2607
|
key: "9"
|
|
2570
2608
|
} : void 0
|
|
2571
2609
|
]), 1032, [
|
|
@@ -2594,298 +2632,298 @@ var Zn = /* @__PURE__ */ e({ default: () => jr }), Qn = ["id"], $n = ["id"], er
|
|
|
2594
2632
|
"onGenerateImage",
|
|
2595
2633
|
"onGenerateSvg",
|
|
2596
2634
|
"style"
|
|
2597
|
-
])) :
|
|
2598
|
-
|
|
2635
|
+
])) : b("", !0),
|
|
2636
|
+
z.value.style.chart.title.text ? (T(), x("div", {
|
|
2599
2637
|
key: 4,
|
|
2600
2638
|
ref_key: "chartTitle",
|
|
2601
|
-
ref:
|
|
2639
|
+
ref: Ie,
|
|
2602
2640
|
style: "width:100%;background:transparent;"
|
|
2603
|
-
}, [(
|
|
2604
|
-
key: `title_${
|
|
2641
|
+
}, [(T(), y(re, {
|
|
2642
|
+
key: `title_${ze.value}`,
|
|
2605
2643
|
config: {
|
|
2606
2644
|
title: {
|
|
2607
2645
|
cy: "dag-title",
|
|
2608
|
-
...
|
|
2646
|
+
...z.value.style.chart.title
|
|
2609
2647
|
},
|
|
2610
2648
|
subtitle: {
|
|
2611
2649
|
cy: "dag-subtitle",
|
|
2612
|
-
...
|
|
2650
|
+
...z.value.style.chart.title.subtitle
|
|
2613
2651
|
}
|
|
2614
2652
|
}
|
|
2615
|
-
}, null, 8, ["config"]))], 512)) :
|
|
2616
|
-
|
|
2653
|
+
}, null, 8, ["config"]))], 512)) : b("", !0),
|
|
2654
|
+
z.value.style.chart.controls.position === "top" && !O(ct) && z.value.style.chart.controls.show ? (T(), y(de, {
|
|
2617
2655
|
key: 5,
|
|
2618
2656
|
ref_key: "zoomControls",
|
|
2619
|
-
ref:
|
|
2620
|
-
config:
|
|
2621
|
-
scale:
|
|
2622
|
-
isFullscreen:
|
|
2657
|
+
ref: Re,
|
|
2658
|
+
config: z.value,
|
|
2659
|
+
scale: O(Mt),
|
|
2660
|
+
isFullscreen: X.value,
|
|
2623
2661
|
withDirection: "",
|
|
2624
|
-
onZoomIn:
|
|
2625
|
-
onZoomOut:
|
|
2626
|
-
onResetZoom:
|
|
2627
|
-
onSwitchDirection:
|
|
2662
|
+
onZoomIn: Vt,
|
|
2663
|
+
onZoomOut: Ht,
|
|
2664
|
+
onResetZoom: n[0] ||= () => O(At)(!0),
|
|
2665
|
+
onSwitchDirection: Wt
|
|
2628
2666
|
}, null, 8, [
|
|
2629
2667
|
"config",
|
|
2630
2668
|
"scale",
|
|
2631
2669
|
"isFullscreen"
|
|
2632
|
-
])) :
|
|
2633
|
-
|
|
2670
|
+
])) : b("", !0),
|
|
2671
|
+
S("div", rr, [O(q) ? (T(), x("svg", {
|
|
2634
2672
|
key: 0,
|
|
2635
2673
|
ref_key: "svgRef",
|
|
2636
|
-
ref:
|
|
2637
|
-
class:
|
|
2674
|
+
ref: G,
|
|
2675
|
+
class: Se({
|
|
2638
2676
|
"vue-ui-dag-svg": !0,
|
|
2639
|
-
"vue-data-ui-loading":
|
|
2677
|
+
"vue-data-ui-loading": O(ct)
|
|
2640
2678
|
}),
|
|
2641
|
-
viewBox:
|
|
2642
|
-
xmlns:
|
|
2643
|
-
style:
|
|
2644
|
-
backgroundColor:
|
|
2679
|
+
viewBox: Rt.value,
|
|
2680
|
+
xmlns: O(u),
|
|
2681
|
+
style: Ce({
|
|
2682
|
+
backgroundColor: z.value.style.chart.backgroundColor,
|
|
2645
2683
|
height: "100%",
|
|
2646
2684
|
width: "100%"
|
|
2647
2685
|
}),
|
|
2648
2686
|
tabindex: "0",
|
|
2649
|
-
"aria-describedby": `chart-instructions-${
|
|
2650
|
-
onFocus:
|
|
2651
|
-
onBlur:
|
|
2652
|
-
onKeydown:
|
|
2687
|
+
"aria-describedby": `chart-instructions-${P.value}`,
|
|
2688
|
+
onFocus: Nn,
|
|
2689
|
+
onBlur: Pn,
|
|
2690
|
+
onKeydown: Rn
|
|
2653
2691
|
}, [
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
id: `dag_bg_pattern_${
|
|
2692
|
+
ve(O(Ne)),
|
|
2693
|
+
z.value.style.chart.backgroundPattern.show ? (T(), x("defs", ar, [S("pattern", {
|
|
2694
|
+
id: `dag_bg_pattern_${P.value}`,
|
|
2657
2695
|
patternUnits: "userSpaceOnUse",
|
|
2658
|
-
width:
|
|
2659
|
-
height:
|
|
2660
|
-
}, [
|
|
2661
|
-
x:
|
|
2662
|
-
y:
|
|
2663
|
-
color:
|
|
2664
|
-
})), () => [
|
|
2665
|
-
cx:
|
|
2666
|
-
cy:
|
|
2667
|
-
r:
|
|
2668
|
-
fill:
|
|
2669
|
-
}, null, 8,
|
|
2670
|
-
|
|
2696
|
+
width: sn.value,
|
|
2697
|
+
height: sn.value
|
|
2698
|
+
}, [D(e.$slots, "background-pattern", w(C({
|
|
2699
|
+
x: sn.value / 2,
|
|
2700
|
+
y: sn.value / 2,
|
|
2701
|
+
color: z.value.style.chart.backgroundPattern.dotColor
|
|
2702
|
+
})), () => [S("circle", {
|
|
2703
|
+
cx: sn.value / 2,
|
|
2704
|
+
cy: sn.value / 2,
|
|
2705
|
+
r: cn.value,
|
|
2706
|
+
fill: z.value.style.chart.backgroundPattern.dotColor
|
|
2707
|
+
}, null, 8, sr)], !0)], 8, or)])) : b("", !0),
|
|
2708
|
+
z.value.style.chart.backgroundPattern.show ? (T(), x("rect", {
|
|
2671
2709
|
key: 1,
|
|
2672
|
-
x:
|
|
2673
|
-
y:
|
|
2674
|
-
width:
|
|
2675
|
-
height:
|
|
2676
|
-
fill: `url(#dag_bg_pattern_${
|
|
2677
|
-
style:
|
|
2710
|
+
x: O(Y)?.x ?? 0,
|
|
2711
|
+
y: O(Y)?.y ?? 0,
|
|
2712
|
+
width: O(Y)?.width ?? 0,
|
|
2713
|
+
height: O(Y)?.height ?? 0,
|
|
2714
|
+
fill: `url(#dag_bg_pattern_${P.value})`,
|
|
2715
|
+
style: Ce({
|
|
2678
2716
|
pointerEvents: "none",
|
|
2679
|
-
opacity:
|
|
2717
|
+
opacity: z.value.style.chart.backgroundPattern.opacity
|
|
2680
2718
|
})
|
|
2681
|
-
}, null, 12,
|
|
2682
|
-
|
|
2719
|
+
}, null, 12, cr)) : b("", !0),
|
|
2720
|
+
O(q).arrowShape === "undirected" ? b("", !0) : (T(), x("defs", lr, [(T(!0), x(pe, null, Ee(O(q).edges, (e) => (T(), x("marker", {
|
|
2683
2721
|
key: `marker_${e.id}`,
|
|
2684
|
-
id:
|
|
2685
|
-
markerWidth:
|
|
2686
|
-
markerHeight:
|
|
2687
|
-
refX:
|
|
2688
|
-
refY:
|
|
2722
|
+
id: bn(e.id),
|
|
2723
|
+
markerWidth: O(q).arrowSize,
|
|
2724
|
+
markerHeight: O(q).arrowSize,
|
|
2725
|
+
refX: O(q).arrowSize - 3,
|
|
2726
|
+
refY: O(q).arrowSize / 2,
|
|
2689
2727
|
orient: "auto",
|
|
2690
2728
|
markerUnits: "strokeWidth"
|
|
2691
|
-
}, [
|
|
2729
|
+
}, [O(q).arrowShape === "normal" ? (T(), x("path", {
|
|
2692
2730
|
key: 0,
|
|
2693
|
-
d: `M 0 0 L ${
|
|
2694
|
-
fill:
|
|
2695
|
-
stroke:
|
|
2731
|
+
d: `M 0 0 L ${O(q).arrowSize} ${O(q).arrowSize / 2} L 0 ${O(q).arrowSize} Z`,
|
|
2732
|
+
fill: yn(e),
|
|
2733
|
+
stroke: yn(e),
|
|
2696
2734
|
"stroke-width": "0",
|
|
2697
2735
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2698
|
-
}, null, 8,
|
|
2736
|
+
}, null, 8, dr)) : (T(), x("path", {
|
|
2699
2737
|
key: 1,
|
|
2700
|
-
d: `M 0 0 L ${
|
|
2701
|
-
fill:
|
|
2702
|
-
stroke:
|
|
2738
|
+
d: `M 0 0 L ${O(q).arrowSize} ${O(q).arrowSize / 2} L 0 ${O(q).arrowSize} L ${O(q).arrowSize / 3} ${O(q).arrowSize / 2} Z`,
|
|
2739
|
+
fill: yn(e),
|
|
2740
|
+
stroke: yn(e),
|
|
2703
2741
|
"stroke-width": "0",
|
|
2704
2742
|
style: { transition: "stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out,\n stroke-width 0.2s ease-in-out" }
|
|
2705
|
-
}, null, 8,
|
|
2706
|
-
|
|
2743
|
+
}, null, 8, fr))], 8, ur))), 128))])),
|
|
2744
|
+
S("g", pr, [(T(!0), x(pe, null, Ee(O(q).edges, (e) => (T(), x(pe, { key: e.id }, [S("path", be({
|
|
2707
2745
|
"data-cy-edge": "",
|
|
2708
2746
|
ref_for: !0,
|
|
2709
|
-
ref:
|
|
2710
|
-
}, { ref_for: !0 },
|
|
2747
|
+
ref: nn(e.id)
|
|
2748
|
+
}, { ref_for: !0 }, hn(e), { style: {
|
|
2711
2749
|
"pointer-events": "none",
|
|
2712
2750
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2713
|
-
} }), null, 16),
|
|
2751
|
+
} }), null, 16), z.value.style.chart.midpoints.show ? (T(), x("circle", be({
|
|
2714
2752
|
key: 0,
|
|
2715
2753
|
"data-cy-midpoint": "",
|
|
2716
2754
|
class: "vue-ui-dag-edge-midpoint",
|
|
2717
2755
|
"data-a11y-midpoint-id": e.id
|
|
2718
|
-
}, { ref_for: !0 },
|
|
2719
|
-
"aria-label": `${
|
|
2756
|
+
}, { ref_for: !0 }, vn(e), {
|
|
2757
|
+
"aria-label": `${J(e.from)?.label ?? e.from} to ${J(e.to)?.label ?? e.to}`,
|
|
2720
2758
|
style: { transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out,\n fill 0.2s ease-in-out" },
|
|
2721
|
-
onMouseenter: (t) =>
|
|
2722
|
-
onMouseleave:
|
|
2723
|
-
}), null, 16,
|
|
2724
|
-
|
|
2759
|
+
onMouseenter: (t) => pn(e),
|
|
2760
|
+
onMouseleave: Q
|
|
2761
|
+
}), null, 16, mr)) : b("", !0)], 64))), 128))]),
|
|
2762
|
+
S("g", hr, [(T(!0), x(pe, null, Ee(O(q).nodes, (t) => (T(), x("g", {
|
|
2725
2763
|
key: t.id,
|
|
2726
2764
|
class: "vue-ui-dag-node",
|
|
2727
|
-
onClick:
|
|
2728
|
-
onMouseenter: (e) =>
|
|
2729
|
-
onMouseleave: (e) =>
|
|
2730
|
-
}, [e.$slots.node ?
|
|
2765
|
+
onClick: je((e) => z.value.style.chart.nodes.tooltip.showOnClick && Jt(t), ["stop"]),
|
|
2766
|
+
onMouseenter: (e) => fn(t.id),
|
|
2767
|
+
onMouseleave: (e) => mn(t.id)
|
|
2768
|
+
}, [e.$slots.node ? b("", !0) : (T(), x("rect", be({
|
|
2731
2769
|
key: 0,
|
|
2732
2770
|
"data-cy-node": ""
|
|
2733
|
-
}, { ref_for: !0 },
|
|
2771
|
+
}, { ref_for: !0 }, _n(t), {
|
|
2734
2772
|
"data-a11y-node-id": t.id,
|
|
2735
2773
|
"aria-label": `${t.label ?? t.id}`,
|
|
2736
2774
|
style: {
|
|
2737
|
-
cursor:
|
|
2775
|
+
cursor: z.value.style.chart.nodes.tooltip.showOnClick && Ke.value ? "pointer" : "default",
|
|
2738
2776
|
transition: "stroke 0.2s ease-in-out, stroke-width 0.2s ease-in-out, fill 0.2s ease-in-out"
|
|
2739
2777
|
}
|
|
2740
|
-
}), null, 16,
|
|
2778
|
+
}), null, 16, _r)), e.$slots.node ? (T(), x("foreignObject", {
|
|
2741
2779
|
key: 1,
|
|
2742
2780
|
x: t.x - t.width / 2,
|
|
2743
2781
|
y: t.y - t.height / 2,
|
|
2744
2782
|
width: t.width,
|
|
2745
2783
|
height: t.height,
|
|
2746
2784
|
style: { overflow: "visible" }
|
|
2747
|
-
}, [
|
|
2785
|
+
}, [D(e.$slots, "node", be({ ref_for: !0 }, {
|
|
2748
2786
|
node: t,
|
|
2749
|
-
orientation:
|
|
2750
|
-
}), void 0, !0)], 8,
|
|
2751
|
-
|
|
2787
|
+
orientation: K.value
|
|
2788
|
+
}), void 0, !0)], 8, vr)) : b("", !0)], 40, gr))), 128))]),
|
|
2789
|
+
S("g", yr, [(T(!0), x(pe, null, Ee(O(q).edges, (e) => (T(), x("path", {
|
|
2752
2790
|
key: e.id,
|
|
2753
2791
|
d: e.pathData,
|
|
2754
2792
|
fill: "none",
|
|
2755
2793
|
stroke: "transparent",
|
|
2756
|
-
"stroke-width":
|
|
2794
|
+
"stroke-width": z.value.style.chart.edges.strokeWidth * (e.from === $.value || e.id === B.value?.id ? 1.3 : 1),
|
|
2757
2795
|
"stroke-linecap": "round",
|
|
2758
2796
|
"stroke-linejoin": "round",
|
|
2759
|
-
"marker-end":
|
|
2797
|
+
"marker-end": O(q).arrowShape === "undirected" ? null : `url(#${bn(e.id)})`,
|
|
2760
2798
|
style: {
|
|
2761
2799
|
"pointer-events": "none",
|
|
2762
2800
|
transition: "stroke-width 0.2s ease-in-out,\n stroke 0.2s ease-in-out"
|
|
2763
2801
|
}
|
|
2764
|
-
}, null, 8,
|
|
2765
|
-
|
|
2766
|
-
key:
|
|
2767
|
-
onClick:
|
|
2768
|
-
onMouseenter: (e) =>
|
|
2769
|
-
onMouseleave: (e) =>
|
|
2770
|
-
}, [e.$slots["free-node-label"] ?
|
|
2802
|
+
}, null, 8, br))), 128))]),
|
|
2803
|
+
S("g", xr, [(T(!0), x(pe, null, Ee(O(q).nodes, (n) => (T(), x("g", {
|
|
2804
|
+
key: n.id,
|
|
2805
|
+
onClick: je((e) => z.value.style.chart.nodes.tooltip.showOnClick && Jt(n), ["stop"]),
|
|
2806
|
+
onMouseenter: (e) => dn(n.id),
|
|
2807
|
+
onMouseleave: (e) => mn(n.id)
|
|
2808
|
+
}, [e.$slots["free-node-label"] ? b("", !0) : (T(), x(pe, { key: 0 }, [e.$slots["node-label"] ? (T(), x("text", {
|
|
2771
2809
|
key: 0,
|
|
2772
|
-
x:
|
|
2773
|
-
y:
|
|
2810
|
+
x: n.x,
|
|
2811
|
+
y: n.y + z.value.style.chart.nodes.labels.fontSize / 3,
|
|
2774
2812
|
"text-anchor": "middle",
|
|
2775
|
-
"font-size":
|
|
2776
|
-
fill:
|
|
2777
|
-
"font-weight":
|
|
2813
|
+
"font-size": z.value.style.chart.nodes.labels.fontSize,
|
|
2814
|
+
fill: $.value === n.id && z.value.style.chart.nodes.selected.labelColor != null ? z.value.style.chart.nodes.selected.labelColor : n.original.color,
|
|
2815
|
+
"font-weight": z.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2778
2816
|
style: { transition: "fill 0.2s ease-in-out" }
|
|
2779
|
-
}, [
|
|
2780
|
-
node:
|
|
2781
|
-
orientation:
|
|
2782
|
-
}), () => [
|
|
2817
|
+
}, [D(e.$slots, "node-label", be({ ref_for: !0 }, {
|
|
2818
|
+
node: n,
|
|
2819
|
+
orientation: K.value
|
|
2820
|
+
}), () => [_e(De(n.label), 1)], !0)], 8, Cr)) : !e.$slots["free-node-label"] && !e.$slots.node ? (T(), x("text", {
|
|
2783
2821
|
key: 1,
|
|
2784
2822
|
"data-cy-node-label": "",
|
|
2785
|
-
x:
|
|
2786
|
-
y:
|
|
2823
|
+
x: n.x,
|
|
2824
|
+
y: n.y + z.value.style.chart.nodes.labels.fontSize / 3,
|
|
2787
2825
|
"text-anchor": "middle",
|
|
2788
|
-
"font-size":
|
|
2789
|
-
fill: (
|
|
2790
|
-
"font-weight":
|
|
2826
|
+
"font-size": z.value.style.chart.nodes.labels.fontSize,
|
|
2827
|
+
fill: ($.value === n.id || gn(n.id)) && z.value.style.chart.nodes.selected.labelColor != null ? z.value.style.chart.nodes.selected.labelColor : n.original.color,
|
|
2828
|
+
"font-weight": z.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2791
2829
|
style: { transition: "fill 0.2s ease-in-out" },
|
|
2792
|
-
innerHTML:
|
|
2793
|
-
content:
|
|
2794
|
-
fontSize:
|
|
2795
|
-
fontWeight:
|
|
2796
|
-
fill: (
|
|
2797
|
-
x:
|
|
2798
|
-
y:
|
|
2830
|
+
innerHTML: O(t)({
|
|
2831
|
+
content: n.label,
|
|
2832
|
+
fontSize: z.value.style.chart.nodes.labels.fontSize,
|
|
2833
|
+
fontWeight: z.value.style.chart.nodes.labels.bold ? "bold" : "normal",
|
|
2834
|
+
fill: ($.value === n.id || gn(n.id)) && z.value.style.chart.nodes.selected.labelColor != null ? z.value.style.chart.nodes.selected.labelColor : n.original.color,
|
|
2835
|
+
x: n.x,
|
|
2836
|
+
y: n.y,
|
|
2799
2837
|
autoOffset: !0
|
|
2800
2838
|
})
|
|
2801
|
-
}, null, 8,
|
|
2802
|
-
node:
|
|
2803
|
-
layoutData:
|
|
2804
|
-
orientation:
|
|
2805
|
-
}), void 0, !0)])) :
|
|
2806
|
-
|
|
2807
|
-
drawingArea:
|
|
2808
|
-
data:
|
|
2809
|
-
orientation:
|
|
2810
|
-
isPrintingImg:
|
|
2811
|
-
isPrintingSvg:
|
|
2839
|
+
}, null, 8, wr)) : b("", !0)], 64)), e.$slots["free-node-label"] ? (T(), x("g", Tr, [D(e.$slots, "free-node-label", be({ ref_for: !0 }, {
|
|
2840
|
+
node: n,
|
|
2841
|
+
layoutData: O(q),
|
|
2842
|
+
orientation: K.value
|
|
2843
|
+
}), void 0, !0)])) : b("", !0)], 40, Sr))), 128))]),
|
|
2844
|
+
D(e.$slots, "svg", { svg: {
|
|
2845
|
+
drawingArea: O(Y),
|
|
2846
|
+
data: O(q),
|
|
2847
|
+
orientation: K.value,
|
|
2848
|
+
isPrintingImg: O(pt) || O(mt) || O(yt),
|
|
2849
|
+
isPrintingSvg: O(bt)
|
|
2812
2850
|
} }, void 0, !0)
|
|
2813
|
-
], 46,
|
|
2814
|
-
hint:
|
|
2815
|
-
isVisible:
|
|
2816
|
-
})), void 0, !0)])) :
|
|
2817
|
-
e.$slots.watermark ? (
|
|
2818
|
-
|
|
2819
|
-
default:
|
|
2851
|
+
], 46, ir)) : b("", !0), e.$slots.hint ? (T(), x("div", Er, [D(e.$slots, "hint", w(C({
|
|
2852
|
+
hint: z.value.a11y.translations.keyboardNavigation,
|
|
2853
|
+
isVisible: Ge.value
|
|
2854
|
+
})), void 0, !0)])) : b("", !0)]),
|
|
2855
|
+
e.$slots.watermark ? (T(), x("div", Dr, [D(e.$slots, "watermark", w(C({ isPrinting: O(pt) || O(mt) || O(yt) || O(bt) })), void 0, !0)])) : b("", !0),
|
|
2856
|
+
ve(he, { name: "fade" }, {
|
|
2857
|
+
default: k(() => [U.value ? (T(), y(me, {
|
|
2820
2858
|
key: 0,
|
|
2821
|
-
to:
|
|
2822
|
-
}, [
|
|
2859
|
+
to: X.value ? N.value : "body"
|
|
2860
|
+
}, [S("div", {
|
|
2823
2861
|
"data-cy-tooltip-midpoint": "",
|
|
2824
2862
|
ref_key: "tooltipRef",
|
|
2825
|
-
ref:
|
|
2863
|
+
ref: Xe,
|
|
2826
2864
|
class: "vue-ui-dag-tooltip",
|
|
2827
|
-
style:
|
|
2828
|
-
...
|
|
2829
|
-
maxWidth:
|
|
2830
|
-
"--vue-data-ui-dag-tooltip-background":
|
|
2831
|
-
"--vue-data-ui-dag-tooltip-color":
|
|
2865
|
+
style: Ce({
|
|
2866
|
+
...Ze.value,
|
|
2867
|
+
maxWidth: z.value.style.chart.midpoints.tooltip.maxWidth,
|
|
2868
|
+
"--vue-data-ui-dag-tooltip-background": z.value.style.chart.midpoints.tooltip.backgroundColor,
|
|
2869
|
+
"--vue-data-ui-dag-tooltip-color": z.value.style.chart.midpoints.tooltip.color
|
|
2832
2870
|
}),
|
|
2833
|
-
"data-position":
|
|
2834
|
-
}, [
|
|
2835
|
-
edge:
|
|
2836
|
-
layoutData:
|
|
2837
|
-
})), () => [
|
|
2871
|
+
"data-position": V.value
|
|
2872
|
+
}, [D(e.$slots, "tooltip-midpoint", w(C({
|
|
2873
|
+
edge: B.value,
|
|
2874
|
+
layoutData: O(q)
|
|
2875
|
+
})), () => [B.value ? (T(), x("div", kr, De(J(B.value.from)?.label ?? B.value.from) + " → " + De(J(B.value.to)?.label ?? B.value.to), 1)) : b("", !0)], !0)], 12, Or)], 8, ["to"])) : b("", !0)]),
|
|
2838
2876
|
_: 3
|
|
2839
2877
|
}),
|
|
2840
|
-
|
|
2841
|
-
default:
|
|
2878
|
+
ve(he, { name: "fade" }, {
|
|
2879
|
+
default: k(() => [H.value ? (T(), y(me, {
|
|
2842
2880
|
key: 0,
|
|
2843
|
-
to:
|
|
2844
|
-
}, [
|
|
2881
|
+
to: X.value ? N.value : "body"
|
|
2882
|
+
}, [S("div", {
|
|
2845
2883
|
"data-cy-tooltip-node": "",
|
|
2846
2884
|
ref_key: "nodeTooltipRef",
|
|
2847
|
-
ref:
|
|
2885
|
+
ref: tt,
|
|
2848
2886
|
class: "vue-ui-dag-node-tooltip",
|
|
2849
|
-
style:
|
|
2850
|
-
maxWidth:
|
|
2851
|
-
left:
|
|
2852
|
-
top:
|
|
2853
|
-
"--vue-data-ui-dag-node-tooltip-background":
|
|
2854
|
-
"--vue-data-ui-dag-node-tooltip-color":
|
|
2887
|
+
style: Ce({
|
|
2888
|
+
maxWidth: z.value.style.chart.nodes.tooltip.maxWidth,
|
|
2889
|
+
left: nt.value.left,
|
|
2890
|
+
top: nt.value.top,
|
|
2891
|
+
"--vue-data-ui-dag-node-tooltip-background": z.value.style.chart.nodes.tooltip.backgroundColor,
|
|
2892
|
+
"--vue-data-ui-dag-node-tooltip-color": z.value.style.chart.nodes.tooltip.color
|
|
2855
2893
|
}),
|
|
2856
|
-
"data-position":
|
|
2857
|
-
}, [
|
|
2858
|
-
node:
|
|
2859
|
-
layoutData:
|
|
2860
|
-
})), () => [
|
|
2894
|
+
"data-position": rt.value
|
|
2895
|
+
}, [D(e.$slots, "tooltip-node", w(C({
|
|
2896
|
+
node: et.value,
|
|
2897
|
+
layoutData: O(q)
|
|
2898
|
+
})), () => [et.value ? (T(), x("div", jr, De(et.value.label), 1)) : b("", !0)], !0)], 12, Ar)], 8, ["to"])) : b("", !0)]),
|
|
2861
2899
|
_: 3
|
|
2862
2900
|
}),
|
|
2863
|
-
|
|
2901
|
+
z.value.style.chart.controls.position === "bottom" && !O(ct) && z.value.style.chart.controls.show ? (T(), y(de, {
|
|
2864
2902
|
key: 7,
|
|
2865
2903
|
ref_key: "zoomControls",
|
|
2866
|
-
ref:
|
|
2867
|
-
config:
|
|
2868
|
-
scale:
|
|
2869
|
-
isFullscreen:
|
|
2904
|
+
ref: Re,
|
|
2905
|
+
config: z.value,
|
|
2906
|
+
scale: O(Mt),
|
|
2907
|
+
isFullscreen: X.value,
|
|
2870
2908
|
withDirection: "",
|
|
2871
|
-
onZoomIn:
|
|
2872
|
-
onZoomOut:
|
|
2873
|
-
onResetZoom:
|
|
2874
|
-
onSwitchDirection:
|
|
2909
|
+
onZoomIn: Vt,
|
|
2910
|
+
onZoomOut: Ht,
|
|
2911
|
+
onResetZoom: n[1] ||= () => O(At)(!0),
|
|
2912
|
+
onSwitchDirection: Wt
|
|
2875
2913
|
}, null, 8, [
|
|
2876
2914
|
"config",
|
|
2877
2915
|
"scale",
|
|
2878
2916
|
"isFullscreen"
|
|
2879
|
-
])) :
|
|
2880
|
-
e.$slots.source ? (
|
|
2917
|
+
])) : b("", !0),
|
|
2918
|
+
e.$slots.source ? (T(), x("div", {
|
|
2881
2919
|
key: 8,
|
|
2882
2920
|
ref_key: "source",
|
|
2883
|
-
ref:
|
|
2921
|
+
ref: Le,
|
|
2884
2922
|
dir: "auto"
|
|
2885
|
-
}, [
|
|
2886
|
-
|
|
2887
|
-
], 46,
|
|
2923
|
+
}, [D(e.$slots, "source", {}, void 0, !0)], 512)) : b("", !0),
|
|
2924
|
+
D(e.$slots, "skeleton", {}, () => [O(ct) ? (T(), y(g, { key: 0 })) : b("", !0)], !0)
|
|
2925
|
+
], 46, er));
|
|
2888
2926
|
}
|
|
2889
|
-
}, [["__scopeId", "data-v-
|
|
2927
|
+
}, [["__scopeId", "data-v-a233d9d1"]]);
|
|
2890
2928
|
//#endregion
|
|
2891
|
-
export {
|
|
2929
|
+
export { $n as n, Nr as t };
|