@n8n-zengchao/chat 0.62.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 (151) hide show
  1. package/README.md +289 -0
  2. package/dist/App.vue.d.ts +2 -0
  3. package/dist/__stories__/App.stories.d.ts +18 -0
  4. package/dist/__tests__/Input.spec.d.ts +1 -0
  5. package/dist/__tests__/api/generic.spec.d.ts +1 -0
  6. package/dist/__tests__/api/message.spec.d.ts +1 -0
  7. package/dist/__tests__/index.spec.d.ts +1 -0
  8. package/dist/__tests__/plugins/chat.spec.d.ts +1 -0
  9. package/dist/__tests__/plugins/chat.test.d.ts +1 -0
  10. package/dist/__tests__/setup.d.ts +0 -0
  11. package/dist/__tests__/utils/create.d.ts +5 -0
  12. package/dist/__tests__/utils/fetch.d.ts +13 -0
  13. package/dist/__tests__/utils/index.d.ts +3 -0
  14. package/dist/__tests__/utils/selectors.d.ts +12 -0
  15. package/dist/__tests__/utils/streaming.spec.d.ts +1 -0
  16. package/dist/__tests__/utils/streamingHandlers.spec.d.ts +1 -0
  17. package/dist/_basePickBy-aQilsjEs.mjs +106 -0
  18. package/dist/_baseUniq-Agc10qFQ.mjs +232 -0
  19. package/dist/api/generic.d.ts +7 -0
  20. package/dist/api/index.d.ts +2 -0
  21. package/dist/api/message.d.ts +11 -0
  22. package/dist/arc-EhYU_DB1.mjs +79 -0
  23. package/dist/architecture-U656AL7Q-B1STlXpR.mjs +10 -0
  24. package/dist/architectureDiagram-VXUJARFQ-DOVAbXSw.mjs +4054 -0
  25. package/dist/array-B5w981Vk.mjs +5 -0
  26. package/dist/blockDiagram-VD42YOAC-BsX3Fkg3.mjs +3013 -0
  27. package/dist/c4Diagram-YG6GDRKO-B5JaLuX6.mjs +2957 -0
  28. package/dist/channel-CqrIo07y.mjs +4 -0
  29. package/dist/chat.bundle.es.js +37656 -0
  30. package/dist/chat.bundle.umd.js +2784 -0
  31. package/dist/chat.es.js +35738 -0
  32. package/dist/chat.umd.js +2776 -0
  33. package/dist/chunk-4BX2VUAB-dn0RXIrC.mjs +7 -0
  34. package/dist/chunk-55IACEB6-DrIttNoL.mjs +7 -0
  35. package/dist/chunk-76Q3JFCE-D7DMbWeQ.mjs +20 -0
  36. package/dist/chunk-ABZYJK2D-_NXv778f.mjs +2516 -0
  37. package/dist/chunk-ATLVNIR6-CBnG7Ev9.mjs +66 -0
  38. package/dist/chunk-B4BG7PRW-DElmmAse.mjs +3109 -0
  39. package/dist/chunk-CVBHYZKI-kPsSw5G9.mjs +11 -0
  40. package/dist/chunk-DI55MBZ5-Bw6uFFfD.mjs +1995 -0
  41. package/dist/chunk-DZXZ2BO8.mjs +19 -0
  42. package/dist/chunk-EXTU4WIE-DWzncOZf.mjs +8 -0
  43. package/dist/chunk-FMBD7UC4-CQf-nVrj.mjs +4 -0
  44. package/dist/chunk-FPAJGGOC-HRc6DGju.mjs +12254 -0
  45. package/dist/chunk-FWNWRKHM-CGiJVNMo.mjs +57 -0
  46. package/dist/chunk-HN2XXSSU-DMfVdeUE.mjs +75 -0
  47. package/dist/chunk-JA3XYJ7Z-b0Li4NN8.mjs +1834 -0
  48. package/dist/chunk-JZLCHNYA-C_4MLySW.mjs +4862 -0
  49. package/dist/chunk-KS23V3DP-BRKOfbU6.mjs +136 -0
  50. package/dist/chunk-LBM3YZW2-JIQK8wiH.mjs +20 -0
  51. package/dist/chunk-LHMN2FUI-PNCyIUgu.mjs +20 -0
  52. package/dist/chunk-MI3HLSF2-B9GTCmLp.mjs +1146 -0
  53. package/dist/chunk-N4CR4FBY-CjlmnCPD.mjs +40 -0
  54. package/dist/chunk-O7ZBX7Z2-DmJUfqJj.mjs +27 -0
  55. package/dist/chunk-QN33PNHL-nN1zLFSf.mjs +24 -0
  56. package/dist/chunk-QXUST7PY-CY78Btj9.mjs +487 -0
  57. package/dist/chunk-QZHKN3VN-BF5N1pfB.mjs +12 -0
  58. package/dist/chunk-S3R3BYOJ-BhFsv0Go.mjs +1076 -0
  59. package/dist/chunk-S6J4BHB3-BvrWTdbl.mjs +20 -0
  60. package/dist/chunk-T53DSG4Q-XzY06amw.mjs +25 -0
  61. package/dist/chunk-TZMSLE5B-DVmJQ8eg.mjs +57 -0
  62. package/dist/classDiagram-2ON5EDUG-CKxiEVX9.mjs +33 -0
  63. package/dist/classDiagram-v2-WZHVMYZB-sAa_2keq.mjs +33 -0
  64. package/dist/clone-nkGlb0Gn.mjs +8 -0
  65. package/dist/components/Button.vue.d.ts +17 -0
  66. package/dist/components/Chat.vue.d.ts +2 -0
  67. package/dist/components/ChatFile.vue.d.ts +11 -0
  68. package/dist/components/ChatWindow.vue.d.ts +2 -0
  69. package/dist/components/GetStarted.vue.d.ts +2 -0
  70. package/dist/components/GetStartedFooter.vue.d.ts +2 -0
  71. package/dist/components/Input.vue.d.ts +39 -0
  72. package/dist/components/Layout.vue.d.ts +23 -0
  73. package/dist/components/Message.vue.d.ts +39 -0
  74. package/dist/components/MessageTyping.vue.d.ts +76 -0
  75. package/dist/components/MessagesList.vue.d.ts +164 -0
  76. package/dist/components/PoweredBy.vue.d.ts +2 -0
  77. package/dist/components/index.d.ts +10 -0
  78. package/dist/composables/index.d.ts +3 -0
  79. package/dist/composables/useChat.d.ts +2 -0
  80. package/dist/composables/useI18n.d.ts +4 -0
  81. package/dist/composables/useOptions.d.ts +4 -0
  82. package/dist/constants/defaults.d.ts +3 -0
  83. package/dist/constants/index.d.ts +3 -0
  84. package/dist/constants/localStorage.d.ts +2 -0
  85. package/dist/constants/symbols.d.ts +4 -0
  86. package/dist/cose-bilkent-S5V4N54A-1lKG2PUg.mjs +2251 -0
  87. package/dist/cytoscape.esm-Dls1_mGy.mjs +18108 -0
  88. package/dist/dagre-6UL2VRFP-CbWFu9xQ.mjs +300 -0
  89. package/dist/dagre-DEdOheHq.mjs +1385 -0
  90. package/dist/defaultLocale-CyoQm63E.mjs +178 -0
  91. package/dist/diagram-PSM6KHXK-CJcHbrJH.mjs +499 -0
  92. package/dist/diagram-QEK2KX5R-XQ9XOVL4.mjs +228 -0
  93. package/dist/diagram-S2PKOQOG-CmRfaeSf.mjs +146 -0
  94. package/dist/dist-BT0fjU7K.mjs +50 -0
  95. package/dist/erDiagram-Q2GNP2WA-iuoUWHwm.mjs +1603 -0
  96. package/dist/event-buses/chatEventBus.d.ts +1 -0
  97. package/dist/event-buses/index.d.ts +1 -0
  98. package/dist/favicon.ico +0 -0
  99. package/dist/flowDiagram-NV44I4VS-D3GMS8-G.mjs +4132 -0
  100. package/dist/ganttDiagram-LVOFAZNH-DMTZVZDR.mjs +2832 -0
  101. package/dist/gitGraph-F6HP7TQM-CrdUzURw.mjs +10 -0
  102. package/dist/gitGraphDiagram-NY62KEGX-DipP5Fgt.mjs +636 -0
  103. package/dist/graphlib-D9eH5icd.mjs +224 -0
  104. package/dist/index.d.ts +2 -0
  105. package/dist/info-NVLQJR56-C-93Yf3U.mjs +10 -0
  106. package/dist/infoDiagram-F6ZHWCRC-jM50s26K.mjs +33 -0
  107. package/dist/init-CYeu4QfE.mjs +14 -0
  108. package/dist/isArrayLikeObject-BPcFdnyK.mjs +459 -0
  109. package/dist/isUndefined-BvarJ1wS.mjs +374 -0
  110. package/dist/journeyDiagram-XKPGCS4Q-BEEO_0Bh.mjs +885 -0
  111. package/dist/kanban-definition-3W4ZIXB7-B8u_HDmL.mjs +971 -0
  112. package/dist/katex-Dc1vXbUC.mjs +22094 -0
  113. package/dist/line-BJxACIPZ.mjs +31 -0
  114. package/dist/linear-DHHVI-cj.mjs +251 -0
  115. package/dist/math-Byg0NvhS.mjs +9 -0
  116. package/dist/mermaid-parser.core-YT4qvimq.mjs +49 -0
  117. package/dist/mindmap-definition-VGOIOE7T-ah41V88S.mjs +960 -0
  118. package/dist/now-DsJMgI1z.mjs +6 -0
  119. package/dist/ordinal-L0-EVPg8.mjs +62 -0
  120. package/dist/packet-BFZMPI3H-Cs4kRHct.mjs +10 -0
  121. package/dist/path-BcDHwjEr.mjs +80 -0
  122. package/dist/pie-7BOR55EZ-YZ5Xu4o6.mjs +10 -0
  123. package/dist/pieDiagram-ADFJNKIX-CqI33m1a.mjs +174 -0
  124. package/dist/plugins/chat.d.ts +3 -0
  125. package/dist/plugins/index.d.ts +1 -0
  126. package/dist/quadrantDiagram-AYHSOK5B-DDv2X9c1.mjs +1971 -0
  127. package/dist/radar-NHE76QYJ-TpirOFtv.mjs +10 -0
  128. package/dist/requirementDiagram-UZGBJVZJ-DXa77VzO.mjs +2194 -0
  129. package/dist/sankeyDiagram-TZEHDZUN--B9DInJC.mjs +885 -0
  130. package/dist/sequenceDiagram-WL72ISMW-Dqn9jJ3g.mjs +3562 -0
  131. package/dist/src-DdwtiGjk.mjs +1976 -0
  132. package/dist/stateDiagram-FKZM4ZOC-D3eEcVjS.mjs +226 -0
  133. package/dist/stateDiagram-v2-4FDKWEC3-dzwJ4caL.mjs +32 -0
  134. package/dist/style.css +3 -0
  135. package/dist/timeline-definition-IT6M3QCI-z93ry7RN.mjs +831 -0
  136. package/dist/toInteger-1S_4Byef.mjs +36 -0
  137. package/dist/treemap-KMMF4GRG-BlF0Ev1z.mjs +10 -0
  138. package/dist/types/chat.d.ts +13 -0
  139. package/dist/types/index.d.ts +5 -0
  140. package/dist/types/messages.d.ts +17 -0
  141. package/dist/types/options.d.ts +33 -0
  142. package/dist/types/streaming.d.ts +18 -0
  143. package/dist/types/webhook.d.ts +19 -0
  144. package/dist/utils/event-bus.d.ts +8 -0
  145. package/dist/utils/index.d.ts +3 -0
  146. package/dist/utils/mount.d.ts +1 -0
  147. package/dist/utils/streaming.d.ts +26 -0
  148. package/dist/utils/streamingHandlers.d.ts +6 -0
  149. package/dist/utils/utils.d.ts +1 -0
  150. package/dist/xychartDiagram-PRI3JC2R-C3aDcgBz.mjs +2022 -0
  151. package/package.json +78 -0
@@ -0,0 +1,40 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import { d as interpolateToCurve } from "./chunk-S3R3BYOJ-BhFsv0Go.mjs";
3
+ import { g as log, h as __name } from "./src-DdwtiGjk.mjs";
4
+ import { s as common_default, y as getConfig } from "./chunk-ABZYJK2D-_NXv778f.mjs";
5
+ import { a as insertNode, i as insertCluster, s as labelHelper } from "./chunk-JZLCHNYA-C_4MLySW.mjs";
6
+ import { a as positionEdgeLabel, i as markers_default, n as insertEdge, r as insertEdgeLabel } from "./chunk-QXUST7PY-CY78Btj9.mjs";
7
+ var internalHelpers = {
8
+ common: common_default,
9
+ getConfig,
10
+ insertCluster,
11
+ insertEdge,
12
+ insertEdgeLabel,
13
+ insertMarkers: markers_default,
14
+ insertNode,
15
+ interpolateToCurve,
16
+ labelHelper,
17
+ log,
18
+ positionEdgeLabel
19
+ }, layoutAlgorithms = {}, registerLayoutLoaders = /* @__PURE__ */ __name((e) => {
20
+ for (let h of e) layoutAlgorithms[h.name] = h;
21
+ }, "registerLayoutLoaders");
22
+ (/* @__PURE__ */ __name(() => {
23
+ registerLayoutLoaders([{
24
+ name: "dagre",
25
+ loader: /* @__PURE__ */ __name(async () => await import("./dagre-6UL2VRFP-CbWFu9xQ.mjs"), "loader")
26
+ }, ...[{
27
+ name: "cose-bilkent",
28
+ loader: /* @__PURE__ */ __name(async () => await import("./cose-bilkent-S5V4N54A-1lKG2PUg.mjs"), "loader")
29
+ }]]);
30
+ }, "registerDefaultLayoutLoaders"))();
31
+ var render = /* @__PURE__ */ __name(async (e, h) => {
32
+ if (!(e.layoutAlgorithm in layoutAlgorithms)) throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);
33
+ let g = layoutAlgorithms[e.layoutAlgorithm];
34
+ return (await g.loader()).render(e, h, internalHelpers, { algorithm: g.algorithm });
35
+ }, "render"), getRegisteredLayoutAlgorithm = /* @__PURE__ */ __name((e = "", { fallback: g = "dagre" } = {}) => {
36
+ if (e in layoutAlgorithms) return e;
37
+ if (g in layoutAlgorithms) return log.warn(`Layout algorithm ${e} is not registered. Using ${g} as fallback.`), g;
38
+ throw Error(`Both layout algorithms ${e} and ${g} are not registered.`);
39
+ }, "getRegisteredLayoutAlgorithm");
40
+ export { registerLayoutLoaders as n, render as r, getRegisteredLayoutAlgorithm as t };
@@ -0,0 +1,27 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import { f as __name, g as createDefaultSharedCoreModule, h as createDefaultCoreModule, m as inject, n as AbstractMermaidValueConverter, p as EmptyFileSystem, r as ArchitectureGeneratedModule, s as MermaidGeneratedSharedModule, t as AbstractMermaidTokenBuilder } from "./chunk-FPAJGGOC-HRc6DGju.mjs";
3
+ var ArchitectureTokenBuilder = class extends AbstractMermaidTokenBuilder {
4
+ static #_ = __name(this, "ArchitectureTokenBuilder");
5
+ constructor() {
6
+ super(["architecture"]);
7
+ }
8
+ }, ArchitectureValueConverter = class extends AbstractMermaidValueConverter {
9
+ static #_ = __name(this, "ArchitectureValueConverter");
10
+ runCustomConverter(e, l, u) {
11
+ if (e.name === "ARCH_ICON") return l.replace(/[()]/g, "").trim();
12
+ if (e.name === "ARCH_TEXT_ICON") return l.replace(/["()]/g, "");
13
+ if (e.name === "ARCH_TITLE") return l.replace(/[[\]]/g, "").trim();
14
+ }
15
+ }, ArchitectureModule = { parser: {
16
+ TokenBuilder: /* @__PURE__ */ __name(() => new ArchitectureTokenBuilder(), "TokenBuilder"),
17
+ ValueConverter: /* @__PURE__ */ __name(() => new ArchitectureValueConverter(), "ValueConverter")
18
+ } };
19
+ function createArchitectureServices(e = EmptyFileSystem) {
20
+ let d = inject(createDefaultSharedCoreModule(e), MermaidGeneratedSharedModule), f = inject(createDefaultCoreModule({ shared: d }), ArchitectureGeneratedModule, ArchitectureModule);
21
+ return d.ServiceRegistry.register(f), {
22
+ shared: d,
23
+ Architecture: f
24
+ };
25
+ }
26
+ __name(createArchitectureServices, "createArchitectureServices");
27
+ export { createArchitectureServices as n, ArchitectureModule as t };
@@ -0,0 +1,24 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import { g as log, h as __name } from "./src-DdwtiGjk.mjs";
3
+ import { c as configureSvgSize } from "./chunk-ABZYJK2D-_NXv778f.mjs";
4
+ var setupViewPortForSVG = /* @__PURE__ */ __name((n, i, o, s) => {
5
+ n.attr("class", o);
6
+ let { width: c, height: l, x: u, y: d } = calculateDimensionsWithPadding(n, i);
7
+ configureSvgSize(n, l, c, s);
8
+ let f = createViewBox(u, d, c, l, i);
9
+ n.attr("viewBox", f), log.debug(`viewBox configured: ${f} with padding: ${i}`);
10
+ }, "setupViewPortForSVG"), calculateDimensionsWithPadding = /* @__PURE__ */ __name((e, n) => {
11
+ let r = e.node()?.getBBox() || {
12
+ width: 0,
13
+ height: 0,
14
+ x: 0,
15
+ y: 0
16
+ };
17
+ return {
18
+ width: r.width + n * 2,
19
+ height: r.height + n * 2,
20
+ x: r.x,
21
+ y: r.y
22
+ };
23
+ }, "calculateDimensionsWithPadding"), createViewBox = /* @__PURE__ */ __name((e, n, r, i, a) => `${e - a} ${n - a} ${r} ${i}`, "createViewBox");
24
+ export { setupViewPortForSVG as t };
@@ -0,0 +1,487 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import { C as monotoneY, D as bumpX, E as basis_default, O as bumpY, S as monotoneX, T as cardinal_default, b as step_default, g as utils_default, k as linear_default, v as stepAfter, w as catmullRom_default, x as natural_default, y as stepBefore } from "./chunk-S3R3BYOJ-BhFsv0Go.mjs";
3
+ import { g as log, h as __name, p as select_default } from "./src-DdwtiGjk.mjs";
4
+ import { b as getConfig2, h as evaluate } from "./chunk-ABZYJK2D-_NXv778f.mjs";
5
+ import { t as line_default } from "./line-BJxACIPZ.mjs";
6
+ import { n as markerOffsets, r as markerOffsets2, t as getLineFunctionsWithOffset } from "./chunk-HN2XXSSU-DMfVdeUE.mjs";
7
+ import { t as getSubGraphTitleMargins } from "./chunk-CVBHYZKI-kPsSw5G9.mjs";
8
+ import { i as styles2String, n as isLabelStyle } from "./chunk-ATLVNIR6-CBnG7Ev9.mjs";
9
+ import { n as createText } from "./chunk-JA3XYJ7Z-b0Li4NN8.mjs";
10
+ import { d as at, r as createLabel_default } from "./chunk-JZLCHNYA-C_4MLySW.mjs";
11
+ var addEdgeMarkers = /* @__PURE__ */ __name((e, o, s, c, l, u) => {
12
+ o.arrowTypeStart && addEdgeMarker(e, "start", o.arrowTypeStart, s, c, l, u), o.arrowTypeEnd && addEdgeMarker(e, "end", o.arrowTypeEnd, s, c, l, u);
13
+ }, "addEdgeMarkers"), arrowTypesMap = {
14
+ arrow_cross: {
15
+ type: "cross",
16
+ fill: !1
17
+ },
18
+ arrow_point: {
19
+ type: "point",
20
+ fill: !0
21
+ },
22
+ arrow_barb: {
23
+ type: "barb",
24
+ fill: !0
25
+ },
26
+ arrow_circle: {
27
+ type: "circle",
28
+ fill: !1
29
+ },
30
+ aggregation: {
31
+ type: "aggregation",
32
+ fill: !1
33
+ },
34
+ extension: {
35
+ type: "extension",
36
+ fill: !1
37
+ },
38
+ composition: {
39
+ type: "composition",
40
+ fill: !0
41
+ },
42
+ dependency: {
43
+ type: "dependency",
44
+ fill: !0
45
+ },
46
+ lollipop: {
47
+ type: "lollipop",
48
+ fill: !1
49
+ },
50
+ only_one: {
51
+ type: "onlyOne",
52
+ fill: !1
53
+ },
54
+ zero_or_one: {
55
+ type: "zeroOrOne",
56
+ fill: !1
57
+ },
58
+ one_or_more: {
59
+ type: "oneOrMore",
60
+ fill: !1
61
+ },
62
+ zero_or_more: {
63
+ type: "zeroOrMore",
64
+ fill: !1
65
+ },
66
+ requirement_arrow: {
67
+ type: "requirement_arrow",
68
+ fill: !1
69
+ },
70
+ requirement_contains: {
71
+ type: "requirement_contains",
72
+ fill: !1
73
+ }
74
+ }, addEdgeMarker = /* @__PURE__ */ __name((e, o, s, c, l, u, d) => {
75
+ let f = arrowTypesMap[s];
76
+ if (!f) {
77
+ log.warn(`Unknown arrow type: ${s}`);
78
+ return;
79
+ }
80
+ let p = `${l}_${u}-${f.type}${o === "start" ? "Start" : "End"}`;
81
+ if (d && d.trim() !== "") {
82
+ let s = `${p}_${d.replace(/[^\dA-Za-z]/g, "_")}`;
83
+ if (!document.getElementById(s)) {
84
+ let e = document.getElementById(p);
85
+ if (e) {
86
+ let o = e.cloneNode(!0);
87
+ o.id = s, o.querySelectorAll("path, circle, line").forEach((e) => {
88
+ e.setAttribute("stroke", d), f.fill && e.setAttribute("fill", d);
89
+ }), e.parentNode?.appendChild(o);
90
+ }
91
+ }
92
+ e.attr(`marker-${o}`, `url(${c}#${s})`);
93
+ } else e.attr(`marker-${o}`, `url(${c}#${p})`);
94
+ }, "addEdgeMarker"), edgeLabels = /* @__PURE__ */ new Map(), terminalLabels = /* @__PURE__ */ new Map(), clear = /* @__PURE__ */ __name(() => {
95
+ edgeLabels.clear(), terminalLabels.clear();
96
+ }, "clear"), getLabelStyles = /* @__PURE__ */ __name((e) => e ? e.reduce((e, o) => e + ";" + o, "") : "", "getLabelStyles"), insertEdgeLabel = /* @__PURE__ */ __name(async (e, o) => {
97
+ let s = evaluate(getConfig2().flowchart.htmlLabels), { labelStyles: c } = styles2String(o);
98
+ o.labelStyle = c;
99
+ let l = await createText(e, o.label, {
100
+ style: o.labelStyle,
101
+ useHtmlLabels: s,
102
+ addSvgBackground: !0,
103
+ isNode: !1
104
+ });
105
+ log.info("abc82", o, o.labelType);
106
+ let u = e.insert("g").attr("class", "edgeLabel"), d = u.insert("g").attr("class", "label").attr("data-id", o.id);
107
+ d.node().appendChild(l);
108
+ let f = l.getBBox();
109
+ if (s) {
110
+ let e = l.children[0], o = select_default(l);
111
+ f = e.getBoundingClientRect(), o.attr("width", f.width), o.attr("height", f.height);
112
+ }
113
+ d.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), edgeLabels.set(o.id, u), o.width = f.width, o.height = f.height;
114
+ let p;
115
+ if (o.startLabelLeft) {
116
+ let s = await createLabel_default(o.startLabelLeft, getLabelStyles(o.labelStyle)), c = e.insert("g").attr("class", "edgeTerminals"), l = c.insert("g").attr("class", "inner");
117
+ p = l.node().appendChild(s);
118
+ let u = s.getBBox();
119
+ l.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), terminalLabels.get(o.id) || terminalLabels.set(o.id, {}), terminalLabels.get(o.id).startLeft = c, setTerminalWidth(p, o.startLabelLeft);
120
+ }
121
+ if (o.startLabelRight) {
122
+ let s = await createLabel_default(o.startLabelRight, getLabelStyles(o.labelStyle)), c = e.insert("g").attr("class", "edgeTerminals"), l = c.insert("g").attr("class", "inner");
123
+ p = c.node().appendChild(s), l.node().appendChild(s);
124
+ let u = s.getBBox();
125
+ l.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), terminalLabels.get(o.id) || terminalLabels.set(o.id, {}), terminalLabels.get(o.id).startRight = c, setTerminalWidth(p, o.startLabelRight);
126
+ }
127
+ if (o.endLabelLeft) {
128
+ let s = await createLabel_default(o.endLabelLeft, getLabelStyles(o.labelStyle)), c = e.insert("g").attr("class", "edgeTerminals"), l = c.insert("g").attr("class", "inner");
129
+ p = l.node().appendChild(s);
130
+ let u = s.getBBox();
131
+ l.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), c.node().appendChild(s), terminalLabels.get(o.id) || terminalLabels.set(o.id, {}), terminalLabels.get(o.id).endLeft = c, setTerminalWidth(p, o.endLabelLeft);
132
+ }
133
+ if (o.endLabelRight) {
134
+ let s = await createLabel_default(o.endLabelRight, getLabelStyles(o.labelStyle)), c = e.insert("g").attr("class", "edgeTerminals"), l = c.insert("g").attr("class", "inner");
135
+ p = l.node().appendChild(s);
136
+ let u = s.getBBox();
137
+ l.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), c.node().appendChild(s), terminalLabels.get(o.id) || terminalLabels.set(o.id, {}), terminalLabels.get(o.id).endRight = c, setTerminalWidth(p, o.endLabelRight);
138
+ }
139
+ return l;
140
+ }, "insertEdgeLabel");
141
+ function setTerminalWidth(e, o) {
142
+ getConfig2().flowchart.htmlLabels && e && (e.style.width = o.length * 9 + "px", e.style.height = "12px");
143
+ }
144
+ __name(setTerminalWidth, "setTerminalWidth");
145
+ var positionEdgeLabel = /* @__PURE__ */ __name((e, o) => {
146
+ log.debug("Moving label abc88 ", e.id, e.label, edgeLabels.get(e.id), o);
147
+ let s = o.updatedPath ? o.updatedPath : o.originalPath, { subGraphTitleTotalMargin: c } = getSubGraphTitleMargins(getConfig2());
148
+ if (e.label) {
149
+ let l = edgeLabels.get(e.id), u = e.x, d = e.y;
150
+ if (s) {
151
+ let c = utils_default.calcLabelPosition(s);
152
+ log.debug("Moving label " + e.label + " from (", u, ",", d, ") to (", c.x, ",", c.y, ") abc88"), o.updatedPath && (u = c.x, d = c.y);
153
+ }
154
+ l.attr("transform", `translate(${u}, ${d + c / 2})`);
155
+ }
156
+ if (e.startLabelLeft) {
157
+ let o = terminalLabels.get(e.id).startLeft, c = e.x, l = e.y;
158
+ if (s) {
159
+ let o = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", s);
160
+ c = o.x, l = o.y;
161
+ }
162
+ o.attr("transform", `translate(${c}, ${l})`);
163
+ }
164
+ if (e.startLabelRight) {
165
+ let o = terminalLabels.get(e.id).startRight, c = e.x, l = e.y;
166
+ if (s) {
167
+ let o = utils_default.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", s);
168
+ c = o.x, l = o.y;
169
+ }
170
+ o.attr("transform", `translate(${c}, ${l})`);
171
+ }
172
+ if (e.endLabelLeft) {
173
+ let o = terminalLabels.get(e.id).endLeft, c = e.x, l = e.y;
174
+ if (s) {
175
+ let o = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", s);
176
+ c = o.x, l = o.y;
177
+ }
178
+ o.attr("transform", `translate(${c}, ${l})`);
179
+ }
180
+ if (e.endLabelRight) {
181
+ let o = terminalLabels.get(e.id).endRight, c = e.x, l = e.y;
182
+ if (s) {
183
+ let o = utils_default.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", s);
184
+ c = o.x, l = o.y;
185
+ }
186
+ o.attr("transform", `translate(${c}, ${l})`);
187
+ }
188
+ }, "positionEdgeLabel"), outsideNode = /* @__PURE__ */ __name((e, o) => {
189
+ let s = e.x, c = e.y, l = Math.abs(o.x - s), u = Math.abs(o.y - c), d = e.width / 2, f = e.height / 2;
190
+ return l >= d || u >= f;
191
+ }, "outsideNode"), intersection = /* @__PURE__ */ __name((e, o, s) => {
192
+ log.debug(`intersection calc abc89:
193
+ outsidePoint: ${JSON.stringify(o)}
194
+ insidePoint : ${JSON.stringify(s)}
195
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
196
+ let c = e.x, l = e.y, u = Math.abs(c - s.x), d = e.width / 2, f = s.x < o.x ? d - u : d + u, p = e.height / 2, m = Math.abs(o.y - s.y), h = Math.abs(o.x - s.x);
197
+ if (Math.abs(l - o.y) * d > Math.abs(c - o.x) * p) {
198
+ let e = s.y < o.y ? o.y - p - l : l - p - o.y;
199
+ f = h * e / m;
200
+ let c = {
201
+ x: s.x < o.x ? s.x + f : s.x - h + f,
202
+ y: s.y < o.y ? s.y + m - e : s.y - m + e
203
+ };
204
+ return f === 0 && (c.x = o.x, c.y = o.y), h === 0 && (c.x = o.x), m === 0 && (c.y = o.y), log.debug(`abc89 top/bottom calc, Q ${m}, q ${e}, R ${h}, r ${f}`, c), c;
205
+ } else {
206
+ f = s.x < o.x ? o.x - d - c : c - d - o.x;
207
+ let e = m * f / h, l = s.x < o.x ? s.x + h - f : s.x - h + f, u = s.y < o.y ? s.y + e : s.y - e;
208
+ return log.debug(`sides calc abc89, Q ${m}, q ${e}, R ${h}, r ${f}`, {
209
+ _x: l,
210
+ _y: u
211
+ }), f === 0 && (l = o.x, u = o.y), h === 0 && (l = o.x), m === 0 && (u = o.y), {
212
+ x: l,
213
+ y: u
214
+ };
215
+ }
216
+ }, "intersection"), cutPathAtIntersect = /* @__PURE__ */ __name((e, o) => {
217
+ log.warn("abc88 cutPathAtIntersect", e, o);
218
+ let s = [], c = e[0], l = !1;
219
+ return e.forEach((e) => {
220
+ if (log.info("abc88 checking point", e, o), !outsideNode(o, e) && !l) {
221
+ let u = intersection(o, c, e);
222
+ log.debug("abc88 inside", e, c, u), log.debug("abc88 intersection", u, o);
223
+ let d = !1;
224
+ s.forEach((e) => {
225
+ d ||= e.x === u.x && e.y === u.y;
226
+ }), s.some((e) => e.x === u.x && e.y === u.y) ? log.warn("abc88 no intersect", u, s) : s.push(u), l = !0;
227
+ } else log.warn("abc88 outside", e, c), c = e, l || s.push(e);
228
+ }), log.debug("returning points", s), s;
229
+ }, "cutPathAtIntersect");
230
+ function extractCornerPoints(e) {
231
+ let o = [], s = [];
232
+ for (let c = 1; c < e.length - 1; c++) {
233
+ let l = e[c - 1], u = e[c], d = e[c + 1];
234
+ (l.x === u.x && u.y === d.y && Math.abs(u.x - d.x) > 5 && Math.abs(u.y - l.y) > 5 || l.y === u.y && u.x === d.x && Math.abs(u.x - l.x) > 5 && Math.abs(u.y - d.y) > 5) && (o.push(u), s.push(c));
235
+ }
236
+ return {
237
+ cornerPoints: o,
238
+ cornerPointPositions: s
239
+ };
240
+ }
241
+ __name(extractCornerPoints, "extractCornerPoints");
242
+ var findAdjacentPoint = /* @__PURE__ */ __name(function(e, o, s) {
243
+ let c = o.x - e.x, l = o.y - e.y, u = s / Math.sqrt(c * c + l * l);
244
+ return {
245
+ x: o.x - u * c,
246
+ y: o.y - u * l
247
+ };
248
+ }, "findAdjacentPoint"), fixCorners = /* @__PURE__ */ __name(function(e) {
249
+ let { cornerPointPositions: o } = extractCornerPoints(e), s = [];
250
+ for (let c = 0; c < e.length; c++) if (o.includes(c)) {
251
+ let o = e[c - 1], l = e[c + 1], u = e[c], d = findAdjacentPoint(o, u, 5), f = findAdjacentPoint(l, u, 5), p = f.x - d.x, m = f.y - d.y;
252
+ s.push(d);
253
+ let h = Math.sqrt(2) * 2, g = {
254
+ x: u.x,
255
+ y: u.y
256
+ };
257
+ Math.abs(l.x - o.x) > 10 && Math.abs(l.y - o.y) >= 10 ? (log.debug("Corner point fixing", Math.abs(l.x - o.x), Math.abs(l.y - o.y)), g = u.x === d.x ? {
258
+ x: p < 0 ? d.x - 5 + h : d.x + 5 - h,
259
+ y: m < 0 ? d.y - h : d.y + h
260
+ } : {
261
+ x: p < 0 ? d.x - h : d.x + h,
262
+ y: m < 0 ? d.y - 5 + h : d.y + 5 - h
263
+ }) : log.debug("Corner point skipping fixing", Math.abs(l.x - o.x), Math.abs(l.y - o.y)), s.push(g, f);
264
+ } else s.push(e[c]);
265
+ return s;
266
+ }, "fixCorners"), generateDashArray = /* @__PURE__ */ __name((e, o, s) => {
267
+ let c = e - o - s, l = Math.floor(c / 4);
268
+ return `0 ${o} ${Array(l).fill("2 2").join(" ")} ${s}`;
269
+ }, "generateDashArray"), insertEdge = /* @__PURE__ */ __name(function(y, S, w, D, O, k, A, j = !1) {
270
+ let { handDrawnSeed: M } = getConfig2(), N = S.points, P = !1, F = O;
271
+ var I = k;
272
+ let L = [];
273
+ for (let e in S.cssCompiledStyles) isLabelStyle(e) || L.push(S.cssCompiledStyles[e]);
274
+ log.debug("UIO intersect check", S.points, I.x, F.x), I.intersect && F.intersect && !j && (N = N.slice(1, S.points.length - 1), N.unshift(F.intersect(N[0])), log.debug("Last point UIO", S.start, "-->", S.end, N[N.length - 1], I, I.intersect(N[N.length - 1])), N.push(I.intersect(N[N.length - 1])));
275
+ let R = btoa(JSON.stringify(N));
276
+ S.toCluster && (log.info("to cluster abc88", w.get(S.toCluster)), N = cutPathAtIntersect(S.points, w.get(S.toCluster).node), P = !0), S.fromCluster && (log.debug("from cluster abc88", w.get(S.fromCluster), JSON.stringify(N, null, 2)), N = cutPathAtIntersect(N.reverse(), w.get(S.fromCluster).node).reverse(), P = !0);
277
+ let z = N.filter((e) => !Number.isNaN(e.y));
278
+ z = fixCorners(z);
279
+ let B = basis_default;
280
+ switch (B = linear_default, S.curve) {
281
+ case "linear":
282
+ B = linear_default;
283
+ break;
284
+ case "basis":
285
+ B = basis_default;
286
+ break;
287
+ case "cardinal":
288
+ B = cardinal_default;
289
+ break;
290
+ case "bumpX":
291
+ B = bumpX;
292
+ break;
293
+ case "bumpY":
294
+ B = bumpY;
295
+ break;
296
+ case "catmullRom":
297
+ B = catmullRom_default;
298
+ break;
299
+ case "monotoneX":
300
+ B = monotoneX;
301
+ break;
302
+ case "monotoneY":
303
+ B = monotoneY;
304
+ break;
305
+ case "natural":
306
+ B = natural_default;
307
+ break;
308
+ case "step":
309
+ B = step_default;
310
+ break;
311
+ case "stepAfter":
312
+ B = stepAfter;
313
+ break;
314
+ case "stepBefore":
315
+ B = stepBefore;
316
+ break;
317
+ default: B = basis_default;
318
+ }
319
+ let { x: V, y: H } = getLineFunctionsWithOffset(S), U = line_default().x(V).y(H).curve(B), W;
320
+ switch (S.thickness) {
321
+ case "normal":
322
+ W = "edge-thickness-normal";
323
+ break;
324
+ case "thick":
325
+ W = "edge-thickness-thick";
326
+ break;
327
+ case "invisible":
328
+ W = "edge-thickness-invisible";
329
+ break;
330
+ default: W = "edge-thickness-normal";
331
+ }
332
+ switch (S.pattern) {
333
+ case "solid":
334
+ W += " edge-pattern-solid";
335
+ break;
336
+ case "dotted":
337
+ W += " edge-pattern-dotted";
338
+ break;
339
+ case "dashed":
340
+ W += " edge-pattern-dashed";
341
+ break;
342
+ default: W += " edge-pattern-solid";
343
+ }
344
+ let G, K = S.curve === "rounded" ? generateRoundedPath(applyMarkerOffsetsToPoints(z, S), 5) : U(z), q = Array.isArray(S.style) ? S.style : [S.style], J = q.find((e) => e?.startsWith("stroke:")), Y = !1;
345
+ if (S.look === "handDrawn") {
346
+ let e = at.svg(y);
347
+ Object.assign([], z);
348
+ let o = e.path(K, {
349
+ roughness: .3,
350
+ seed: M
351
+ });
352
+ W += " transition", G = select_default(o).select("path").attr("id", S.id).attr("class", " " + W + (S.classes ? " " + S.classes : "")).attr("style", q ? q.reduce((e, o) => e + ";" + o, "") : "");
353
+ let s = G.attr("d");
354
+ G.attr("d", s), y.node().appendChild(G.node());
355
+ } else {
356
+ let e = L.join(";"), o = q ? q.reduce((e, o) => e + o + ";", "") : "", s = "";
357
+ S.animate && (s = " edge-animation-fast"), S.animation && (s = " edge-animation-" + S.animation);
358
+ let c = (e ? e + ";" + o + ";" : o) + ";" + (q ? q.reduce((e, o) => e + ";" + o, "") : "");
359
+ G = y.append("path").attr("d", K).attr("id", S.id).attr("class", " " + W + (S.classes ? " " + S.classes : "") + (s ?? "")).attr("style", c), J = c.match(/stroke:([^;]+)/)?.[1], Y = S.animate === !0 || !!S.animation || e.includes("animation");
360
+ let l = G.node(), u = typeof l.getTotalLength == "function" ? l.getTotalLength() : 0, d = markerOffsets2[S.arrowTypeStart] || 0, f = markerOffsets2[S.arrowTypeEnd] || 0;
361
+ if (S.look === "neo" && !Y) {
362
+ let e = `stroke-dasharray: ${S.pattern === "dotted" || S.pattern === "dashed" ? generateDashArray(u, d, f) : `0 ${d} ${u - d - f} ${f}`}; stroke-dashoffset: 0;`;
363
+ G.attr("style", e + G.attr("style"));
364
+ }
365
+ }
366
+ G.attr("data-edge", !0), G.attr("data-et", "edge"), G.attr("data-id", S.id), G.attr("data-points", R), S.showPoints && z.forEach((e) => {
367
+ y.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", e.x).attr("cy", e.y);
368
+ });
369
+ let X = "";
370
+ (getConfig2().flowchart.arrowMarkerAbsolute || getConfig2().state.arrowMarkerAbsolute) && (X = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, X = X.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), log.info("arrowTypeStart", S.arrowTypeStart), log.info("arrowTypeEnd", S.arrowTypeEnd), addEdgeMarkers(G, S, X, A, D, J);
371
+ let Z = Math.floor(N.length / 2), Q = N[Z];
372
+ utils_default.isLabelCoordinateInPath(Q, G.attr("d")) || (P = !0);
373
+ let $ = {};
374
+ return P && ($.updatedPath = N), $.originalPath = S.points, $;
375
+ }, "insertEdge");
376
+ function generateRoundedPath(e, o) {
377
+ if (e.length < 2) return "";
378
+ let s = "", c = e.length, l = 1e-5;
379
+ for (let u = 0; u < c; u++) {
380
+ let d = e[u], f = e[u - 1], p = e[u + 1];
381
+ if (u === 0) s += `M${d.x},${d.y}`;
382
+ else if (u === c - 1) s += `L${d.x},${d.y}`;
383
+ else {
384
+ let e = d.x - f.x, c = d.y - f.y, u = p.x - d.x, m = p.y - d.y, h = Math.hypot(e, c), g = Math.hypot(u, m);
385
+ if (h < l || g < l) {
386
+ s += `L${d.x},${d.y}`;
387
+ continue;
388
+ }
389
+ let _ = e / h, v = c / h, y = u / g, b = m / g, x = _ * y + v * b, S = Math.max(-1, Math.min(1, x)), C = Math.acos(S);
390
+ if (C < l || Math.abs(Math.PI - C) < l) {
391
+ s += `L${d.x},${d.y}`;
392
+ continue;
393
+ }
394
+ let w = Math.min(o / Math.sin(C / 2), h / 2, g / 2), T = d.x - _ * w, E = d.y - v * w, D = d.x + y * w, O = d.y + b * w;
395
+ s += `L${T},${E}`, s += `Q${d.x},${d.y} ${D},${O}`;
396
+ }
397
+ }
398
+ return s;
399
+ }
400
+ __name(generateRoundedPath, "generateRoundedPath");
401
+ function calculateDeltaAndAngle(e, o) {
402
+ if (!e || !o) return {
403
+ angle: 0,
404
+ deltaX: 0,
405
+ deltaY: 0
406
+ };
407
+ let s = o.x - e.x, c = o.y - e.y;
408
+ return {
409
+ angle: Math.atan2(c, s),
410
+ deltaX: s,
411
+ deltaY: c
412
+ };
413
+ }
414
+ __name(calculateDeltaAndAngle, "calculateDeltaAndAngle");
415
+ function applyMarkerOffsetsToPoints(e, o) {
416
+ let s = e.map((e) => ({ ...e }));
417
+ if (e.length >= 2 && markerOffsets[o.arrowTypeStart]) {
418
+ let c = markerOffsets[o.arrowTypeStart], l = e[0], u = e[1], { angle: d } = calculateDeltaAndAngle(l, u), f = c * Math.cos(d), p = c * Math.sin(d);
419
+ s[0].x = l.x + f, s[0].y = l.y + p;
420
+ }
421
+ let c = e.length;
422
+ if (c >= 2 && markerOffsets[o.arrowTypeEnd]) {
423
+ let l = markerOffsets[o.arrowTypeEnd], u = e[c - 1], d = e[c - 2], { angle: f } = calculateDeltaAndAngle(d, u), p = l * Math.cos(f), m = l * Math.sin(f);
424
+ s[c - 1].x = u.x - p, s[c - 1].y = u.y - m;
425
+ }
426
+ return s;
427
+ }
428
+ __name(applyMarkerOffsetsToPoints, "applyMarkerOffsetsToPoints");
429
+ var insertMarkers = /* @__PURE__ */ __name((e, o, s, c) => {
430
+ o.forEach((o) => {
431
+ markers[o](e, s, c);
432
+ });
433
+ }, "insertMarkers"), markers = {
434
+ extension: /* @__PURE__ */ __name((e, o, s) => {
435
+ log.trace("Making markers for ", s), e.append("defs").append("marker").attr("id", s + "_" + o + "-extensionStart").attr("class", "marker extension " + o).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", s + "_" + o + "-extensionEnd").attr("class", "marker extension " + o).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");
436
+ }, "extension"),
437
+ composition: /* @__PURE__ */ __name((e, o, s) => {
438
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-compositionStart").attr("class", "marker composition " + o).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", s + "_" + o + "-compositionEnd").attr("class", "marker composition " + o).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");
439
+ }, "composition"),
440
+ aggregation: /* @__PURE__ */ __name((e, o, s) => {
441
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-aggregationStart").attr("class", "marker aggregation " + o).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", s + "_" + o + "-aggregationEnd").attr("class", "marker aggregation " + o).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");
442
+ }, "aggregation"),
443
+ dependency: /* @__PURE__ */ __name((e, o, s) => {
444
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-dependencyStart").attr("class", "marker dependency " + o).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", s + "_" + o + "-dependencyEnd").attr("class", "marker dependency " + o).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
445
+ }, "dependency"),
446
+ lollipop: /* @__PURE__ */ __name((e, o, s) => {
447
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-lollipopStart").attr("class", "marker lollipop " + o).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", s + "_" + o + "-lollipopEnd").attr("class", "marker lollipop " + o).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
448
+ }, "lollipop"),
449
+ point: /* @__PURE__ */ __name((e, o, s) => {
450
+ e.append("marker").attr("id", s + "_" + o + "-pointEnd").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + o + "-pointStart").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
451
+ }, "point"),
452
+ circle: /* @__PURE__ */ __name((e, o, s) => {
453
+ e.append("marker").attr("id", s + "_" + o + "-circleEnd").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + o + "-circleStart").attr("class", "marker " + o).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
454
+ }, "circle"),
455
+ cross: /* @__PURE__ */ __name((e, o, s) => {
456
+ e.append("marker").attr("id", s + "_" + o + "-crossEnd").attr("class", "marker cross " + o).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", s + "_" + o + "-crossStart").attr("class", "marker cross " + o).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
457
+ }, "cross"),
458
+ barb: /* @__PURE__ */ __name((e, o, s) => {
459
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-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");
460
+ }, "barb"),
461
+ only_one: /* @__PURE__ */ __name((e, o, s) => {
462
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-onlyOneStart").attr("class", "marker onlyOne " + o).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", s + "_" + o + "-onlyOneEnd").attr("class", "marker onlyOne " + o).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");
463
+ }, "only_one"),
464
+ zero_or_one: /* @__PURE__ */ __name((e, o, s) => {
465
+ let c = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + o).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
466
+ c.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), c.append("path").attr("d", "M9,0 L9,18");
467
+ let l = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + o).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
468
+ l.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), l.append("path").attr("d", "M21,0 L21,18");
469
+ }, "zero_or_one"),
470
+ one_or_more: /* @__PURE__ */ __name((e, o, s) => {
471
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-oneOrMoreStart").attr("class", "marker oneOrMore " + o).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), e.append("defs").append("marker").attr("id", s + "_" + o + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + o).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
472
+ }, "one_or_more"),
473
+ zero_or_more: /* @__PURE__ */ __name((e, o, s) => {
474
+ let c = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + o).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
475
+ c.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), c.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
476
+ let l = e.append("defs").append("marker").attr("id", s + "_" + o + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + o).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
477
+ l.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), l.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
478
+ }, "zero_or_more"),
479
+ requirement_arrow: /* @__PURE__ */ __name((e, o, s) => {
480
+ e.append("defs").append("marker").attr("id", s + "_" + o + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20");
481
+ }, "requirement_arrow"),
482
+ requirement_contains: /* @__PURE__ */ __name((e, o, s) => {
483
+ let c = e.append("defs").append("marker").attr("id", s + "_" + o + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
484
+ 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);
485
+ }, "requirement_contains")
486
+ }, markers_default = insertMarkers;
487
+ export { positionEdgeLabel as a, markers_default as i, insertEdge as n, insertEdgeLabel as r, clear as t };
@@ -0,0 +1,12 @@
1
+ /*! Package version @n8n/chat@0.62.0 */
2
+ import { h as __name } from "./src-DdwtiGjk.mjs";
3
+ var ImperativeState = class {
4
+ constructor(e) {
5
+ this.init = e, this.records = this.init();
6
+ }
7
+ static #_ = __name(this, "ImperativeState");
8
+ reset() {
9
+ this.records = this.init();
10
+ }
11
+ };
12
+ export { ImperativeState as t };