@loopstack/loopstack-studio 0.29.5 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/dist/_virtual/rolldown_runtime.js +3 -1
  2. package/dist/api/config.js +5 -4
  3. package/dist/api/environments.js +5 -1
  4. package/dist/api/processor.js +4 -1
  5. package/dist/app/EnvironmentEmbedRoot.js +22 -30
  6. package/dist/components/ai-elements/code-block.js +4 -4
  7. package/dist/components/dynamic-form/CodeContent.js +1 -1
  8. package/dist/components/dynamic-form/FormBody.js +1 -1
  9. package/dist/components/layout/StudioSidebar.js +116 -131
  10. package/dist/components/lists/ListView.js +46 -46
  11. package/dist/components/motion/FadeIn.js +72 -0
  12. package/dist/components/motion/StreamingText.js +49 -0
  13. package/dist/components/ui/accordion.js +2 -2
  14. package/dist/components/ui-widgets/UiWidget.js +11 -10
  15. package/dist/components/ui-widgets/widgets/AiPromptInput.js +31 -28
  16. package/dist/events/sse-client-events.js +7 -1
  17. package/dist/features/code-explorer/components/FileContentViewer.js +2 -2
  18. package/dist/features/dashboard/AppLauncher.js +84 -0
  19. package/dist/features/debug/components/WorkflowFlowViewer.js +49 -51
  20. package/dist/features/documents/DocumentRenderer.js +18 -17
  21. package/dist/features/documents/components/DocumentItem.js +42 -20
  22. package/dist/features/documents/components/DocumentList.js +34 -36
  23. package/dist/features/documents/components/DocumentMetadataPills.js +102 -49
  24. package/dist/features/documents/document-details/DocumentDetails.js +577 -377
  25. package/dist/features/documents/document-details/PromptDetails.js +118 -130
  26. package/dist/features/documents/document-details/document-debug-utils.js +100 -0
  27. package/dist/features/documents/renderers/ChoicesRenderer.js +41 -38
  28. package/dist/features/documents/renderers/ConfirmPromptRenderer.js +31 -28
  29. package/dist/features/documents/renderers/DocumentFormRenderer.js +62 -70
  30. package/dist/features/documents/renderers/LlmMessage.js +52 -47
  31. package/dist/features/documents/renderers/TextPromptRenderer.js +32 -29
  32. package/dist/features/documents/renderers/useDocumentTransition.js +4 -4
  33. package/dist/features/feature-registry/FeatureRegistryProvider.js +32 -10
  34. package/dist/features/feature-registry/available-features.js +12 -0
  35. package/dist/features/feature-registry/index.js +2 -1
  36. package/dist/features/file-explorer/components/FileExplorerPanel.js +55 -51
  37. package/dist/features/git/components/GitBranchBadge.js +31 -0
  38. package/dist/features/git/components/GitCommitList.js +46 -0
  39. package/dist/features/git/components/GitRemoteStatus.js +84 -0
  40. package/dist/features/git/components/WorkbenchGitPanel.js +81 -0
  41. package/dist/features/git/git-feature.js +12 -0
  42. package/dist/features/git/hooks/useGit.js +78 -0
  43. package/dist/features/git/index.js +1 -0
  44. package/dist/features/oauth/OAuthPromptRenderer.js +137 -142
  45. package/dist/features/runs/Runs.js +73 -73
  46. package/dist/features/secrets/components/WorkbenchSecretsPanel.js +1 -1
  47. package/dist/features/secrets/renderers/SecretInputRenderer.js +30 -29
  48. package/dist/features/workbench/Workbench.js +25 -33
  49. package/dist/features/workbench/WorkflowItem.js +9 -9
  50. package/dist/features/workbench/WorkflowList.js +61 -62
  51. package/dist/features/workbench/components/NewRunDialog.js +237 -209
  52. package/dist/features/workbench/components/RecentRunItem.js +3 -3
  53. package/dist/features/workbench/components/WorkbenchEnvironmentPanel.js +8 -8
  54. package/dist/features/workbench/components/WorkbenchIconSidebar.js +74 -109
  55. package/dist/features/workbench/components/WorkbenchSidebarShell.js +3 -3
  56. package/dist/features/workbench/components/WorkflowForms.js +11 -10
  57. package/dist/features/workbench/components/WorkflowHistoryItem.js +16 -36
  58. package/dist/features/workbench/components/WorkflowHistoryList.js +19 -17
  59. package/dist/features/workbench/components/buttons/WorkflowButtons.js +3 -3
  60. package/dist/features/workbench/hooks/useLlmStreamingDocuments.js +159 -0
  61. package/dist/features/workbench/hooks/useWorkflowData.js +58 -31
  62. package/dist/features/workbench/index.js +2 -2
  63. package/dist/features/workbench/providers/WorkbenchLayoutProvider.js +53 -53
  64. package/dist/features/workspaces/Workspaces.js +166 -136
  65. package/dist/features/workspaces/components/CreateWorkspace.js +115 -107
  66. package/dist/features/workspaces/components/ExecutionTimeline.js +2 -2
  67. package/dist/features/workspaces/components/WorkflowRunForm.js +127 -104
  68. package/dist/features/workspaces/components/WorkspaceHomePage.js +6 -89
  69. package/dist/features/workspaces/components/workflow-form/ArgumentsView.js +1 -1
  70. package/dist/features/workspaces/components/workflow-form/SelectionView.js +15 -15
  71. package/dist/hooks/index.js +3 -2
  72. package/dist/hooks/query-keys.js +43 -30
  73. package/dist/hooks/useConfig.js +28 -22
  74. package/dist/hooks/useEnvironments.js +27 -2
  75. package/dist/hooks/useProcessor.js +14 -1
  76. package/dist/hooks/useWorkflows.js +4 -4
  77. package/dist/index.d.ts +119 -18
  78. package/dist/index.js +10 -9
  79. package/dist/node_modules/d3/src/index.js +13 -13
  80. package/dist/node_modules/d3-scale/src/continuous.js +16 -16
  81. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/architectureDiagram-3BPJPVTR.js +43 -43
  82. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/blockDiagram-GPEHLZMM.js +270 -270
  83. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-AAUBKEIU.js +90 -90
  84. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-3OPIFGDE.js +458 -458
  85. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-55IACEB6.js +3 -3
  86. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-5ZQYHXKU.js +37 -37
  87. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-727SXJPM.js +208 -208
  88. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-KSCS5N6A.js +145 -145
  89. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ND2GUHAM.js +7 -7
  90. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O5CBEL6O.js +41 -41
  91. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/chunk-WU5MYG2G.js +3 -3
  92. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/cose-bilkent-S5V4N54A.js +6 -6
  93. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-KO2AKTUF.js +30 -30
  94. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/diagram-OG6HWLK6.js +82 -82
  95. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/erDiagram-TEJ5UH35.js +65 -65
  96. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-I6XJVG4X.js +227 -227
  97. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-6RSMTGT7.js +104 -104
  98. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-PVQCEYII.js +104 -104
  99. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/journeyDiagram-JHISSGLW.js +49 -49
  100. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/quadrantDiagram-W4KKPZXB.js +101 -101
  101. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sankeyDiagram-5OEKKPKP.js +20 -20
  102. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-3UESZ5HK.js +354 -354
  103. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-AJRCARHV.js +53 -53
  104. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/timeline-definition-PNZ67QCA.js +113 -113
  105. package/dist/node_modules/mermaid/dist/chunks/mermaid.core/vennDiagram-CIIHVFJN.js +90 -90
  106. package/dist/node_modules/mermaid/dist/mermaid.core.js +156 -156
  107. package/dist/node_modules/motion/dist/es/react.js +9 -2
  108. package/dist/pages/DashboardPage.js +20 -74
  109. package/dist/pages/DebugWorkflowDetailsPage.js +2 -2
  110. package/dist/pages/DebugWorkflowsPage.js +76 -106
  111. package/dist/pages/EmbedWorkbenchPage.js +1 -1
  112. package/dist/pages/PreviewWorkbenchPage.js +6 -6
  113. package/dist/pages/WorkbenchPage.js +43 -47
  114. package/dist/pages/WorkflowDebugPage.js +6 -12
  115. package/dist/pages/WorkspacePage.js +40 -66
  116. package/dist/pages/WorkspaceRunsPage.js +24 -31
  117. package/dist/routing/LocalRouter.js +1 -1
  118. package/package.json +2 -2
  119. package/dist/features/dashboard/Dashboard.js +0 -125
  120. package/dist/features/dashboard/RunItem.js +0 -78
  121. package/dist/features/dashboard/RunList.js +0 -32
  122. package/dist/hooks/useDashboard.js +0 -16
@@ -1,6 +1,6 @@
1
+ import select_default from "../../../../d3-selection/src/select.js";
1
2
  import { __name, log } from "./chunk-AGHRB4JF.js";
2
3
  import { getConfig, getConfig2, getEffectiveHtmlLabels } from "./chunk-CSCIHK7Q.js";
3
- import select_default from "../../../../d3-selection/src/select.js";
4
4
  import linear_default from "../../../../d3-shape/src/curve/linear.js";
5
5
  import line_default from "../../../../d3-shape/src/line.js";
6
6
  import { bumpX, bumpY } from "../../../../d3-shape/src/curve/bump.js";
@@ -95,89 +95,89 @@ var addEdgeMarkers = /* @__PURE__ */ __name((e, r, i, a, o, s = !1, c) => {
95
95
  "composition",
96
96
  "dependency",
97
97
  "barb"
98
- ], addEdgeMarker = /* @__PURE__ */ __name((e, i, a, o, s, c, l = !1, u) => {
98
+ ], addEdgeMarker = /* @__PURE__ */ __name((e, r, a, o, s, c, l = !1, u) => {
99
99
  let d = arrowTypesMap[a], f = d && arrowTypesWithMarginSupport.includes(d.type);
100
100
  if (!d) {
101
101
  log.warn(`Unknown arrow type: ${a}`);
102
102
  return;
103
103
  }
104
- let p = `${s}_${c}-${d.type}${i === "start" ? "Start" : "End"}${l && f ? "-margin" : ""}`;
104
+ let p = `${s}_${c}-${d.type}${r === "start" ? "Start" : "End"}${l && f ? "-margin" : ""}`;
105
105
  if (u && u.trim() !== "") {
106
- let r = `${p}_${u.replace(/[^\dA-Za-z]/g, "_")}`;
107
- if (!document.getElementById(r)) {
106
+ let i = `${p}_${u.replace(/[^\dA-Za-z]/g, "_")}`;
107
+ if (!document.getElementById(i)) {
108
108
  let e = document.getElementById(p);
109
109
  if (e) {
110
- let i = e.cloneNode(!0);
111
- i.id = r, i.querySelectorAll("path, circle, line").forEach((e) => {
110
+ let r = e.cloneNode(!0);
111
+ r.id = i, r.querySelectorAll("path, circle, line").forEach((e) => {
112
112
  e.setAttribute("stroke", u), d.fill && e.setAttribute("fill", u);
113
- }), e.parentNode?.appendChild(i);
113
+ }), e.parentNode?.appendChild(r);
114
114
  }
115
115
  }
116
- e.attr(`marker-${i}`, `url(${o}#${r})`);
117
- } else e.attr(`marker-${i}`, `url(${o}#${p})`);
116
+ e.attr(`marker-${r}`, `url(${o}#${i})`);
117
+ } else e.attr(`marker-${r}`, `url(${o}#${p})`);
118
118
  }, "addEdgeMarker"), resolveEdgeCurveType = /* @__PURE__ */ __name((e) => typeof e == "string" ? e : getConfig2()?.flowchart?.curve, "resolveEdgeCurveType"), edgeLabels = /* @__PURE__ */ new Map(), terminalLabels = /* @__PURE__ */ new Map(), clear = /* @__PURE__ */ __name(() => {
119
119
  edgeLabels.clear(), terminalLabels.clear();
120
- }, "clear"), getLabelStyles = /* @__PURE__ */ __name((e) => e ? typeof e == "string" ? e : e.reduce((e, r) => e + ";" + r, "") : "", "getLabelStyles"), insertEdgeLabel = /* @__PURE__ */ __name(async (e, i) => {
121
- let c = getConfig2(), l = getEffectiveHtmlLabels(c), { labelStyles: u } = styles2String(i);
122
- i.labelStyle = u;
123
- let d = e.insert("g").attr("class", "edgeLabel"), f = d.insert("g").attr("class", "label").attr("data-id", i.id), p = i.labelType === "markdown", m = await createText(e, i.label, {
124
- style: getLabelStyles(i.labelStyle),
120
+ }, "clear"), getLabelStyles = /* @__PURE__ */ __name((e) => e ? typeof e == "string" ? e : e.reduce((e, r) => e + ";" + r, "") : "", "getLabelStyles"), insertEdgeLabel = /* @__PURE__ */ __name(async (r, a) => {
121
+ let c = getConfig2(), l = getEffectiveHtmlLabels(c), { labelStyles: u } = styles2String(a);
122
+ a.labelStyle = u;
123
+ let d = r.insert("g").attr("class", "edgeLabel"), f = d.insert("g").attr("class", "label").attr("data-id", a.id), p = a.labelType === "markdown", m = await createText(r, a.label, {
124
+ style: getLabelStyles(a.labelStyle),
125
125
  useHtmlLabels: l,
126
126
  addSvgBackground: !0,
127
127
  isNode: !1,
128
128
  markdown: p,
129
129
  width: void 0
130
130
  }, c);
131
- f.node().appendChild(m), log.info("abc82", i, i.labelType);
131
+ f.node().appendChild(m), log.info("abc82", a, a.labelType);
132
132
  let h = m.getBBox(), g = h;
133
133
  if (l) {
134
- let e = m.children[0], r = select_default(m);
135
- h = e.getBoundingClientRect(), g = h, r.attr("width", h.width), r.attr("height", h.height);
134
+ let r = m.children[0], i = select_default(m);
135
+ h = r.getBoundingClientRect(), g = h, i.attr("width", h.width), i.attr("height", h.height);
136
136
  } else {
137
- let e = select_default(m).select("text").node();
138
- e && typeof e.getBBox == "function" && (g = e.getBBox());
137
+ let r = select_default(m).select("text").node();
138
+ r && typeof r.getBBox == "function" && (g = r.getBBox());
139
139
  }
140
- f.attr("transform", computeLabelTransform(g, l)), edgeLabels.set(i.id, d), i.width = h.width, i.height = h.height;
140
+ f.attr("transform", computeLabelTransform(g, l)), edgeLabels.set(a.id, d), a.width = h.width, a.height = h.height;
141
141
  let _;
142
- if (i.startLabelLeft) {
143
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(a, i.startLabelLeft, getLabelStyles(i.labelStyle) || "", !1, !1);
144
- _ = o;
145
- let c = o.getBBox();
142
+ if (a.startLabelLeft) {
143
+ let i = r.insert("g").attr("class", "edgeTerminals"), o = i.insert("g").attr("class", "inner"), s = await createLabel_default(o, a.startLabelLeft, getLabelStyles(a.labelStyle) || "", !1, !1);
144
+ _ = s;
145
+ let c = s.getBBox();
146
146
  if (l) {
147
- let e = o.children[0], r = select_default(o);
148
- c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
147
+ let r = s.children[0], i = select_default(s);
148
+ c = r.getBoundingClientRect(), i.attr("width", c.width), i.attr("height", c.height);
149
149
  }
150
- a.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).startLeft = r, setTerminalWidth(_, i.startLabelLeft);
150
+ o.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(a.id) || terminalLabels.set(a.id, {}), terminalLabels.get(a.id).startLeft = i, setTerminalWidth(_, a.startLabelLeft);
151
151
  }
152
- if (i.startLabelRight) {
153
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(a, i.startLabelRight, getLabelStyles(i.labelStyle) || "", !1, !1);
154
- _ = o;
155
- let c = o.getBBox();
152
+ if (a.startLabelRight) {
153
+ let i = r.insert("g").attr("class", "edgeTerminals"), o = i.insert("g").attr("class", "inner"), s = await createLabel_default(o, a.startLabelRight, getLabelStyles(a.labelStyle) || "", !1, !1);
154
+ _ = s;
155
+ let c = s.getBBox();
156
156
  if (l) {
157
- let e = o.children[0], r = select_default(o);
158
- c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
157
+ let r = s.children[0], i = select_default(s);
158
+ c = r.getBoundingClientRect(), i.attr("width", c.width), i.attr("height", c.height);
159
159
  }
160
- a.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).startRight = r, setTerminalWidth(_, i.startLabelRight);
160
+ o.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(a.id) || terminalLabels.set(a.id, {}), terminalLabels.get(a.id).startRight = i, setTerminalWidth(_, a.startLabelRight);
161
161
  }
162
- if (i.endLabelLeft) {
163
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(r, i.endLabelLeft, getLabelStyles(i.labelStyle) || "", !1, !1);
164
- _ = o;
165
- let c = o.getBBox();
162
+ if (a.endLabelLeft) {
163
+ let i = r.insert("g").attr("class", "edgeTerminals"), o = i.insert("g").attr("class", "inner"), s = await createLabel_default(i, a.endLabelLeft, getLabelStyles(a.labelStyle) || "", !1, !1);
164
+ _ = s;
165
+ let c = s.getBBox();
166
166
  if (l) {
167
- let e = o.children[0], r = select_default(o);
168
- c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
167
+ let r = s.children[0], i = select_default(s);
168
+ c = r.getBoundingClientRect(), i.attr("width", c.width), i.attr("height", c.height);
169
169
  }
170
- a.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).endLeft = r, setTerminalWidth(_, i.endLabelLeft);
170
+ o.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(a.id) || terminalLabels.set(a.id, {}), terminalLabels.get(a.id).endLeft = i, setTerminalWidth(_, a.endLabelLeft);
171
171
  }
172
- if (i.endLabelRight) {
173
- let r = e.insert("g").attr("class", "edgeTerminals"), a = r.insert("g").attr("class", "inner"), o = await createLabel_default(r, i.endLabelRight, getLabelStyles(i.labelStyle) || "", !1, !1);
174
- _ = o;
175
- let c = o.getBBox();
172
+ if (a.endLabelRight) {
173
+ let i = r.insert("g").attr("class", "edgeTerminals"), o = i.insert("g").attr("class", "inner"), s = await createLabel_default(i, a.endLabelRight, getLabelStyles(a.labelStyle) || "", !1, !1);
174
+ _ = s;
175
+ let c = s.getBBox();
176
176
  if (l) {
177
- let e = o.children[0], r = select_default(o);
178
- c = e.getBoundingClientRect(), r.attr("width", c.width), r.attr("height", c.height);
177
+ let r = s.children[0], i = select_default(s);
178
+ c = r.getBoundingClientRect(), i.attr("width", c.width), i.attr("height", c.height);
179
179
  }
180
- a.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(i.id) || terminalLabels.set(i.id, {}), terminalLabels.get(i.id).endRight = r, setTerminalWidth(_, i.endLabelRight);
180
+ o.attr("transform", computeLabelTransform(c, l)), terminalLabels.get(a.id) || terminalLabels.set(a.id, {}), terminalLabels.get(a.id).endRight = i, setTerminalWidth(_, a.endLabelRight);
181
181
  }
182
182
  return m;
183
183
  }, "insertEdgeLabel");
@@ -185,84 +185,84 @@ function setTerminalWidth(e, r) {
185
185
  getEffectiveHtmlLabels(getConfig2()) && e && (e.style.width = r.length * 9 + "px", e.style.height = "12px");
186
186
  }
187
187
  __name(setTerminalWidth, "setTerminalWidth");
188
- var positionEdgeLabel = /* @__PURE__ */ __name((e, i) => {
189
- log.debug("Moving label abc88 ", e.id, e.label, edgeLabels.get(e.id), i);
190
- let o = i.updatedPath ? i.updatedPath : i.originalPath, { subGraphTitleTotalMargin: s } = getSubGraphTitleMargins(getConfig2());
188
+ var positionEdgeLabel = /* @__PURE__ */ __name((e, r) => {
189
+ log.debug("Moving label abc88 ", e.id, e.label, edgeLabels.get(e.id), r);
190
+ let a = r.updatedPath ? r.updatedPath : r.originalPath, { subGraphTitleTotalMargin: s } = getSubGraphTitleMargins(getConfig2());
191
191
  if (e.label) {
192
- let a = edgeLabels.get(e.id), c = e.x, l = e.y;
193
- if (o) {
194
- let a = utils_default.calcLabelPosition(o);
195
- log.debug("Moving label " + e.label + " from (", c, ",", l, ") to (", a.x, ",", a.y, ") abc88"), i.updatedPath && (c = a.x, l = a.y);
192
+ let o = edgeLabels.get(e.id), c = e.x, l = e.y;
193
+ if (a) {
194
+ let o = utils_default.calcLabelPosition(a);
195
+ log.debug("Moving label " + e.label + " from (", c, ",", l, ") to (", o.x, ",", o.y, ") abc88"), r.updatedPath && (c = o.x, l = o.y);
196
196
  }
197
- a.attr("transform", `translate(${c}, ${l + s / 2})`);
197
+ o.attr("transform", `translate(${c}, ${l + s / 2})`);
198
198
  }
199
199
  if (e.startLabelLeft) {
200
- let r = terminalLabels.get(e.id).startLeft, i = e.x, a = e.y;
201
- if (o) {
202
- let r = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", o);
203
- i = r.x, a = r.y;
200
+ let r = terminalLabels.get(e.id).startLeft, i = e.x, o = e.y;
201
+ if (a) {
202
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", a);
203
+ i = r.x, o = r.y;
204
204
  }
205
- r.attr("transform", `translate(${i}, ${a})`);
205
+ r.attr("transform", `translate(${i}, ${o})`);
206
206
  }
207
207
  if (e.startLabelRight) {
208
- let r = terminalLabels.get(e.id).startRight, i = e.x, a = e.y;
209
- if (o) {
210
- let r = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", o);
211
- i = r.x, a = r.y;
208
+ let r = terminalLabels.get(e.id).startRight, i = e.x, o = e.y;
209
+ if (a) {
210
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", a);
211
+ i = r.x, o = r.y;
212
212
  }
213
- r.attr("transform", `translate(${i}, ${a})`);
213
+ r.attr("transform", `translate(${i}, ${o})`);
214
214
  }
215
215
  if (e.endLabelLeft) {
216
- let r = terminalLabels.get(e.id).endLeft, i = e.x, a = e.y;
217
- if (o) {
218
- let r = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", o);
219
- i = r.x, a = r.y;
216
+ let r = terminalLabels.get(e.id).endLeft, i = e.x, o = e.y;
217
+ if (a) {
218
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", a);
219
+ i = r.x, o = r.y;
220
220
  }
221
- r.attr("transform", `translate(${i}, ${a})`);
221
+ r.attr("transform", `translate(${i}, ${o})`);
222
222
  }
223
223
  if (e.endLabelRight) {
224
- let r = terminalLabels.get(e.id).endRight, i = e.x, a = e.y;
225
- if (o) {
226
- let r = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", o);
227
- i = r.x, a = r.y;
224
+ let r = terminalLabels.get(e.id).endRight, i = e.x, o = e.y;
225
+ if (a) {
226
+ let r = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", a);
227
+ i = r.x, o = r.y;
228
228
  }
229
- r.attr("transform", `translate(${i}, ${a})`);
229
+ r.attr("transform", `translate(${i}, ${o})`);
230
230
  }
231
231
  }, "positionEdgeLabel"), outsideNode = /* @__PURE__ */ __name((e, r) => {
232
232
  let i = e.x, a = e.y, o = Math.abs(r.x - i), s = Math.abs(r.y - a), c = e.width / 2, l = e.height / 2;
233
233
  return o >= c || s >= l;
234
- }, "outsideNode"), intersection = /* @__PURE__ */ __name((e, i, a) => {
234
+ }, "outsideNode"), intersection = /* @__PURE__ */ __name((e, r, a) => {
235
235
  log.debug(`intersection calc abc89:
236
- outsidePoint: ${JSON.stringify(i)}
236
+ outsidePoint: ${JSON.stringify(r)}
237
237
  insidePoint : ${JSON.stringify(a)}
238
238
  node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
239
- let o = e.x, s = e.y, c = Math.abs(o - a.x), l = e.width / 2, u = a.x < i.x ? l - c : l + c, d = e.height / 2, f = Math.abs(i.y - a.y), p = Math.abs(i.x - a.x);
240
- if (Math.abs(s - i.y) * l > Math.abs(o - i.x) * d) {
241
- let e = a.y < i.y ? i.y - d - s : s - d - i.y;
239
+ let o = e.x, s = e.y, c = Math.abs(o - a.x), l = e.width / 2, u = a.x < r.x ? l - c : l + c, d = e.height / 2, f = Math.abs(r.y - a.y), p = Math.abs(r.x - a.x);
240
+ if (Math.abs(s - r.y) * l > Math.abs(o - r.x) * d) {
241
+ let e = a.y < r.y ? r.y - d - s : s - d - r.y;
242
242
  u = p * e / f;
243
243
  let o = {
244
- x: a.x < i.x ? a.x + u : a.x - p + u,
245
- y: a.y < i.y ? a.y + f - e : a.y - f + e
244
+ x: a.x < r.x ? a.x + u : a.x - p + u,
245
+ y: a.y < r.y ? a.y + f - e : a.y - f + e
246
246
  };
247
- return u === 0 && (o.x = i.x, o.y = i.y), p === 0 && (o.x = i.x), f === 0 && (o.y = i.y), log.debug(`abc89 top/bottom calc, Q ${f}, q ${e}, R ${p}, r ${u}`, o), o;
247
+ return u === 0 && (o.x = r.x, o.y = r.y), p === 0 && (o.x = r.x), f === 0 && (o.y = r.y), log.debug(`abc89 top/bottom calc, Q ${f}, q ${e}, R ${p}, r ${u}`, o), o;
248
248
  } else {
249
- u = a.x < i.x ? i.x - l - o : o - l - i.x;
250
- let e = f * u / p, s = a.x < i.x ? a.x + p - u : a.x - p + u, c = a.y < i.y ? a.y + e : a.y - e;
249
+ u = a.x < r.x ? r.x - l - o : o - l - r.x;
250
+ let e = f * u / p, s = a.x < r.x ? a.x + p - u : a.x - p + u, c = a.y < r.y ? a.y + e : a.y - e;
251
251
  return log.debug(`sides calc abc89, Q ${f}, q ${e}, R ${p}, r ${u}`, {
252
252
  _x: s,
253
253
  _y: c
254
- }), u === 0 && (s = i.x, c = i.y), p === 0 && (s = i.x), f === 0 && (c = i.y), {
254
+ }), u === 0 && (s = r.x, c = r.y), p === 0 && (s = r.x), f === 0 && (c = r.y), {
255
255
  x: s,
256
256
  y: c
257
257
  };
258
258
  }
259
- }, "intersection"), cutPathAtIntersect = /* @__PURE__ */ __name((e, i) => {
260
- log.warn("abc88 cutPathAtIntersect", e, i);
259
+ }, "intersection"), cutPathAtIntersect = /* @__PURE__ */ __name((e, r) => {
260
+ log.warn("abc88 cutPathAtIntersect", e, r);
261
261
  let a = [], o = e[0], s = !1;
262
262
  return e.forEach((e) => {
263
- if (log.info("abc88 checking point", e, i), !outsideNode(i, e) && !s) {
264
- let c = intersection(i, o, e);
265
- log.debug("abc88 inside", e, o, c), log.debug("abc88 intersection", c, i);
263
+ if (log.info("abc88 checking point", e, r), !outsideNode(r, e) && !s) {
264
+ let c = intersection(r, o, e);
265
+ log.debug("abc88 inside", e, o, c), log.debug("abc88 intersection", c, r);
266
266
  let l = !1;
267
267
  a.forEach((e) => {
268
268
  l ||= e.x === c.x && e.y === c.y;
@@ -289,36 +289,36 @@ var findAdjacentPoint = /* @__PURE__ */ __name(function(e, r, i) {
289
289
  y: r.y - s * o
290
290
  };
291
291
  }, "findAdjacentPoint"), fixCorners = /* @__PURE__ */ __name(function(e) {
292
- let { cornerPointPositions: i } = extractCornerPoints(e), a = [];
293
- for (let o = 0; o < e.length; o++) if (i.includes(o)) {
294
- let i = e[o - 1], s = e[o + 1], c = e[o], l = findAdjacentPoint(i, c, 5), u = findAdjacentPoint(s, c, 5), d = u.x - l.x, f = u.y - l.y;
292
+ let { cornerPointPositions: r } = extractCornerPoints(e), a = [];
293
+ for (let o = 0; o < e.length; o++) if (r.includes(o)) {
294
+ let r = e[o - 1], s = e[o + 1], c = e[o], l = findAdjacentPoint(r, c, 5), u = findAdjacentPoint(s, c, 5), d = u.x - l.x, f = u.y - l.y;
295
295
  a.push(l);
296
296
  let p = Math.sqrt(2) * 2, m = {
297
297
  x: c.x,
298
298
  y: c.y
299
299
  };
300
- Math.abs(s.x - i.x) > 10 && Math.abs(s.y - i.y) >= 10 ? (log.debug("Corner point fixing", Math.abs(s.x - i.x), Math.abs(s.y - i.y)), m = c.x === l.x ? {
300
+ Math.abs(s.x - r.x) > 10 && Math.abs(s.y - r.y) >= 10 ? (log.debug("Corner point fixing", Math.abs(s.x - r.x), Math.abs(s.y - r.y)), m = c.x === l.x ? {
301
301
  x: d < 0 ? l.x - 5 + p : l.x + 5 - p,
302
302
  y: f < 0 ? l.y - p : l.y + p
303
303
  } : {
304
304
  x: d < 0 ? l.x - p : l.x + p,
305
305
  y: f < 0 ? l.y - 5 + p : l.y + 5 - p
306
- }) : log.debug("Corner point skipping fixing", Math.abs(s.x - i.x), Math.abs(s.y - i.y)), a.push(m, u);
306
+ }) : log.debug("Corner point skipping fixing", Math.abs(s.x - r.x), Math.abs(s.y - r.y)), a.push(m, u);
307
307
  } else a.push(e[o]);
308
308
  return a;
309
309
  }, "fixCorners"), generateDashArray = /* @__PURE__ */ __name((e, r, i) => {
310
310
  let a = e - r - i, o = Math.floor(a / 4);
311
311
  return `0 ${r} ${Array(o).fill("2 2").join(" ")} ${i}`;
312
- }, "generateDashArray"), insertEdge = /* @__PURE__ */ __name(function(e, i, o, x, C, E, D, O = !1) {
313
- if (!D) throw Error(`insertEdge: missing diagramId for edge "${i.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);
314
- let { handDrawnSeed: k } = getConfig2(), A = i.points, j = !1, M = C;
312
+ }, "generateDashArray"), insertEdge = /* @__PURE__ */ __name(function(r, a, s, x, C, E, D, O = !1) {
313
+ if (!D) throw Error(`insertEdge: missing diagramId for edge "${a.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);
314
+ let { handDrawnSeed: k } = getConfig2(), A = a.points, j = !1, M = C;
315
315
  var N = E;
316
316
  let P = [];
317
- for (let e in i.cssCompiledStyles) isLabelStyle(e) || P.push(i.cssCompiledStyles[e]);
318
- log.debug("UIO intersect check", i.points, N.x, M.x), N.intersect && M.intersect && !O && (A = A.slice(1, i.points.length - 1), A.unshift(M.intersect(A[0])), log.debug("Last point UIO", i.start, "-->", i.end, A[A.length - 1], N, N.intersect(A[A.length - 1])), A.push(N.intersect(A[A.length - 1])));
317
+ for (let e in a.cssCompiledStyles) isLabelStyle(e) || P.push(a.cssCompiledStyles[e]);
318
+ log.debug("UIO intersect check", a.points, N.x, M.x), N.intersect && M.intersect && !O && (A = A.slice(1, a.points.length - 1), A.unshift(M.intersect(A[0])), log.debug("Last point UIO", a.start, "-->", a.end, A[A.length - 1], N, N.intersect(A[A.length - 1])), A.push(N.intersect(A[A.length - 1])));
319
319
  let F = btoa(JSON.stringify(A));
320
- i.toCluster && (log.info("to cluster abc88", o.get(i.toCluster)), A = cutPathAtIntersect(i.points, o.get(i.toCluster).node), j = !0), i.fromCluster && (log.debug("from cluster abc88", o.get(i.fromCluster), JSON.stringify(A, null, 2)), A = cutPathAtIntersect(A.reverse(), o.get(i.fromCluster).node).reverse(), j = !0);
321
- let I = A.filter((e) => !Number.isNaN(e.y)), L = resolveEdgeCurveType(i.curve);
320
+ a.toCluster && (log.info("to cluster abc88", s.get(a.toCluster)), A = cutPathAtIntersect(a.points, s.get(a.toCluster).node), j = !0), a.fromCluster && (log.debug("from cluster abc88", s.get(a.fromCluster), JSON.stringify(A, null, 2)), A = cutPathAtIntersect(A.reverse(), s.get(a.fromCluster).node).reverse(), j = !0);
321
+ let I = A.filter((e) => !Number.isNaN(e.y)), L = resolveEdgeCurveType(a.curve);
322
322
  L !== "rounded" && (I = fixCorners(I));
323
323
  let R = linear_default;
324
324
  switch (L) {
@@ -363,8 +363,8 @@ var findAdjacentPoint = /* @__PURE__ */ __name(function(e, r, i) {
363
363
  break;
364
364
  default: R = basis_default;
365
365
  }
366
- let { x: z, y: B } = getLineFunctionsWithOffset(i), V = line_default().x(z).y(B).curve(R), H;
367
- switch (i.thickness) {
366
+ let { x: z, y: B } = getLineFunctionsWithOffset(a), V = line_default().x(z).y(B).curve(R), H;
367
+ switch (a.thickness) {
368
368
  case "normal":
369
369
  H = "edge-thickness-normal";
370
370
  break;
@@ -376,7 +376,7 @@ var findAdjacentPoint = /* @__PURE__ */ __name(function(e, r, i) {
376
376
  break;
377
377
  default: H = "edge-thickness-normal";
378
378
  }
379
- switch (i.pattern) {
379
+ switch (a.pattern) {
380
380
  case "solid":
381
381
  H += " edge-pattern-solid";
382
382
  break;
@@ -388,39 +388,39 @@ var findAdjacentPoint = /* @__PURE__ */ __name(function(e, r, i) {
388
388
  break;
389
389
  default: H += " edge-pattern-solid";
390
390
  }
391
- let U, W = L === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(I, i), 5) : V(I), G = Array.isArray(i.style) ? i.style : [i.style], K = G.find((e) => e?.startsWith("stroke:")), q = "";
392
- i.animate && (q = "edge-animation-fast"), i.animation && (q = "edge-animation-" + i.animation);
391
+ let U, W = L === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(I, a), 5) : V(I), G = Array.isArray(a.style) ? a.style : [a.style], K = G.find((e) => e?.startsWith("stroke:")), q = "";
392
+ a.animate && (q = "edge-animation-fast"), a.animation && (q = "edge-animation-" + a.animation);
393
393
  let J = !1;
394
- if (i.look === "handDrawn") {
395
- let r = at.svg(e);
394
+ if (a.look === "handDrawn") {
395
+ let i = at.svg(r);
396
396
  Object.assign([], I);
397
- let a = r.path(W, {
397
+ let o = i.path(W, {
398
398
  roughness: .3,
399
399
  seed: k
400
400
  });
401
- H += " transition", U = select_default(a).select("path").attr("id", `${D}-${i.id}`).attr("class", " " + H + (i.classes ? " " + i.classes : "") + (q ? " " + q : "")).attr("style", G ? G.reduce((e, r) => e + ";" + r, "") : "");
402
- let o = U.attr("d");
403
- U.attr("d", o), e.node().appendChild(U.node());
401
+ H += " transition", U = select_default(o).select("path").attr("id", `${D}-${a.id}`).attr("class", " " + H + (a.classes ? " " + a.classes : "") + (q ? " " + q : "")).attr("style", G ? G.reduce((e, r) => e + ";" + r, "") : "");
402
+ let s = U.attr("d");
403
+ U.attr("d", s), r.node().appendChild(U.node());
404
404
  } else {
405
- let r = P.join(";"), a = G ? G.reduce((e, r) => e + r + ";", "") : "", o = (r ? r + ";" + a + ";" : a) + ";" + (G ? G.reduce((e, r) => e + ";" + r, "") : "");
406
- U = e.append("path").attr("d", W).attr("id", `${D}-${i.id}`).attr("class", " " + H + (i.classes ? " " + i.classes : "") + (q ? " " + q : "")).attr("style", o), K = o.match(/stroke:([^;]+)/)?.[1], J = i.animate === !0 || !!i.animation || r.includes("animation");
407
- let s = U.node(), c = typeof s.getTotalLength == "function" ? s.getTotalLength() : 0, l = markerOffsets2[i.arrowTypeStart] || 0, u = markerOffsets2[i.arrowTypeEnd] || 0;
408
- if (i.look === "neo" && !J) {
409
- let e = `stroke-dasharray: ${i.pattern === "dotted" || i.pattern === "dashed" ? generateDashArray(c, l, u) : `0 ${l} ${c - l - u} ${u}`}; stroke-dashoffset: 0;`;
405
+ let e = P.join(";"), i = G ? G.reduce((e, r) => e + r + ";", "") : "", o = (e ? e + ";" + i + ";" : i) + ";" + (G ? G.reduce((e, r) => e + ";" + r, "") : "");
406
+ U = r.append("path").attr("d", W).attr("id", `${D}-${a.id}`).attr("class", " " + H + (a.classes ? " " + a.classes : "") + (q ? " " + q : "")).attr("style", o), K = o.match(/stroke:([^;]+)/)?.[1], J = a.animate === !0 || !!a.animation || e.includes("animation");
407
+ let s = U.node(), c = typeof s.getTotalLength == "function" ? s.getTotalLength() : 0, l = markerOffsets2[a.arrowTypeStart] || 0, u = markerOffsets2[a.arrowTypeEnd] || 0;
408
+ if (a.look === "neo" && !J) {
409
+ let e = `stroke-dasharray: ${a.pattern === "dotted" || a.pattern === "dashed" ? generateDashArray(c, l, u) : `0 ${l} ${c - l - u} ${u}`}; stroke-dashoffset: 0;`;
410
410
  U.attr("style", e + U.attr("style"));
411
411
  }
412
412
  }
413
- U.attr("data-edge", !0), U.attr("data-et", "edge"), U.attr("data-id", i.id), U.attr("data-points", F), U.attr("data-look", handleUndefinedAttr(i.look)), i.showPoints && I.forEach((r) => {
414
- e.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", r.x).attr("cy", r.y);
413
+ U.attr("data-edge", !0), U.attr("data-et", "edge"), U.attr("data-id", a.id), U.attr("data-points", F), U.attr("data-look", handleUndefinedAttr(a.look)), a.showPoints && I.forEach((e) => {
414
+ r.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", e.x).attr("cy", e.y);
415
415
  });
416
416
  let Y = "";
417
- (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) && (Y = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Y = Y.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), log.info("arrowTypeStart", i.arrowTypeStart), log.info("arrowTypeEnd", i.arrowTypeEnd);
418
- let X = !J && i?.look === "neo";
419
- addEdgeMarkers(U, i, Y, D, x, X, K);
417
+ (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) && (Y = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Y = Y.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), log.info("arrowTypeStart", a.arrowTypeStart), log.info("arrowTypeEnd", a.arrowTypeEnd);
418
+ let X = !J && a?.look === "neo";
419
+ addEdgeMarkers(U, a, Y, D, x, X, K);
420
420
  let Z = Math.floor(A.length / 2), Q = A[Z];
421
421
  utils_default.isLabelCoordinateInPath(Q, U.attr("d")) || (j = !0);
422
422
  let $ = {};
423
- return j && ($.updatedPath = A), $.originalPath = i.points, $;
423
+ return j && ($.updatedPath = A), $.originalPath = a.points, $;
424
424
  }, "insertEdge");
425
425
  function generateRoundedPath(e, r) {
426
426
  if (e.length < 2) return "";
@@ -480,8 +480,8 @@ var insertMarkers = /* @__PURE__ */ __name((e, r, i, a) => {
480
480
  markers[r](e, i, a);
481
481
  });
482
482
  }, "insertMarkers"), markers = {
483
- extension: /* @__PURE__ */ __name((e, i, a) => {
484
- log.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + i + "-extensionStart").attr("class", "marker extension " + i).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + i + "-extensionEnd").attr("class", "marker extension " + i).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), e.append("marker").attr("id", a + "_" + i + "-extensionStart-margin").attr("class", "marker extension " + i).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,7 18,13 18,1").style("stroke-width", 2).style("stroke-dasharray", "0"), e.append("defs").append("marker").attr("id", a + "_" + i + "-extensionEnd-margin").attr("class", "marker extension " + i).attr("refX", 9).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,1 10,13 18,7").style("stroke-width", 2).style("stroke-dasharray", "0");
483
+ extension: /* @__PURE__ */ __name((e, r, a) => {
484
+ log.trace("Making markers for ", a), e.append("defs").append("marker").attr("id", a + "_" + r + "-extensionStart").attr("class", "marker extension " + r).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", a + "_" + r + "-extensionEnd").attr("class", "marker extension " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z"), e.append("marker").attr("id", a + "_" + r + "-extensionStart-margin").attr("class", "marker extension " + r).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,7 18,13 18,1").style("stroke-width", 2).style("stroke-dasharray", "0"), e.append("defs").append("marker").attr("id", a + "_" + r + "-extensionEnd-margin").attr("class", "marker extension " + r).attr("refX", 9).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,1 10,13 18,7").style("stroke-width", 2).style("stroke-dasharray", "0");
485
485
  }, "extension"),
486
486
  composition: /* @__PURE__ */ __name((e, r, i) => {
487
487
  e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionStart").attr("class", "marker composition " + r).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionEnd").attr("class", "marker composition " + r).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionStart-margin").attr("class", "marker composition " + r).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("viewBox", "0 0 15 15").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-compositionEnd-margin").attr("class", "marker composition " + r).attr("refX", 3.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
@@ -507,9 +507,9 @@ var insertMarkers = /* @__PURE__ */ __name((e, r, i, a) => {
507
507
  barb: /* @__PURE__ */ __name((e, r, i) => {
508
508
  e.append("defs").append("marker").attr("id", i + "_" + r + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
509
509
  }, "barb"),
510
- barbNeo: /* @__PURE__ */ __name((e, r, a) => {
510
+ barbNeo: /* @__PURE__ */ __name((e, r, i) => {
511
511
  let { themeVariables: o } = getConfig(), { transitionColor: s } = o;
512
- e.append("defs").append("marker").attr("id", a + "_" + r + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z"), e.append("defs").append("marker").attr("id", a + "_" + r + "-barbEnd-margin").attr("refX", 17).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z").attr("fill", `${s}`);
512
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z"), e.append("defs").append("marker").attr("id", i + "_" + r + "-barbEnd-margin").attr("refX", 17).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z").attr("fill", `${s}`);
513
513
  }, "barbNeo"),
514
514
  only_one: /* @__PURE__ */ __name((e, r, i) => {
515
515
  e.append("defs").append("marker").attr("id", i + "_" + r + "-onlyOneStart").attr("class", "marker onlyOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18"), e.append("defs").append("marker").attr("id", i + "_" + r + "-onlyOneEnd").attr("class", "marker onlyOne " + r).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
@@ -529,24 +529,24 @@ var insertMarkers = /* @__PURE__ */ __name((e, r, i, a) => {
529
529
  let o = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + r).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
530
530
  o.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), o.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
531
531
  }, "zero_or_more"),
532
- only_one_neo: /* @__PURE__ */ __name((e, r, a) => {
532
+ only_one_neo: /* @__PURE__ */ __name((e, r, i) => {
533
533
  let { themeVariables: o } = getConfig(), { strokeWidth: s } = o;
534
- e.append("defs").append("marker").attr("id", a + "_" + r + "-onlyOneStart").attr("class", "marker onlyOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18").attr("stroke-width", `${s}`), e.append("defs").append("marker").attr("id", a + "_" + r + "-onlyOneEnd").attr("class", "marker onlyOne " + r).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18").attr("stroke-width", `${s}`);
534
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-onlyOneStart").attr("class", "marker onlyOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18").attr("stroke-width", `${s}`), e.append("defs").append("marker").attr("id", i + "_" + r + "-onlyOneEnd").attr("class", "marker onlyOne " + r).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18").attr("stroke-width", `${s}`);
535
535
  }, "only_one_neo"),
536
- zero_or_one_neo: /* @__PURE__ */ __name((e, r, a) => {
537
- let { themeVariables: o } = getConfig(), { strokeWidth: s, mainBkg: c } = o, l = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
536
+ zero_or_one_neo: /* @__PURE__ */ __name((e, r, i) => {
537
+ let { themeVariables: o } = getConfig(), { strokeWidth: s, mainBkg: c } = o, l = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + r).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
538
538
  l.append("circle").attr("fill", c ?? "white").attr("cx", 21).attr("cy", 9).attr("stroke-width", `${s}`).attr("r", 6), l.append("path").attr("d", "M9,0 L9,18").attr("stroke-width", `${s}`);
539
- let u = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + r).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
539
+ let u = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + r).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
540
540
  u.append("circle").attr("fill", c ?? "white").attr("cx", 9).attr("cy", 9).attr("stroke-width", `${s}`).attr("r", 6), u.append("path").attr("d", "M21,0 L21,18").attr("stroke-width", `${s}`);
541
541
  }, "zero_or_one_neo"),
542
- one_or_more_neo: /* @__PURE__ */ __name((e, r, a) => {
542
+ one_or_more_neo: /* @__PURE__ */ __name((e, r, i) => {
543
543
  let { themeVariables: o } = getConfig(), { strokeWidth: s } = o;
544
- e.append("defs").append("marker").attr("id", a + "_" + r + "-oneOrMoreStart").attr("class", "marker oneOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width", `${s}`), e.append("defs").append("marker").attr("id", a + "_" + r + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + r).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width", `${s}`);
544
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-oneOrMoreStart").attr("class", "marker oneOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width", `${s}`), e.append("defs").append("marker").attr("id", i + "_" + r + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + r).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width", `${s}`);
545
545
  }, "one_or_more_neo"),
546
- zero_or_more_neo: /* @__PURE__ */ __name((e, r, a) => {
547
- let { themeVariables: o } = getConfig(), { strokeWidth: s, mainBkg: c } = o, l = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
546
+ zero_or_more_neo: /* @__PURE__ */ __name((e, r, i) => {
547
+ let { themeVariables: o } = getConfig(), { strokeWidth: s, mainBkg: c } = o, l = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + r).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto");
548
548
  l.append("circle").attr("fill", c ?? "white").attr("cx", 45.5).attr("cy", 18).attr("r", 6).attr("stroke-width", `${s}`), l.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width", `${s}`);
549
- let u = e.append("defs").append("marker").attr("id", a + "_" + r + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + r).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
549
+ let u = e.append("defs").append("marker").attr("id", i + "_" + r + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + r).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse");
550
550
  u.append("circle").attr("fill", c ?? "white").attr("cx", 11).attr("cy", 18).attr("r", 6).attr("stroke-width", `${s}`), u.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width", `${s}`);
551
551
  }, "zero_or_more_neo"),
552
552
  requirement_arrow: /* @__PURE__ */ __name((e, r, i) => {
@@ -556,12 +556,12 @@ var insertMarkers = /* @__PURE__ */ __name((e, r, i, a) => {
556
556
  let a = e.append("defs").append("marker").attr("id", i + "_" + r + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
557
557
  a.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), a.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), a.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
558
558
  }, "requirement_contains"),
559
- requirement_arrow_neo: /* @__PURE__ */ __name((e, r, a) => {
559
+ requirement_arrow_neo: /* @__PURE__ */ __name((e, r, i) => {
560
560
  let { themeVariables: o } = getConfig(), { strokeWidth: s } = o;
561
- e.append("defs").append("marker").attr("id", a + "_" + r + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("stroke-width", `${s}`).attr("viewBox", "0 0 25 20").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin", "miter");
561
+ e.append("defs").append("marker").attr("id", i + "_" + r + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("stroke-width", `${s}`).attr("viewBox", "0 0 25 20").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin", "miter");
562
562
  }, "requirement_arrow_neo"),
563
- requirement_contains_neo: /* @__PURE__ */ __name((e, r, a) => {
564
- let { themeVariables: o } = getConfig(), { strokeWidth: s } = o, c = e.append("defs").append("marker").attr("id", a + "_" + r + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("g");
563
+ requirement_contains_neo: /* @__PURE__ */ __name((e, r, i) => {
564
+ let { themeVariables: o } = getConfig(), { strokeWidth: s } = o, c = e.append("defs").append("marker").attr("id", i + "_" + r + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("g");
565
565
  c.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), c.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), c.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10), c.selectAll("*").attr("stroke-width", `${s}`);
566
566
  }, "requirement_contains_neo")
567
567
  }, markers_default = insertMarkers;
@@ -1,6 +1,6 @@
1
+ import select_default from "../../../../d3-selection/src/select.js";
1
2
  import { __name } from "./chunk-AGHRB4JF.js";
2
3
  import { lineBreakRegex } from "./chunk-CSCIHK7Q.js";
3
- import select_default from "../../../../d3-selection/src/select.js";
4
4
  import "../../../../d3/src/index.js";
5
5
  import { require_dist } from "../../../../@braintree/sanitize-url/dist/index.js";
6
6
  var import_dist = require_dist(), drawRect = /* @__PURE__ */ __name((e, s) => {
@@ -17,11 +17,11 @@ var import_dist = require_dist(), drawRect = /* @__PURE__ */ __name((e, s) => {
17
17
  stroke: s.stroke,
18
18
  class: "rect"
19
19
  }).lower();
20
- }, "drawBackgroundRect"), drawText = /* @__PURE__ */ __name((e, c) => {
21
- let l = c.text.replace(lineBreakRegex, " "), u = e.append("text");
22
- u.attr("x", c.x), u.attr("y", c.y), u.attr("class", "legend"), u.style("text-anchor", c.anchor), c.class && u.attr("class", c.class);
20
+ }, "drawBackgroundRect"), drawText = /* @__PURE__ */ __name((e, s) => {
21
+ let l = s.text.replace(lineBreakRegex, " "), u = e.append("text");
22
+ u.attr("x", s.x), u.attr("y", s.y), u.attr("class", "legend"), u.style("text-anchor", s.anchor), s.class && u.attr("class", s.class);
23
23
  let d = u.append("tspan");
24
- return d.attr("x", c.x + c.textMargin * 2), d.text(l), u;
24
+ return d.attr("x", s.x + s.textMargin * 2), d.text(l), u;
25
25
  }, "drawText"), drawImage = /* @__PURE__ */ __name((e, s, c, l) => {
26
26
  let d = e.append("image");
27
27
  d.attr("x", s), d.attr("y", c);
@@ -54,7 +54,7 @@ var import_dist = require_dist(), drawRect = /* @__PURE__ */ __name((e, s) => {
54
54
  ry: 0,
55
55
  tspan: !0
56
56
  }), "getTextObj"), createTooltip = /* @__PURE__ */ __name(() => {
57
- let e = select_default(".mermaidTooltip");
58
- return e.empty() && (e = select_default("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0).style("position", "absolute").style("text-align", "center").style("max-width", "200px").style("padding", "2px").style("font-size", "12px").style("background", "#ffffde").style("border", "1px solid #333").style("border-radius", "2px").style("pointer-events", "none").style("z-index", "100")), e;
57
+ let s = select_default(".mermaidTooltip");
58
+ return s.empty() && (s = select_default("body").append("div").attr("class", "mermaidTooltip").style("opacity", 0).style("position", "absolute").style("text-align", "center").style("max-width", "200px").style("padding", "2px").style("font-size", "12px").style("background", "#ffffde").style("border", "1px solid #333").style("border-radius", "2px").style("pointer-events", "none").style("z-index", "100")), s;
59
59
  }, "createTooltip");
60
60
  export { createTooltip, drawBackgroundRect, drawEmbeddedImage, drawImage, drawRect, drawText, getNoteRect, getTextObj };