@blueking/ai-blueking 2.1.4-beta.7 → 2.1.4-beta.8

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 (105) hide show
  1. package/dist/standalone/_baseFor-DZ1vnh4H.js +393 -0
  2. package/dist/standalone/arc-WNacHY26.js +80 -0
  3. package/dist/standalone/architecture-YZFGNWBL-pIa_tKdA.js +3 -0
  4. package/dist/standalone/architectureDiagram-Q4EWVU46-Bfam8Fg3.js +4057 -0
  5. package/dist/standalone/array-CWNufkl9.js +6 -0
  6. package/dist/standalone/blockDiagram-DXYQGD6D-vAb9uyF5.js +3033 -0
  7. package/dist/standalone/c4Diagram-AHTNJAMY-BWACU0ER.js +2961 -0
  8. package/dist/standalone/channel-Br5ChI8U.js +5 -0
  9. package/dist/standalone/chunk-2KRD3SAO-Deh6AASy.js +23 -0
  10. package/dist/standalone/chunk-336JU56O-CFKWNcxR.js +49 -0
  11. package/dist/standalone/chunk-426QAEUC-D_wKNd3w.js +9 -0
  12. package/dist/standalone/chunk-4BX2VUAB-DKC_OBWg.js +8 -0
  13. package/dist/standalone/chunk-4TB4RGXK-HiVG7T1A.js +3254 -0
  14. package/dist/standalone/chunk-55IACEB6-DBivnNb2.js +8 -0
  15. package/dist/standalone/chunk-5FUZZQ4R-tiEjqlP4.js +3638 -0
  16. package/dist/standalone/chunk-5PVQY5BW-BCjrVrWB.js +1299 -0
  17. package/dist/standalone/chunk-67CJDMHE-BX09W6oy.js +23 -0
  18. package/dist/standalone/chunk-7N4EOEYR-G144j5Vc.js +35 -0
  19. package/dist/standalone/chunk-AA7GKIK3-Dx9YCoJ-.js +30 -0
  20. package/dist/standalone/chunk-BSJP7CBP-DE8WR0MI.js +82 -0
  21. package/dist/standalone/chunk-CIAEETIT-Bv86XVLB.js +23 -0
  22. package/dist/standalone/chunk-EDXVE4YY-DE9KzYM-.js +25 -0
  23. package/dist/standalone/chunk-ENJZ2VHE-DlxIC-A3.js +560 -0
  24. package/dist/standalone/chunk-FMBD7UC4-DCkBrKFO.js +5 -0
  25. package/dist/standalone/chunk-FOC6F5B3-C7hwrEZJ.js +23 -0
  26. package/dist/standalone/chunk-ICPOFSXX-B9JXAgJU.js +2772 -0
  27. package/dist/standalone/chunk-K5T4RW27-T6hJxJM0.js +16070 -0
  28. package/dist/standalone/chunk-KGLVRYIC-C0JPhrjn.js +23 -0
  29. package/dist/standalone/chunk-LIHQZDEY-CiavnvWh.js +64 -0
  30. package/dist/standalone/chunk-ORNJ4GCN-BtJ79bik.js +31 -0
  31. package/dist/standalone/chunk-OYMX7WX6-D2UHnmfD.js +2014 -0
  32. package/dist/standalone/chunk-QZHKN3VN-DhzThSvb.js +15 -0
  33. package/dist/standalone/chunk-U2HBQHQK-75Isf1R4.js +1896 -0
  34. package/dist/standalone/chunk-WQLz0Won.js +20 -0
  35. package/dist/standalone/chunk-X2U36JSP-DSzducJI.js +67 -0
  36. package/dist/standalone/chunk-XPW4576I-BFhmu0d4.js +1146 -0
  37. package/dist/standalone/chunk-YZCP3GAM-90EaSO-2.js +60 -0
  38. package/dist/standalone/chunk-ZZ45TVLE-DUagTZ9d.js +32 -0
  39. package/dist/standalone/classDiagram-6PBFFD2Q-Bwt78q4N.js +29 -0
  40. package/dist/standalone/classDiagram-v2-HSJHXN6E-B2qI9-xf.js +29 -0
  41. package/dist/standalone/clone-CBw-BHXl.js +8 -0
  42. package/dist/standalone/cose-bilkent-S5V4N54A-DFJ1nlog.js +2250 -0
  43. package/dist/standalone/cytoscape.esm-DdhenceR.js +18103 -0
  44. package/dist/standalone/dagre-KV5264BT-CXTBtAae.js +293 -0
  45. package/dist/standalone/dagre-kfvGmNUa.js +1606 -0
  46. package/dist/standalone/defaultLocale-bckJcYh1.js +201 -0
  47. package/dist/standalone/diagram-5BDNPKRD--gLHDKg-.js +101 -0
  48. package/dist/standalone/diagram-G4DWMVQ6-BwLE9Hsf.js +524 -0
  49. package/dist/standalone/diagram-MMDJMWI5-CoilYxa0.js +213 -0
  50. package/dist/standalone/diagram-TYMM5635-BupwRdr6.js +133 -0
  51. package/dist/standalone/dist-Dlj1jr8W.js +59 -0
  52. package/dist/standalone/erDiagram-SMLLAGMA-tIdn6ZCM.js +1700 -0
  53. package/dist/standalone/flatten-CXxC4cn2.js +40 -0
  54. package/dist/standalone/flowDiagram-DWJPFMVM-C86bLTAY.js +4146 -0
  55. package/dist/standalone/ganttDiagram-T4ZO3ILL-BT23lv_X.js +3077 -0
  56. package/dist/standalone/gitGraph-7Q5UKJZL-C-7nG8PF.js +3 -0
  57. package/dist/standalone/gitGraphDiagram-UUTBAWPF-DT1BGQsP.js +728 -0
  58. package/dist/standalone/graphlib-DrXiQBFg.js +373 -0
  59. package/dist/standalone/index.es.min.js +59705 -0
  60. package/dist/standalone/index.iife.min.js +3502 -0
  61. package/dist/standalone/index.umd.min.js +3502 -0
  62. package/dist/standalone/info-OMHHGYJF-BOS7mrON.js +3 -0
  63. package/dist/standalone/infoDiagram-42DDH7IO-Dx7LFK0B.js +19 -0
  64. package/dist/standalone/init-B75p2clj.js +15 -0
  65. package/dist/standalone/isEmpty-CVG4Bj-P.js +35 -0
  66. package/dist/standalone/ishikawaDiagram-UXIWVN3A-CX4cX3qb.js +718 -0
  67. package/dist/standalone/journeyDiagram-VCZTEJTY-BCvxmmFn.js +883 -0
  68. package/dist/standalone/kanban-definition-6JOO6SKY-SVINWaiM.js +973 -0
  69. package/dist/standalone/katex-CKrw0rbA.js +22016 -0
  70. package/dist/standalone/line-BF1XS-Ng.js +34 -0
  71. package/dist/standalone/linear-DGQDIL28.js +289 -0
  72. package/dist/standalone/mermaid-parser.core-Blz-Qy2h.js +69 -0
  73. package/dist/standalone/mermaid.core-CHTh1JGx.js +944 -0
  74. package/dist/standalone/mindmap-definition-QFDTVHPH-1Trzro3y.js +1009 -0
  75. package/dist/standalone/ordinal-F3U6aXtP.js +65 -0
  76. package/dist/standalone/packet-4T2RLAQJ-ai5Omp1h.js +3 -0
  77. package/dist/standalone/path-Dm3C8WEs.js +85 -0
  78. package/dist/standalone/pie-ZZUOXDRM-Df1rG6QC.js +3 -0
  79. package/dist/standalone/pieDiagram-DEJITSTG-D5Omb898.js +165 -0
  80. package/dist/standalone/purify.es-CZ_RvYUu.js +549 -0
  81. package/dist/standalone/quadrantDiagram-34T5L4WZ-Ct4g9T4o.js +1974 -0
  82. package/dist/standalone/radar-PYXPWWZC-B2t6k6Fg.js +3 -0
  83. package/dist/standalone/reduce-DbMsJ4nx.js +532 -0
  84. package/dist/standalone/requirementDiagram-MS252O5E-CP0BUgnz.js +2221 -0
  85. package/dist/standalone/rough.esm-UCEI3PYn.js +1352 -0
  86. package/dist/standalone/sankeyDiagram-XADWPNL6-D6C7yZ3k.js +920 -0
  87. package/dist/standalone/sequenceDiagram-FGHM5R23-KeodespT.js +4157 -0
  88. package/dist/standalone/src-CFVe5TPD.js +2146 -0
  89. package/dist/standalone/stateDiagram-FHFEXIEX-DAupoS9U.js +217 -0
  90. package/dist/standalone/stateDiagram-v2-QKLJ7IA2-C1Lw_i_z.js +27 -0
  91. package/dist/standalone/style.css +1 -0
  92. package/dist/standalone/timeline-definition-GMOUNBTQ-Cwhj84lX.js +1068 -0
  93. package/dist/standalone/treeView-SZITEDCU-BnoMeJSb.js +3 -0
  94. package/dist/standalone/treemap-W4RFUUIX-B38XFBZF.js +3 -0
  95. package/dist/standalone/vennDiagram-DHZGUBPP-_1PHloeO.js +1858 -0
  96. package/dist/standalone/wardley-RL74JXVD-bB8BBy_Y.js +3 -0
  97. package/dist/standalone/wardleyDiagram-NUSXRM2D-DRLCx-qh.js +578 -0
  98. package/dist/standalone/xychartDiagram-5P7HB3ND-Bz2-4Ufi.js +2044 -0
  99. package/dist/standalone-mount-core.d.ts +34 -0
  100. package/dist/standalone-mount-core.d.ts.map +1 -0
  101. package/dist/standalone-mount.d.ts +14 -0
  102. package/dist/standalone-mount.d.ts.map +1 -0
  103. package/dist/standalone.d.ts +8 -0
  104. package/dist/standalone.d.ts.map +1 -0
  105. package/package.json +12 -3
@@ -0,0 +1,718 @@
1
+ import { h as e } from "./src-CFVe5TPD.js";
2
+ import { B as t, C as n, V as r, W as i, _ as a, a as o, b as s, c, s as l, v as u } from "./chunk-ICPOFSXX-B9JXAgJU.js";
3
+ import { f as d } from "./chunk-5PVQY5BW-BCjrVrWB.js";
4
+ import { t as f } from "./chunk-426QAEUC-D_wKNd3w.js";
5
+ import { t as p } from "./rough.esm-UCEI3PYn.js";
6
+ //#region ../../node_modules/.pnpm/mermaid@11.14.0/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-UXIWVN3A.mjs
7
+ var m = (function() {
8
+ var t = /* @__PURE__ */ e(function(e, t, n, r) {
9
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
10
+ return n;
11
+ }, "o"), n = [1, 4], r = [1, 14], i = [1, 12], a = [1, 13], o = [
12
+ 6,
13
+ 7,
14
+ 8
15
+ ], s = [1, 20], c = [1, 18], l = [1, 19], u = [
16
+ 6,
17
+ 7,
18
+ 11
19
+ ], d = [
20
+ 1,
21
+ 6,
22
+ 13,
23
+ 14
24
+ ], f = [1, 23], p = [1, 24], m = [
25
+ 1,
26
+ 6,
27
+ 7,
28
+ 11,
29
+ 13,
30
+ 14
31
+ ], h = {
32
+ trace: /* @__PURE__ */ e(function() {}, "trace"),
33
+ yy: {},
34
+ symbols_: {
35
+ error: 2,
36
+ start: 3,
37
+ ishikawa: 4,
38
+ spaceLines: 5,
39
+ SPACELINE: 6,
40
+ NL: 7,
41
+ ISHIKAWA: 8,
42
+ document: 9,
43
+ stop: 10,
44
+ EOF: 11,
45
+ statement: 12,
46
+ SPACELIST: 13,
47
+ TEXT: 14,
48
+ $accept: 0,
49
+ $end: 1
50
+ },
51
+ terminals_: {
52
+ 2: "error",
53
+ 6: "SPACELINE",
54
+ 7: "NL",
55
+ 8: "ISHIKAWA",
56
+ 11: "EOF",
57
+ 13: "SPACELIST",
58
+ 14: "TEXT"
59
+ },
60
+ productions_: [
61
+ 0,
62
+ [3, 1],
63
+ [3, 2],
64
+ [5, 1],
65
+ [5, 2],
66
+ [5, 2],
67
+ [4, 2],
68
+ [4, 3],
69
+ [10, 1],
70
+ [10, 1],
71
+ [10, 1],
72
+ [10, 2],
73
+ [10, 2],
74
+ [9, 3],
75
+ [9, 2],
76
+ [12, 2],
77
+ [12, 1],
78
+ [12, 1],
79
+ [12, 1]
80
+ ],
81
+ performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
82
+ var s = a.length - 1;
83
+ switch (i) {
84
+ case 6:
85
+ case 7: return r;
86
+ case 15:
87
+ r.addNode(a[s - 1].length, a[s].trim());
88
+ break;
89
+ case 16:
90
+ r.addNode(0, a[s].trim());
91
+ break;
92
+ }
93
+ }, "anonymous"),
94
+ table: [
95
+ {
96
+ 3: 1,
97
+ 4: 2,
98
+ 5: 3,
99
+ 6: [1, 5],
100
+ 8: n
101
+ },
102
+ { 1: [3] },
103
+ { 1: [2, 1] },
104
+ {
105
+ 4: 6,
106
+ 6: [1, 7],
107
+ 7: [1, 8],
108
+ 8: n
109
+ },
110
+ {
111
+ 6: r,
112
+ 7: [1, 10],
113
+ 9: 9,
114
+ 12: 11,
115
+ 13: i,
116
+ 14: a
117
+ },
118
+ t(o, [2, 3]),
119
+ { 1: [2, 2] },
120
+ t(o, [2, 4]),
121
+ t(o, [2, 5]),
122
+ {
123
+ 1: [2, 6],
124
+ 6: r,
125
+ 12: 15,
126
+ 13: i,
127
+ 14: a
128
+ },
129
+ {
130
+ 6: r,
131
+ 9: 16,
132
+ 12: 11,
133
+ 13: i,
134
+ 14: a
135
+ },
136
+ {
137
+ 6: s,
138
+ 7: c,
139
+ 10: 17,
140
+ 11: l
141
+ },
142
+ t(u, [2, 18], { 14: [1, 21] }),
143
+ t(u, [2, 16]),
144
+ t(u, [2, 17]),
145
+ {
146
+ 6: s,
147
+ 7: c,
148
+ 10: 22,
149
+ 11: l
150
+ },
151
+ {
152
+ 1: [2, 7],
153
+ 6: r,
154
+ 12: 15,
155
+ 13: i,
156
+ 14: a
157
+ },
158
+ t(d, [2, 14], {
159
+ 7: f,
160
+ 11: p
161
+ }),
162
+ t(m, [2, 8]),
163
+ t(m, [2, 9]),
164
+ t(m, [2, 10]),
165
+ t(u, [2, 15]),
166
+ t(d, [2, 13], {
167
+ 7: f,
168
+ 11: p
169
+ }),
170
+ t(m, [2, 11]),
171
+ t(m, [2, 12])
172
+ ],
173
+ defaultActions: {
174
+ 2: [2, 1],
175
+ 6: [2, 2]
176
+ },
177
+ parseError: /* @__PURE__ */ e(function(e, t) {
178
+ if (t.recoverable) this.trace(e);
179
+ else {
180
+ var n = Error(e);
181
+ throw n.hash = t, n;
182
+ }
183
+ }, "parseError"),
184
+ parse: /* @__PURE__ */ e(function(t) {
185
+ var n = this, r = [0], i = [], a = [null], o = [], s = this.table, c = "", l = 0, u = 0, d = 0, f = 2, p = 1, m = o.slice.call(arguments, 1), h = Object.create(this.lexer), g = { yy: {} };
186
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
187
+ h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
188
+ var v = h.yylloc;
189
+ o.push(v);
190
+ var y = h.options && h.options.ranges;
191
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
192
+ function b(e) {
193
+ r.length -= 2 * e, a.length -= e, o.length -= e;
194
+ }
195
+ e(b, "popStack");
196
+ function x() {
197
+ var e = i.pop() || h.lex() || p;
198
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
199
+ }
200
+ e(x, "lex");
201
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
202
+ if (w = r[r.length - 1], this.defaultActions[w] ? T = this.defaultActions[w] : (S ??= x(), T = s[w] && s[w][S]), T === void 0 || !T.length || !T[0]) {
203
+ var M = "";
204
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
205
+ M = h.showPosition ? "Parse error on line " + (l + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[S] || S) + "'" : "Parse error on line " + (l + 1) + ": Unexpected " + (S == p ? "end of input" : "'" + (this.terminals_[S] || S) + "'"), this.parseError(M, {
206
+ text: h.match,
207
+ token: this.terminals_[S] || S,
208
+ line: h.yylineno,
209
+ loc: v,
210
+ expected: j
211
+ });
212
+ }
213
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
214
+ switch (T[0]) {
215
+ case 1:
216
+ r.push(S), a.push(h.yytext), o.push(h.yylloc), r.push(T[1]), S = null, C ? (S = C, C = null) : (u = h.yyleng, c = h.yytext, l = h.yylineno, v = h.yylloc, d > 0 && d--);
217
+ break;
218
+ case 2:
219
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
220
+ first_line: o[o.length - (k || 1)].first_line,
221
+ last_line: o[o.length - 1].last_line,
222
+ first_column: o[o.length - (k || 1)].first_column,
223
+ last_column: o[o.length - 1].last_column
224
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
225
+ c,
226
+ u,
227
+ l,
228
+ g.yy,
229
+ T[1],
230
+ a,
231
+ o
232
+ ].concat(m)), E !== void 0) return E;
233
+ k && (r = r.slice(0, -1 * k * 2), a = a.slice(0, -1 * k), o = o.slice(0, -1 * k)), r.push(this.productions_[T[1]][0]), a.push(D.$), o.push(D._$), A = s[r[r.length - 2]][r[r.length - 1]], r.push(A);
234
+ break;
235
+ case 3: return !0;
236
+ }
237
+ }
238
+ return !0;
239
+ }, "parse")
240
+ };
241
+ h.lexer = /* @__PURE__ */ (function() {
242
+ return {
243
+ EOF: 1,
244
+ parseError: /* @__PURE__ */ e(function(e, t) {
245
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
246
+ else throw Error(e);
247
+ }, "parseError"),
248
+ setInput: /* @__PURE__ */ e(function(e, t) {
249
+ return this.yy = t || this.yy || {}, this._input = e, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
250
+ first_line: 1,
251
+ first_column: 0,
252
+ last_line: 1,
253
+ last_column: 0
254
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
255
+ }, "setInput"),
256
+ input: /* @__PURE__ */ e(function() {
257
+ var e = this._input[0];
258
+ return this.yytext += e, this.yyleng++, this.offset++, this.match += e, this.matched += e, e.match(/(?:\r\n?|\n).*/g) ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), e;
259
+ }, "input"),
260
+ unput: /* @__PURE__ */ e(function(e) {
261
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
262
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
263
+ var r = this.match.split(/(?:\r\n?|\n)/g);
264
+ this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
265
+ var i = this.yylloc.range;
266
+ return this.yylloc = {
267
+ first_line: this.yylloc.first_line,
268
+ last_line: this.yylineno + 1,
269
+ first_column: this.yylloc.first_column,
270
+ last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - t
271
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
272
+ }, "unput"),
273
+ more: /* @__PURE__ */ e(function() {
274
+ return this._more = !0, this;
275
+ }, "more"),
276
+ reject: /* @__PURE__ */ e(function() {
277
+ if (this.options.backtrack_lexer) this._backtrack = !0;
278
+ else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
279
+ text: "",
280
+ token: null,
281
+ line: this.yylineno
282
+ });
283
+ return this;
284
+ }, "reject"),
285
+ less: /* @__PURE__ */ e(function(e) {
286
+ this.unput(this.match.slice(e));
287
+ }, "less"),
288
+ pastInput: /* @__PURE__ */ e(function() {
289
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
290
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
291
+ }, "pastInput"),
292
+ upcomingInput: /* @__PURE__ */ e(function() {
293
+ var e = this.match;
294
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
295
+ }, "upcomingInput"),
296
+ showPosition: /* @__PURE__ */ e(function() {
297
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
298
+ return e + this.upcomingInput() + "\n" + t + "^";
299
+ }, "showPosition"),
300
+ test_match: /* @__PURE__ */ e(function(e, t) {
301
+ var n, r, i;
302
+ if (this.options.backtrack_lexer && (i = {
303
+ yylineno: this.yylineno,
304
+ yylloc: {
305
+ first_line: this.yylloc.first_line,
306
+ last_line: this.last_line,
307
+ first_column: this.yylloc.first_column,
308
+ last_column: this.yylloc.last_column
309
+ },
310
+ yytext: this.yytext,
311
+ match: this.match,
312
+ matches: this.matches,
313
+ matched: this.matched,
314
+ yyleng: this.yyleng,
315
+ offset: this.offset,
316
+ _more: this._more,
317
+ _input: this._input,
318
+ yy: this.yy,
319
+ conditionStack: this.conditionStack.slice(0),
320
+ done: this.done
321
+ }, this.options.ranges && (i.yylloc.range = this.yylloc.range.slice(0))), r = e[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
322
+ first_line: this.yylloc.last_line,
323
+ last_line: this.yylineno + 1,
324
+ first_column: this.yylloc.last_column,
325
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
326
+ }, this.yytext += e[0], this.match += e[0], this.matches = e, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(e[0].length), this.matched += e[0], n = this.performAction.call(this, this.yy, this, t, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n) return n;
327
+ if (this._backtrack) {
328
+ for (var a in i) this[a] = i[a];
329
+ return !1;
330
+ }
331
+ return !1;
332
+ }, "test_match"),
333
+ next: /* @__PURE__ */ e(function() {
334
+ if (this.done) return this.EOF;
335
+ this._input || (this.done = !0);
336
+ var e, t, n, r;
337
+ this._more || (this.yytext = "", this.match = "");
338
+ for (var i = this._currentRules(), a = 0; a < i.length; a++) if (n = this._input.match(this.rules[i[a]]), n && (!t || n[0].length > t[0].length)) {
339
+ if (t = n, r = a, this.options.backtrack_lexer) {
340
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
341
+ if (this._backtrack) {
342
+ t = !1;
343
+ continue;
344
+ } else return !1;
345
+ } else if (!this.options.flex) break;
346
+ }
347
+ return t ? (e = this.test_match(t, i[r]), e === !1 ? !1 : e) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
348
+ text: "",
349
+ token: null,
350
+ line: this.yylineno
351
+ });
352
+ }, "next"),
353
+ lex: /* @__PURE__ */ e(function() {
354
+ return this.next() || this.lex();
355
+ }, "lex"),
356
+ begin: /* @__PURE__ */ e(function(e) {
357
+ this.conditionStack.push(e);
358
+ }, "begin"),
359
+ popState: /* @__PURE__ */ e(function() {
360
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
361
+ }, "popState"),
362
+ _currentRules: /* @__PURE__ */ e(function() {
363
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
364
+ }, "_currentRules"),
365
+ topState: /* @__PURE__ */ e(function(e) {
366
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
367
+ }, "topState"),
368
+ pushState: /* @__PURE__ */ e(function(e) {
369
+ this.begin(e);
370
+ }, "pushState"),
371
+ stateStackSize: /* @__PURE__ */ e(function() {
372
+ return this.conditionStack.length;
373
+ }, "stateStackSize"),
374
+ options: { "case-insensitive": !0 },
375
+ performAction: /* @__PURE__ */ e(function(e, t, n, r) {
376
+ switch (n) {
377
+ case 0: return 6;
378
+ case 1: return 8;
379
+ case 2: return 8;
380
+ case 3: return 6;
381
+ case 4: return 7;
382
+ case 5: return 13;
383
+ case 6: return 14;
384
+ case 7: return 11;
385
+ }
386
+ }, "anonymous"),
387
+ rules: [
388
+ /^(?:\s*%%.*)/i,
389
+ /^(?:ishikawa-beta\b)/i,
390
+ /^(?:ishikawa\b)/i,
391
+ /^(?:[\s]+[\n])/i,
392
+ /^(?:[\n]+)/i,
393
+ /^(?:[\s]+)/i,
394
+ /^(?:[^\n]+)/i,
395
+ /^(?:$)/i
396
+ ],
397
+ conditions: { INITIAL: {
398
+ rules: [
399
+ 0,
400
+ 1,
401
+ 2,
402
+ 3,
403
+ 4,
404
+ 5,
405
+ 6,
406
+ 7
407
+ ],
408
+ inclusive: !0
409
+ } }
410
+ };
411
+ })();
412
+ function g() {
413
+ this.yy = {};
414
+ }
415
+ return e(g, "Parser"), g.prototype = h, h.Parser = g, new g();
416
+ })();
417
+ m.parser = m;
418
+ var h = m, g = class {
419
+ constructor() {
420
+ this.stack = [], this.clear = this.clear.bind(this), this.addNode = this.addNode.bind(this), this.getRoot = this.getRoot.bind(this);
421
+ }
422
+ static {
423
+ e(this, "IshikawaDB");
424
+ }
425
+ clear() {
426
+ this.root = void 0, this.stack = [], this.baseLevel = void 0, o();
427
+ }
428
+ getRoot() {
429
+ return this.root;
430
+ }
431
+ addNode(e, t) {
432
+ let n = l.sanitizeText(t, s());
433
+ if (!this.root) {
434
+ this.root = {
435
+ text: n,
436
+ children: []
437
+ }, this.stack = [{
438
+ level: 0,
439
+ node: this.root
440
+ }], i(n);
441
+ return;
442
+ }
443
+ this.baseLevel ??= e;
444
+ let r = e - this.baseLevel + 1;
445
+ for (r <= 0 && (r = 1); this.stack.length > 1 && this.stack[this.stack.length - 1].level >= r;) this.stack.pop();
446
+ let a = this.stack[this.stack.length - 1].node, o = {
447
+ text: n,
448
+ children: []
449
+ };
450
+ a.children.push(o), this.stack.push({
451
+ level: r,
452
+ node: o
453
+ });
454
+ }
455
+ getAccTitle() {
456
+ return u();
457
+ }
458
+ setAccTitle(e) {
459
+ r(e);
460
+ }
461
+ getAccDescription() {
462
+ return a();
463
+ }
464
+ setAccDescription(e) {
465
+ t(e);
466
+ }
467
+ getDiagramTitle() {
468
+ return n();
469
+ }
470
+ setDiagramTitle(e) {
471
+ i(e);
472
+ }
473
+ }, _ = 14, v = 250, y = 30, b = 60, x = 5, S = 82 * Math.PI / 180, C = Math.cos(S), w = Math.sin(S), T = /* @__PURE__ */ e((e, t, n) => {
474
+ let r = e.node().getBBox(), i = r.width + t * 2, a = r.height + t * 2;
475
+ c(e, a, i, n), e.attr("viewBox", `${r.x - t} ${r.y - t} ${i} ${a}`);
476
+ }, "applyPaddedViewBox"), E = /* @__PURE__ */ e((e, t, n, r) => {
477
+ let i = r.db.getRoot();
478
+ if (!i) return;
479
+ let a = s(), { look: o, handDrawnSeed: c, themeVariables: l } = a, u = d(a.fontSize)[0] ?? _, m = o === "handDrawn", h = i.children ?? [], g = a.ishikawa?.diagramPadding ?? 20, y = a.ishikawa?.useMaxWidth ?? !1, b = f(t), x = b.append("g").attr("class", "ishikawa"), S = m ? p.svg(b.node()) : void 0, C = S ? {
480
+ roughSvg: S,
481
+ seed: c ?? 0,
482
+ lineColor: l?.lineColor ?? "#333",
483
+ fillColor: l?.mainBkg ?? "#fff"
484
+ } : void 0, w = `ishikawa-arrow-${t}`;
485
+ m || x.append("defs").append("marker").attr("id", w).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 Z").attr("class", "ishikawa-arrow");
486
+ let E = 0, k = v, A = m ? void 0 : L(x, E, k, E, k, "ishikawa-spine");
487
+ if (O(x, E, k, i.text, u, C), !h.length) {
488
+ m && L(x, E, k, E, k, "ishikawa-spine", C), T(b, g, y);
489
+ return;
490
+ }
491
+ E -= 20;
492
+ let j = h.filter((e, t) => t % 2 == 0), N = h.filter((e, t) => t % 2 == 1), P = D(j), F = D(N), I = P.total + F.total, R = v, z = v;
493
+ if (I > 0) {
494
+ let e = v * 2, t = v * .3;
495
+ R = Math.max(t, e * (P.total / I)), z = Math.max(t, e * (F.total / I));
496
+ }
497
+ let B = u * 2;
498
+ R = Math.max(R, P.max * B), z = Math.max(z, F.max * B), k = Math.max(R, v), A && A.attr("y1", k).attr("y2", k), x.select(".ishikawa-head-group").attr("transform", `translate(0,${k})`);
499
+ let V = Math.ceil(h.length / 2);
500
+ for (let e = 0; e < V; e++) {
501
+ let t = x.append("g").attr("class", "ishikawa-pair");
502
+ for (let [n, r, i] of [[
503
+ h[e * 2],
504
+ -1,
505
+ R
506
+ ], [
507
+ h[e * 2 + 1],
508
+ 1,
509
+ z
510
+ ]]) n && M(t, n, E, k, r, i, u, C);
511
+ E = t.selectAll("text").nodes().reduce((e, t) => Math.min(e, t.getBBox().x), Infinity);
512
+ }
513
+ if (m) L(x, E, k, 0, k, "ishikawa-spine", C);
514
+ else {
515
+ A.attr("x1", E);
516
+ let e = `url(#${w})`;
517
+ x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start", e);
518
+ }
519
+ T(b, g, y);
520
+ }, "draw"), D = /* @__PURE__ */ e((t) => {
521
+ let n = /* @__PURE__ */ e((e) => e.children.reduce((e, t) => e + 1 + n(t), 0), "countDescendants");
522
+ return t.reduce((e, t) => {
523
+ let r = n(t);
524
+ return e.total += r, e.max = Math.max(e.max, r), e;
525
+ }, {
526
+ total: 0,
527
+ max: 0
528
+ });
529
+ }, "sideStats"), O = /* @__PURE__ */ e((e, t, n, r, i, a) => {
530
+ let o = Math.max(6, Math.floor(110 / (i * .6))), s = e.append("g").attr("class", "ishikawa-head-group").attr("transform", `translate(${t},${n})`), c = F(s, P(r, o), 0, 0, "ishikawa-head-label", "start", i), l = c.node().getBBox(), u = Math.max(60, l.width + 6), d = Math.max(40, l.height * 2 + 40), f = `M 0 ${-d / 2} L 0 ${d / 2} Q ${u * 2.4} 0 0 ${-d / 2} Z`;
531
+ if (a) {
532
+ let e = a.roughSvg.path(f, {
533
+ roughness: 1.5,
534
+ seed: a.seed,
535
+ fill: a.fillColor,
536
+ fillStyle: "hachure",
537
+ fillWeight: 2.5,
538
+ hachureGap: 5,
539
+ stroke: a.lineColor,
540
+ strokeWidth: 2
541
+ });
542
+ s.insert(() => e, ":first-child").attr("class", "ishikawa-head");
543
+ } else s.insert("path", ":first-child").attr("class", "ishikawa-head").attr("d", f);
544
+ c.attr("transform", `translate(${(u - l.width) / 2 - l.x + 3},${-l.y - l.height / 2})`);
545
+ }, "drawHead"), k = /* @__PURE__ */ e((t, n) => {
546
+ let r = [], i = [], a = /* @__PURE__ */ e((e, t, o) => {
547
+ let s = n === -1 ? [...e].reverse() : e;
548
+ for (let e of s) {
549
+ let n = r.length, s = e.children ?? [];
550
+ r.push({
551
+ depth: o,
552
+ text: P(e.text, 15),
553
+ parentIndex: t,
554
+ childCount: s.length
555
+ }), o % 2 == 0 ? (i.push(n), s.length && a(s, n, o + 1)) : (s.length && a(s, n, o + 1), i.push(n));
556
+ }
557
+ }, "walk");
558
+ return a(t, -1, 2), {
559
+ entries: r,
560
+ yOrder: i
561
+ };
562
+ }, "flattenTree"), A = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
563
+ let s = e.append("g").attr("class", "ishikawa-label-group"), c = F(s, t, n, r + 11 * i, "ishikawa-label cause", "middle", a).node().getBBox();
564
+ if (o) {
565
+ let e = o.roughSvg.rectangle(c.x - 20, c.y - 2, c.width + 40, c.height + 4, {
566
+ roughness: 1.5,
567
+ seed: o.seed,
568
+ fill: o.fillColor,
569
+ fillStyle: "hachure",
570
+ fillWeight: 2.5,
571
+ hachureGap: 5,
572
+ stroke: o.lineColor,
573
+ strokeWidth: 2
574
+ });
575
+ s.insert(() => e, ":first-child").attr("class", "ishikawa-label-box");
576
+ } else s.insert("rect", ":first-child").attr("class", "ishikawa-label-box").attr("x", c.x - 20).attr("y", c.y - 2).attr("width", c.width + 40).attr("height", c.height + 4);
577
+ }, "drawCauseLabel"), j = /* @__PURE__ */ e((e, t, n, r, i, a) => {
578
+ let o = Math.sqrt(r * r + i * i);
579
+ if (o === 0) return;
580
+ let s = r / o, c = i / o, l = -c * 6, u = s * 6, d = t, f = n, p = `M ${d} ${f} L ${d - s * 6 * 2 + l} ${f - c * 6 * 2 + u} L ${d - s * 6 * 2 - l} ${f - c * 6 * 2 - u} Z`, m = a.roughSvg.path(p, {
581
+ roughness: 1,
582
+ seed: a.seed,
583
+ fill: a.lineColor,
584
+ fillStyle: "solid",
585
+ stroke: a.lineColor,
586
+ strokeWidth: 1
587
+ });
588
+ e.append(() => m);
589
+ }, "drawArrowMarker"), M = /* @__PURE__ */ e((e, t, n, r, i, a, o, s) => {
590
+ let c = t.children ?? [], l = a * (c.length ? 1 : .2), u = -C * l, d = w * l * i, f = n + u, p = r + d;
591
+ if (L(e, n, r, f, p, "ishikawa-branch", s), s && j(e, n, r, n - f, r - p, s), A(e, t.text, f, p, i, o, s), !c.length) return;
592
+ let { entries: m, yOrder: h } = k(c, i), g = m.length, _ = Array(g);
593
+ for (let [e, t] of h.entries()) _[t] = r + d * ((e + 1) / (g + 1));
594
+ let v = /* @__PURE__ */ new Map();
595
+ v.set(-1, {
596
+ x0: n,
597
+ y0: r,
598
+ x1: f,
599
+ y1: p,
600
+ childCount: c.length,
601
+ childrenDrawn: 0
602
+ });
603
+ let S = -C, T = w * i, E = i < 0 ? "ishikawa-label up" : "ishikawa-label down";
604
+ for (let [t, n] of m.entries()) {
605
+ let r = _[t], i = v.get(n.parentIndex), a = e.append("g").attr("class", "ishikawa-sub-group"), c = 0, l = 0, u = 0;
606
+ if (n.depth % 2 == 0) {
607
+ let e = i.y1 - i.y0;
608
+ c = I(i.x0, i.x1, e ? (r - i.y0) / e : .5), l = r, u = c - (n.childCount > 0 ? b + n.childCount * x : y), L(a, c, r, u, r, "ishikawa-sub-branch", s), s && j(a, c, r, 1, 0, s), F(a, n.text, u, r, "ishikawa-label align", "end", o);
609
+ } else {
610
+ let e = i.childrenDrawn++;
611
+ c = I(i.x0, i.x1, (i.childCount - e) / (i.childCount + 1)), l = i.y0, u = c + S * ((r - l) / T), L(a, c, l, u, r, "ishikawa-sub-branch", s), s && j(a, c, l, c - u, l - r, s), F(a, n.text, u, r, E, "end", o);
612
+ }
613
+ n.childCount > 0 && v.set(t, {
614
+ x0: c,
615
+ y0: l,
616
+ x1: u,
617
+ y1: r,
618
+ childCount: n.childCount,
619
+ childrenDrawn: 0
620
+ });
621
+ }
622
+ }, "drawBranch"), N = /* @__PURE__ */ e((e) => e.split(/<br\s*\/?>|\n/), "splitLines"), P = /* @__PURE__ */ e((e, t) => {
623
+ if (e.length <= t) return e;
624
+ let n = [];
625
+ for (let r of e.split(/\s+/)) {
626
+ let e = n.length - 1;
627
+ e >= 0 && n[e].length + 1 + r.length <= t ? n[e] += " " + r : n.push(r);
628
+ }
629
+ return n.join("\n");
630
+ }, "wrapText"), F = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
631
+ let s = N(t), c = o * 1.05, l = e.append("text").attr("class", i).attr("text-anchor", a).attr("x", n).attr("y", r - (s.length - 1) * c / 2);
632
+ for (let [e, t] of s.entries()) l.append("tspan").attr("x", n).attr("dy", e === 0 ? 0 : c).text(t);
633
+ return l;
634
+ }, "drawMultilineText"), I = /* @__PURE__ */ e((e, t, n) => e + (t - e) * n, "lerp"), L = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
635
+ if (o) {
636
+ let s = o.roughSvg.line(t, n, r, i, {
637
+ roughness: 1.5,
638
+ seed: o.seed,
639
+ stroke: o.lineColor,
640
+ strokeWidth: 2
641
+ });
642
+ e.append(() => s).attr("class", a);
643
+ return;
644
+ }
645
+ return e.append("line").attr("class", a).attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i);
646
+ }, "drawLine"), R = {
647
+ parser: h,
648
+ get db() {
649
+ return new g();
650
+ },
651
+ renderer: { draw: E },
652
+ styles: /* @__PURE__ */ e((e) => `
653
+ .ishikawa .ishikawa-spine,
654
+ .ishikawa .ishikawa-branch,
655
+ .ishikawa .ishikawa-sub-branch {
656
+ stroke: ${e.lineColor};
657
+ stroke-width: 2;
658
+ fill: none;
659
+ }
660
+
661
+ .ishikawa .ishikawa-sub-branch {
662
+ stroke-width: 1;
663
+ }
664
+
665
+ .ishikawa .ishikawa-arrow {
666
+ fill: ${e.lineColor};
667
+ }
668
+
669
+ .ishikawa .ishikawa-head {
670
+ fill: ${e.mainBkg};
671
+ stroke: ${e.lineColor};
672
+ stroke-width: 2;
673
+ }
674
+
675
+ .ishikawa .ishikawa-label-box {
676
+ fill: ${e.mainBkg};
677
+ stroke: ${e.lineColor};
678
+ stroke-width: 2;
679
+ }
680
+
681
+ .ishikawa text {
682
+ font-family: ${e.fontFamily};
683
+ font-size: ${e.fontSize};
684
+ fill: ${e.textColor};
685
+ }
686
+
687
+ .ishikawa .ishikawa-head-label {
688
+ font-weight: 600;
689
+ text-anchor: middle;
690
+ dominant-baseline: middle;
691
+ font-size: 14px;
692
+ }
693
+
694
+ .ishikawa .ishikawa-label {
695
+ text-anchor: end;
696
+ }
697
+
698
+ .ishikawa .ishikawa-label.cause {
699
+ text-anchor: middle;
700
+ dominant-baseline: middle;
701
+ }
702
+
703
+ .ishikawa .ishikawa-label.align {
704
+ text-anchor: end;
705
+ dominant-baseline: middle;
706
+ }
707
+
708
+ .ishikawa .ishikawa-label.up {
709
+ dominant-baseline: baseline;
710
+ }
711
+
712
+ .ishikawa .ishikawa-label.down {
713
+ dominant-baseline: hanging;
714
+ }
715
+ `, "getStyles")
716
+ };
717
+ //#endregion
718
+ export { R as diagram };