@brainfish-ai/components 0.18.0 → 0.18.4-alpha.2

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 (148) hide show
  1. package/dist/components/ui/sheet.d.ts +2 -0
  2. package/dist/convos.d.ts +58 -36
  3. package/dist/div-button.d.ts +6 -6
  4. package/dist/esm/chunks/{ChatSearch.D_vAxj0b.js → ChatSearch.B1M0RZvX.js} +17 -16
  5. package/dist/esm/chunks/ChatSearch.B1M0RZvX.js.map +1 -0
  6. package/dist/esm/chunks/{FormattedMessage.C2OwhDXi.js → FormattedMessage.ieoe4jPf.js} +5 -5
  7. package/dist/esm/chunks/{FormattedMessage.C2OwhDXi.js.map → FormattedMessage.ieoe4jPf.js.map} +1 -1
  8. package/dist/esm/chunks/{feedback.NWn6_mYe.js → feedback.DkdQ_9Xt.js} +5 -49
  9. package/dist/esm/chunks/feedback.DkdQ_9Xt.js.map +1 -0
  10. package/dist/esm/chunks/love.o_d3F-ZG.js +56 -0
  11. package/dist/esm/chunks/love.o_d3F-ZG.js.map +1 -0
  12. package/dist/esm/components/chat-search.js +1 -1
  13. package/dist/esm/components/convos.js +258 -155
  14. package/dist/esm/components/convos.js.map +1 -1
  15. package/dist/esm/components/feedback.js +1 -1
  16. package/dist/esm/components/markdown.js +1 -1
  17. package/dist/esm/components/ui/button.js +1 -1
  18. package/dist/esm/components/ui/button.js.map +1 -1
  19. package/dist/esm/components/ui/div-button.js +5 -5
  20. package/dist/esm/components/ui/div-button.js.map +1 -1
  21. package/dist/esm/components/ui/sheet.js +99 -0
  22. package/dist/esm/components/ui/sheet.js.map +1 -0
  23. package/dist/esm/convos.css +1 -1
  24. package/dist/esm/global.css +1 -0
  25. package/dist/esm/index.js +15 -4
  26. package/dist/esm/index.js.map +1 -1
  27. package/dist/esm/tailwind.preset.js +4 -1
  28. package/dist/esm/tailwind.preset.js.map +1 -1
  29. package/dist/index.d.ts +196 -102
  30. package/dist/sheet.d.ts +39 -0
  31. package/dist/stats.html +1 -1
  32. package/package.json +3 -2
  33. package/tailwind.config.js +17 -0
  34. package/tailwind.preset.ts +4 -1
  35. package/dist/esm/chunks/ChatSearch.D_vAxj0b.js.map +0 -1
  36. package/dist/esm/chunks/_basePickBy-CwGxyceg.Xb99Kj9y.js +0 -140
  37. package/dist/esm/chunks/_basePickBy-CwGxyceg.Xb99Kj9y.js.map +0 -1
  38. package/dist/esm/chunks/_baseUniq-DPdR3RIY.CwjYlx_X.js +0 -585
  39. package/dist/esm/chunks/_baseUniq-DPdR3RIY.CwjYlx_X.js.map +0 -1
  40. package/dist/esm/chunks/arc-DCsLb4RX.BSykn17U.js +0 -84
  41. package/dist/esm/chunks/arc-DCsLb4RX.BSykn17U.js.map +0 -1
  42. package/dist/esm/chunks/architectureDiagram-W76B3OCA-wIkmQqR8.apwMoUL6.js +0 -4662
  43. package/dist/esm/chunks/architectureDiagram-W76B3OCA-wIkmQqR8.apwMoUL6.js.map +0 -1
  44. package/dist/esm/chunks/blockDiagram-QIGZ2CNN-DOHijbkj.Bhy4DvtQ.js +0 -2262
  45. package/dist/esm/chunks/blockDiagram-QIGZ2CNN-DOHijbkj.Bhy4DvtQ.js.map +0 -1
  46. package/dist/esm/chunks/c4Diagram-FPNF74CW-BDvLZfmS.BqXyX6vZ.js +0 -1581
  47. package/dist/esm/chunks/c4Diagram-FPNF74CW-BDvLZfmS.BqXyX6vZ.js.map +0 -1
  48. package/dist/esm/chunks/channel-B_G4xVvq.CDI0vVb4.js +0 -6
  49. package/dist/esm/chunks/channel-B_G4xVvq.CDI0vVb4.js.map +0 -1
  50. package/dist/esm/chunks/chunk-4BX2VUAB-BZuS0UUH.Cg_xxXPg.js +0 -9
  51. package/dist/esm/chunks/chunk-4BX2VUAB-BZuS0UUH.Cg_xxXPg.js.map +0 -1
  52. package/dist/esm/chunks/chunk-55IACEB6-zeObXUUN.DHI8ANMR.js +0 -9
  53. package/dist/esm/chunks/chunk-55IACEB6-zeObXUUN.DHI8ANMR.js.map +0 -1
  54. package/dist/esm/chunks/chunk-FMBD7UC4-Ployc43X.DXd4JseP.js +0 -20
  55. package/dist/esm/chunks/chunk-FMBD7UC4-Ployc43X.DXd4JseP.js.map +0 -1
  56. package/dist/esm/chunks/chunk-K7UQS3LO-DlVqoBtA.DX3jgm_E.js +0 -1373
  57. package/dist/esm/chunks/chunk-K7UQS3LO-DlVqoBtA.DX3jgm_E.js.map +0 -1
  58. package/dist/esm/chunks/chunk-QN33PNHL-AUdLDoKI.BY-ym94M.js +0 -20
  59. package/dist/esm/chunks/chunk-QN33PNHL-AUdLDoKI.BY-ym94M.js.map +0 -1
  60. package/dist/esm/chunks/chunk-QZHKN3VN-DqO1gyPu.ez2zb3P8.js +0 -16
  61. package/dist/esm/chunks/chunk-QZHKN3VN-DqO1gyPu.ez2zb3P8.js.map +0 -1
  62. package/dist/esm/chunks/chunk-TVAH2DTR-DfXCdP5R.DQy4Fkrs.js +0 -1368
  63. package/dist/esm/chunks/chunk-TVAH2DTR-DfXCdP5R.DQy4Fkrs.js.map +0 -1
  64. package/dist/esm/chunks/chunk-TZMSLE5B-rpRajlFG.hDeYXYTj.js +0 -59
  65. package/dist/esm/chunks/chunk-TZMSLE5B-rpRajlFG.hDeYXYTj.js.map +0 -1
  66. package/dist/esm/chunks/classDiagram-KNZD7YFC-Dvpwq6te.Cn76BN4H.js +0 -17
  67. package/dist/esm/chunks/classDiagram-KNZD7YFC-Dvpwq6te.Cn76BN4H.js.map +0 -1
  68. package/dist/esm/chunks/classDiagram-v2-RKCZMP56-Dvpwq6te.Cn76BN4H.js +0 -17
  69. package/dist/esm/chunks/classDiagram-v2-RKCZMP56-Dvpwq6te.Cn76BN4H.js.map +0 -1
  70. package/dist/esm/chunks/clone-BE7mMQvS.DWQ34rNI.js +0 -9
  71. package/dist/esm/chunks/clone-BE7mMQvS.DWQ34rNI.js.map +0 -1
  72. package/dist/esm/chunks/cose-bilkent-S5V4N54A-BUsrR_iz.Bh8yg7Po.js +0 -2610
  73. package/dist/esm/chunks/cose-bilkent-S5V4N54A-BUsrR_iz.Bh8yg7Po.js.map +0 -1
  74. package/dist/esm/chunks/cytoscape.esm-qgs_QMrm.Cg6eOcD7.js +0 -18633
  75. package/dist/esm/chunks/cytoscape.esm-qgs_QMrm.Cg6eOcD7.js.map +0 -1
  76. package/dist/esm/chunks/dagre-5GWH7T2D-BCK0K3-J.B8kiMv3u.js +0 -445
  77. package/dist/esm/chunks/dagre-5GWH7T2D-BCK0K3-J.B8kiMv3u.js.map +0 -1
  78. package/dist/esm/chunks/defaultLocale-D7EN2tov.B8F577Sx.js +0 -168
  79. package/dist/esm/chunks/defaultLocale-D7EN2tov.B8F577Sx.js.map +0 -1
  80. package/dist/esm/chunks/diagram-N5W7TBWH-DNHeQ1XG.DSk26vS_.js +0 -533
  81. package/dist/esm/chunks/diagram-N5W7TBWH-DNHeQ1XG.DSk26vS_.js.map +0 -1
  82. package/dist/esm/chunks/diagram-QEK2KX5R-CLGfmIsQ.CyC2UTXK.js +0 -218
  83. package/dist/esm/chunks/diagram-QEK2KX5R-CLGfmIsQ.CyC2UTXK.js.map +0 -1
  84. package/dist/esm/chunks/diagram-S2PKOQOG-CFTty0ve.D1LXKq3X.js +0 -143
  85. package/dist/esm/chunks/diagram-S2PKOQOG-CFTty0ve.D1LXKq3X.js.map +0 -1
  86. package/dist/esm/chunks/erDiagram-AWTI2OKA-DI06fG0A.CN7PNzR5.js +0 -842
  87. package/dist/esm/chunks/erDiagram-AWTI2OKA-DI06fG0A.CN7PNzR5.js.map +0 -1
  88. package/dist/esm/chunks/feedback.NWn6_mYe.js.map +0 -1
  89. package/dist/esm/chunks/flowDiagram-PVAE7QVJ-cS0QwpLW.jM7NbRUh.js +0 -1621
  90. package/dist/esm/chunks/flowDiagram-PVAE7QVJ-cS0QwpLW.jM7NbRUh.js.map +0 -1
  91. package/dist/esm/chunks/ganttDiagram-OWAHRB6G-g0lXLgos.B7pPM-og.js +0 -2506
  92. package/dist/esm/chunks/ganttDiagram-OWAHRB6G-g0lXLgos.B7pPM-og.js.map +0 -1
  93. package/dist/esm/chunks/gitGraphDiagram-NY62KEGX-B4wrMGJN.BFxyjY4k.js +0 -700
  94. package/dist/esm/chunks/gitGraphDiagram-NY62KEGX-B4wrMGJN.BFxyjY4k.js.map +0 -1
  95. package/dist/esm/chunks/graph-BuR5bqPu.C7CFP2zs.js +0 -248
  96. package/dist/esm/chunks/graph-BuR5bqPu.C7CFP2zs.js.map +0 -1
  97. package/dist/esm/chunks/infoDiagram-STP46IZ2-CGDBggCS.DCEC64lG.js +0 -25
  98. package/dist/esm/chunks/infoDiagram-STP46IZ2-CGDBggCS.DCEC64lG.js.map +0 -1
  99. package/dist/esm/chunks/init-DjUOC4st.BOEiyheD.js +0 -16
  100. package/dist/esm/chunks/init-DjUOC4st.BOEiyheD.js.map +0 -1
  101. package/dist/esm/chunks/journeyDiagram-BIP6EPQ6-BGl5AI_2.sOXXDhT-.js +0 -837
  102. package/dist/esm/chunks/journeyDiagram-BIP6EPQ6-BGl5AI_2.sOXXDhT-.js.map +0 -1
  103. package/dist/esm/chunks/kanban-definition-6OIFK2YF-Br5Lf76e.B761uhE_.js +0 -720
  104. package/dist/esm/chunks/kanban-definition-6OIFK2YF-Br5Lf76e.B761uhE_.js.map +0 -1
  105. package/dist/esm/chunks/katex-SsTUIUTC.Ci8jyli6.js +0 -11675
  106. package/dist/esm/chunks/katex-SsTUIUTC.Ci8jyli6.js.map +0 -1
  107. package/dist/esm/chunks/layout-p8eM70uN.FvhPiL74.js +0 -1322
  108. package/dist/esm/chunks/layout-p8eM70uN.FvhPiL74.js.map +0 -1
  109. package/dist/esm/chunks/linear-DZf3n5Zt.FxmYe42o.js +0 -256
  110. package/dist/esm/chunks/linear-DZf3n5Zt.FxmYe42o.js.map +0 -1
  111. package/dist/esm/chunks/markdownTranslator-D7_8pMsF.C3NBLaFd.js +0 -15968
  112. package/dist/esm/chunks/markdownTranslator-D7_8pMsF.C3NBLaFd.js.map +0 -1
  113. package/dist/esm/chunks/mermaid.core-CqFoMSZo.D88DhzXd.js +0 -15491
  114. package/dist/esm/chunks/mermaid.core-CqFoMSZo.D88DhzXd.js.map +0 -1
  115. package/dist/esm/chunks/mindmap-definition-Q6HEUPPD-C1kH3VVd.Cyskcv6i.js +0 -782
  116. package/dist/esm/chunks/mindmap-definition-Q6HEUPPD-C1kH3VVd.Cyskcv6i.js.map +0 -1
  117. package/dist/esm/chunks/ordinal-DfAQgscy.J1PPD2vL.js +0 -62
  118. package/dist/esm/chunks/ordinal-DfAQgscy.J1PPD2vL.js.map +0 -1
  119. package/dist/esm/chunks/paragraph-node-CmRSSJjl.DeUA_7DY.js +0 -61348
  120. package/dist/esm/chunks/paragraph-node-CmRSSJjl.DeUA_7DY.js.map +0 -1
  121. package/dist/esm/chunks/pieDiagram-ADFJNKIX-BJslR05R.DjzQR5vc.js +0 -162
  122. package/dist/esm/chunks/pieDiagram-ADFJNKIX-BJslR05R.DjzQR5vc.js.map +0 -1
  123. package/dist/esm/chunks/quadrantDiagram-LMRXKWRM-D1e_ge5x.DI9xyo0H.js +0 -1023
  124. package/dist/esm/chunks/quadrantDiagram-LMRXKWRM-D1e_ge5x.DI9xyo0H.js.map +0 -1
  125. package/dist/esm/chunks/requirementDiagram-4UW4RH46-D0dwxz8M.RFf2JPMN.js +0 -851
  126. package/dist/esm/chunks/requirementDiagram-4UW4RH46-D0dwxz8M.RFf2JPMN.js.map +0 -1
  127. package/dist/esm/chunks/sankeyDiagram-GR3RE2ED-Bjb_rMVp.Cqz6Fi3a.js +0 -811
  128. package/dist/esm/chunks/sankeyDiagram-GR3RE2ED-Bjb_rMVp.Cqz6Fi3a.js.map +0 -1
  129. package/dist/esm/chunks/sequenceDiagram-C3RYC4MD-B4BgA_NP.DusV8c9r.js +0 -2512
  130. package/dist/esm/chunks/sequenceDiagram-C3RYC4MD-B4BgA_NP.DusV8c9r.js.map +0 -1
  131. package/dist/esm/chunks/simple-editor.Dy2IcVOx.js +0 -9474
  132. package/dist/esm/chunks/simple-editor.Dy2IcVOx.js.map +0 -1
  133. package/dist/esm/chunks/simple-viewer-D5Y0qq6S.eLIcVhig.js +0 -5543
  134. package/dist/esm/chunks/simple-viewer-D5Y0qq6S.eLIcVhig.js.map +0 -1
  135. package/dist/esm/chunks/stateDiagram-KXAO66HF-BTfthjTl.DTGpiufP.js +0 -264
  136. package/dist/esm/chunks/stateDiagram-KXAO66HF-BTfthjTl.DTGpiufP.js.map +0 -1
  137. package/dist/esm/chunks/stateDiagram-v2-UMBNRL4Z-CY-NEjvL.DCJld7HR.js +0 -17
  138. package/dist/esm/chunks/stateDiagram-v2-UMBNRL4Z-CY-NEjvL.DCJld7HR.js.map +0 -1
  139. package/dist/esm/chunks/timeline-definition-XQNQX7LJ-DaQHmG4W.4EzpEGiV.js +0 -798
  140. package/dist/esm/chunks/timeline-definition-XQNQX7LJ-DaQHmG4W.4EzpEGiV.js.map +0 -1
  141. package/dist/esm/chunks/treemap-75Q7IDZK-BNMPwj0E.CnZbkKYI.js +0 -12982
  142. package/dist/esm/chunks/treemap-75Q7IDZK-BNMPwj0E.CnZbkKYI.js.map +0 -1
  143. package/dist/esm/chunks/xychartDiagram-6GGTOJPD-fFGQonuW.B9WMwjJb.js +0 -1341
  144. package/dist/esm/chunks/xychartDiagram-6GGTOJPD-fFGQonuW.B9WMwjJb.js.map +0 -1
  145. package/dist/esm/components/markdown-editor-viewer.js +0 -2
  146. package/dist/esm/components/markdown-editor-viewer.js.map +0 -1
  147. package/dist/esm/index.css +0 -1
  148. package/dist/markdown-editor-viewer.d.ts +0 -105
@@ -1,837 +0,0 @@
1
- import { d, y, g, x } from './chunk-TZMSLE5B-rpRajlFG.hDeYXYTj.js';
2
- import { l } from './chunk-FMBD7UC4-Ployc43X.DXd4JseP.js';
3
- import { _ as p, g as fy, s as uy, a as hy, b as cy, q as py, p as dy, c as ut$1, d as ht$1, e as zh, y as ly } from './mermaid.core-CqFoMSZo.D88DhzXd.js';
4
- import { h as hn } from './arc-DCsLb4RX.BSykn17U.js';
5
-
6
- var U = function() {
7
- var t = /* @__PURE__ */ p(function(h, i, a, l) {
8
- for (a = a || {}, l = h.length; l--; a[h[l]] = i) ;
9
- return a;
10
- }, "o"), e = [6, 8, 10, 11, 12, 14, 16, 17, 18], s = [1, 9], c = [1, 10], r = [1, 11], f = [1, 12], u = [1, 13], y = [1, 14], g = {
11
- trace: /* @__PURE__ */ p(function() {
12
- }, "trace"),
13
- yy: {},
14
- symbols_: { error: 2, start: 3, journey: 4, document: 5, EOF: 6, line: 7, SPACE: 8, statement: 9, NEWLINE: 10, title: 11, acc_title: 12, acc_title_value: 13, acc_descr: 14, acc_descr_value: 15, acc_descr_multiline_value: 16, section: 17, taskName: 18, taskData: 19, $accept: 0, $end: 1 },
15
- terminals_: { 2: "error", 4: "journey", 6: "EOF", 8: "SPACE", 10: "NEWLINE", 11: "title", 12: "acc_title", 13: "acc_title_value", 14: "acc_descr", 15: "acc_descr_value", 16: "acc_descr_multiline_value", 17: "section", 18: "taskName", 19: "taskData" },
16
- productions_: [0, [3, 3], [5, 0], [5, 2], [7, 2], [7, 1], [7, 1], [7, 1], [9, 1], [9, 2], [9, 2], [9, 1], [9, 1], [9, 2]],
17
- performAction: /* @__PURE__ */ p(function(i, a, l, d, p, o, b) {
18
- var k = o.length - 1;
19
- switch (p) {
20
- case 1:
21
- return o[k - 1];
22
- case 2:
23
- this.$ = [];
24
- break;
25
- case 3:
26
- o[k - 1].push(o[k]), this.$ = o[k - 1];
27
- break;
28
- case 4:
29
- case 5:
30
- this.$ = o[k];
31
- break;
32
- case 6:
33
- case 7:
34
- this.$ = [];
35
- break;
36
- case 8:
37
- d.setDiagramTitle(o[k].substr(6)), this.$ = o[k].substr(6);
38
- break;
39
- case 9:
40
- this.$ = o[k].trim(), d.setAccTitle(this.$);
41
- break;
42
- case 10:
43
- case 11:
44
- this.$ = o[k].trim(), d.setAccDescription(this.$);
45
- break;
46
- case 12:
47
- d.addSection(o[k].substr(8)), this.$ = o[k].substr(8);
48
- break;
49
- case 13:
50
- d.addTask(o[k - 1], o[k]), this.$ = "task";
51
- break;
52
- }
53
- }, "anonymous"),
54
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, t(e, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 7], { 1: [2, 1] }), t(e, [2, 3]), { 9: 15, 11: s, 12: c, 14: r, 16: f, 17: u, 18: y }, t(e, [2, 5]), t(e, [2, 6]), t(e, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, t(e, [2, 11]), t(e, [2, 12]), { 19: [1, 18] }, t(e, [2, 4]), t(e, [2, 9]), t(e, [2, 10]), t(e, [2, 13])],
55
- defaultActions: {},
56
- parseError: /* @__PURE__ */ p(function(i, a) {
57
- if (a.recoverable)
58
- this.trace(i);
59
- else {
60
- var l = new Error(i);
61
- throw l.hash = a, l;
62
- }
63
- }, "parseError"),
64
- parse: /* @__PURE__ */ p(function(i) {
65
- var a = this, l = [0], d = [], p$1 = [null], o = [], b = this.table, k = "", C = 0, K = 0, dt = 2, Q = 1, yt = o.slice.call(arguments, 1), _ = Object.create(this.lexer), I = { yy: {} };
66
- for (var O in this.yy)
67
- Object.prototype.hasOwnProperty.call(this.yy, O) && (I.yy[O] = this.yy[O]);
68
- _.setInput(i, I.yy), I.yy.lexer = _, I.yy.parser = this, typeof _.yylloc > "u" && (_.yylloc = {});
69
- var Y = _.yylloc;
70
- o.push(Y);
71
- var ft = _.options && _.options.ranges;
72
- typeof I.yy.parseError == "function" ? this.parseError = I.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
73
- function pt(w) {
74
- l.length = l.length - 2 * w, p$1.length = p$1.length - w, o.length = o.length - w;
75
- }
76
- p(pt, "popStack");
77
- function D() {
78
- var w;
79
- return w = d.pop() || _.lex() || Q, typeof w != "number" && (w instanceof Array && (d = w, w = d.pop()), w = a.symbols_[w] || w), w;
80
- }
81
- p(D, "lex");
82
- for (var v, A, T, q, F = {}, N, M, tt, z; ; ) {
83
- if (A = l[l.length - 1], this.defaultActions[A] ? T = this.defaultActions[A] : ((v === null || typeof v > "u") && (v = D()), T = b[A] && b[A][v]), typeof T > "u" || !T.length || !T[0]) {
84
- var X = "";
85
- z = [];
86
- for (N in b[A])
87
- this.terminals_[N] && N > dt && z.push("'" + this.terminals_[N] + "'");
88
- _.showPosition ? X = "Parse error on line " + (C + 1) + `:
89
- ` + _.showPosition() + `
90
- Expecting ` + z.join(", ") + ", got '" + (this.terminals_[v] || v) + "'" : X = "Parse error on line " + (C + 1) + ": Unexpected " + (v == Q ? "end of input" : "'" + (this.terminals_[v] || v) + "'"), this.parseError(X, {
91
- text: _.match,
92
- token: this.terminals_[v] || v,
93
- line: _.yylineno,
94
- loc: Y,
95
- expected: z
96
- });
97
- }
98
- if (T[0] instanceof Array && T.length > 1)
99
- throw new Error("Parse Error: multiple actions possible at state: " + A + ", token: " + v);
100
- switch (T[0]) {
101
- case 1:
102
- l.push(v), p$1.push(_.yytext), o.push(_.yylloc), l.push(T[1]), v = null, K = _.yyleng, k = _.yytext, C = _.yylineno, Y = _.yylloc;
103
- break;
104
- case 2:
105
- if (M = this.productions_[T[1]][1], F.$ = p$1[p$1.length - M], F._$ = {
106
- first_line: o[o.length - (M || 1)].first_line,
107
- last_line: o[o.length - 1].last_line,
108
- first_column: o[o.length - (M || 1)].first_column,
109
- last_column: o[o.length - 1].last_column
110
- }, ft && (F._$.range = [
111
- o[o.length - (M || 1)].range[0],
112
- o[o.length - 1].range[1]
113
- ]), q = this.performAction.apply(F, [
114
- k,
115
- K,
116
- C,
117
- I.yy,
118
- T[1],
119
- p$1,
120
- o
121
- ].concat(yt)), typeof q < "u")
122
- return q;
123
- M && (l = l.slice(0, -1 * M * 2), p$1 = p$1.slice(0, -1 * M), o = o.slice(0, -1 * M)), l.push(this.productions_[T[1]][0]), p$1.push(F.$), o.push(F._$), tt = b[l[l.length - 2]][l[l.length - 1]], l.push(tt);
124
- break;
125
- case 3:
126
- return true;
127
- }
128
- }
129
- return true;
130
- }, "parse")
131
- }, m = /* @__PURE__ */ function() {
132
- var h = {
133
- EOF: 1,
134
- parseError: /* @__PURE__ */ p(function(a, l) {
135
- if (this.yy.parser)
136
- this.yy.parser.parseError(a, l);
137
- else
138
- throw new Error(a);
139
- }, "parseError"),
140
- // resets the lexer, sets new input
141
- setInput: /* @__PURE__ */ p(function(i, a) {
142
- return this.yy = a || this.yy || {}, this._input = i, this._more = this._backtrack = this.done = false, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
143
- first_line: 1,
144
- first_column: 0,
145
- last_line: 1,
146
- last_column: 0
147
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
148
- }, "setInput"),
149
- // consumes and returns one char from the input
150
- input: /* @__PURE__ */ p(function() {
151
- var i = this._input[0];
152
- this.yytext += i, this.yyleng++, this.offset++, this.match += i, this.matched += i;
153
- var a = i.match(/(?:\r\n?|\n).*/g);
154
- return a ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), i;
155
- }, "input"),
156
- // unshifts one char (or a string) into the input
157
- unput: /* @__PURE__ */ p(function(i) {
158
- var a = i.length, l = i.split(/(?:\r\n?|\n)/g);
159
- this._input = i + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - a), this.offset -= a;
160
- var d = this.match.split(/(?:\r\n?|\n)/g);
161
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), l.length - 1 && (this.yylineno -= l.length - 1);
162
- var p = this.yylloc.range;
163
- return this.yylloc = {
164
- first_line: this.yylloc.first_line,
165
- last_line: this.yylineno + 1,
166
- first_column: this.yylloc.first_column,
167
- last_column: l ? (l.length === d.length ? this.yylloc.first_column : 0) + d[d.length - l.length].length - l[0].length : this.yylloc.first_column - a
168
- }, this.options.ranges && (this.yylloc.range = [p[0], p[0] + this.yyleng - a]), this.yyleng = this.yytext.length, this;
169
- }, "unput"),
170
- // When called from action, caches matched text and appends it on next action
171
- more: /* @__PURE__ */ p(function() {
172
- return this._more = true, this;
173
- }, "more"),
174
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
175
- reject: /* @__PURE__ */ p(function() {
176
- if (this.options.backtrack_lexer)
177
- this._backtrack = true;
178
- else
179
- 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).
180
- ` + this.showPosition(), {
181
- text: "",
182
- token: null,
183
- line: this.yylineno
184
- });
185
- return this;
186
- }, "reject"),
187
- // retain first n characters of the match
188
- less: /* @__PURE__ */ p(function(i) {
189
- this.unput(this.match.slice(i));
190
- }, "less"),
191
- // displays already matched input, i.e. for error messages
192
- pastInput: /* @__PURE__ */ p(function() {
193
- var i = this.matched.substr(0, this.matched.length - this.match.length);
194
- return (i.length > 20 ? "..." : "") + i.substr(-20).replace(/\n/g, "");
195
- }, "pastInput"),
196
- // displays upcoming input, i.e. for error messages
197
- upcomingInput: /* @__PURE__ */ p(function() {
198
- var i = this.match;
199
- return i.length < 20 && (i += this._input.substr(0, 20 - i.length)), (i.substr(0, 20) + (i.length > 20 ? "..." : "")).replace(/\n/g, "");
200
- }, "upcomingInput"),
201
- // displays the character position where the lexing error occurred, i.e. for error messages
202
- showPosition: /* @__PURE__ */ p(function() {
203
- var i = this.pastInput(), a = new Array(i.length + 1).join("-");
204
- return i + this.upcomingInput() + `
205
- ` + a + "^";
206
- }, "showPosition"),
207
- // test the lexed token: return FALSE when not a match, otherwise return token
208
- test_match: /* @__PURE__ */ p(function(i, a) {
209
- var l, d, p;
210
- if (this.options.backtrack_lexer && (p = {
211
- yylineno: this.yylineno,
212
- yylloc: {
213
- first_line: this.yylloc.first_line,
214
- last_line: this.last_line,
215
- first_column: this.yylloc.first_column,
216
- last_column: this.yylloc.last_column
217
- },
218
- yytext: this.yytext,
219
- match: this.match,
220
- matches: this.matches,
221
- matched: this.matched,
222
- yyleng: this.yyleng,
223
- offset: this.offset,
224
- _more: this._more,
225
- _input: this._input,
226
- yy: this.yy,
227
- conditionStack: this.conditionStack.slice(0),
228
- done: this.done
229
- }, this.options.ranges && (p.yylloc.range = this.yylloc.range.slice(0))), d = i[0].match(/(?:\r\n?|\n).*/g), d && (this.yylineno += d.length), this.yylloc = {
230
- first_line: this.yylloc.last_line,
231
- last_line: this.yylineno + 1,
232
- first_column: this.yylloc.last_column,
233
- last_column: d ? d[d.length - 1].length - d[d.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + i[0].length
234
- }, this.yytext += i[0], this.match += i[0], this.matches = i, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = false, this._backtrack = false, this._input = this._input.slice(i[0].length), this.matched += i[0], l = this.performAction.call(this, this.yy, this, a, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = false), l)
235
- return l;
236
- if (this._backtrack) {
237
- for (var o in p)
238
- this[o] = p[o];
239
- return false;
240
- }
241
- return false;
242
- }, "test_match"),
243
- // return next match in input
244
- next: /* @__PURE__ */ p(function() {
245
- if (this.done)
246
- return this.EOF;
247
- this._input || (this.done = true);
248
- var i, a, l, d;
249
- this._more || (this.yytext = "", this.match = "");
250
- for (var p = this._currentRules(), o = 0; o < p.length; o++)
251
- if (l = this._input.match(this.rules[p[o]]), l && (!a || l[0].length > a[0].length)) {
252
- if (a = l, d = o, this.options.backtrack_lexer) {
253
- if (i = this.test_match(l, p[o]), i !== false)
254
- return i;
255
- if (this._backtrack) {
256
- a = false;
257
- continue;
258
- } else
259
- return false;
260
- } else if (!this.options.flex)
261
- break;
262
- }
263
- return a ? (i = this.test_match(a, p[d]), i !== false ? i : false) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
264
- ` + this.showPosition(), {
265
- text: "",
266
- token: null,
267
- line: this.yylineno
268
- });
269
- }, "next"),
270
- // return next match that has a token
271
- lex: /* @__PURE__ */ p(function() {
272
- var a = this.next();
273
- return a || this.lex();
274
- }, "lex"),
275
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
276
- begin: /* @__PURE__ */ p(function(a) {
277
- this.conditionStack.push(a);
278
- }, "begin"),
279
- // pop the previously active lexer condition state off the condition stack
280
- popState: /* @__PURE__ */ p(function() {
281
- var a = this.conditionStack.length - 1;
282
- return a > 0 ? this.conditionStack.pop() : this.conditionStack[0];
283
- }, "popState"),
284
- // produce the lexer rule set which is active for the currently active lexer condition state
285
- _currentRules: /* @__PURE__ */ p(function() {
286
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
287
- }, "_currentRules"),
288
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
289
- topState: /* @__PURE__ */ p(function(a) {
290
- return a = this.conditionStack.length - 1 - Math.abs(a || 0), a >= 0 ? this.conditionStack[a] : "INITIAL";
291
- }, "topState"),
292
- // alias for begin(condition)
293
- pushState: /* @__PURE__ */ p(function(a) {
294
- this.begin(a);
295
- }, "pushState"),
296
- // return the number of states currently on the stack
297
- stateStackSize: /* @__PURE__ */ p(function() {
298
- return this.conditionStack.length;
299
- }, "stateStackSize"),
300
- options: { "case-insensitive": true },
301
- performAction: /* @__PURE__ */ p(function(a, l, d, p) {
302
- switch (d) {
303
- case 0:
304
- break;
305
- case 1:
306
- break;
307
- case 2:
308
- return 10;
309
- case 3:
310
- break;
311
- case 4:
312
- break;
313
- case 5:
314
- return 4;
315
- case 6:
316
- return 11;
317
- case 7:
318
- return this.begin("acc_title"), 12;
319
- case 8:
320
- return this.popState(), "acc_title_value";
321
- case 9:
322
- return this.begin("acc_descr"), 14;
323
- case 10:
324
- return this.popState(), "acc_descr_value";
325
- case 11:
326
- this.begin("acc_descr_multiline");
327
- break;
328
- case 12:
329
- this.popState();
330
- break;
331
- case 13:
332
- return "acc_descr_multiline_value";
333
- case 14:
334
- return 17;
335
- case 15:
336
- return 18;
337
- case 16:
338
- return 19;
339
- case 17:
340
- return ":";
341
- case 18:
342
- return 6;
343
- case 19:
344
- return "INVALID";
345
- }
346
- }, "anonymous"),
347
- rules: [/^(?:%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:\s+)/i, /^(?:#[^\n]*)/i, /^(?:journey\b)/i, /^(?:title\s[^#\n;]+)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:section\s[^#:\n;]+)/i, /^(?:[^#:\n;]+)/i, /^(?::[^#\n;]+)/i, /^(?::)/i, /^(?:$)/i, /^(?:.)/i],
348
- conditions: { acc_descr_multiline: { rules: [12, 13], inclusive: false }, acc_descr: { rules: [10], inclusive: false }, acc_title: { rules: [8], inclusive: false }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 9, 11, 14, 15, 16, 17, 18, 19], inclusive: true } }
349
- };
350
- return h;
351
- }();
352
- g.lexer = m;
353
- function x() {
354
- this.yy = {};
355
- }
356
- return p(x, "Parser"), x.prototype = g, g.Parser = x, new x();
357
- }();
358
- U.parser = U;
359
- var Et = U, V = "", Z = [], L = [], B = [], Ct = /* @__PURE__ */ p(function() {
360
- Z.length = 0, L.length = 0, V = "", B.length = 0, ly();
361
- }, "clear"), Pt = /* @__PURE__ */ p(function(t) {
362
- V = t, Z.push(t);
363
- }, "addSection"), It = /* @__PURE__ */ p(function() {
364
- return Z;
365
- }, "getSections"), At = /* @__PURE__ */ p(function() {
366
- let t = it();
367
- const e = 100;
368
- let s = 0;
369
- for (; !t && s < e; )
370
- t = it(), s++;
371
- return L.push(...B), L;
372
- }, "getTasks"), Ft = /* @__PURE__ */ p(function() {
373
- const t = [];
374
- return L.forEach((s) => {
375
- s.people && t.push(...s.people);
376
- }), [...new Set(t)].sort();
377
- }, "updateActors"), Vt = /* @__PURE__ */ p(function(t, e) {
378
- const s = e.substr(1).split(":");
379
- let c = 0, r = [];
380
- s.length === 1 ? (c = Number(s[0]), r = []) : (c = Number(s[0]), r = s[1].split(","));
381
- const f = r.map((y) => y.trim()), u = {
382
- section: V,
383
- type: V,
384
- people: f,
385
- task: t,
386
- score: c
387
- };
388
- B.push(u);
389
- }, "addTask"), Rt = /* @__PURE__ */ p(function(t) {
390
- const e = {
391
- section: V,
392
- type: V,
393
- description: t,
394
- task: t,
395
- classes: []
396
- };
397
- L.push(e);
398
- }, "addTaskOrg"), it = /* @__PURE__ */ p(function() {
399
- const t = /* @__PURE__ */ p(function(s) {
400
- return B[s].processed;
401
- }, "compileTask");
402
- let e = true;
403
- for (const [s, c] of B.entries())
404
- t(s), e = e && c.processed;
405
- return e;
406
- }, "compileTasks"), Lt = /* @__PURE__ */ p(function() {
407
- return Ft();
408
- }, "getActors"), rt = {
409
- getConfig: /* @__PURE__ */ p(() => ut$1().journey, "getConfig"),
410
- clear: Ct,
411
- setDiagramTitle: dy,
412
- getDiagramTitle: py,
413
- setAccTitle: cy,
414
- getAccTitle: hy,
415
- setAccDescription: uy,
416
- getAccDescription: fy,
417
- addSection: Pt,
418
- getSections: It,
419
- getTasks: At,
420
- addTask: Vt,
421
- addTaskOrg: Rt,
422
- getActors: Lt
423
- }, Bt = /* @__PURE__ */ p((t) => `.label {
424
- font-family: ${t.fontFamily};
425
- color: ${t.textColor};
426
- }
427
- .mouth {
428
- stroke: #666;
429
- }
430
-
431
- line {
432
- stroke: ${t.textColor}
433
- }
434
-
435
- .legend {
436
- fill: ${t.textColor};
437
- font-family: ${t.fontFamily};
438
- }
439
-
440
- .label text {
441
- fill: #333;
442
- }
443
- .label {
444
- color: ${t.textColor}
445
- }
446
-
447
- .face {
448
- ${t.faceColor ? `fill: ${t.faceColor}` : "fill: #FFF8DC"};
449
- stroke: #999;
450
- }
451
-
452
- .node rect,
453
- .node circle,
454
- .node ellipse,
455
- .node polygon,
456
- .node path {
457
- fill: ${t.mainBkg};
458
- stroke: ${t.nodeBorder};
459
- stroke-width: 1px;
460
- }
461
-
462
- .node .label {
463
- text-align: center;
464
- }
465
- .node.clickable {
466
- cursor: pointer;
467
- }
468
-
469
- .arrowheadPath {
470
- fill: ${t.arrowheadColor};
471
- }
472
-
473
- .edgePath .path {
474
- stroke: ${t.lineColor};
475
- stroke-width: 1.5px;
476
- }
477
-
478
- .flowchart-link {
479
- stroke: ${t.lineColor};
480
- fill: none;
481
- }
482
-
483
- .edgeLabel {
484
- background-color: ${t.edgeLabelBackground};
485
- rect {
486
- opacity: 0.5;
487
- }
488
- text-align: center;
489
- }
490
-
491
- .cluster rect {
492
- }
493
-
494
- .cluster text {
495
- fill: ${t.titleColor};
496
- }
497
-
498
- div.mermaidTooltip {
499
- position: absolute;
500
- text-align: center;
501
- max-width: 200px;
502
- padding: 2px;
503
- font-family: ${t.fontFamily};
504
- font-size: 12px;
505
- background: ${t.tertiaryColor};
506
- border: 1px solid ${t.border2};
507
- border-radius: 2px;
508
- pointer-events: none;
509
- z-index: 100;
510
- }
511
-
512
- .task-type-0, .section-type-0 {
513
- ${t.fillType0 ? `fill: ${t.fillType0}` : ""};
514
- }
515
- .task-type-1, .section-type-1 {
516
- ${t.fillType0 ? `fill: ${t.fillType1}` : ""};
517
- }
518
- .task-type-2, .section-type-2 {
519
- ${t.fillType0 ? `fill: ${t.fillType2}` : ""};
520
- }
521
- .task-type-3, .section-type-3 {
522
- ${t.fillType0 ? `fill: ${t.fillType3}` : ""};
523
- }
524
- .task-type-4, .section-type-4 {
525
- ${t.fillType0 ? `fill: ${t.fillType4}` : ""};
526
- }
527
- .task-type-5, .section-type-5 {
528
- ${t.fillType0 ? `fill: ${t.fillType5}` : ""};
529
- }
530
- .task-type-6, .section-type-6 {
531
- ${t.fillType0 ? `fill: ${t.fillType6}` : ""};
532
- }
533
- .task-type-7, .section-type-7 {
534
- ${t.fillType0 ? `fill: ${t.fillType7}` : ""};
535
- }
536
-
537
- .actor-0 {
538
- ${t.actor0 ? `fill: ${t.actor0}` : ""};
539
- }
540
- .actor-1 {
541
- ${t.actor1 ? `fill: ${t.actor1}` : ""};
542
- }
543
- .actor-2 {
544
- ${t.actor2 ? `fill: ${t.actor2}` : ""};
545
- }
546
- .actor-3 {
547
- ${t.actor3 ? `fill: ${t.actor3}` : ""};
548
- }
549
- .actor-4 {
550
- ${t.actor4 ? `fill: ${t.actor4}` : ""};
551
- }
552
- .actor-5 {
553
- ${t.actor5 ? `fill: ${t.actor5}` : ""};
554
- }
555
- ${l()}
556
- `, "getStyles"), jt = Bt, J = /* @__PURE__ */ p(function(t, e) {
557
- return x(t, e);
558
- }, "drawRect"), Nt = /* @__PURE__ */ p(function(t, e) {
559
- const c = t.append("circle").attr("cx", e.cx).attr("cy", e.cy).attr("class", "face").attr("r", 15).attr("stroke-width", 2).attr("overflow", "visible"), r = t.append("g");
560
- r.append("circle").attr("cx", e.cx - 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666"), r.append("circle").attr("cx", e.cx + 15 / 3).attr("cy", e.cy - 15 / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
561
- function f(g) {
562
- const m = hn().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
563
- g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 2) + ")");
564
- }
565
- p(f, "smile");
566
- function u(g) {
567
- const m = hn().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(7.5).outerRadius(6.8181818181818175);
568
- g.append("path").attr("class", "mouth").attr("d", m).attr("transform", "translate(" + e.cx + "," + (e.cy + 7) + ")");
569
- }
570
- p(u, "sad");
571
- function y(g) {
572
- g.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", e.cx - 5).attr("y1", e.cy + 7).attr("x2", e.cx + 5).attr("y2", e.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
573
- }
574
- return p(y, "ambivalent"), e.score > 3 ? f(r) : e.score < 3 ? u(r) : y(r), c;
575
- }, "drawFace"), ot = /* @__PURE__ */ p(function(t, e) {
576
- const s = t.append("circle");
577
- return s.attr("cx", e.cx), s.attr("cy", e.cy), s.attr("class", "actor-" + e.pos), s.attr("fill", e.fill), s.attr("stroke", e.stroke), s.attr("r", e.r), s.class !== void 0 && s.attr("class", s.class), e.title !== void 0 && s.append("title").text(e.title), s;
578
- }, "drawCircle"), ct = /* @__PURE__ */ p(function(t, e) {
579
- return g(t, e);
580
- }, "drawText"), zt = /* @__PURE__ */ p(function(t, e) {
581
- function s(r, f, u, y, g) {
582
- return r + "," + f + " " + (r + u) + "," + f + " " + (r + u) + "," + (f + y - g) + " " + (r + u - g * 1.2) + "," + (f + y) + " " + r + "," + (f + y);
583
- }
584
- p(s, "genPoints");
585
- const c = t.append("polygon");
586
- c.attr("points", s(e.x, e.y, 50, 20, 7)), c.attr("class", "labelBox"), e.y = e.y + e.labelMargin, e.x = e.x + 0.5 * e.labelMargin, ct(t, e);
587
- }, "drawLabel"), Wt = /* @__PURE__ */ p(function(t, e, s) {
588
- const c = t.append("g"), r = y();
589
- r.x = e.x, r.y = e.y, r.fill = e.fill, r.width = s.width * e.taskCount + // width of the tasks
590
- s.diagramMarginX * (e.taskCount - 1), r.height = s.height, r.class = "journey-section section-type-" + e.num, r.rx = 3, r.ry = 3, J(c, r), ht(s)(
591
- e.text,
592
- c,
593
- r.x,
594
- r.y,
595
- r.width,
596
- r.height,
597
- { class: "journey-section section-type-" + e.num },
598
- s,
599
- e.colour
600
- );
601
- }, "drawSection"), nt = -1, Ot = /* @__PURE__ */ p(function(t, e, s) {
602
- const c = e.x + s.width / 2, r = t.append("g");
603
- nt++;
604
- const f = 300 + 5 * 30;
605
- r.append("line").attr("id", "task" + nt).attr("x1", c).attr("y1", e.y).attr("x2", c).attr("y2", f).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666"), Nt(r, {
606
- cx: c,
607
- cy: 300 + (5 - e.score) * 30,
608
- score: e.score
609
- });
610
- const u = y();
611
- u.x = e.x, u.y = e.y, u.fill = e.fill, u.width = s.width, u.height = s.height, u.class = "task task-type-" + e.num, u.rx = 3, u.ry = 3, J(r, u);
612
- let y$1 = e.x + 14;
613
- e.people.forEach((g) => {
614
- const m = e.actors[g].color, x = {
615
- cx: y$1,
616
- cy: e.y,
617
- r: 7,
618
- fill: m,
619
- stroke: "#000",
620
- title: g,
621
- pos: e.actors[g].position
622
- };
623
- ot(r, x), y$1 += 10;
624
- }), ht(s)(
625
- e.task,
626
- r,
627
- u.x,
628
- u.y,
629
- u.width,
630
- u.height,
631
- { class: "task" },
632
- s,
633
- e.colour
634
- );
635
- }, "drawTask"), Yt = /* @__PURE__ */ p(function(t, e) {
636
- d(t, e);
637
- }, "drawBackgroundRect"), ht = /* @__PURE__ */ function() {
638
- function t(r, f, u, y, g, m, x, h) {
639
- const i = f.append("text").attr("x", u + g / 2).attr("y", y + m / 2 + 5).style("font-color", h).style("text-anchor", "middle").text(r);
640
- c(i, x);
641
- }
642
- p(t, "byText");
643
- function e(r, f, u, y, g, m, x, h, i) {
644
- const { taskFontSize: a, taskFontFamily: l } = h, d = r.split(/<br\s*\/?>/gi);
645
- for (let p = 0; p < d.length; p++) {
646
- const o = p * a - a * (d.length - 1) / 2, b = f.append("text").attr("x", u + g / 2).attr("y", y).attr("fill", i).style("text-anchor", "middle").style("font-size", a).style("font-family", l);
647
- b.append("tspan").attr("x", u + g / 2).attr("dy", o).text(d[p]), b.attr("y", y + m / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central"), c(b, x);
648
- }
649
- }
650
- p(e, "byTspan");
651
- function s(r, f, u, y, g, m, x, h) {
652
- const i = f.append("switch"), l = i.append("foreignObject").attr("x", u).attr("y", y).attr("width", g).attr("height", m).attr("position", "fixed").append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
653
- l.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(r), e(r, i, u, y, g, m, x, h), c(l, x);
654
- }
655
- p(s, "byFo");
656
- function c(r, f) {
657
- for (const u in f)
658
- u in f && r.attr(u, f[u]);
659
- }
660
- return p(c, "_setTextAttrs"), function(r) {
661
- return r.textPlacement === "fo" ? s : r.textPlacement === "old" ? t : e;
662
- };
663
- }(), qt = /* @__PURE__ */ p(function(t) {
664
- t.append("defs").append("marker").attr("id", "arrowhead").attr("refX", 5).attr("refY", 2).attr("markerWidth", 6).attr("markerHeight", 4).attr("orient", "auto").append("path").attr("d", "M 0,0 V 4 L6,2 Z");
665
- }, "initGraphics"), j = {
666
- drawRect: J,
667
- drawCircle: ot,
668
- drawSection: Wt,
669
- drawText: ct,
670
- drawLabel: zt,
671
- drawTask: Ot,
672
- drawBackgroundRect: Yt,
673
- initGraphics: qt
674
- }, Xt = /* @__PURE__ */ p(function(t) {
675
- Object.keys(t).forEach(function(s) {
676
- $[s] = t[s];
677
- });
678
- }, "setConf"), E = {}, W = 0;
679
- function ut(t) {
680
- const e = ut$1().journey, s = e.maxLabelWidth;
681
- W = 0;
682
- let c = 60;
683
- Object.keys(E).forEach((r) => {
684
- const f = E[r].color, u = {
685
- cx: 20,
686
- cy: c,
687
- r: 7,
688
- fill: f,
689
- stroke: "#000",
690
- pos: E[r].position
691
- };
692
- j.drawCircle(t, u);
693
- let y = t.append("text").attr("visibility", "hidden").text(r);
694
- const g = y.node().getBoundingClientRect().width;
695
- y.remove();
696
- let m = [];
697
- if (g <= s)
698
- m = [r];
699
- else {
700
- const x = r.split(" ");
701
- let h = "";
702
- y = t.append("text").attr("visibility", "hidden"), x.forEach((i) => {
703
- const a = h ? `${h} ${i}` : i;
704
- if (y.text(a), y.node().getBoundingClientRect().width > s) {
705
- if (h && m.push(h), h = i, y.text(i), y.node().getBoundingClientRect().width > s) {
706
- let d = "";
707
- for (const p of i)
708
- d += p, y.text(d + "-"), y.node().getBoundingClientRect().width > s && (m.push(d.slice(0, -1) + "-"), d = p);
709
- h = d;
710
- }
711
- } else
712
- h = a;
713
- }), h && m.push(h), y.remove();
714
- }
715
- m.forEach((x, h) => {
716
- const i = {
717
- x: 40,
718
- y: c + 7 + h * 20,
719
- fill: "#666",
720
- text: x,
721
- textMargin: e.boxTextMargin ?? 5
722
- }, l = j.drawText(t, i).node().getBoundingClientRect().width;
723
- l > W && l > e.leftMargin - l && (W = l);
724
- }), c += Math.max(20, m.length * 20);
725
- });
726
- }
727
- p(ut, "drawActorLegend");
728
- var $ = ut$1().journey, P = 0, Gt = /* @__PURE__ */ p(function(t, e, s, c) {
729
- const r = ut$1(), f = r.journey.titleColor, u = r.journey.titleFontSize, y = r.journey.titleFontFamily, g = r.securityLevel;
730
- let m;
731
- g === "sandbox" && (m = ht$1("#i" + e));
732
- const x = g === "sandbox" ? ht$1(m.nodes()[0].contentDocument.body) : ht$1("body");
733
- S.init();
734
- const h = x.select("#" + e);
735
- j.initGraphics(h);
736
- const i = c.db.getTasks(), a = c.db.getDiagramTitle(), l = c.db.getActors();
737
- for (const C in E)
738
- delete E[C];
739
- let d = 0;
740
- l.forEach((C) => {
741
- E[C] = {
742
- color: $.actorColours[d % $.actorColours.length],
743
- position: d
744
- }, d++;
745
- }), ut(h), P = $.leftMargin + W, S.insert(0, 0, P, Object.keys(E).length * 50), Ht(h, i, 0);
746
- const p = S.getBounds();
747
- a && h.append("text").text(a).attr("x", P).attr("font-size", u).attr("font-weight", "bold").attr("y", 25).attr("fill", f).attr("font-family", y);
748
- const o = p.stopy - p.starty + 2 * $.diagramMarginY, b = P + p.stopx + 2 * $.diagramMarginX;
749
- zh(h, o, b, $.useMaxWidth), h.append("line").attr("x1", P).attr("y1", $.height * 4).attr("x2", b - P - 4).attr("y2", $.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
750
- const k = a ? 70 : 0;
751
- h.attr("viewBox", `${p.startx} -25 ${b} ${o + k}`), h.attr("preserveAspectRatio", "xMinYMin meet"), h.attr("height", o + k + 25);
752
- }, "draw"), S = {
753
- data: {
754
- startx: void 0,
755
- stopx: void 0,
756
- starty: void 0,
757
- stopy: void 0
758
- },
759
- verticalPos: 0,
760
- sequenceItems: [],
761
- init: /* @__PURE__ */ p(function() {
762
- this.sequenceItems = [], this.data = {
763
- startx: void 0,
764
- stopx: void 0,
765
- starty: void 0,
766
- stopy: void 0
767
- }, this.verticalPos = 0;
768
- }, "init"),
769
- updateVal: /* @__PURE__ */ p(function(t, e, s, c) {
770
- t[e] === void 0 ? t[e] = s : t[e] = c(s, t[e]);
771
- }, "updateVal"),
772
- updateBounds: /* @__PURE__ */ p(function(t, e, s, c) {
773
- const r = ut$1().journey, f = this;
774
- let u = 0;
775
- function y(g) {
776
- return /* @__PURE__ */ p(function(x) {
777
- u++;
778
- const h = f.sequenceItems.length - u + 1;
779
- f.updateVal(x, "starty", e - h * r.boxMargin, Math.min), f.updateVal(x, "stopy", c + h * r.boxMargin, Math.max), f.updateVal(S.data, "startx", t - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopx", s + h * r.boxMargin, Math.max), g !== "activation" && (f.updateVal(x, "startx", t - h * r.boxMargin, Math.min), f.updateVal(x, "stopx", s + h * r.boxMargin, Math.max), f.updateVal(S.data, "starty", e - h * r.boxMargin, Math.min), f.updateVal(S.data, "stopy", c + h * r.boxMargin, Math.max));
780
- }, "updateItemBounds");
781
- }
782
- p(y, "updateFn"), this.sequenceItems.forEach(y());
783
- }, "updateBounds"),
784
- insert: /* @__PURE__ */ p(function(t, e, s, c) {
785
- const r = Math.min(t, s), f = Math.max(t, s), u = Math.min(e, c), y = Math.max(e, c);
786
- this.updateVal(S.data, "startx", r, Math.min), this.updateVal(S.data, "starty", u, Math.min), this.updateVal(S.data, "stopx", f, Math.max), this.updateVal(S.data, "stopy", y, Math.max), this.updateBounds(r, u, f, y);
787
- }, "insert"),
788
- bumpVerticalPos: /* @__PURE__ */ p(function(t) {
789
- this.verticalPos = this.verticalPos + t, this.data.stopy = this.verticalPos;
790
- }, "bumpVerticalPos"),
791
- getVerticalPos: /* @__PURE__ */ p(function() {
792
- return this.verticalPos;
793
- }, "getVerticalPos"),
794
- getBounds: /* @__PURE__ */ p(function() {
795
- return this.data;
796
- }, "getBounds")
797
- }, H = $.sectionFills, st = $.sectionColours, Ht = /* @__PURE__ */ p(function(t, e, s) {
798
- const c = ut$1().journey;
799
- let r = "";
800
- const f = c.height * 2 + c.diagramMarginY, u = s + f;
801
- let y = 0, g = "#CCC", m = "black", x = 0;
802
- for (const [h, i] of e.entries()) {
803
- if (r !== i.section) {
804
- g = H[y % H.length], x = y % H.length, m = st[y % st.length];
805
- let l = 0;
806
- const d = i.section;
807
- for (let o = h; o < e.length && e[o].section == d; o++)
808
- l = l + 1;
809
- const p = {
810
- x: h * c.taskMargin + h * c.width + P,
811
- y: 50,
812
- text: i.section,
813
- fill: g,
814
- num: x,
815
- colour: m,
816
- taskCount: l
817
- };
818
- j.drawSection(t, p, c), r = i.section, y++;
819
- }
820
- const a = i.people.reduce((l, d) => (E[d] && (l[d] = E[d]), l), {});
821
- i.x = h * c.taskMargin + h * c.width + P, i.y = u, i.width = c.diagramMarginX, i.height = c.diagramMarginY, i.colour = m, i.fill = g, i.num = x, i.actors = a, j.drawTask(t, i, c), S.insert(i.x, i.y, i.x + i.width + c.taskMargin, 300 + 5 * 30);
822
- }
823
- }, "drawTasks"), at = {
824
- setConf: Xt,
825
- draw: Gt
826
- }, Qt = {
827
- parser: Et,
828
- db: rt,
829
- renderer: at,
830
- styles: jt,
831
- init: /* @__PURE__ */ p((t) => {
832
- at.setConf(t.journey), rt.clear();
833
- }, "init")
834
- };
835
-
836
- export { Qt as diagram };
837
- //# sourceMappingURL=journeyDiagram-BIP6EPQ6-BGl5AI_2.sOXXDhT-.js.map