@readme/markdown 7.10.0 → 7.10.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 (48) hide show
  1. package/components/Columns/index.tsx +4 -2
  2. package/components/Columns/style.scss +6 -0
  3. package/components/Image/index.tsx +1 -1
  4. package/dist/components/Columns/index.d.ts +1 -2
  5. package/dist/lib/migrate.d.ts +3 -1
  6. package/dist/main.css +1 -1
  7. package/dist/main.js +22 -30
  8. package/dist/main.node.js +422 -5473
  9. package/dist/processor/migration/index.d.ts +2 -1
  10. package/dist/processor/migration/table-cell.d.ts +1 -1
  11. package/package.json +2 -2
  12. package/dist/10.node.js +0 -22721
  13. package/dist/11.node.js +0 -1443
  14. package/dist/120.node.js +0 -22
  15. package/dist/134.node.js +0 -22
  16. package/dist/150.node.js +0 -1891
  17. package/dist/17.node.js +0 -1376
  18. package/dist/246.node.js +0 -1932
  19. package/dist/351.node.js +0 -2403
  20. package/dist/366.node.js +0 -1184
  21. package/dist/403.node.js +0 -2195
  22. package/dist/429.node.js +0 -11133
  23. package/dist/485.node.js +0 -517
  24. package/dist/486.node.js +0 -31818
  25. package/dist/488.node.js +0 -58
  26. package/dist/489.node.js +0 -18475
  27. package/dist/510.node.js +0 -249
  28. package/dist/52.node.js +0 -811
  29. package/dist/550.node.js +0 -1456
  30. package/dist/551.node.js +0 -2725
  31. package/dist/617.node.js +0 -22
  32. package/dist/687.node.js +0 -3674
  33. package/dist/745.node.js +0 -7507
  34. package/dist/775.node.js +0 -1903
  35. package/dist/786.node.js +0 -31381
  36. package/dist/788.node.js +0 -1024
  37. package/dist/81.node.js +0 -385
  38. package/dist/849.node.js +0 -2589
  39. package/dist/863.node.js +0 -22
  40. package/dist/867.node.js +0 -1417
  41. package/dist/881.node.js +0 -1279
  42. package/dist/885.node.js +0 -51
  43. package/dist/896.node.js +0 -1616
  44. package/dist/906.node.js +0 -1818
  45. package/dist/91.node.js +0 -22
  46. package/dist/940.node.js +0 -3362
  47. package/dist/952.node.js +0 -246
  48. package/dist/995.node.js +0 -5737
package/dist/17.node.js DELETED
@@ -1,1376 +0,0 @@
1
- "use strict";
2
- exports.id = 17;
3
- exports.ids = [17];
4
- exports.modules = {
5
-
6
- /***/ 242:
7
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
8
-
9
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10
- /* harmony export */ CP: () => (/* binding */ drawEmbeddedImage),
11
- /* harmony export */ HT: () => (/* binding */ getTextObj),
12
- /* harmony export */ PB: () => (/* binding */ getNoteRect),
13
- /* harmony export */ aC: () => (/* binding */ drawImage),
14
- /* harmony export */ lC: () => (/* binding */ drawBackgroundRect),
15
- /* harmony export */ m: () => (/* binding */ drawText),
16
- /* harmony export */ tk: () => (/* binding */ drawRect)
17
- /* harmony export */ });
18
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6322);
19
- /* harmony import */ var _braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6750);
20
-
21
-
22
- // src/diagrams/common/svgDrawCommon.ts
23
-
24
- var drawRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, rectData) => {
25
- const rectElement = element.append("rect");
26
- rectElement.attr("x", rectData.x);
27
- rectElement.attr("y", rectData.y);
28
- rectElement.attr("fill", rectData.fill);
29
- rectElement.attr("stroke", rectData.stroke);
30
- rectElement.attr("width", rectData.width);
31
- rectElement.attr("height", rectData.height);
32
- if (rectData.name) {
33
- rectElement.attr("name", rectData.name);
34
- }
35
- if (rectData.rx) {
36
- rectElement.attr("rx", rectData.rx);
37
- }
38
- if (rectData.ry) {
39
- rectElement.attr("ry", rectData.ry);
40
- }
41
- if (rectData.attrs !== void 0) {
42
- for (const attrKey in rectData.attrs) {
43
- rectElement.attr(attrKey, rectData.attrs[attrKey]);
44
- }
45
- }
46
- if (rectData.class) {
47
- rectElement.attr("class", rectData.class);
48
- }
49
- return rectElement;
50
- }, "drawRect");
51
- var drawBackgroundRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, bounds) => {
52
- const rectData = {
53
- x: bounds.startx,
54
- y: bounds.starty,
55
- width: bounds.stopx - bounds.startx,
56
- height: bounds.stopy - bounds.starty,
57
- fill: bounds.fill,
58
- stroke: bounds.stroke,
59
- class: "rect"
60
- };
61
- const rectElement = drawRect(element, rectData);
62
- rectElement.lower();
63
- }, "drawBackgroundRect");
64
- var drawText = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, textData) => {
65
- const nText = textData.text.replace(_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .lineBreakRegex */ .H1, " ");
66
- const textElem = element.append("text");
67
- textElem.attr("x", textData.x);
68
- textElem.attr("y", textData.y);
69
- textElem.attr("class", "legend");
70
- textElem.style("text-anchor", textData.anchor);
71
- if (textData.class) {
72
- textElem.attr("class", textData.class);
73
- }
74
- const tspan = textElem.append("tspan");
75
- tspan.attr("x", textData.x + textData.textMargin * 2);
76
- tspan.text(nText);
77
- return textElem;
78
- }, "drawText");
79
- var drawImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((elem, x, y, link) => {
80
- const imageElement = elem.append("image");
81
- imageElement.attr("x", x);
82
- imageElement.attr("y", y);
83
- const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
84
- imageElement.attr("xlink:href", sanitizedLink);
85
- }, "drawImage");
86
- var drawEmbeddedImage = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)((element, x, y, link) => {
87
- const imageElement = element.append("use");
88
- imageElement.attr("x", x);
89
- imageElement.attr("y", y);
90
- const sanitizedLink = (0,_braintree_sanitize_url__WEBPACK_IMPORTED_MODULE_1__/* .sanitizeUrl */ .J)(link);
91
- imageElement.attr("xlink:href", `#${sanitizedLink}`);
92
- }, "drawEmbeddedImage");
93
- var getNoteRect = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
94
- const noteRectData = {
95
- x: 0,
96
- y: 0,
97
- width: 100,
98
- height: 100,
99
- fill: "#EDF2AE",
100
- stroke: "#666",
101
- anchor: "start",
102
- rx: 0,
103
- ry: 0
104
- };
105
- return noteRectData;
106
- }, "getNoteRect");
107
- var getTextObj = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_0__/* .__name */ .K2)(() => {
108
- const testObject = {
109
- x: 0,
110
- y: 0,
111
- width: 100,
112
- height: 100,
113
- "text-anchor": "start",
114
- style: "#666",
115
- textMargin: 0,
116
- rx: 0,
117
- ry: 0,
118
- tspan: true
119
- };
120
- return testObject;
121
- }, "getTextObj");
122
-
123
-
124
-
125
-
126
- /***/ }),
127
-
128
- /***/ 2017:
129
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
130
-
131
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
132
- /* harmony export */ diagram: () => (/* binding */ diagram)
133
- /* harmony export */ });
134
- /* harmony import */ var _chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(242);
135
- /* harmony import */ var _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6322);
136
- /* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(8066);
137
-
138
-
139
-
140
- // src/diagrams/user-journey/parser/journey.jison
141
- var parser = function() {
142
- var o = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(k, v, o2, l) {
143
- for (o2 = o2 || {}, l = k.length; l--; o2[k[l]] = v) ;
144
- return o2;
145
- }, "o"), $V0 = [6, 8, 10, 11, 12, 14, 16, 17, 18], $V1 = [1, 9], $V2 = [1, 10], $V3 = [1, 11], $V4 = [1, 12], $V5 = [1, 13], $V6 = [1, 14];
146
- var parser2 = {
147
- trace: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function trace() {
148
- }, "trace"),
149
- yy: {},
150
- 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 },
151
- 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" },
152
- 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]],
153
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
154
- var $0 = $$.length - 1;
155
- switch (yystate) {
156
- case 1:
157
- return $$[$0 - 1];
158
- break;
159
- case 2:
160
- this.$ = [];
161
- break;
162
- case 3:
163
- $$[$0 - 1].push($$[$0]);
164
- this.$ = $$[$0 - 1];
165
- break;
166
- case 4:
167
- case 5:
168
- this.$ = $$[$0];
169
- break;
170
- case 6:
171
- case 7:
172
- this.$ = [];
173
- break;
174
- case 8:
175
- yy.setDiagramTitle($$[$0].substr(6));
176
- this.$ = $$[$0].substr(6);
177
- break;
178
- case 9:
179
- this.$ = $$[$0].trim();
180
- yy.setAccTitle(this.$);
181
- break;
182
- case 10:
183
- case 11:
184
- this.$ = $$[$0].trim();
185
- yy.setAccDescription(this.$);
186
- break;
187
- case 12:
188
- yy.addSection($$[$0].substr(8));
189
- this.$ = $$[$0].substr(8);
190
- break;
191
- case 13:
192
- yy.addTask($$[$0 - 1], $$[$0]);
193
- this.$ = "task";
194
- break;
195
- }
196
- }, "anonymous"),
197
- table: [{ 3: 1, 4: [1, 2] }, { 1: [3] }, o($V0, [2, 2], { 5: 3 }), { 6: [1, 4], 7: 5, 8: [1, 6], 9: 7, 10: [1, 8], 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 7], { 1: [2, 1] }), o($V0, [2, 3]), { 9: 15, 11: $V1, 12: $V2, 14: $V3, 16: $V4, 17: $V5, 18: $V6 }, o($V0, [2, 5]), o($V0, [2, 6]), o($V0, [2, 8]), { 13: [1, 16] }, { 15: [1, 17] }, o($V0, [2, 11]), o($V0, [2, 12]), { 19: [1, 18] }, o($V0, [2, 4]), o($V0, [2, 9]), o($V0, [2, 10]), o($V0, [2, 13])],
198
- defaultActions: {},
199
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function parseError(str, hash) {
200
- if (hash.recoverable) {
201
- this.trace(str);
202
- } else {
203
- var error = new Error(str);
204
- error.hash = hash;
205
- throw error;
206
- }
207
- }, "parseError"),
208
- parse: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function parse(input) {
209
- var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
210
- var args = lstack.slice.call(arguments, 1);
211
- var lexer2 = Object.create(this.lexer);
212
- var sharedState = { yy: {} };
213
- for (var k in this.yy) {
214
- if (Object.prototype.hasOwnProperty.call(this.yy, k)) {
215
- sharedState.yy[k] = this.yy[k];
216
- }
217
- }
218
- lexer2.setInput(input, sharedState.yy);
219
- sharedState.yy.lexer = lexer2;
220
- sharedState.yy.parser = this;
221
- if (typeof lexer2.yylloc == "undefined") {
222
- lexer2.yylloc = {};
223
- }
224
- var yyloc = lexer2.yylloc;
225
- lstack.push(yyloc);
226
- var ranges = lexer2.options && lexer2.options.ranges;
227
- if (typeof sharedState.yy.parseError === "function") {
228
- this.parseError = sharedState.yy.parseError;
229
- } else {
230
- this.parseError = Object.getPrototypeOf(this).parseError;
231
- }
232
- function popStack(n) {
233
- stack.length = stack.length - 2 * n;
234
- vstack.length = vstack.length - n;
235
- lstack.length = lstack.length - n;
236
- }
237
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(popStack, "popStack");
238
- function lex() {
239
- var token;
240
- token = tstack.pop() || lexer2.lex() || EOF;
241
- if (typeof token !== "number") {
242
- if (token instanceof Array) {
243
- tstack = token;
244
- token = tstack.pop();
245
- }
246
- token = self.symbols_[token] || token;
247
- }
248
- return token;
249
- }
250
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(lex, "lex");
251
- var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
252
- while (true) {
253
- state = stack[stack.length - 1];
254
- if (this.defaultActions[state]) {
255
- action = this.defaultActions[state];
256
- } else {
257
- if (symbol === null || typeof symbol == "undefined") {
258
- symbol = lex();
259
- }
260
- action = table[state] && table[state][symbol];
261
- }
262
- if (typeof action === "undefined" || !action.length || !action[0]) {
263
- var errStr = "";
264
- expected = [];
265
- for (p in table[state]) {
266
- if (this.terminals_[p] && p > TERROR) {
267
- expected.push("'" + this.terminals_[p] + "'");
268
- }
269
- }
270
- if (lexer2.showPosition) {
271
- errStr = "Parse error on line " + (yylineno + 1) + ":\n" + lexer2.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
272
- } else {
273
- errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == EOF ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
274
- }
275
- this.parseError(errStr, {
276
- text: lexer2.match,
277
- token: this.terminals_[symbol] || symbol,
278
- line: lexer2.yylineno,
279
- loc: yyloc,
280
- expected
281
- });
282
- }
283
- if (action[0] instanceof Array && action.length > 1) {
284
- throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
285
- }
286
- switch (action[0]) {
287
- case 1:
288
- stack.push(symbol);
289
- vstack.push(lexer2.yytext);
290
- lstack.push(lexer2.yylloc);
291
- stack.push(action[1]);
292
- symbol = null;
293
- if (!preErrorSymbol) {
294
- yyleng = lexer2.yyleng;
295
- yytext = lexer2.yytext;
296
- yylineno = lexer2.yylineno;
297
- yyloc = lexer2.yylloc;
298
- if (recovering > 0) {
299
- recovering--;
300
- }
301
- } else {
302
- symbol = preErrorSymbol;
303
- preErrorSymbol = null;
304
- }
305
- break;
306
- case 2:
307
- len = this.productions_[action[1]][1];
308
- yyval.$ = vstack[vstack.length - len];
309
- yyval._$ = {
310
- first_line: lstack[lstack.length - (len || 1)].first_line,
311
- last_line: lstack[lstack.length - 1].last_line,
312
- first_column: lstack[lstack.length - (len || 1)].first_column,
313
- last_column: lstack[lstack.length - 1].last_column
314
- };
315
- if (ranges) {
316
- yyval._$.range = [
317
- lstack[lstack.length - (len || 1)].range[0],
318
- lstack[lstack.length - 1].range[1]
319
- ];
320
- }
321
- r = this.performAction.apply(yyval, [
322
- yytext,
323
- yyleng,
324
- yylineno,
325
- sharedState.yy,
326
- action[1],
327
- vstack,
328
- lstack
329
- ].concat(args));
330
- if (typeof r !== "undefined") {
331
- return r;
332
- }
333
- if (len) {
334
- stack = stack.slice(0, -1 * len * 2);
335
- vstack = vstack.slice(0, -1 * len);
336
- lstack = lstack.slice(0, -1 * len);
337
- }
338
- stack.push(this.productions_[action[1]][0]);
339
- vstack.push(yyval.$);
340
- lstack.push(yyval._$);
341
- newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
342
- stack.push(newState);
343
- break;
344
- case 3:
345
- return true;
346
- }
347
- }
348
- return true;
349
- }, "parse")
350
- };
351
- var lexer = /* @__PURE__ */ function() {
352
- var lexer2 = {
353
- EOF: 1,
354
- parseError: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function parseError(str, hash) {
355
- if (this.yy.parser) {
356
- this.yy.parser.parseError(str, hash);
357
- } else {
358
- throw new Error(str);
359
- }
360
- }, "parseError"),
361
- // resets the lexer, sets new input
362
- setInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(input, yy) {
363
- this.yy = yy || this.yy || {};
364
- this._input = input;
365
- this._more = this._backtrack = this.done = false;
366
- this.yylineno = this.yyleng = 0;
367
- this.yytext = this.matched = this.match = "";
368
- this.conditionStack = ["INITIAL"];
369
- this.yylloc = {
370
- first_line: 1,
371
- first_column: 0,
372
- last_line: 1,
373
- last_column: 0
374
- };
375
- if (this.options.ranges) {
376
- this.yylloc.range = [0, 0];
377
- }
378
- this.offset = 0;
379
- return this;
380
- }, "setInput"),
381
- // consumes and returns one char from the input
382
- input: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
383
- var ch = this._input[0];
384
- this.yytext += ch;
385
- this.yyleng++;
386
- this.offset++;
387
- this.match += ch;
388
- this.matched += ch;
389
- var lines = ch.match(/(?:\r\n?|\n).*/g);
390
- if (lines) {
391
- this.yylineno++;
392
- this.yylloc.last_line++;
393
- } else {
394
- this.yylloc.last_column++;
395
- }
396
- if (this.options.ranges) {
397
- this.yylloc.range[1]++;
398
- }
399
- this._input = this._input.slice(1);
400
- return ch;
401
- }, "input"),
402
- // unshifts one char (or a string) into the input
403
- unput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(ch) {
404
- var len = ch.length;
405
- var lines = ch.split(/(?:\r\n?|\n)/g);
406
- this._input = ch + this._input;
407
- this.yytext = this.yytext.substr(0, this.yytext.length - len);
408
- this.offset -= len;
409
- var oldLines = this.match.split(/(?:\r\n?|\n)/g);
410
- this.match = this.match.substr(0, this.match.length - 1);
411
- this.matched = this.matched.substr(0, this.matched.length - 1);
412
- if (lines.length - 1) {
413
- this.yylineno -= lines.length - 1;
414
- }
415
- var r = this.yylloc.range;
416
- this.yylloc = {
417
- first_line: this.yylloc.first_line,
418
- last_line: this.yylineno + 1,
419
- first_column: this.yylloc.first_column,
420
- last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
421
- };
422
- if (this.options.ranges) {
423
- this.yylloc.range = [r[0], r[0] + this.yyleng - len];
424
- }
425
- this.yyleng = this.yytext.length;
426
- return this;
427
- }, "unput"),
428
- // When called from action, caches matched text and appends it on next action
429
- more: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
430
- this._more = true;
431
- return this;
432
- }, "more"),
433
- // 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.
434
- reject: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
435
- if (this.options.backtrack_lexer) {
436
- this._backtrack = true;
437
- } else {
438
- 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(), {
439
- text: "",
440
- token: null,
441
- line: this.yylineno
442
- });
443
- }
444
- return this;
445
- }, "reject"),
446
- // retain first n characters of the match
447
- less: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(n) {
448
- this.unput(this.match.slice(n));
449
- }, "less"),
450
- // displays already matched input, i.e. for error messages
451
- pastInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
452
- var past = this.matched.substr(0, this.matched.length - this.match.length);
453
- return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
454
- }, "pastInput"),
455
- // displays upcoming input, i.e. for error messages
456
- upcomingInput: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
457
- var next = this.match;
458
- if (next.length < 20) {
459
- next += this._input.substr(0, 20 - next.length);
460
- }
461
- return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
462
- }, "upcomingInput"),
463
- // displays the character position where the lexing error occurred, i.e. for error messages
464
- showPosition: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
465
- var pre = this.pastInput();
466
- var c = new Array(pre.length + 1).join("-");
467
- return pre + this.upcomingInput() + "\n" + c + "^";
468
- }, "showPosition"),
469
- // test the lexed token: return FALSE when not a match, otherwise return token
470
- test_match: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(match, indexed_rule) {
471
- var token, lines, backup;
472
- if (this.options.backtrack_lexer) {
473
- backup = {
474
- yylineno: this.yylineno,
475
- yylloc: {
476
- first_line: this.yylloc.first_line,
477
- last_line: this.last_line,
478
- first_column: this.yylloc.first_column,
479
- last_column: this.yylloc.last_column
480
- },
481
- yytext: this.yytext,
482
- match: this.match,
483
- matches: this.matches,
484
- matched: this.matched,
485
- yyleng: this.yyleng,
486
- offset: this.offset,
487
- _more: this._more,
488
- _input: this._input,
489
- yy: this.yy,
490
- conditionStack: this.conditionStack.slice(0),
491
- done: this.done
492
- };
493
- if (this.options.ranges) {
494
- backup.yylloc.range = this.yylloc.range.slice(0);
495
- }
496
- }
497
- lines = match[0].match(/(?:\r\n?|\n).*/g);
498
- if (lines) {
499
- this.yylineno += lines.length;
500
- }
501
- this.yylloc = {
502
- first_line: this.yylloc.last_line,
503
- last_line: this.yylineno + 1,
504
- first_column: this.yylloc.last_column,
505
- last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
506
- };
507
- this.yytext += match[0];
508
- this.match += match[0];
509
- this.matches = match;
510
- this.yyleng = this.yytext.length;
511
- if (this.options.ranges) {
512
- this.yylloc.range = [this.offset, this.offset += this.yyleng];
513
- }
514
- this._more = false;
515
- this._backtrack = false;
516
- this._input = this._input.slice(match[0].length);
517
- this.matched += match[0];
518
- token = this.performAction.call(this, this.yy, this, indexed_rule, this.conditionStack[this.conditionStack.length - 1]);
519
- if (this.done && this._input) {
520
- this.done = false;
521
- }
522
- if (token) {
523
- return token;
524
- } else if (this._backtrack) {
525
- for (var k in backup) {
526
- this[k] = backup[k];
527
- }
528
- return false;
529
- }
530
- return false;
531
- }, "test_match"),
532
- // return next match in input
533
- next: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
534
- if (this.done) {
535
- return this.EOF;
536
- }
537
- if (!this._input) {
538
- this.done = true;
539
- }
540
- var token, match, tempMatch, index;
541
- if (!this._more) {
542
- this.yytext = "";
543
- this.match = "";
544
- }
545
- var rules = this._currentRules();
546
- for (var i = 0; i < rules.length; i++) {
547
- tempMatch = this._input.match(this.rules[rules[i]]);
548
- if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
549
- match = tempMatch;
550
- index = i;
551
- if (this.options.backtrack_lexer) {
552
- token = this.test_match(tempMatch, rules[i]);
553
- if (token !== false) {
554
- return token;
555
- } else if (this._backtrack) {
556
- match = false;
557
- continue;
558
- } else {
559
- return false;
560
- }
561
- } else if (!this.options.flex) {
562
- break;
563
- }
564
- }
565
- }
566
- if (match) {
567
- token = this.test_match(match, rules[index]);
568
- if (token !== false) {
569
- return token;
570
- }
571
- return false;
572
- }
573
- if (this._input === "") {
574
- return this.EOF;
575
- } else {
576
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
577
- text: "",
578
- token: null,
579
- line: this.yylineno
580
- });
581
- }
582
- }, "next"),
583
- // return next match that has a token
584
- lex: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function lex() {
585
- var r = this.next();
586
- if (r) {
587
- return r;
588
- } else {
589
- return this.lex();
590
- }
591
- }, "lex"),
592
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
593
- begin: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function begin(condition) {
594
- this.conditionStack.push(condition);
595
- }, "begin"),
596
- // pop the previously active lexer condition state off the condition stack
597
- popState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function popState() {
598
- var n = this.conditionStack.length - 1;
599
- if (n > 0) {
600
- return this.conditionStack.pop();
601
- } else {
602
- return this.conditionStack[0];
603
- }
604
- }, "popState"),
605
- // produce the lexer rule set which is active for the currently active lexer condition state
606
- _currentRules: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function _currentRules() {
607
- if (this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1]) {
608
- return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
609
- } else {
610
- return this.conditions["INITIAL"].rules;
611
- }
612
- }, "_currentRules"),
613
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
614
- topState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function topState(n) {
615
- n = this.conditionStack.length - 1 - Math.abs(n || 0);
616
- if (n >= 0) {
617
- return this.conditionStack[n];
618
- } else {
619
- return "INITIAL";
620
- }
621
- }, "topState"),
622
- // alias for begin(condition)
623
- pushState: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function pushState(condition) {
624
- this.begin(condition);
625
- }, "pushState"),
626
- // return the number of states currently on the stack
627
- stateStackSize: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function stateStackSize() {
628
- return this.conditionStack.length;
629
- }, "stateStackSize"),
630
- options: { "case-insensitive": true },
631
- performAction: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
632
- var YYSTATE = YY_START;
633
- switch ($avoiding_name_collisions) {
634
- case 0:
635
- break;
636
- case 1:
637
- break;
638
- case 2:
639
- return 10;
640
- break;
641
- case 3:
642
- break;
643
- case 4:
644
- break;
645
- case 5:
646
- return 4;
647
- break;
648
- case 6:
649
- return 11;
650
- break;
651
- case 7:
652
- this.begin("acc_title");
653
- return 12;
654
- break;
655
- case 8:
656
- this.popState();
657
- return "acc_title_value";
658
- break;
659
- case 9:
660
- this.begin("acc_descr");
661
- return 14;
662
- break;
663
- case 10:
664
- this.popState();
665
- return "acc_descr_value";
666
- break;
667
- case 11:
668
- this.begin("acc_descr_multiline");
669
- break;
670
- case 12:
671
- this.popState();
672
- break;
673
- case 13:
674
- return "acc_descr_multiline_value";
675
- break;
676
- case 14:
677
- return 17;
678
- break;
679
- case 15:
680
- return 18;
681
- break;
682
- case 16:
683
- return 19;
684
- break;
685
- case 17:
686
- return ":";
687
- break;
688
- case 18:
689
- return 6;
690
- break;
691
- case 19:
692
- return "INVALID";
693
- break;
694
- }
695
- }, "anonymous"),
696
- 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],
697
- 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 } }
698
- };
699
- return lexer2;
700
- }();
701
- parser2.lexer = lexer;
702
- function Parser() {
703
- this.yy = {};
704
- }
705
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(Parser, "Parser");
706
- Parser.prototype = parser2;
707
- parser2.Parser = Parser;
708
- return new Parser();
709
- }();
710
- parser.parser = parser;
711
- var journey_default = parser;
712
-
713
- // src/diagrams/user-journey/journeyDb.js
714
- var currentSection = "";
715
- var sections = [];
716
- var tasks = [];
717
- var rawTasks = [];
718
- var clear2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
719
- sections.length = 0;
720
- tasks.length = 0;
721
- currentSection = "";
722
- rawTasks.length = 0;
723
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .clear */ .IU)();
724
- }, "clear");
725
- var addSection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(txt) {
726
- currentSection = txt;
727
- sections.push(txt);
728
- }, "addSection");
729
- var getSections = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
730
- return sections;
731
- }, "getSections");
732
- var getTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
733
- let allItemsProcessed = compileTasks();
734
- const maxDepth = 100;
735
- let iterationCount = 0;
736
- while (!allItemsProcessed && iterationCount < maxDepth) {
737
- allItemsProcessed = compileTasks();
738
- iterationCount++;
739
- }
740
- tasks.push(...rawTasks);
741
- return tasks;
742
- }, "getTasks");
743
- var updateActors = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
744
- const tempActors = [];
745
- tasks.forEach((task) => {
746
- if (task.people) {
747
- tempActors.push(...task.people);
748
- }
749
- });
750
- const unique = new Set(tempActors);
751
- return [...unique].sort();
752
- }, "updateActors");
753
- var addTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(descr, taskData) {
754
- const pieces = taskData.substr(1).split(":");
755
- let score = 0;
756
- let peeps = [];
757
- if (pieces.length === 1) {
758
- score = Number(pieces[0]);
759
- peeps = [];
760
- } else {
761
- score = Number(pieces[0]);
762
- peeps = pieces[1].split(",");
763
- }
764
- const peopleList = peeps.map((s) => s.trim());
765
- const rawTask = {
766
- section: currentSection,
767
- type: currentSection,
768
- people: peopleList,
769
- task: descr,
770
- score
771
- };
772
- rawTasks.push(rawTask);
773
- }, "addTask");
774
- var addTaskOrg = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(descr) {
775
- const newTask = {
776
- section: currentSection,
777
- type: currentSection,
778
- description: descr,
779
- task: descr,
780
- classes: []
781
- };
782
- tasks.push(newTask);
783
- }, "addTaskOrg");
784
- var compileTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
785
- const compileTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(pos) {
786
- return rawTasks[pos].processed;
787
- }, "compileTask");
788
- let allProcessed = true;
789
- for (const [i, rawTask] of rawTasks.entries()) {
790
- compileTask(i);
791
- allProcessed = allProcessed && rawTask.processed;
792
- }
793
- return allProcessed;
794
- }, "compileTasks");
795
- var getActors = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
796
- return updateActors();
797
- }, "getActors");
798
- var journeyDb_default = {
799
- getConfig: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(() => (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey, "getConfig"),
800
- clear: clear2,
801
- setDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .setDiagramTitle */ .ke,
802
- getDiagramTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getDiagramTitle */ .ab,
803
- setAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .setAccTitle */ .SV,
804
- getAccTitle: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getAccTitle */ .iN,
805
- setAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .setAccDescription */ .EI,
806
- getAccDescription: _chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getAccDescription */ .m7,
807
- addSection,
808
- getSections,
809
- getTasks,
810
- addTask,
811
- addTaskOrg,
812
- getActors
813
- };
814
-
815
- // src/diagrams/user-journey/styles.js
816
- var getStyles = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((options) => `.label {
817
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
818
- font-family: var(--mermaid-font-family);
819
- color: ${options.textColor};
820
- }
821
- .mouth {
822
- stroke: #666;
823
- }
824
-
825
- line {
826
- stroke: ${options.textColor}
827
- }
828
-
829
- .legend {
830
- fill: ${options.textColor};
831
- }
832
-
833
- .label text {
834
- fill: #333;
835
- }
836
- .label {
837
- color: ${options.textColor}
838
- }
839
-
840
- .face {
841
- ${options.faceColor ? `fill: ${options.faceColor}` : "fill: #FFF8DC"};
842
- stroke: #999;
843
- }
844
-
845
- .node rect,
846
- .node circle,
847
- .node ellipse,
848
- .node polygon,
849
- .node path {
850
- fill: ${options.mainBkg};
851
- stroke: ${options.nodeBorder};
852
- stroke-width: 1px;
853
- }
854
-
855
- .node .label {
856
- text-align: center;
857
- }
858
- .node.clickable {
859
- cursor: pointer;
860
- }
861
-
862
- .arrowheadPath {
863
- fill: ${options.arrowheadColor};
864
- }
865
-
866
- .edgePath .path {
867
- stroke: ${options.lineColor};
868
- stroke-width: 1.5px;
869
- }
870
-
871
- .flowchart-link {
872
- stroke: ${options.lineColor};
873
- fill: none;
874
- }
875
-
876
- .edgeLabel {
877
- background-color: ${options.edgeLabelBackground};
878
- rect {
879
- opacity: 0.5;
880
- }
881
- text-align: center;
882
- }
883
-
884
- .cluster rect {
885
- }
886
-
887
- .cluster text {
888
- fill: ${options.titleColor};
889
- }
890
-
891
- div.mermaidTooltip {
892
- position: absolute;
893
- text-align: center;
894
- max-width: 200px;
895
- padding: 2px;
896
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
897
- font-family: var(--mermaid-font-family);
898
- font-size: 12px;
899
- background: ${options.tertiaryColor};
900
- border: 1px solid ${options.border2};
901
- border-radius: 2px;
902
- pointer-events: none;
903
- z-index: 100;
904
- }
905
-
906
- .task-type-0, .section-type-0 {
907
- ${options.fillType0 ? `fill: ${options.fillType0}` : ""};
908
- }
909
- .task-type-1, .section-type-1 {
910
- ${options.fillType0 ? `fill: ${options.fillType1}` : ""};
911
- }
912
- .task-type-2, .section-type-2 {
913
- ${options.fillType0 ? `fill: ${options.fillType2}` : ""};
914
- }
915
- .task-type-3, .section-type-3 {
916
- ${options.fillType0 ? `fill: ${options.fillType3}` : ""};
917
- }
918
- .task-type-4, .section-type-4 {
919
- ${options.fillType0 ? `fill: ${options.fillType4}` : ""};
920
- }
921
- .task-type-5, .section-type-5 {
922
- ${options.fillType0 ? `fill: ${options.fillType5}` : ""};
923
- }
924
- .task-type-6, .section-type-6 {
925
- ${options.fillType0 ? `fill: ${options.fillType6}` : ""};
926
- }
927
- .task-type-7, .section-type-7 {
928
- ${options.fillType0 ? `fill: ${options.fillType7}` : ""};
929
- }
930
-
931
- .actor-0 {
932
- ${options.actor0 ? `fill: ${options.actor0}` : ""};
933
- }
934
- .actor-1 {
935
- ${options.actor1 ? `fill: ${options.actor1}` : ""};
936
- }
937
- .actor-2 {
938
- ${options.actor2 ? `fill: ${options.actor2}` : ""};
939
- }
940
- .actor-3 {
941
- ${options.actor3 ? `fill: ${options.actor3}` : ""};
942
- }
943
- .actor-4 {
944
- ${options.actor4 ? `fill: ${options.actor4}` : ""};
945
- }
946
- .actor-5 {
947
- ${options.actor5 ? `fill: ${options.actor5}` : ""};
948
- }
949
- `, "getStyles");
950
- var styles_default = getStyles;
951
-
952
- // src/diagrams/user-journey/journeyRenderer.ts
953
-
954
-
955
- // src/diagrams/user-journey/svgDraw.js
956
-
957
- var drawRect2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, rectData) {
958
- return (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawRect */ .tk)(elem, rectData);
959
- }, "drawRect");
960
- var drawFace = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(element, faceData) {
961
- const radius = 15;
962
- const circleElement = element.append("circle").attr("cx", faceData.cx).attr("cy", faceData.cy).attr("class", "face").attr("r", radius).attr("stroke-width", 2).attr("overflow", "visible");
963
- const face = element.append("g");
964
- face.append("circle").attr("cx", faceData.cx - radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
965
- face.append("circle").attr("cx", faceData.cx + radius / 3).attr("cy", faceData.cy - radius / 3).attr("r", 1.5).attr("stroke-width", 2).attr("fill", "#666").attr("stroke", "#666");
966
- function smile(face2) {
967
- const arc = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .arc */ .JLW)().startAngle(Math.PI / 2).endAngle(3 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
968
- face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 2) + ")");
969
- }
970
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(smile, "smile");
971
- function sad(face2) {
972
- const arc = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .arc */ .JLW)().startAngle(3 * Math.PI / 2).endAngle(5 * (Math.PI / 2)).innerRadius(radius / 2).outerRadius(radius / 2.2);
973
- face2.append("path").attr("class", "mouth").attr("d", arc).attr("transform", "translate(" + faceData.cx + "," + (faceData.cy + 7) + ")");
974
- }
975
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(sad, "sad");
976
- function ambivalent(face2) {
977
- face2.append("line").attr("class", "mouth").attr("stroke", 2).attr("x1", faceData.cx - 5).attr("y1", faceData.cy + 7).attr("x2", faceData.cx + 5).attr("y2", faceData.cy + 7).attr("class", "mouth").attr("stroke-width", "1px").attr("stroke", "#666");
978
- }
979
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(ambivalent, "ambivalent");
980
- if (faceData.score > 3) {
981
- smile(face);
982
- } else if (faceData.score < 3) {
983
- sad(face);
984
- } else {
985
- ambivalent(face);
986
- }
987
- return circleElement;
988
- }, "drawFace");
989
- var drawCircle = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(element, circleData) {
990
- const circleElement = element.append("circle");
991
- circleElement.attr("cx", circleData.cx);
992
- circleElement.attr("cy", circleData.cy);
993
- circleElement.attr("class", "actor-" + circleData.pos);
994
- circleElement.attr("fill", circleData.fill);
995
- circleElement.attr("stroke", circleData.stroke);
996
- circleElement.attr("r", circleData.r);
997
- if (circleElement.class !== void 0) {
998
- circleElement.attr("class", circleElement.class);
999
- }
1000
- if (circleData.title !== void 0) {
1001
- circleElement.append("title").text(circleData.title);
1002
- }
1003
- return circleElement;
1004
- }, "drawCircle");
1005
- var drawText2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, textData) {
1006
- return (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawText */ .m)(elem, textData);
1007
- }, "drawText");
1008
- var drawLabel = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, txtObject) {
1009
- function genPoints(x, y, width, height, cut) {
1010
- return x + "," + y + " " + (x + width) + "," + y + " " + (x + width) + "," + (y + height - cut) + " " + (x + width - cut * 1.2) + "," + (y + height) + " " + x + "," + (y + height);
1011
- }
1012
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(genPoints, "genPoints");
1013
- const polygon = elem.append("polygon");
1014
- polygon.attr("points", genPoints(txtObject.x, txtObject.y, 50, 20, 7));
1015
- polygon.attr("class", "labelBox");
1016
- txtObject.y = txtObject.y + txtObject.labelMargin;
1017
- txtObject.x = txtObject.x + 0.5 * txtObject.labelMargin;
1018
- drawText2(elem, txtObject);
1019
- }, "drawLabel");
1020
- var drawSection = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, section, conf2) {
1021
- const g = elem.append("g");
1022
- const rect = (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getNoteRect */ .PB)();
1023
- rect.x = section.x;
1024
- rect.y = section.y;
1025
- rect.fill = section.fill;
1026
- rect.width = conf2.width * section.taskCount + // width of the tasks
1027
- conf2.diagramMarginX * (section.taskCount - 1);
1028
- rect.height = conf2.height;
1029
- rect.class = "journey-section section-type-" + section.num;
1030
- rect.rx = 3;
1031
- rect.ry = 3;
1032
- drawRect2(g, rect);
1033
- _drawTextCandidateFunc(conf2)(
1034
- section.text,
1035
- g,
1036
- rect.x,
1037
- rect.y,
1038
- rect.width,
1039
- rect.height,
1040
- { class: "journey-section section-type-" + section.num },
1041
- conf2,
1042
- section.colour
1043
- );
1044
- }, "drawSection");
1045
- var taskCount = -1;
1046
- var drawTask = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, task, conf2) {
1047
- const center = task.x + conf2.width / 2;
1048
- const g = elem.append("g");
1049
- taskCount++;
1050
- const maxHeight = 300 + 5 * 30;
1051
- g.append("line").attr("id", "task" + taskCount).attr("x1", center).attr("y1", task.y).attr("x2", center).attr("y2", maxHeight).attr("class", "task-line").attr("stroke-width", "1px").attr("stroke-dasharray", "4 2").attr("stroke", "#666");
1052
- drawFace(g, {
1053
- cx: center,
1054
- cy: 300 + (5 - task.score) * 30,
1055
- score: task.score
1056
- });
1057
- const rect = (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .getNoteRect */ .PB)();
1058
- rect.x = task.x;
1059
- rect.y = task.y;
1060
- rect.fill = task.fill;
1061
- rect.width = conf2.width;
1062
- rect.height = conf2.height;
1063
- rect.class = "task task-type-" + task.num;
1064
- rect.rx = 3;
1065
- rect.ry = 3;
1066
- drawRect2(g, rect);
1067
- let xPos = task.x + 14;
1068
- task.people.forEach((person) => {
1069
- const colour = task.actors[person].color;
1070
- const circle = {
1071
- cx: xPos,
1072
- cy: task.y,
1073
- r: 7,
1074
- fill: colour,
1075
- stroke: "#000",
1076
- title: person,
1077
- pos: task.actors[person].position
1078
- };
1079
- drawCircle(g, circle);
1080
- xPos += 10;
1081
- });
1082
- _drawTextCandidateFunc(conf2)(
1083
- task.task,
1084
- g,
1085
- rect.x,
1086
- rect.y,
1087
- rect.width,
1088
- rect.height,
1089
- { class: "task" },
1090
- conf2,
1091
- task.colour
1092
- );
1093
- }, "drawTask");
1094
- var drawBackgroundRect2 = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(elem, bounds2) {
1095
- (0,_chunk_V35ELUW5_mjs__WEBPACK_IMPORTED_MODULE_0__/* .drawBackgroundRect */ .lC)(elem, bounds2);
1096
- }, "drawBackgroundRect");
1097
- var _drawTextCandidateFunc = /* @__PURE__ */ function() {
1098
- function byText(content, g, x, y, width, height, textAttrs, colour) {
1099
- const text = g.append("text").attr("x", x + width / 2).attr("y", y + height / 2 + 5).style("font-color", colour).style("text-anchor", "middle").text(content);
1100
- _setTextAttrs(text, textAttrs);
1101
- }
1102
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(byText, "byText");
1103
- function byTspan(content, g, x, y, width, height, textAttrs, conf2, colour) {
1104
- const { taskFontSize, taskFontFamily } = conf2;
1105
- const lines = content.split(/<br\s*\/?>/gi);
1106
- for (let i = 0; i < lines.length; i++) {
1107
- const dy = i * taskFontSize - taskFontSize * (lines.length - 1) / 2;
1108
- const text = g.append("text").attr("x", x + width / 2).attr("y", y).attr("fill", colour).style("text-anchor", "middle").style("font-size", taskFontSize).style("font-family", taskFontFamily);
1109
- text.append("tspan").attr("x", x + width / 2).attr("dy", dy).text(lines[i]);
1110
- text.attr("y", y + height / 2).attr("dominant-baseline", "central").attr("alignment-baseline", "central");
1111
- _setTextAttrs(text, textAttrs);
1112
- }
1113
- }
1114
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(byTspan, "byTspan");
1115
- function byFo(content, g, x, y, width, height, textAttrs, conf2) {
1116
- const body = g.append("switch");
1117
- const f = body.append("foreignObject").attr("x", x).attr("y", y).attr("width", width).attr("height", height).attr("position", "fixed");
1118
- const text = f.append("xhtml:div").style("display", "table").style("height", "100%").style("width", "100%");
1119
- text.append("div").attr("class", "label").style("display", "table-cell").style("text-align", "center").style("vertical-align", "middle").text(content);
1120
- byTspan(content, body, x, y, width, height, textAttrs, conf2);
1121
- _setTextAttrs(text, textAttrs);
1122
- }
1123
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(byFo, "byFo");
1124
- function _setTextAttrs(toText, fromTextAttrsDict) {
1125
- for (const key in fromTextAttrsDict) {
1126
- if (key in fromTextAttrsDict) {
1127
- toText.attr(key, fromTextAttrsDict[key]);
1128
- }
1129
- }
1130
- }
1131
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(_setTextAttrs, "_setTextAttrs");
1132
- return function(conf2) {
1133
- return conf2.textPlacement === "fo" ? byFo : conf2.textPlacement === "old" ? byText : byTspan;
1134
- };
1135
- }();
1136
- var initGraphics = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(graphics) {
1137
- graphics.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");
1138
- }, "initGraphics");
1139
- var svgDraw_default = {
1140
- drawRect: drawRect2,
1141
- drawCircle,
1142
- drawSection,
1143
- drawText: drawText2,
1144
- drawLabel,
1145
- drawTask,
1146
- drawBackgroundRect: drawBackgroundRect2,
1147
- initGraphics
1148
- };
1149
-
1150
- // src/diagrams/user-journey/journeyRenderer.ts
1151
- var setConf = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(cnf) {
1152
- const keys = Object.keys(cnf);
1153
- keys.forEach(function(key) {
1154
- conf[key] = cnf[key];
1155
- });
1156
- }, "setConf");
1157
- var actors = {};
1158
- function drawActorLegend(diagram2) {
1159
- const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
1160
- let yPos = 60;
1161
- Object.keys(actors).forEach((person) => {
1162
- const colour = actors[person].color;
1163
- const circleData = {
1164
- cx: 20,
1165
- cy: yPos,
1166
- r: 7,
1167
- fill: colour,
1168
- stroke: "#000",
1169
- pos: actors[person].position
1170
- };
1171
- svgDraw_default.drawCircle(diagram2, circleData);
1172
- const labelData = {
1173
- x: 40,
1174
- y: yPos + 7,
1175
- fill: "#666",
1176
- text: person,
1177
- textMargin: conf2.boxTextMargin | 5
1178
- };
1179
- svgDraw_default.drawText(diagram2, labelData);
1180
- yPos += 20;
1181
- });
1182
- }
1183
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(drawActorLegend, "drawActorLegend");
1184
- var conf = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
1185
- var LEFT_MARGIN = conf.leftMargin;
1186
- var draw = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(text, id, version, diagObj) {
1187
- const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
1188
- const securityLevel = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().securityLevel;
1189
- let sandboxElement;
1190
- if (securityLevel === "sandbox") {
1191
- sandboxElement = (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)("#i" + id);
1192
- }
1193
- const root = securityLevel === "sandbox" ? (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)(sandboxElement.nodes()[0].contentDocument.body) : (0,d3__WEBPACK_IMPORTED_MODULE_2__/* .select */ .Ltv)("body");
1194
- bounds.init();
1195
- const diagram2 = root.select("#" + id);
1196
- svgDraw_default.initGraphics(diagram2);
1197
- const tasks2 = diagObj.db.getTasks();
1198
- const title = diagObj.db.getDiagramTitle();
1199
- const actorNames = diagObj.db.getActors();
1200
- for (const member in actors) {
1201
- delete actors[member];
1202
- }
1203
- let actorPos = 0;
1204
- actorNames.forEach((actorName) => {
1205
- actors[actorName] = {
1206
- color: conf2.actorColours[actorPos % conf2.actorColours.length],
1207
- position: actorPos
1208
- };
1209
- actorPos++;
1210
- });
1211
- drawActorLegend(diagram2);
1212
- bounds.insert(0, 0, LEFT_MARGIN, Object.keys(actors).length * 50);
1213
- drawTasks(diagram2, tasks2, 0);
1214
- const box = bounds.getBounds();
1215
- if (title) {
1216
- diagram2.append("text").text(title).attr("x", LEFT_MARGIN).attr("font-size", "4ex").attr("font-weight", "bold").attr("y", 25);
1217
- }
1218
- const height = box.stopy - box.starty + 2 * conf2.diagramMarginY;
1219
- const width = LEFT_MARGIN + box.stopx + 2 * conf2.diagramMarginX;
1220
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .configureSvgSize */ .a$)(diagram2, height, width, conf2.useMaxWidth);
1221
- diagram2.append("line").attr("x1", LEFT_MARGIN).attr("y1", conf2.height * 4).attr("x2", width - LEFT_MARGIN - 4).attr("y2", conf2.height * 4).attr("stroke-width", 4).attr("stroke", "black").attr("marker-end", "url(#arrowhead)");
1222
- const extraVertForTitle = title ? 70 : 0;
1223
- diagram2.attr("viewBox", `${box.startx} -25 ${width} ${height + extraVertForTitle}`);
1224
- diagram2.attr("preserveAspectRatio", "xMinYMin meet");
1225
- diagram2.attr("height", height + extraVertForTitle + 25);
1226
- }, "draw");
1227
- var bounds = {
1228
- data: {
1229
- startx: void 0,
1230
- stopx: void 0,
1231
- starty: void 0,
1232
- stopy: void 0
1233
- },
1234
- verticalPos: 0,
1235
- sequenceItems: [],
1236
- init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
1237
- this.sequenceItems = [];
1238
- this.data = {
1239
- startx: void 0,
1240
- stopx: void 0,
1241
- starty: void 0,
1242
- stopy: void 0
1243
- };
1244
- this.verticalPos = 0;
1245
- }, "init"),
1246
- updateVal: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(obj, key, val, fun) {
1247
- if (obj[key] === void 0) {
1248
- obj[key] = val;
1249
- } else {
1250
- obj[key] = fun(val, obj[key]);
1251
- }
1252
- }, "updateVal"),
1253
- updateBounds: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(startx, starty, stopx, stopy) {
1254
- const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
1255
- const _self = this;
1256
- let cnt = 0;
1257
- function updateFn(type) {
1258
- return /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function updateItemBounds(item) {
1259
- cnt++;
1260
- const n = _self.sequenceItems.length - cnt + 1;
1261
- _self.updateVal(item, "starty", starty - n * conf2.boxMargin, Math.min);
1262
- _self.updateVal(item, "stopy", stopy + n * conf2.boxMargin, Math.max);
1263
- _self.updateVal(bounds.data, "startx", startx - n * conf2.boxMargin, Math.min);
1264
- _self.updateVal(bounds.data, "stopx", stopx + n * conf2.boxMargin, Math.max);
1265
- if (!(type === "activation")) {
1266
- _self.updateVal(item, "startx", startx - n * conf2.boxMargin, Math.min);
1267
- _self.updateVal(item, "stopx", stopx + n * conf2.boxMargin, Math.max);
1268
- _self.updateVal(bounds.data, "starty", starty - n * conf2.boxMargin, Math.min);
1269
- _self.updateVal(bounds.data, "stopy", stopy + n * conf2.boxMargin, Math.max);
1270
- }
1271
- }, "updateItemBounds");
1272
- }
1273
- (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(updateFn, "updateFn");
1274
- this.sequenceItems.forEach(updateFn());
1275
- }, "updateBounds"),
1276
- insert: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(startx, starty, stopx, stopy) {
1277
- const _startx = Math.min(startx, stopx);
1278
- const _stopx = Math.max(startx, stopx);
1279
- const _starty = Math.min(starty, stopy);
1280
- const _stopy = Math.max(starty, stopy);
1281
- this.updateVal(bounds.data, "startx", _startx, Math.min);
1282
- this.updateVal(bounds.data, "starty", _starty, Math.min);
1283
- this.updateVal(bounds.data, "stopx", _stopx, Math.max);
1284
- this.updateVal(bounds.data, "stopy", _stopy, Math.max);
1285
- this.updateBounds(_startx, _starty, _stopx, _stopy);
1286
- }, "insert"),
1287
- bumpVerticalPos: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(bump) {
1288
- this.verticalPos = this.verticalPos + bump;
1289
- this.data.stopy = this.verticalPos;
1290
- }, "bumpVerticalPos"),
1291
- getVerticalPos: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
1292
- return this.verticalPos;
1293
- }, "getVerticalPos"),
1294
- getBounds: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function() {
1295
- return this.data;
1296
- }, "getBounds")
1297
- };
1298
- var fills = conf.sectionFills;
1299
- var textColours = conf.sectionColours;
1300
- var drawTasks = /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)(function(diagram2, tasks2, verticalPos) {
1301
- const conf2 = (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .getConfig2 */ .D7)().journey;
1302
- let lastSection = "";
1303
- const sectionVHeight = conf2.height * 2 + conf2.diagramMarginY;
1304
- const taskPos = verticalPos + sectionVHeight;
1305
- let sectionNumber = 0;
1306
- let fill = "#CCC";
1307
- let colour = "black";
1308
- let num = 0;
1309
- for (const [i, task] of tasks2.entries()) {
1310
- if (lastSection !== task.section) {
1311
- fill = fills[sectionNumber % fills.length];
1312
- num = sectionNumber % fills.length;
1313
- colour = textColours[sectionNumber % textColours.length];
1314
- let taskInSectionCount = 0;
1315
- const currentSection2 = task.section;
1316
- for (let taskIndex = i; taskIndex < tasks2.length; taskIndex++) {
1317
- if (tasks2[taskIndex].section == currentSection2) {
1318
- taskInSectionCount = taskInSectionCount + 1;
1319
- } else {
1320
- break;
1321
- }
1322
- }
1323
- const section = {
1324
- x: i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN,
1325
- y: 50,
1326
- text: task.section,
1327
- fill,
1328
- num,
1329
- colour,
1330
- taskCount: taskInSectionCount
1331
- };
1332
- svgDraw_default.drawSection(diagram2, section, conf2);
1333
- lastSection = task.section;
1334
- sectionNumber++;
1335
- }
1336
- const taskActors = task.people.reduce((acc, actorName) => {
1337
- if (actors[actorName]) {
1338
- acc[actorName] = actors[actorName];
1339
- }
1340
- return acc;
1341
- }, {});
1342
- task.x = i * conf2.taskMargin + i * conf2.width + LEFT_MARGIN;
1343
- task.y = taskPos;
1344
- task.width = conf2.diagramMarginX;
1345
- task.height = conf2.diagramMarginY;
1346
- task.colour = colour;
1347
- task.fill = fill;
1348
- task.num = num;
1349
- task.actors = taskActors;
1350
- svgDraw_default.drawTask(diagram2, task, conf2);
1351
- bounds.insert(task.x, task.y, task.x + task.width + conf2.taskMargin, 300 + 5 * 30);
1352
- }
1353
- }, "drawTasks");
1354
- var journeyRenderer_default = {
1355
- setConf,
1356
- draw
1357
- };
1358
-
1359
- // src/diagrams/user-journey/journeyDiagram.ts
1360
- var diagram = {
1361
- parser: journey_default,
1362
- db: journeyDb_default,
1363
- renderer: journeyRenderer_default,
1364
- styles: styles_default,
1365
- init: /* @__PURE__ */ (0,_chunk_S24QXQKS_mjs__WEBPACK_IMPORTED_MODULE_1__/* .__name */ .K2)((cnf) => {
1366
- journeyRenderer_default.setConf(cnf.journey);
1367
- journeyDb_default.clear();
1368
- }, "init")
1369
- };
1370
-
1371
-
1372
-
1373
- /***/ })
1374
-
1375
- };
1376
- ;