react-docs-ui 0.6.16 → 0.6.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AIChatDialog-W60DtiEW.js → AIChatDialog-BnAX3dRn.js} +2 -2
- package/dist/{AISelectionTrigger-MaBGhxTE.js → AISelectionTrigger-SLyb8Vep.js} +2 -2
- package/dist/{AISettingsPanel-aiMnncnQ.js → AISettingsPanel-Bsd_wLP4.js} +3 -3
- package/dist/{DocsApp-CUrnKwOU.js → DocsApp-CNVM_Zcf.js} +3505 -3212
- package/dist/{GlobalContextMenu-DG6x5Y5w.js → GlobalContextMenu-BtVjQk0v.js} +1 -1
- package/dist/{MdxContent-CMB8ZbXo.js → MdxContent-D2l4Au7Z.js} +310 -306
- package/dist/{MdxContent.lazy-C4rcCv4v.js → MdxContent.lazy-BirC7wrH.js} +1 -1
- package/dist/{SearchDialog-tUSKKsxW.js → SearchDialog-DWVre6R9.js} +66 -56
- package/dist/{SearchRuntime-5fXpxDsi.js → SearchRuntime-D0rSMKV3.js} +6 -5
- package/dist/_basePickBy-3HEi44E5.js +166 -0
- package/dist/_baseUniq-CyOGXr0t.js +682 -0
- package/dist/arc-DULIiw5L.js +80 -0
- package/dist/architecture-PBZL5I3N-DT4oHaWT.js +3 -0
- package/dist/architectureDiagram-2XIMDMQ5-CqinFxzU.js +4045 -0
- package/dist/array-DHiPsILf.js +6 -0
- package/dist/blockDiagram-WCTKOSBZ-4JAhKeqm.js +3025 -0
- package/dist/c4Diagram-IC4MRINW-DtmtzsQQ.js +2964 -0
- package/dist/channel-BPONoOHQ.js +5 -0
- package/dist/chunk-4BX2VUAB-Bv5NGtUU.js +8 -0
- package/dist/chunk-55IACEB6-BXL-F-QI.js +8 -0
- package/dist/chunk-7E7YKBS2-CuTUVGrY.js +23 -0
- package/dist/chunk-7R4GIKGN-Qkaxl46X.js +2596 -0
- package/dist/chunk-C72U2L5F-42ScKBi2.js +23 -0
- package/dist/chunk-EGIJ26TM-D9jfybGA.js +23 -0
- package/dist/chunk-FMBD7UC4-DZXaweDk.js +5 -0
- package/dist/chunk-GEFDOKGD-OXBFFBXI.js +1121 -0
- package/dist/chunk-GLR3WWYH-BNwKwdNm.js +41 -0
- package/dist/chunk-HHEYEP7N-BQ3EJT5G.js +9 -0
- package/dist/chunk-JSJVCQXG-DNkHiMyV.js +60 -0
- package/dist/chunk-KX2RTZJC-DuTfSwwu.js +25 -0
- package/dist/chunk-KYZI473N-COpLSX52.js +3434 -0
- package/dist/chunk-L3YUKLVL-BdSnx12A.js +23 -0
- package/dist/chunk-MX3YWQON-CrwNXQjz.js +80 -0
- package/dist/chunk-NBPlniwU.js +23 -0
- package/dist/chunk-NQ4KR5QH-Y07nfCMJ.js +2002 -0
- package/dist/chunk-O4XLMI2P-CuexQiBs.js +511 -0
- package/dist/chunk-OZEHJAEY-D6vfkGpv.js +64 -0
- package/dist/chunk-PQ6SQG4A-6cI0SCcc.js +67 -0
- package/dist/chunk-PU5JKC2W-an2DzREj.js +1885 -0
- package/dist/chunk-QZHKN3VN-BKMQ36H3.js +15 -0
- package/dist/chunk-R5LLSJPH-DOyud7qN.js +35 -0
- package/dist/chunk-WL4C6EOR-y1gU9zpd.js +3194 -0
- package/dist/chunk-XIRO2GV7-BD1Cp5pB.js +30 -0
- package/dist/chunk-XPW4576I-DOBR2ORN.js +1146 -0
- package/dist/chunk-XZSTWKYB-BQ9uqNJe.js +15797 -0
- package/dist/chunk-YBOYWFTD-BT3l76Xm.js +32 -0
- package/dist/classDiagram-VBA2DB6C-AUxID939.js +29 -0
- package/dist/classDiagram-v2-RAHNMMFH-tupy2OPi.js +29 -0
- package/dist/clone-CRTZj7kp.js +8 -0
- package/dist/cose-bilkent-S5V4N54A-Bbd2d2j7.js +2250 -0
- package/dist/cytoscape.esm-CQKQOqRt.js +18100 -0
- package/dist/dagre-Cyr5_x2X.js +1483 -0
- package/dist/dagre-KLK3FWXG-Bjsq-TtB.js +294 -0
- package/dist/defaultLocale-P2nWjZJu.js +201 -0
- package/dist/diagram-E7M64L7V-CCTuI46e.js +527 -0
- package/dist/diagram-IFDJBPK2-DI_KTvRx.js +213 -0
- package/dist/diagram-P4PSJMXO-D3SeWDdU.js +133 -0
- package/dist/dist-CSS39H68.js +50 -0
- package/dist/docs-app.es.js +1 -1
- package/dist/erDiagram-INFDFZHY-Db_DAoTf.js +1666 -0
- package/dist/flowDiagram-PKNHOUZH-TqyNp9Dn.js +4161 -0
- package/dist/ganttDiagram-A5KZAMGK-DqNVbtHo.js +3072 -0
- package/dist/gitGraph-HDMCJU4V-DQudxfzL.js +3 -0
- package/dist/gitGraphDiagram-K3NZZRJ6-Cga9Wfgb.js +625 -0
- package/dist/graphlib-CexrUFs9.js +225 -0
- package/dist/info-3K5VOQVL-DiuN3kw6.js +3 -0
- package/dist/infoDiagram-LFFYTUFH-bvABxJph.js +19 -0
- package/dist/init-GWRygwCo.js +15 -0
- package/dist/isArrayLikeObject-CG2kGrxR.js +578 -0
- package/dist/isEmpty-C8iIdTg-.js +35 -0
- package/dist/ishikawaDiagram-PHBUUO56-DKGPu-hu.js +717 -0
- package/dist/journeyDiagram-4ABVD52K-DefcNau0.js +883 -0
- package/dist/kanban-definition-K7BYSVSG-BXvFQzdZ.js +971 -0
- package/dist/line-ChPoSgrf.js +34 -0
- package/dist/linear-BeQrMQNe.js +289 -0
- package/dist/math-CgS6d5p2.js +10 -0
- package/dist/{shiki-highlighter-BmQSSJpS.js → mdx-components-Bz45lgrV.js} +1387 -1288
- package/dist/mdx-components-TEc3uhbY.js +4 -0
- package/dist/mermaid-parser.core-CDTyVXPe.js +59 -0
- package/dist/mermaid.core-CHJrGTZ9.js +919 -0
- package/dist/mindmap-definition-YRQLILUH-CqsMcFhX.js +964 -0
- package/dist/ordinal-DUEC8Lr4.js +65 -0
- package/dist/packet-RMMSAZCW-ZLaHU0Ov.js +3 -0
- package/dist/path-CzRXOvk1.js +85 -0
- package/dist/pie-UPGHQEXC-COgIbE0j.js +3 -0
- package/dist/pieDiagram-SKSYHLDU-C8Y5Bc8d.js +165 -0
- package/dist/quadrantDiagram-337W2JSQ-DRWBX5cn.js +1974 -0
- package/dist/radar-KQ55EAFF-ABFVVcns.js +3 -0
- package/dist/react-docs-ui.css +1 -1
- package/dist/react-docs-ui.es.js +19 -19
- package/dist/requirementDiagram-Z7DCOOCP-EkyUnFq8.js +2201 -0
- package/dist/rough.esm-qTNNhHn7.js +1352 -0
- package/dist/sankeyDiagram-WA2Y5GQK-Cmas7IuZ.js +920 -0
- package/dist/sequenceDiagram-2WXFIKYE-B7TrFw3o.js +4109 -0
- package/dist/src-B8kKzJ6p.js +2146 -0
- package/dist/stateDiagram-RAJIS63D-DyqZyFdt.js +217 -0
- package/dist/stateDiagram-v2-FVOUBMTO-5UjWXgt6.js +27 -0
- package/dist/timeline-definition-YZTLITO2-qhoXPOhL.js +830 -0
- package/dist/treemap-KZPCXAKY-CRdRsoRo.js +3 -0
- package/dist/types/components/AnnouncementBar.d.ts +12 -0
- package/dist/types/components/AnnouncementBar.d.ts.map +1 -0
- package/dist/types/components/DocsLayout.d.ts +8 -2
- package/dist/types/components/DocsLayout.d.ts.map +1 -1
- package/dist/types/components/HeaderNav.d.ts +17 -1
- package/dist/types/components/HeaderNav.d.ts.map +1 -1
- package/dist/types/components/MdxContent.d.ts.map +1 -1
- package/dist/types/components/MobileSidebar.d.ts +2 -1
- package/dist/types/components/MobileSidebar.d.ts.map +1 -1
- package/dist/types/components/PageFeedback.d.ts +11 -0
- package/dist/types/components/PageFeedback.d.ts.map +1 -0
- package/dist/types/components/PageMetaActions.d.ts +15 -0
- package/dist/types/components/PageMetaActions.d.ts.map +1 -0
- package/dist/types/components/PageNavigation.d.ts +2 -1
- package/dist/types/components/PageNavigation.d.ts.map +1 -1
- package/dist/types/components/SearchLauncher.d.ts +2 -1
- package/dist/types/components/SearchLauncher.d.ts.map +1 -1
- package/dist/types/components/SidebarNav.d.ts +2 -1
- package/dist/types/components/SidebarNav.d.ts.map +1 -1
- package/dist/types/components/mdx-components/Mermaid.d.ts +6 -0
- package/dist/types/components/mdx-components/Mermaid.d.ts.map +1 -0
- package/dist/types/components/mdx-components/Tabs.d.ts +13 -0
- package/dist/types/components/mdx-components/Tabs.d.ts.map +1 -0
- package/dist/types/components/mdx-components/index.d.ts +2 -0
- package/dist/types/components/mdx-components/index.d.ts.map +1 -1
- package/dist/types/components/search/SearchProvider.d.ts +2 -1
- package/dist/types/components/search/SearchProvider.d.ts.map +1 -1
- package/dist/types/components/search/SearchRuntime.d.ts +2 -1
- package/dist/types/components/search/SearchRuntime.d.ts.map +1 -1
- package/dist/types/lib/component-scanner.d.ts.map +1 -1
- package/dist/types/lib/config.d.ts +42 -0
- package/dist/types/lib/config.d.ts.map +1 -1
- package/dist/types/lib/navigation.d.ts +1 -1
- package/dist/types/lib/navigation.d.ts.map +1 -1
- package/dist/types/lib/page-meta.d.ts +16 -0
- package/dist/types/lib/page-meta.d.ts.map +1 -0
- package/dist/types/lib/search/build/index-generator.d.ts.map +1 -1
- package/dist/types/lib/search/build/types.d.ts +1 -0
- package/dist/types/lib/search/build/types.d.ts.map +1 -1
- package/dist/types/lib/search/runtime/search-engine.d.ts.map +1 -1
- package/dist/types/lib/search/runtime/types.d.ts +1 -0
- package/dist/types/lib/search/runtime/types.d.ts.map +1 -1
- package/dist/types/lib/versioning.d.ts +6 -0
- package/dist/types/lib/versioning.d.ts.map +1 -0
- package/dist/vennDiagram-LZ73GAT5-DlUUn7LI.js +1858 -0
- package/dist/xychartDiagram-JWTSCODW-oT2IR7c0.js +2041 -0
- package/package.json +4 -1
- /package/dist/{AIProvider-C1_b1iKH.js → AIProvider-niZNPSGi.js} +0 -0
- /package/dist/{context-menu-CB7erSoV.js → context-menu-BIQsQup7.js} +0 -0
- /package/dist/{dialog-DQ6nkP0y.js → dialog-D8otbqQL.js} +0 -0
- /package/dist/{use-toast-d9VPBjMn.js → use-toast-DK69oadB.js} +0 -0
|
@@ -0,0 +1,717 @@
|
|
|
1
|
+
import { f as e } from "./chunk-GEFDOKGD-OXBFFBXI.js";
|
|
2
|
+
import { h as t } from "./src-B8kKzJ6p.js";
|
|
3
|
+
import { B as n, C as r, V as i, W as a, _ as o, a as s, b as c, c as l, s as u, v as d } from "./chunk-7R4GIKGN-Qkaxl46X.js";
|
|
4
|
+
import { t as f } from "./chunk-HHEYEP7N-BQ3EJT5G.js";
|
|
5
|
+
import { t as p } from "./rough.esm-qTNNhHn7.js";
|
|
6
|
+
//#region node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/ishikawaDiagram-PHBUUO56.mjs
|
|
7
|
+
var m = (function() {
|
|
8
|
+
var e = /* @__PURE__ */ t(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__ */ t(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__ */ t(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
|
+
e(o, [2, 3]),
|
|
119
|
+
{ 1: [2, 2] },
|
|
120
|
+
e(o, [2, 4]),
|
|
121
|
+
e(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
|
+
e(u, [2, 18], { 14: [1, 21] }),
|
|
143
|
+
e(u, [2, 16]),
|
|
144
|
+
e(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
|
+
e(d, [2, 14], {
|
|
159
|
+
7: f,
|
|
160
|
+
11: p
|
|
161
|
+
}),
|
|
162
|
+
e(m, [2, 8]),
|
|
163
|
+
e(m, [2, 9]),
|
|
164
|
+
e(m, [2, 10]),
|
|
165
|
+
e(u, [2, 15]),
|
|
166
|
+
e(d, [2, 13], {
|
|
167
|
+
7: f,
|
|
168
|
+
11: p
|
|
169
|
+
}),
|
|
170
|
+
e(m, [2, 11]),
|
|
171
|
+
e(m, [2, 12])
|
|
172
|
+
],
|
|
173
|
+
defaultActions: {
|
|
174
|
+
2: [2, 1],
|
|
175
|
+
6: [2, 2]
|
|
176
|
+
},
|
|
177
|
+
parseError: /* @__PURE__ */ t(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__ */ t(function(e) {
|
|
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(e, 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
|
+
t(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
|
+
t(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__ */ t(function(e, t) {
|
|
245
|
+
if (this.yy.parser) this.yy.parser.parseError(e, t);
|
|
246
|
+
else throw Error(e);
|
|
247
|
+
}, "parseError"),
|
|
248
|
+
setInput: /* @__PURE__ */ t(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__ */ t(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__ */ t(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__ */ t(function() {
|
|
274
|
+
return this._more = !0, this;
|
|
275
|
+
}, "more"),
|
|
276
|
+
reject: /* @__PURE__ */ t(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__ */ t(function(e) {
|
|
286
|
+
this.unput(this.match.slice(e));
|
|
287
|
+
}, "less"),
|
|
288
|
+
pastInput: /* @__PURE__ */ t(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__ */ t(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__ */ t(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__ */ t(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__ */ t(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__ */ t(function() {
|
|
354
|
+
return this.next() || this.lex();
|
|
355
|
+
}, "lex"),
|
|
356
|
+
begin: /* @__PURE__ */ t(function(e) {
|
|
357
|
+
this.conditionStack.push(e);
|
|
358
|
+
}, "begin"),
|
|
359
|
+
popState: /* @__PURE__ */ t(function() {
|
|
360
|
+
return this.conditionStack.length - 1 > 0 ? this.conditionStack.pop() : this.conditionStack[0];
|
|
361
|
+
}, "popState"),
|
|
362
|
+
_currentRules: /* @__PURE__ */ t(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__ */ t(function(e) {
|
|
366
|
+
return e = this.conditionStack.length - 1 - Math.abs(e || 0), e >= 0 ? this.conditionStack[e] : "INITIAL";
|
|
367
|
+
}, "topState"),
|
|
368
|
+
pushState: /* @__PURE__ */ t(function(e) {
|
|
369
|
+
this.begin(e);
|
|
370
|
+
}, "pushState"),
|
|
371
|
+
stateStackSize: /* @__PURE__ */ t(function() {
|
|
372
|
+
return this.conditionStack.length;
|
|
373
|
+
}, "stateStackSize"),
|
|
374
|
+
options: { "case-insensitive": !0 },
|
|
375
|
+
performAction: /* @__PURE__ */ t(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 t(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
|
+
t(this, "IshikawaDB");
|
|
424
|
+
}
|
|
425
|
+
clear() {
|
|
426
|
+
this.root = void 0, this.stack = [], this.baseLevel = void 0, s();
|
|
427
|
+
}
|
|
428
|
+
getRoot() {
|
|
429
|
+
return this.root;
|
|
430
|
+
}
|
|
431
|
+
addNode(e, t) {
|
|
432
|
+
let n = u.sanitizeText(t, c());
|
|
433
|
+
if (!this.root) {
|
|
434
|
+
this.baseLevel = e, this.root = {
|
|
435
|
+
text: n,
|
|
436
|
+
children: []
|
|
437
|
+
}, this.stack = [{
|
|
438
|
+
level: 0,
|
|
439
|
+
node: this.root
|
|
440
|
+
}], a(n);
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
let r = e - (this.baseLevel ?? 0);
|
|
444
|
+
for (r <= 0 && (r = 1); this.stack.length > 1 && this.stack[this.stack.length - 1].level >= r;) this.stack.pop();
|
|
445
|
+
let i = this.stack[this.stack.length - 1].node, o = {
|
|
446
|
+
text: n,
|
|
447
|
+
children: []
|
|
448
|
+
};
|
|
449
|
+
i.children.push(o), this.stack.push({
|
|
450
|
+
level: r,
|
|
451
|
+
node: o
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
getAccTitle() {
|
|
455
|
+
return d();
|
|
456
|
+
}
|
|
457
|
+
setAccTitle(e) {
|
|
458
|
+
i(e);
|
|
459
|
+
}
|
|
460
|
+
getAccDescription() {
|
|
461
|
+
return o();
|
|
462
|
+
}
|
|
463
|
+
setAccDescription(e) {
|
|
464
|
+
n(e);
|
|
465
|
+
}
|
|
466
|
+
getDiagramTitle() {
|
|
467
|
+
return r();
|
|
468
|
+
}
|
|
469
|
+
setDiagramTitle(e) {
|
|
470
|
+
a(e);
|
|
471
|
+
}
|
|
472
|
+
}, _ = 14, v = 250, y = 30, b = 60, x = 5, S = 82 * Math.PI / 180, C = Math.cos(S), w = Math.sin(S), T = /* @__PURE__ */ t((e, t, n) => {
|
|
473
|
+
let r = e.node().getBBox(), i = r.width + t * 2, a = r.height + t * 2;
|
|
474
|
+
l(e, a, i, n), e.attr("viewBox", `${r.x - t} ${r.y - t} ${i} ${a}`);
|
|
475
|
+
}, "applyPaddedViewBox"), E = /* @__PURE__ */ t((t, n, r, i) => {
|
|
476
|
+
let a = i.db.getRoot();
|
|
477
|
+
if (!a) return;
|
|
478
|
+
let o = c(), { look: s, handDrawnSeed: l, themeVariables: u } = o, d = e(o.fontSize)[0] ?? _, m = s === "handDrawn", h = a.children ?? [], g = o.ishikawa?.diagramPadding ?? 20, y = o.ishikawa?.useMaxWidth ?? !1, b = f(n), x = b.append("g").attr("class", "ishikawa"), S = m ? p.svg(b.node()) : void 0, C = S ? {
|
|
479
|
+
roughSvg: S,
|
|
480
|
+
seed: l ?? 0,
|
|
481
|
+
lineColor: u?.lineColor ?? "#333",
|
|
482
|
+
fillColor: u?.mainBkg ?? "#fff"
|
|
483
|
+
} : void 0, w = `ishikawa-arrow-${n}`;
|
|
484
|
+
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");
|
|
485
|
+
let E = 0, k = v, A = m ? void 0 : L(x, E, k, E, k, "ishikawa-spine");
|
|
486
|
+
if (O(x, E, k, a.text, d, C), !h.length) {
|
|
487
|
+
m && L(x, E, k, E, k, "ishikawa-spine", C), T(b, g, y);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
E -= 20;
|
|
491
|
+
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;
|
|
492
|
+
if (I > 0) {
|
|
493
|
+
let e = v * 2, t = v * .3;
|
|
494
|
+
R = Math.max(t, e * (P.total / I)), z = Math.max(t, e * (F.total / I));
|
|
495
|
+
}
|
|
496
|
+
let B = d * 2;
|
|
497
|
+
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})`);
|
|
498
|
+
let V = Math.ceil(h.length / 2);
|
|
499
|
+
for (let e = 0; e < V; e++) {
|
|
500
|
+
let t = x.append("g").attr("class", "ishikawa-pair");
|
|
501
|
+
for (let [n, r, i] of [[
|
|
502
|
+
h[e * 2],
|
|
503
|
+
-1,
|
|
504
|
+
R
|
|
505
|
+
], [
|
|
506
|
+
h[e * 2 + 1],
|
|
507
|
+
1,
|
|
508
|
+
z
|
|
509
|
+
]]) n && M(t, n, E, k, r, i, d, C);
|
|
510
|
+
E = t.selectAll("text").nodes().reduce((e, t) => Math.min(e, t.getBBox().x), Infinity);
|
|
511
|
+
}
|
|
512
|
+
if (m) L(x, E, k, 0, k, "ishikawa-spine", C);
|
|
513
|
+
else {
|
|
514
|
+
A.attr("x1", E);
|
|
515
|
+
let e = `url(#${w})`;
|
|
516
|
+
x.selectAll("line.ishikawa-branch, line.ishikawa-sub-branch").attr("marker-start", e);
|
|
517
|
+
}
|
|
518
|
+
T(b, g, y);
|
|
519
|
+
}, "draw"), D = /* @__PURE__ */ t((e) => {
|
|
520
|
+
let n = /* @__PURE__ */ t((e) => e.children.reduce((e, t) => e + 1 + n(t), 0), "countDescendants");
|
|
521
|
+
return e.reduce((e, t) => {
|
|
522
|
+
let r = n(t);
|
|
523
|
+
return e.total += r, e.max = Math.max(e.max, r), e;
|
|
524
|
+
}, {
|
|
525
|
+
total: 0,
|
|
526
|
+
max: 0
|
|
527
|
+
});
|
|
528
|
+
}, "sideStats"), O = /* @__PURE__ */ t((e, t, n, r, i, a) => {
|
|
529
|
+
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`;
|
|
530
|
+
if (a) {
|
|
531
|
+
let e = a.roughSvg.path(f, {
|
|
532
|
+
roughness: 1.5,
|
|
533
|
+
seed: a.seed,
|
|
534
|
+
fill: a.fillColor,
|
|
535
|
+
fillStyle: "hachure",
|
|
536
|
+
fillWeight: 2.5,
|
|
537
|
+
hachureGap: 5,
|
|
538
|
+
stroke: a.lineColor,
|
|
539
|
+
strokeWidth: 2
|
|
540
|
+
});
|
|
541
|
+
s.insert(() => e, ":first-child").attr("class", "ishikawa-head");
|
|
542
|
+
} else s.insert("path", ":first-child").attr("class", "ishikawa-head").attr("d", f);
|
|
543
|
+
c.attr("transform", `translate(${(u - l.width) / 2 - l.x + 3},${-l.y - l.height / 2})`);
|
|
544
|
+
}, "drawHead"), k = /* @__PURE__ */ t((e, n) => {
|
|
545
|
+
let r = [], i = [], a = /* @__PURE__ */ t((e, t, o) => {
|
|
546
|
+
let s = n === -1 ? [...e].reverse() : e;
|
|
547
|
+
for (let e of s) {
|
|
548
|
+
let n = r.length, s = e.children ?? [];
|
|
549
|
+
r.push({
|
|
550
|
+
depth: o,
|
|
551
|
+
text: P(e.text, 15),
|
|
552
|
+
parentIndex: t,
|
|
553
|
+
childCount: s.length
|
|
554
|
+
}), o % 2 == 0 ? (i.push(n), s.length && a(s, n, o + 1)) : (s.length && a(s, n, o + 1), i.push(n));
|
|
555
|
+
}
|
|
556
|
+
}, "walk");
|
|
557
|
+
return a(e, -1, 2), {
|
|
558
|
+
entries: r,
|
|
559
|
+
yOrder: i
|
|
560
|
+
};
|
|
561
|
+
}, "flattenTree"), A = /* @__PURE__ */ t((e, t, n, r, i, a, o) => {
|
|
562
|
+
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();
|
|
563
|
+
if (o) {
|
|
564
|
+
let e = o.roughSvg.rectangle(c.x - 20, c.y - 2, c.width + 40, c.height + 4, {
|
|
565
|
+
roughness: 1.5,
|
|
566
|
+
seed: o.seed,
|
|
567
|
+
fill: o.fillColor,
|
|
568
|
+
fillStyle: "hachure",
|
|
569
|
+
fillWeight: 2.5,
|
|
570
|
+
hachureGap: 5,
|
|
571
|
+
stroke: o.lineColor,
|
|
572
|
+
strokeWidth: 2
|
|
573
|
+
});
|
|
574
|
+
s.insert(() => e, ":first-child").attr("class", "ishikawa-label-box");
|
|
575
|
+
} 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);
|
|
576
|
+
}, "drawCauseLabel"), j = /* @__PURE__ */ t((e, t, n, r, i, a) => {
|
|
577
|
+
let o = Math.sqrt(r * r + i * i);
|
|
578
|
+
if (o === 0) return;
|
|
579
|
+
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, {
|
|
580
|
+
roughness: 1,
|
|
581
|
+
seed: a.seed,
|
|
582
|
+
fill: a.lineColor,
|
|
583
|
+
fillStyle: "solid",
|
|
584
|
+
stroke: a.lineColor,
|
|
585
|
+
strokeWidth: 1
|
|
586
|
+
});
|
|
587
|
+
e.append(() => m);
|
|
588
|
+
}, "drawArrowMarker"), M = /* @__PURE__ */ t((e, t, n, r, i, a, o, s) => {
|
|
589
|
+
let c = t.children ?? [], l = a * (c.length ? 1 : .2), u = -C * l, d = w * l * i, f = n + u, p = r + d;
|
|
590
|
+
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;
|
|
591
|
+
let { entries: m, yOrder: h } = k(c, i), g = m.length, _ = Array(g);
|
|
592
|
+
for (let [e, t] of h.entries()) _[t] = r + d * ((e + 1) / (g + 1));
|
|
593
|
+
let v = /* @__PURE__ */ new Map();
|
|
594
|
+
v.set(-1, {
|
|
595
|
+
x0: n,
|
|
596
|
+
y0: r,
|
|
597
|
+
x1: f,
|
|
598
|
+
y1: p,
|
|
599
|
+
childCount: c.length,
|
|
600
|
+
childrenDrawn: 0
|
|
601
|
+
});
|
|
602
|
+
let S = -C, T = w * i, E = i < 0 ? "ishikawa-label up" : "ishikawa-label down";
|
|
603
|
+
for (let [t, n] of m.entries()) {
|
|
604
|
+
let r = _[t], i = v.get(n.parentIndex), a = e.append("g").attr("class", "ishikawa-sub-group"), c = 0, l = 0, u = 0;
|
|
605
|
+
if (n.depth % 2 == 0) {
|
|
606
|
+
let e = i.y1 - i.y0;
|
|
607
|
+
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);
|
|
608
|
+
} else {
|
|
609
|
+
let e = i.childrenDrawn++;
|
|
610
|
+
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);
|
|
611
|
+
}
|
|
612
|
+
n.childCount > 0 && v.set(t, {
|
|
613
|
+
x0: c,
|
|
614
|
+
y0: l,
|
|
615
|
+
x1: u,
|
|
616
|
+
y1: r,
|
|
617
|
+
childCount: n.childCount,
|
|
618
|
+
childrenDrawn: 0
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
}, "drawBranch"), N = /* @__PURE__ */ t((e) => e.split(/<br\s*\/?>|\n/), "splitLines"), P = /* @__PURE__ */ t((e, t) => {
|
|
622
|
+
if (e.length <= t) return e;
|
|
623
|
+
let n = [];
|
|
624
|
+
for (let r of e.split(/\s+/)) {
|
|
625
|
+
let e = n.length - 1;
|
|
626
|
+
e >= 0 && n[e].length + 1 + r.length <= t ? n[e] += " " + r : n.push(r);
|
|
627
|
+
}
|
|
628
|
+
return n.join("\n");
|
|
629
|
+
}, "wrapText"), F = /* @__PURE__ */ t((e, t, n, r, i, a, o) => {
|
|
630
|
+
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);
|
|
631
|
+
for (let [e, t] of s.entries()) l.append("tspan").attr("x", n).attr("dy", e === 0 ? 0 : c).text(t);
|
|
632
|
+
return l;
|
|
633
|
+
}, "drawMultilineText"), I = /* @__PURE__ */ t((e, t, n) => e + (t - e) * n, "lerp"), L = /* @__PURE__ */ t((e, t, n, r, i, a, o) => {
|
|
634
|
+
if (o) {
|
|
635
|
+
let s = o.roughSvg.line(t, n, r, i, {
|
|
636
|
+
roughness: 1.5,
|
|
637
|
+
seed: o.seed,
|
|
638
|
+
stroke: o.lineColor,
|
|
639
|
+
strokeWidth: 2
|
|
640
|
+
});
|
|
641
|
+
e.append(() => s).attr("class", a);
|
|
642
|
+
return;
|
|
643
|
+
}
|
|
644
|
+
return e.append("line").attr("class", a).attr("x1", t).attr("y1", n).attr("x2", r).attr("y2", i);
|
|
645
|
+
}, "drawLine"), R = {
|
|
646
|
+
parser: h,
|
|
647
|
+
get db() {
|
|
648
|
+
return new g();
|
|
649
|
+
},
|
|
650
|
+
renderer: { draw: E },
|
|
651
|
+
styles: /* @__PURE__ */ t((e) => `
|
|
652
|
+
.ishikawa .ishikawa-spine,
|
|
653
|
+
.ishikawa .ishikawa-branch,
|
|
654
|
+
.ishikawa .ishikawa-sub-branch {
|
|
655
|
+
stroke: ${e.lineColor};
|
|
656
|
+
stroke-width: 2;
|
|
657
|
+
fill: none;
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
.ishikawa .ishikawa-sub-branch {
|
|
661
|
+
stroke-width: 1;
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
.ishikawa .ishikawa-arrow {
|
|
665
|
+
fill: ${e.lineColor};
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
.ishikawa .ishikawa-head {
|
|
669
|
+
fill: ${e.mainBkg};
|
|
670
|
+
stroke: ${e.lineColor};
|
|
671
|
+
stroke-width: 2;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
.ishikawa .ishikawa-label-box {
|
|
675
|
+
fill: ${e.mainBkg};
|
|
676
|
+
stroke: ${e.lineColor};
|
|
677
|
+
stroke-width: 2;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
.ishikawa text {
|
|
681
|
+
font-family: ${e.fontFamily};
|
|
682
|
+
font-size: ${e.fontSize};
|
|
683
|
+
fill: ${e.textColor};
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
.ishikawa .ishikawa-head-label {
|
|
687
|
+
font-weight: 600;
|
|
688
|
+
text-anchor: middle;
|
|
689
|
+
dominant-baseline: middle;
|
|
690
|
+
font-size: 14px;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.ishikawa .ishikawa-label {
|
|
694
|
+
text-anchor: end;
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
.ishikawa .ishikawa-label.cause {
|
|
698
|
+
text-anchor: middle;
|
|
699
|
+
dominant-baseline: middle;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
.ishikawa .ishikawa-label.align {
|
|
703
|
+
text-anchor: end;
|
|
704
|
+
dominant-baseline: middle;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
.ishikawa .ishikawa-label.up {
|
|
708
|
+
dominant-baseline: baseline;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
.ishikawa .ishikawa-label.down {
|
|
712
|
+
dominant-baseline: hanging;
|
|
713
|
+
}
|
|
714
|
+
`, "getStyles")
|
|
715
|
+
};
|
|
716
|
+
//#endregion
|
|
717
|
+
export { R as diagram };
|