@peasant-labs/fairtrade 0.0.47 → 0.0.49

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 (129) hide show
  1. package/dist/lib/abnfDiagram-WEYOIA3C-D4LMNFIJ.js +89 -0
  2. package/dist/lib/{adapter-Dulh38C2.js → adapter-CVKibszh.js} +209 -186
  3. package/dist/lib/arc-1xTxsoRi.js +80 -0
  4. package/dist/lib/architecture-WOLXFQ4H-c6RsZuzu.js +3 -0
  5. package/dist/lib/architectureDiagram-ZHVYKT53-DTINqD5R.js +4145 -0
  6. package/dist/lib/array-CApNbSU9.js +6 -0
  7. package/dist/lib/blockDiagram-RJAE7QA3-CUYHoR3g.js +1946 -0
  8. package/dist/lib/c4Diagram-XDPPPE54-Cdx6_DsI.js +2990 -0
  9. package/dist/lib/channel-DagAO2vE.js +5 -0
  10. package/dist/lib/chunk-2E7WHVMD-BzhgXW3b.js +490 -0
  11. package/dist/lib/chunk-2Q5K7J3B-DWNwIK5Y.js +15 -0
  12. package/dist/lib/chunk-4EMNKR2T-DhFrQz9k.js +236 -0
  13. package/dist/lib/chunk-55XCU76K-CI0GXDkJ.js +61 -0
  14. package/dist/lib/chunk-5VM5RSS4-BAQ-46g4.js +5 -0
  15. package/dist/lib/chunk-7S6XSTFO-CMt_p-O6.js +1373 -0
  16. package/dist/lib/chunk-AQDTSKZB-DrZccIQa.js +1847 -0
  17. package/dist/lib/chunk-DSNLSHJZ-CpA9d2CJ.js +4044 -0
  18. package/dist/lib/chunk-DUW6YSOI-C-tN4Kiv.js +10 -0
  19. package/dist/lib/chunk-EJLWFMJV-B30MNYvY.js +75 -0
  20. package/dist/lib/chunk-HAGFOTED-DMU2JNZM.js +4487 -0
  21. package/dist/lib/chunk-HNE4Q36P-BIA0n2gA.js +363 -0
  22. package/dist/lib/chunk-J5ZVWO5B-CA_-jk8G.js +12 -0
  23. package/dist/lib/chunk-JWPE2WC7-KRpHbrIX.js +8 -0
  24. package/dist/lib/chunk-LNGE3PJU-CMGaAEAh.js +1513 -0
  25. package/dist/lib/chunk-NGNAAXSQ-D7Dvct7J.js +19774 -0
  26. package/dist/lib/chunk-NQOKRVIF-MK9F46y3.js +4258 -0
  27. package/dist/lib/chunk-OYAV6JZA-B1yICcbU.js +10 -0
  28. package/dist/lib/chunk-UHW7PFBP-CLrOaA0y.js +67 -0
  29. package/dist/lib/chunk-VQ5W62QI-_ZR3gKe4.js +26 -0
  30. package/dist/lib/chunk-WQQL4CDK-DFtyhYZq.js +693 -0
  31. package/dist/lib/chunk-XXDRQBXY-uzyNBbgx.js +9 -0
  32. package/dist/lib/chunk-Y2CYZVJY-BYzrzvCI.js +12 -0
  33. package/dist/lib/chunk-YZO67HFG-D1jKt78p.js +275 -0
  34. package/dist/lib/chunk-ZAUX2LTX-7XO0Yj1z.js +37 -0
  35. package/dist/lib/chunk-ZCHMQSOR-CxoKltfF.js +349 -0
  36. package/dist/lib/classDiagram-v2-4MYWR3UA-BPvwhZqw.js +3397 -0
  37. package/dist/lib/commons.js +729 -729
  38. package/dist/lib/components.css +1 -1
  39. package/dist/lib/cose-bilkent-JH36ORCC-Oj79uOIQ.js +2250 -0
  40. package/dist/lib/cynefin-EF2NZ3EQ-COX3NRum.js +3 -0
  41. package/dist/lib/cynefinDiagram-WF24UDRP-UzTptNAX.js +349 -0
  42. package/dist/lib/cytoscape.esm-0ojxgO9x.js +18161 -0
  43. package/dist/lib/dagre-NK4GIZVX-DWZr-NGm.js +2356 -0
  44. package/dist/lib/defaultLocale-BbgDuMnp.js +201 -0
  45. package/dist/lib/diagram-CBK3MWTC-CsyKuv-w.js +525 -0
  46. package/dist/lib/diagram-I5XIIV2D-DWY2JSPC.js +134 -0
  47. package/dist/lib/diagram-ODIL2UCW-DUptj0JZ.js +301 -0
  48. package/dist/lib/diagram-PFBEJUXE-N5XnIBqM.js +447 -0
  49. package/dist/lib/diagram-RJA3I4VV-B9XgohYo.js +214 -0
  50. package/dist/lib/diagram-TYUNFSNR-XnsJIeAd.js +5084 -0
  51. package/dist/lib/dist-AMlsjiDX.js +59 -0
  52. package/dist/lib/ebnfDiagram-V4P3TTPT-BssHqFox.js +100 -0
  53. package/dist/lib/elk-QONTBCTQ-DwmwqYgP.js +47944 -0
  54. package/dist/lib/erDiagram-KYQIGQAA-BQiXw1Tw.js +1970 -0
  55. package/dist/lib/eventmodeling-K75KTNOO-DDb--yMc.js +3 -0
  56. package/dist/lib/flowDiagram-IUGLLWBU-BEqqF1y2.js +17 -0
  57. package/dist/lib/ganttDiagram-R7GPNTJY-BWtGXxEF.js +3094 -0
  58. package/dist/lib/gitGraph-VSP46ZUC-BSwOaak_.js +3 -0
  59. package/dist/lib/gitGraphDiagram-PDYL7XHY-CHGNuGbk.js +729 -0
  60. package/dist/lib/graphlib-Dndp26xU.js +1267 -0
  61. package/dist/lib/info-OHQRW6UA-Dk06sZRe.js +3 -0
  62. package/dist/lib/infoDiagram-MVDRKAX5-Cdhxnjmi.js +20 -0
  63. package/dist/lib/init-Bwwdo3M6.js +15 -0
  64. package/dist/lib/ishikawaDiagram-HPEHV2GE-Dzhti-GJ.js +719 -0
  65. package/dist/lib/journeyDiagram-BOSHW7O7-C3_vsSjw.js +884 -0
  66. package/dist/lib/kanban-definition-FNSA4HC5-XsfCEsjn.js +976 -0
  67. package/dist/lib/katex-Dw0PnoPU.js +21850 -0
  68. package/dist/lib/line-C9krU3Sv.js +34 -0
  69. package/dist/lib/linear-Cvilv3OA.js +289 -0
  70. package/dist/lib/mermaid-parser.core-I7qQ_fxz.js +638 -0
  71. package/dist/lib/mermaid.core-UNHMAbBP.js +1126 -0
  72. package/dist/lib/mindmap-definition-6OY57UG3-CAua-JvB.js +1011 -0
  73. package/dist/lib/ordinal-C55HfHHp.js +65 -0
  74. package/dist/lib/packet-JDAUHWVQ-DZ-MKx4I.js +3 -0
  75. package/dist/lib/path-DNvJyUE8.js +85 -0
  76. package/dist/lib/pegDiagram-ECIUJNBX-BCxa_IO0.js +94 -0
  77. package/dist/lib/pie-XZMESJXO-DpCa-Nnq.js +3 -0
  78. package/dist/lib/pieDiagram-GNMPY74T-CE_C3dCB.js +205 -0
  79. package/dist/lib/quadrantDiagram-D57K4MC3-CDgzdMoL.js +2001 -0
  80. package/dist/lib/radar-ABXABTNO-BOVK7L9p.js +3 -0
  81. package/dist/lib/railroad-I3PHUGI6-B6spKM0Z.js +3 -0
  82. package/dist/lib/railroad-abnf-LNEFI6M7-DEWqfByZ.js +3 -0
  83. package/dist/lib/railroad-ebnf-DWYD2UWJ-CWRLtxHB.js +3 -0
  84. package/dist/lib/railroad-peg-JR7BVNR7-C-3NHSsk.js +3 -0
  85. package/dist/lib/railroadDiagram-Y72NRBL7-a8YVk8LT.js +76 -0
  86. package/dist/lib/requirementDiagram-EQYSW5RA-B9HolqxU.js +2228 -0
  87. package/dist/lib/rough.esm-a8mysczE.js +1352 -0
  88. package/dist/lib/sankeyDiagram-SY24JHO5-CLFMtMJG.js +970 -0
  89. package/dist/lib/sequenceDiagram-BLEHNHQU-B5wfSV85.js +4253 -0
  90. package/dist/lib/share.js +1 -1
  91. package/dist/lib/sizeCapture-INFHLROL-BWGCc9aa.js +46 -0
  92. package/dist/lib/src-Dcy0zUZH.js +2153 -0
  93. package/dist/lib/stateDiagram-v2-A6IESKWZ-C92vye4N.js +2143 -0
  94. package/dist/lib/swimlanes-B3ENRKFQ-B6-i-tPc.js +4764 -0
  95. package/dist/lib/swimlanesDiagram-AYQRV4AK-CbkBeql-.js +28 -0
  96. package/dist/lib/timeline-definition-JXYKGLGB-D2Ip4r72.js +1073 -0
  97. package/dist/lib/treeView-D4JQ5SDB-CFaKQ_2T.js +3 -0
  98. package/dist/lib/treemap-SAJKECNS-BQ6z7Z3g.js +3 -0
  99. package/dist/lib/types/AppSidebar.d.ts +14 -1
  100. package/dist/lib/types/transcript/Collapsible.d.ts +10 -0
  101. package/dist/lib/types/transcript/FiltersRail.d.ts +1 -0
  102. package/dist/lib/types/transcript/MermaidBlock.d.ts +3 -0
  103. package/dist/lib/types/transcript/Thinking.d.ts +1 -1
  104. package/dist/lib/types/transcript/ToolCall.d.ts +1 -1
  105. package/dist/lib/types/transcript/TranscriptViewer.d.ts +2 -2
  106. package/dist/lib/types/transcript/TurnCard.d.ts +3 -1
  107. package/dist/lib/types/transcript/UnverifiedPullRequests.d.ts +12 -0
  108. package/dist/lib/types/transcript/WorkGroup.d.ts +9 -0
  109. package/dist/lib/types/transcript/action-groups.d.ts +9 -0
  110. package/dist/lib/types/transcript/adapter.d.ts +12 -0
  111. package/dist/lib/types/transcript/filters.d.ts +5 -5
  112. package/dist/lib/types/transcript/index.d.ts +2 -1
  113. package/dist/lib/types/transcript/mermaidSource.d.ts +2 -0
  114. package/dist/lib/types/transcript/mermaidSvg.d.ts +1 -0
  115. package/dist/lib/types/transcript/state-capabilities.d.ts +38 -11
  116. package/dist/lib/types/transcript/tool-state-key.d.ts +2 -0
  117. package/dist/lib/types/transcript/useReaderWidthAnchor.d.ts +20 -0
  118. package/dist/lib/types/transcript/view-model.d.ts +19 -0
  119. package/dist/lib/types/transcript/work-summary.d.ts +8 -0
  120. package/dist/lib/types/ui/transcript/adapter.d.ts +12 -0
  121. package/dist/lib/types/ui/transcript/view-model.d.ts +19 -0
  122. package/dist/lib/{ui-CrH0SVd_.js → ui-Beoq-HpN.js} +5345 -4232
  123. package/dist/lib/ui.js +6 -6
  124. package/dist/lib/usecaseDiagram-WPOLBNNX-BK1Anch1.js +7190 -0
  125. package/dist/lib/vennDiagram-Q3Y3IDCW-B6YTBqTS.js +1880 -0
  126. package/dist/lib/wardley-7MLQ67FV-DChYwu4i.js +3 -0
  127. package/dist/lib/wardleyDiagram-IVAIDKWA-D5I1qLUK.js +645 -0
  128. package/dist/lib/xychartDiagram-4URNHDU4-B6RXyhTO.js +2218 -0
  129. package/package.json +3 -2
@@ -0,0 +1,719 @@
1
+ import "./src-Dcy0zUZH.js";
2
+ import { n as e } from "./chunk-Y2CYZVJY-BYzrzvCI.js";
3
+ import { C as t, H as n, U as r, _ as i, a, b as o, c as s, q as c, s as l, v as u } from "./chunk-DSNLSHJZ-CpA9d2CJ.js";
4
+ import { m as d } from "./chunk-7S6XSTFO-CMt_p-O6.js";
5
+ import { t as f } from "./chunk-OYAV6JZA-B1yICcbU.js";
6
+ import { t as p } from "./rough.esm-a8mysczE.js";
7
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-HPEHV2GE.mjs
8
+ var m = (function() {
9
+ var t = /* @__PURE__ */ e(function(e, t, n, r) {
10
+ for (n ||= {}, r = e.length; r--; n[e[r]] = t);
11
+ return n;
12
+ }, "o"), n = [1, 4], r = [1, 14], i = [1, 12], a = [1, 13], o = [
13
+ 6,
14
+ 7,
15
+ 8
16
+ ], s = [1, 20], c = [1, 18], l = [1, 19], u = [
17
+ 6,
18
+ 7,
19
+ 11
20
+ ], d = [
21
+ 1,
22
+ 6,
23
+ 13,
24
+ 14
25
+ ], f = [1, 23], p = [1, 24], m = [
26
+ 1,
27
+ 6,
28
+ 7,
29
+ 11,
30
+ 13,
31
+ 14
32
+ ], h = {
33
+ trace: /* @__PURE__ */ e(function() {}, "trace"),
34
+ yy: {},
35
+ symbols_: {
36
+ error: 2,
37
+ start: 3,
38
+ ishikawa: 4,
39
+ spaceLines: 5,
40
+ SPACELINE: 6,
41
+ NL: 7,
42
+ ISHIKAWA: 8,
43
+ document: 9,
44
+ stop: 10,
45
+ EOF: 11,
46
+ statement: 12,
47
+ SPACELIST: 13,
48
+ TEXT: 14,
49
+ $accept: 0,
50
+ $end: 1
51
+ },
52
+ terminals_: {
53
+ 2: "error",
54
+ 6: "SPACELINE",
55
+ 7: "NL",
56
+ 8: "ISHIKAWA",
57
+ 11: "EOF",
58
+ 13: "SPACELIST",
59
+ 14: "TEXT"
60
+ },
61
+ productions_: [
62
+ 0,
63
+ [3, 1],
64
+ [3, 2],
65
+ [5, 1],
66
+ [5, 2],
67
+ [5, 2],
68
+ [4, 2],
69
+ [4, 3],
70
+ [10, 1],
71
+ [10, 1],
72
+ [10, 1],
73
+ [10, 2],
74
+ [10, 2],
75
+ [9, 3],
76
+ [9, 2],
77
+ [12, 2],
78
+ [12, 1],
79
+ [12, 1],
80
+ [12, 1]
81
+ ],
82
+ performAction: /* @__PURE__ */ e(function(e, t, n, r, i, a, o) {
83
+ var s = a.length - 1;
84
+ switch (i) {
85
+ case 6:
86
+ case 7: return r;
87
+ case 15:
88
+ r.addNode(a[s - 1].length, a[s].trim());
89
+ break;
90
+ case 16:
91
+ r.addNode(0, a[s].trim());
92
+ break;
93
+ }
94
+ }, "anonymous"),
95
+ table: [
96
+ {
97
+ 3: 1,
98
+ 4: 2,
99
+ 5: 3,
100
+ 6: [1, 5],
101
+ 8: n
102
+ },
103
+ { 1: [3] },
104
+ { 1: [2, 1] },
105
+ {
106
+ 4: 6,
107
+ 6: [1, 7],
108
+ 7: [1, 8],
109
+ 8: n
110
+ },
111
+ {
112
+ 6: r,
113
+ 7: [1, 10],
114
+ 9: 9,
115
+ 12: 11,
116
+ 13: i,
117
+ 14: a
118
+ },
119
+ t(o, [2, 3]),
120
+ { 1: [2, 2] },
121
+ t(o, [2, 4]),
122
+ t(o, [2, 5]),
123
+ {
124
+ 1: [2, 6],
125
+ 6: r,
126
+ 12: 15,
127
+ 13: i,
128
+ 14: a
129
+ },
130
+ {
131
+ 6: r,
132
+ 9: 16,
133
+ 12: 11,
134
+ 13: i,
135
+ 14: a
136
+ },
137
+ {
138
+ 6: s,
139
+ 7: c,
140
+ 10: 17,
141
+ 11: l
142
+ },
143
+ t(u, [2, 18], { 14: [1, 21] }),
144
+ t(u, [2, 16]),
145
+ t(u, [2, 17]),
146
+ {
147
+ 6: s,
148
+ 7: c,
149
+ 10: 22,
150
+ 11: l
151
+ },
152
+ {
153
+ 1: [2, 7],
154
+ 6: r,
155
+ 12: 15,
156
+ 13: i,
157
+ 14: a
158
+ },
159
+ t(d, [2, 14], {
160
+ 7: f,
161
+ 11: p
162
+ }),
163
+ t(m, [2, 8]),
164
+ t(m, [2, 9]),
165
+ t(m, [2, 10]),
166
+ t(u, [2, 15]),
167
+ t(d, [2, 13], {
168
+ 7: f,
169
+ 11: p
170
+ }),
171
+ t(m, [2, 11]),
172
+ t(m, [2, 12])
173
+ ],
174
+ defaultActions: {
175
+ 2: [2, 1],
176
+ 6: [2, 2]
177
+ },
178
+ parseError: /* @__PURE__ */ e(function(e, t) {
179
+ if (t.recoverable) this.trace(e);
180
+ else {
181
+ var n = Error(e);
182
+ throw n.hash = t, n;
183
+ }
184
+ }, "parseError"),
185
+ parse: /* @__PURE__ */ e(function(t) {
186
+ 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: {} };
187
+ for (var _ in this.yy) Object.prototype.hasOwnProperty.call(this.yy, _) && (g.yy[_] = this.yy[_]);
188
+ h.setInput(t, g.yy), g.yy.lexer = h, g.yy.parser = this, h.yylloc === void 0 && (h.yylloc = {});
189
+ var v = h.yylloc;
190
+ o.push(v);
191
+ var y = h.options && h.options.ranges;
192
+ typeof g.yy.parseError == "function" ? this.parseError = g.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
193
+ function b(e) {
194
+ r.length -= 2 * e, a.length -= e, o.length -= e;
195
+ }
196
+ e(b, "popStack");
197
+ function x() {
198
+ var e = i.pop() || h.lex() || p;
199
+ return typeof e != "number" && (e instanceof Array && (i = e, e = i.pop()), e = n.symbols_[e] || e), e;
200
+ }
201
+ e(x, "lex");
202
+ for (var S, C, w, T, E, D = {}, O, k, A, j;;) {
203
+ 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]) {
204
+ var M = "";
205
+ for (O in j = [], s[w]) this.terminals_[O] && O > f && j.push("'" + this.terminals_[O] + "'");
206
+ 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, {
207
+ text: h.match,
208
+ token: this.terminals_[S] || S,
209
+ line: h.yylineno,
210
+ loc: v,
211
+ expected: j
212
+ });
213
+ }
214
+ if (T[0] instanceof Array && T.length > 1) throw Error("Parse Error: multiple actions possible at state: " + w + ", token: " + S);
215
+ switch (T[0]) {
216
+ case 1:
217
+ 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--);
218
+ break;
219
+ case 2:
220
+ if (k = this.productions_[T[1]][1], D.$ = a[a.length - k], D._$ = {
221
+ first_line: o[o.length - (k || 1)].first_line,
222
+ last_line: o[o.length - 1].last_line,
223
+ first_column: o[o.length - (k || 1)].first_column,
224
+ last_column: o[o.length - 1].last_column
225
+ }, y && (D._$.range = [o[o.length - (k || 1)].range[0], o[o.length - 1].range[1]]), E = this.performAction.apply(D, [
226
+ c,
227
+ u,
228
+ l,
229
+ g.yy,
230
+ T[1],
231
+ a,
232
+ o
233
+ ].concat(m)), E !== void 0) return E;
234
+ 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);
235
+ break;
236
+ case 3: return !0;
237
+ }
238
+ }
239
+ return !0;
240
+ }, "parse")
241
+ };
242
+ h.lexer = /* @__PURE__ */ (function() {
243
+ return {
244
+ EOF: 1,
245
+ parseError: /* @__PURE__ */ e(function(e, t) {
246
+ if (this.yy.parser) this.yy.parser.parseError(e, t);
247
+ else throw Error(e);
248
+ }, "parseError"),
249
+ setInput: /* @__PURE__ */ e(function(e, t) {
250
+ 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 = {
251
+ first_line: 1,
252
+ first_column: 0,
253
+ last_line: 1,
254
+ last_column: 0
255
+ }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
256
+ }, "setInput"),
257
+ input: /* @__PURE__ */ e(function() {
258
+ var e = this._input[0];
259
+ 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;
260
+ }, "input"),
261
+ unput: /* @__PURE__ */ e(function(e) {
262
+ var t = e.length, n = e.split(/(?:\r\n?|\n)/g);
263
+ this._input = e + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - t), this.offset -= t;
264
+ var r = this.match.split(/(?:\r\n?|\n)/g);
265
+ 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);
266
+ var i = this.yylloc.range;
267
+ return this.yylloc = {
268
+ first_line: this.yylloc.first_line,
269
+ last_line: this.yylineno + 1,
270
+ first_column: this.yylloc.first_column,
271
+ 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
272
+ }, this.options.ranges && (this.yylloc.range = [i[0], i[0] + this.yyleng - t]), this.yyleng = this.yytext.length, this;
273
+ }, "unput"),
274
+ more: /* @__PURE__ */ e(function() {
275
+ return this._more = !0, this;
276
+ }, "more"),
277
+ reject: /* @__PURE__ */ e(function() {
278
+ if (this.options.backtrack_lexer) this._backtrack = !0;
279
+ 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(), {
280
+ text: "",
281
+ token: null,
282
+ line: this.yylineno
283
+ });
284
+ return this;
285
+ }, "reject"),
286
+ less: /* @__PURE__ */ e(function(e) {
287
+ this.unput(this.match.slice(e));
288
+ }, "less"),
289
+ pastInput: /* @__PURE__ */ e(function() {
290
+ var e = this.matched.substr(0, this.matched.length - this.match.length);
291
+ return (e.length > 20 ? "..." : "") + e.substr(-20).replace(/\n/g, "");
292
+ }, "pastInput"),
293
+ upcomingInput: /* @__PURE__ */ e(function() {
294
+ var e = this.match;
295
+ return e.length < 20 && (e += this._input.substr(0, 20 - e.length)), (e.substr(0, 20) + (e.length > 20 ? "..." : "")).replace(/\n/g, "");
296
+ }, "upcomingInput"),
297
+ showPosition: /* @__PURE__ */ e(function() {
298
+ var e = this.pastInput(), t = Array(e.length + 1).join("-");
299
+ return e + this.upcomingInput() + "\n" + t + "^";
300
+ }, "showPosition"),
301
+ test_match: /* @__PURE__ */ e(function(e, t) {
302
+ var n, r, i;
303
+ if (this.options.backtrack_lexer && (i = {
304
+ yylineno: this.yylineno,
305
+ yylloc: {
306
+ first_line: this.yylloc.first_line,
307
+ last_line: this.last_line,
308
+ first_column: this.yylloc.first_column,
309
+ last_column: this.yylloc.last_column
310
+ },
311
+ yytext: this.yytext,
312
+ match: this.match,
313
+ matches: this.matches,
314
+ matched: this.matched,
315
+ yyleng: this.yyleng,
316
+ offset: this.offset,
317
+ _more: this._more,
318
+ _input: this._input,
319
+ yy: this.yy,
320
+ conditionStack: this.conditionStack.slice(0),
321
+ done: this.done
322
+ }, 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 = {
323
+ first_line: this.yylloc.last_line,
324
+ last_line: this.yylineno + 1,
325
+ first_column: this.yylloc.last_column,
326
+ last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + e[0].length
327
+ }, 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;
328
+ if (this._backtrack) {
329
+ for (var a in i) this[a] = i[a];
330
+ return !1;
331
+ }
332
+ return !1;
333
+ }, "test_match"),
334
+ next: /* @__PURE__ */ e(function() {
335
+ if (this.done) return this.EOF;
336
+ this._input || (this.done = !0);
337
+ var e, t, n, r;
338
+ this._more || (this.yytext = "", this.match = "");
339
+ 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)) {
340
+ if (t = n, r = a, this.options.backtrack_lexer) {
341
+ if (e = this.test_match(n, i[a]), e !== !1) return e;
342
+ if (this._backtrack) {
343
+ t = !1;
344
+ continue;
345
+ } else return !1;
346
+ } else if (!this.options.flex) break;
347
+ }
348
+ 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(), {
349
+ text: "",
350
+ token: null,
351
+ line: this.yylineno
352
+ });
353
+ }, "next"),
354
+ lex: /* @__PURE__ */ e(function() {
355
+ return this.next() || this.lex();
356
+ }, "lex"),
357
+ begin: /* @__PURE__ */ e(function(e) {
358
+ this.conditionStack.push(e);
359
+ }, "begin"),
360
+ popState: /* @__PURE__ */ e(function() {
361
+ return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
+ }, "popState"),
363
+ _currentRules: /* @__PURE__ */ e(function() {
364
+ return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
365
+ }, "_currentRules"),
366
+ topState: /* @__PURE__ */ e(function(e) {
367
+ return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
368
+ }, "topState"),
369
+ pushState: /* @__PURE__ */ e(function(e) {
370
+ this.begin(e);
371
+ }, "pushState"),
372
+ stateStackSize: /* @__PURE__ */ e(function() {
373
+ return this.conditionStack.length;
374
+ }, "stateStackSize"),
375
+ options: { "case-insensitive": !0 },
376
+ performAction: /* @__PURE__ */ e(function(e, t, n, r) {
377
+ switch (n) {
378
+ case 0: return 6;
379
+ case 1: return 8;
380
+ case 2: return 8;
381
+ case 3: return 6;
382
+ case 4: return 7;
383
+ case 5: return 13;
384
+ case 6: return 14;
385
+ case 7: return 11;
386
+ }
387
+ }, "anonymous"),
388
+ rules: [
389
+ /^(?:\s*%%.*)/i,
390
+ /^(?:ishikawa-beta\b)/i,
391
+ /^(?:ishikawa\b)/i,
392
+ /^(?:[\s]+[\n])/i,
393
+ /^(?:[\n]+)/i,
394
+ /^(?:[\s]+)/i,
395
+ /^(?:[^\n]+)/i,
396
+ /^(?:$)/i
397
+ ],
398
+ conditions: { INITIAL: {
399
+ rules: [
400
+ 0,
401
+ 1,
402
+ 2,
403
+ 3,
404
+ 4,
405
+ 5,
406
+ 6,
407
+ 7
408
+ ],
409
+ inclusive: !0
410
+ } }
411
+ };
412
+ })();
413
+ function g() {
414
+ this.yy = {};
415
+ }
416
+ return e(g, "Parser"), g.prototype = h, h.Parser = g, new g();
417
+ })();
418
+ m.parser = m;
419
+ var h = m, g = class {
420
+ constructor() {
421
+ this.stack = [], this.clear = this.clear.bind(this), this.addNode = this.addNode.bind(this), this.getRoot = this.getRoot.bind(this);
422
+ }
423
+ static {
424
+ e(this, "IshikawaDB");
425
+ }
426
+ clear() {
427
+ this.root = void 0, this.stack = [], this.baseLevel = void 0, a();
428
+ }
429
+ getRoot() {
430
+ return this.root;
431
+ }
432
+ addNode(e, t) {
433
+ let n = l.sanitizeText(t, o());
434
+ if (!this.root) {
435
+ this.root = {
436
+ text: n,
437
+ children: []
438
+ }, this.stack = [{
439
+ level: 0,
440
+ node: this.root
441
+ }], c(n);
442
+ return;
443
+ }
444
+ this.baseLevel ??= e;
445
+ let r = e - this.baseLevel + 1;
446
+ for (r <= 0 && (r = 1); this.stack.length > 1 && this.stack[this.stack.length - 1].level >= r;) this.stack.pop();
447
+ let i = this.stack[this.stack.length - 1].node, a = {
448
+ text: n,
449
+ children: []
450
+ };
451
+ i.children.push(a), this.stack.push({
452
+ level: r,
453
+ node: a
454
+ });
455
+ }
456
+ getAccTitle() {
457
+ return u();
458
+ }
459
+ setAccTitle(e) {
460
+ r(e);
461
+ }
462
+ getAccDescription() {
463
+ return i();
464
+ }
465
+ setAccDescription(e) {
466
+ n(e);
467
+ }
468
+ getDiagramTitle() {
469
+ return t();
470
+ }
471
+ setDiagramTitle(e) {
472
+ c(e);
473
+ }
474
+ }, _ = 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) => {
475
+ let r = e.node().getBBox(), i = r.width + t * 2, a = r.height + t * 2;
476
+ s(e, a, i, n), e.attr("viewBox", `${r.x - t} ${r.y - t} ${i} ${a}`);
477
+ }, "applyPaddedViewBox"), E = /* @__PURE__ */ e((e, t, n, r) => {
478
+ let i = r.db.getRoot();
479
+ if (!i) return;
480
+ let a = o(), { look: s, handDrawnSeed: c, themeVariables: l } = a, u = d(a.fontSize)[0] ?? _, m = s === "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 ? {
481
+ roughSvg: S,
482
+ seed: c ?? 0,
483
+ lineColor: l?.lineColor ?? "#333",
484
+ fillColor: l?.mainBkg ?? "#fff"
485
+ } : void 0, w = `ishikawa-arrow-${t}`;
486
+ 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");
487
+ let E = 0, k = v, A = m ? void 0 : L(x, E, k, E, k, "ishikawa-spine");
488
+ if (O(x, E, k, i.text, u, C), !h.length) {
489
+ m && L(x, E, k, E, k, "ishikawa-spine", C), T(b, g, y);
490
+ return;
491
+ }
492
+ E -= 20;
493
+ 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;
494
+ if (I > 0) {
495
+ let e = v * 2, t = v * .3;
496
+ R = Math.max(t, e * (P.total / I)), z = Math.max(t, e * (F.total / I));
497
+ }
498
+ let B = u * 2;
499
+ 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})`);
500
+ let V = Math.ceil(h.length / 2);
501
+ for (let e = 0; e < V; e++) {
502
+ let t = x.append("g").attr("class", "ishikawa-pair");
503
+ for (let [n, r, i] of [[
504
+ h[e * 2],
505
+ -1,
506
+ R
507
+ ], [
508
+ h[e * 2 + 1],
509
+ 1,
510
+ z
511
+ ]]) n && M(t, n, E, k, r, i, u, C);
512
+ E = t.selectAll("text").nodes().reduce((e, t) => Math.min(e, t.getBBox().x), Infinity);
513
+ }
514
+ if (m) L(x, E, k, 0, k, "ishikawa-spine", C);
515
+ else {
516
+ A.attr("x1", E);
517
+ let e = `url(#${w})`;
518
+ x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start", e);
519
+ }
520
+ T(b, g, y);
521
+ }, "draw"), D = /* @__PURE__ */ e((t) => {
522
+ let n = /* @__PURE__ */ e((e) => e.children.reduce((e, t) => e + 1 + n(t), 0), "countDescendants");
523
+ return t.reduce((e, t) => {
524
+ let r = n(t);
525
+ return e.total += r, e.max = Math.max(e.max, r), e;
526
+ }, {
527
+ total: 0,
528
+ max: 0
529
+ });
530
+ }, "sideStats"), O = /* @__PURE__ */ e((e, t, n, r, i, a) => {
531
+ 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`;
532
+ if (a) {
533
+ let e = a.roughSvg.path(f, {
534
+ roughness: 1.5,
535
+ seed: a.seed,
536
+ fill: a.fillColor,
537
+ fillStyle: "hachure",
538
+ fillWeight: 2.5,
539
+ hachureGap: 5,
540
+ stroke: a.lineColor,
541
+ strokeWidth: 2
542
+ });
543
+ s.insert(() => e, ":first-child").attr("class", "ishikawa-head");
544
+ } else s.insert("path", ":first-child").attr("class", "ishikawa-head").attr("d", f);
545
+ c.attr("transform", `translate(${(u - l.width) / 2 - l.x + 3},${-l.y - l.height / 2})`);
546
+ }, "drawHead"), k = /* @__PURE__ */ e((t, n) => {
547
+ let r = [], i = [], a = /* @__PURE__ */ e((e, t, o) => {
548
+ let s = n === -1 ? [...e].reverse() : e;
549
+ for (let e of s) {
550
+ let n = r.length, s = e.children ?? [];
551
+ r.push({
552
+ depth: o,
553
+ text: P(e.text, 15),
554
+ parentIndex: t,
555
+ childCount: s.length
556
+ }), o % 2 == 0 ? (i.push(n), s.length && a(s, n, o + 1)) : (s.length && a(s, n, o + 1), i.push(n));
557
+ }
558
+ }, "walk");
559
+ return a(t, -1, 2), {
560
+ entries: r,
561
+ yOrder: i
562
+ };
563
+ }, "flattenTree"), A = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
564
+ 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();
565
+ if (o) {
566
+ let e = o.roughSvg.rectangle(c.x - 20, c.y - 2, c.width + 40, c.height + 4, {
567
+ roughness: 1.5,
568
+ seed: o.seed,
569
+ fill: o.fillColor,
570
+ fillStyle: "hachure",
571
+ fillWeight: 2.5,
572
+ hachureGap: 5,
573
+ stroke: o.lineColor,
574
+ strokeWidth: 2
575
+ });
576
+ s.insert(() => e, ":first-child").attr("class", "ishikawa-label-box");
577
+ } 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);
578
+ }, "drawCauseLabel"), j = /* @__PURE__ */ e((e, t, n, r, i, a) => {
579
+ let o = Math.sqrt(r * r + i * i);
580
+ if (o === 0) return;
581
+ 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, {
582
+ roughness: 1,
583
+ seed: a.seed,
584
+ fill: a.lineColor,
585
+ fillStyle: "solid",
586
+ stroke: a.lineColor,
587
+ strokeWidth: 1
588
+ });
589
+ e.append(() => m);
590
+ }, "drawArrowMarker"), M = /* @__PURE__ */ e((e, t, n, r, i, a, o, s) => {
591
+ let c = t.children ?? [], l = a * (c.length ? 1 : .2), u = -C * l, d = w * l * i, f = n + u, p = r + d;
592
+ 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;
593
+ let { entries: m, yOrder: h } = k(c, i), g = m.length, _ = Array(g);
594
+ for (let [e, t] of h.entries()) _[t] = r + d * ((e + 1) / (g + 1));
595
+ let v = /* @__PURE__ */ new Map();
596
+ v.set(-1, {
597
+ x0: n,
598
+ y0: r,
599
+ x1: f,
600
+ y1: p,
601
+ childCount: c.length,
602
+ childrenDrawn: 0
603
+ });
604
+ let S = -C, T = w * i, E = i < 0 ? "ishikawa-label up" : "ishikawa-label down";
605
+ for (let [t, n] of m.entries()) {
606
+ let r = _[t], i = v.get(n.parentIndex), a = e.append("g").attr("class", "ishikawa-sub-group"), c = 0, l = 0, u = 0;
607
+ if (n.depth % 2 == 0) {
608
+ let e = i.y1 - i.y0;
609
+ 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);
610
+ } else {
611
+ let e = i.childrenDrawn++;
612
+ 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);
613
+ }
614
+ n.childCount > 0 && v.set(t, {
615
+ x0: c,
616
+ y0: l,
617
+ x1: u,
618
+ y1: r,
619
+ childCount: n.childCount,
620
+ childrenDrawn: 0
621
+ });
622
+ }
623
+ }, "drawBranch"), N = /* @__PURE__ */ e((e) => e.split(/<br\s*\/?>|\n/), "splitLines"), P = /* @__PURE__ */ e((e, t) => {
624
+ if (e.length <= t) return e;
625
+ let n = [];
626
+ for (let r of e.split(/\s+/)) {
627
+ let e = n.length - 1;
628
+ e >= 0 && n[e].length + 1 + r.length <= t ? n[e] += " " + r : n.push(r);
629
+ }
630
+ return n.join("\n");
631
+ }, "wrapText"), F = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
632
+ 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);
633
+ for (let [e, t] of s.entries()) l.append("tspan").attr("x", n).attr("dy", e === 0 ? 0 : c).text(t);
634
+ return l;
635
+ }, "drawMultilineText"), I = /* @__PURE__ */ e((e, t, n) => e + (t - e) * n, "lerp"), L = /* @__PURE__ */ e((e, t, n, r, i, a, o) => {
636
+ if (o) {
637
+ let s = o.roughSvg.line(t, n, r, i, {
638
+ roughness: 1.5,
639
+ seed: o.seed,
640
+ stroke: o.lineColor,
641
+ strokeWidth: 2
642
+ });
643
+ e.append(() => s).attr("class", a);
644
+ return;
645
+ }
646
+ return e.append("line").attr("class", a).attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i);
647
+ }, "drawLine"), R = {
648
+ parser: h,
649
+ get db() {
650
+ return new g();
651
+ },
652
+ renderer: { draw: E },
653
+ styles: /* @__PURE__ */ e((e) => `
654
+ .ishikawa .ishikawa-spine,
655
+ .ishikawa .ishikawa-branch,
656
+ .ishikawa .ishikawa-sub-branch {
657
+ stroke: ${e.lineColor};
658
+ stroke-width: 2;
659
+ fill: none;
660
+ }
661
+
662
+ .ishikawa .ishikawa-sub-branch {
663
+ stroke-width: 1;
664
+ }
665
+
666
+ .ishikawa .ishikawa-arrow {
667
+ fill: ${e.lineColor};
668
+ }
669
+
670
+ .ishikawa .ishikawa-head {
671
+ fill: ${e.mainBkg};
672
+ stroke: ${e.lineColor};
673
+ stroke-width: 2;
674
+ }
675
+
676
+ .ishikawa .ishikawa-label-box {
677
+ fill: ${e.mainBkg};
678
+ stroke: ${e.lineColor};
679
+ stroke-width: 2;
680
+ }
681
+
682
+ .ishikawa text {
683
+ font-family: ${e.fontFamily};
684
+ font-size: ${e.fontSize};
685
+ fill: ${e.textColor};
686
+ }
687
+
688
+ .ishikawa .ishikawa-head-label {
689
+ font-weight: 600;
690
+ text-anchor: middle;
691
+ dominant-baseline: middle;
692
+ font-size: 14px;
693
+ }
694
+
695
+ .ishikawa .ishikawa-label {
696
+ text-anchor: end;
697
+ }
698
+
699
+ .ishikawa .ishikawa-label.cause {
700
+ text-anchor: middle;
701
+ dominant-baseline: middle;
702
+ }
703
+
704
+ .ishikawa .ishikawa-label.align {
705
+ text-anchor: end;
706
+ dominant-baseline: middle;
707
+ }
708
+
709
+ .ishikawa .ishikawa-label.up {
710
+ dominant-baseline: baseline;
711
+ }
712
+
713
+ .ishikawa .ishikawa-label.down {
714
+ dominant-baseline: hanging;
715
+ }
716
+ `, "getStyles")
717
+ };
718
+ //#endregion
719
+ export { R as diagram };