@digipair/skill-web-chatbot 0.114.2 → 0.114.3

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 (49) hide show
  1. package/dist/index.cjs.js +2118 -8
  2. package/dist/index.esm2.js +5 -5
  3. package/package.json +6 -2
  4. package/dist/SAP-icons.cjs.js +0 -2489
  5. package/dist/SAP-icons.cjs2.js +0 -2489
  6. package/dist/Tableau10-558cc280.cjs.js +0 -9
  7. package/dist/arc-d1f6357e.cjs.js +0 -88
  8. package/dist/array-2ff2c7a6.cjs.js +0 -11
  9. package/dist/blockDiagram-5dc23a45.cjs.js +0 -2916
  10. package/dist/c4Diagram-1e775db3.cjs.js +0 -4386
  11. package/dist/channel-ebbc4130.cjs.js +0 -9
  12. package/dist/classDiagram-f52caa06.cjs.js +0 -209
  13. package/dist/classDiagram-v2-640c694e.cjs.js +0 -401
  14. package/dist/clone-afc2f047.cjs.js +0 -10
  15. package/dist/createText-03b82060.cjs.js +0 -2940
  16. package/dist/edges-16357fde.cjs.js +0 -2002
  17. package/dist/erDiagram-c7ff1bec.cjs.js +0 -1807
  18. package/dist/flowDb-9a89ea33.cjs.js +0 -5542
  19. package/dist/flowDiagram-aadb13b0.cjs.js +0 -1351
  20. package/dist/flowDiagram-v2-f2119625.cjs.js +0 -31
  21. package/dist/flowchart-elk-definition-cf813a97.cjs.js +0 -50248
  22. package/dist/ganttDiagram-3c2fde2b.cjs.js +0 -3710
  23. package/dist/gitGraphDiagram-c3a0619c.cjs.js +0 -3815
  24. package/dist/graph-0ee63739.cjs.js +0 -954
  25. package/dist/index-bb6d8841.cjs.js +0 -648
  26. package/dist/index.cjs2.js +0 -76743
  27. package/dist/infoDiagram-2f5c50c0.cjs.js +0 -460
  28. package/dist/init-f9637058.cjs.js +0 -17
  29. package/dist/journeyDiagram-14fe341a.cjs.js +0 -1061
  30. package/dist/katex-d90b6d29.cjs.js +0 -25690
  31. package/dist/layout-fd473db2.cjs.js +0 -1613
  32. package/dist/line-24d93f1b.cjs.js +0 -34
  33. package/dist/linear-9bcf74c4.cjs.js +0 -537
  34. package/dist/mindmap-definition-9399c7e6.cjs.js +0 -20488
  35. package/dist/ordinal-5695958c.cjs.js +0 -330
  36. package/dist/path-428ebac9.cjs.js +0 -316
  37. package/dist/pieDiagram-828dae43.cjs.js +0 -949
  38. package/dist/quadrantDiagram-5fa00455.cjs.js +0 -2409
  39. package/dist/requirementDiagram-03163dc4.cjs.js +0 -2267
  40. package/dist/sankeyDiagram-52ec8976.cjs.js +0 -1848
  41. package/dist/sequenceDiagram-b517d154.cjs.js +0 -5948
  42. package/dist/stateDiagram-fca82b5b.cjs.js +0 -283
  43. package/dist/stateDiagram-v2-ed04200a.cjs.js +0 -373
  44. package/dist/styles-11e81fdd.cjs.js +0 -3943
  45. package/dist/styles-cacbff60.cjs.js +0 -2120
  46. package/dist/styles-e75131e4.cjs.js +0 -671
  47. package/dist/svgDrawCommon-ecc5f780.cjs.js +0 -68
  48. package/dist/timeline-definition-4ee9bff4.cjs.js +0 -1161
  49. package/dist/xychartDiagram-e5e6b652.cjs.js +0 -3150
@@ -1,949 +0,0 @@
1
- 'use strict';
2
-
3
- var index = require('./index.cjs2.js');
4
- var arcD1f6357e = require('./arc-d1f6357e.cjs.js');
5
- var ordinal5695958c = require('./ordinal-5695958c.cjs.js');
6
- var array2ff2c7a6 = require('./array-2ff2c7a6.cjs.js');
7
- var path428ebac9 = require('./path-428ebac9.cjs.js');
8
- require('./init-f9637058.cjs.js');
9
-
10
- function _array_like_to_array(arr, len) {
11
- if (len == null || len > arr.length) len = arr.length;
12
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
13
- return arr2;
14
- }
15
- function _array_with_holes(arr) {
16
- if (Array.isArray(arr)) return arr;
17
- }
18
- function _array_without_holes(arr) {
19
- if (Array.isArray(arr)) return _array_like_to_array(arr);
20
- }
21
- function _instanceof(left, right) {
22
- if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {
23
- return !!right[Symbol.hasInstance](left);
24
- } else {
25
- return left instanceof right;
26
- }
27
- }
28
- function _iterable_to_array(iter) {
29
- if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
30
- }
31
- function _iterable_to_array_limit(arr, i) {
32
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
33
- if (_i == null) return;
34
- var _arr = [];
35
- var _n = true;
36
- var _d = false;
37
- var _s, _e;
38
- try {
39
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
40
- _arr.push(_s.value);
41
- if (i && _arr.length === i) break;
42
- }
43
- } catch (err) {
44
- _d = true;
45
- _e = err;
46
- } finally{
47
- try {
48
- if (!_n && _i["return"] != null) _i["return"]();
49
- } finally{
50
- if (_d) throw _e;
51
- }
52
- }
53
- return _arr;
54
- }
55
- function _non_iterable_rest() {
56
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
57
- }
58
- function _non_iterable_spread() {
59
- throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
60
- }
61
- function _sliced_to_array(arr, i) {
62
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
63
- }
64
- function _to_consumable_array(arr) {
65
- return _array_without_holes(arr) || _iterable_to_array(arr) || _unsupported_iterable_to_array(arr) || _non_iterable_spread();
66
- }
67
- function _type_of(obj) {
68
- "@swc/helpers - typeof";
69
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
70
- }
71
- function _unsupported_iterable_to_array(o, minLen) {
72
- if (!o) return;
73
- if (typeof o === "string") return _array_like_to_array(o, minLen);
74
- var n = Object.prototype.toString.call(o).slice(8, -1);
75
- if (n === "Object" && o.constructor) n = o.constructor.name;
76
- if (n === "Map" || n === "Set") return Array.from(n);
77
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
78
- }
79
- function vt(e, u) {
80
- return u < e ? -1 : u > e ? 1 : u >= e ? 0 : NaN;
81
- }
82
- function bt(e) {
83
- return e;
84
- }
85
- function St() {
86
- var e = bt, u = vt, E = null, p = path428ebac9.P(0), g = path428ebac9.P(index.m1), A = path428ebac9.P(0);
87
- function y(a) {
88
- var l, d = (a = array2ff2c7a6.t(a)).length, m, I, $ = 0, _ = new Array(d), v = new Array(d), o = +p.apply(this, arguments), T = Math.min(index.m1, Math.max(-index.m1, g.apply(this, arguments) - o)), O, w = Math.min(Math.abs(T) / d, A.apply(this, arguments)), b = w * (T < 0 ? -1 : 1), t;
89
- for(l = 0; l < d; ++l)(t = v[_[l] = l] = +e(a[l], l, a)) > 0 && ($ += t);
90
- for(u != null ? _.sort(function(i, n) {
91
- return u(v[i], v[n]);
92
- }) : E != null && _.sort(function(i, n) {
93
- return E(a[i], a[n]);
94
- }), l = 0, I = $ ? (T - d * b) / $ : 0; l < d; ++l, o = O)m = _[l], t = v[m], O = o + (t > 0 ? t * I : 0) + b, v[m] = {
95
- data: a[m],
96
- index: l,
97
- value: t,
98
- startAngle: o,
99
- endAngle: O,
100
- padAngle: w
101
- };
102
- return v;
103
- }
104
- return y.value = function(a) {
105
- return arguments.length ? (e = typeof a == "function" ? a : path428ebac9.P(+a), y) : e;
106
- }, y.sortValues = function(a) {
107
- return arguments.length ? (u = a, E = null, y) : u;
108
- }, y.sort = function(a) {
109
- return arguments.length ? (E = a, u = null, y) : E;
110
- }, y.startAngle = function(a) {
111
- return arguments.length ? (p = typeof a == "function" ? a : path428ebac9.P(+a), y) : p;
112
- }, y.endAngle = function(a) {
113
- return arguments.length ? (g = typeof a == "function" ? a : path428ebac9.P(+a), y) : g;
114
- }, y.padAngle = function(a) {
115
- return arguments.length ? (A = typeof a == "function" ? a : path428ebac9.P(+a), y) : A;
116
- }, y;
117
- }
118
- var J = function() {
119
- var e = function e(b, t, i, n) {
120
- for(i = i || {}, n = b.length; n--; i[b[n]] = t);
121
- return i;
122
- }, u = [
123
- 1,
124
- 3
125
- ], E = [
126
- 1,
127
- 4
128
- ], p = [
129
- 1,
130
- 5
131
- ], g = [
132
- 1,
133
- 6
134
- ], A = [
135
- 1,
136
- 10,
137
- 12,
138
- 14,
139
- 16,
140
- 18,
141
- 19,
142
- 20,
143
- 21,
144
- 22
145
- ], y = [
146
- 2,
147
- 4
148
- ], a = [
149
- 1,
150
- 5,
151
- 10,
152
- 12,
153
- 14,
154
- 16,
155
- 18,
156
- 19,
157
- 20,
158
- 21,
159
- 22
160
- ], l = [
161
- 20,
162
- 21,
163
- 22
164
- ], d = [
165
- 2,
166
- 7
167
- ], m = [
168
- 1,
169
- 12
170
- ], I = [
171
- 1,
172
- 13
173
- ], $ = [
174
- 1,
175
- 14
176
- ], _ = [
177
- 1,
178
- 15
179
- ], v = [
180
- 1,
181
- 16
182
- ], o = [
183
- 1,
184
- 17
185
- ], T = {
186
- trace: function trace() {},
187
- yy: {},
188
- symbols_: {
189
- error: 2,
190
- start: 3,
191
- eol: 4,
192
- PIE: 5,
193
- document: 6,
194
- showData: 7,
195
- line: 8,
196
- statement: 9,
197
- txt: 10,
198
- value: 11,
199
- title: 12,
200
- title_value: 13,
201
- acc_title: 14,
202
- acc_title_value: 15,
203
- acc_descr: 16,
204
- acc_descr_value: 17,
205
- acc_descr_multiline_value: 18,
206
- section: 19,
207
- NEWLINE: 20,
208
- ";": 21,
209
- EOF: 22,
210
- $accept: 0,
211
- $end: 1
212
- },
213
- terminals_: {
214
- 2: "error",
215
- 5: "PIE",
216
- 7: "showData",
217
- 10: "txt",
218
- 11: "value",
219
- 12: "title",
220
- 13: "title_value",
221
- 14: "acc_title",
222
- 15: "acc_title_value",
223
- 16: "acc_descr",
224
- 17: "acc_descr_value",
225
- 18: "acc_descr_multiline_value",
226
- 19: "section",
227
- 20: "NEWLINE",
228
- 21: ";",
229
- 22: "EOF"
230
- },
231
- productions_: [
232
- 0,
233
- [
234
- 3,
235
- 2
236
- ],
237
- [
238
- 3,
239
- 2
240
- ],
241
- [
242
- 3,
243
- 3
244
- ],
245
- [
246
- 6,
247
- 0
248
- ],
249
- [
250
- 6,
251
- 2
252
- ],
253
- [
254
- 8,
255
- 2
256
- ],
257
- [
258
- 9,
259
- 0
260
- ],
261
- [
262
- 9,
263
- 2
264
- ],
265
- [
266
- 9,
267
- 2
268
- ],
269
- [
270
- 9,
271
- 2
272
- ],
273
- [
274
- 9,
275
- 2
276
- ],
277
- [
278
- 9,
279
- 1
280
- ],
281
- [
282
- 9,
283
- 1
284
- ],
285
- [
286
- 4,
287
- 1
288
- ],
289
- [
290
- 4,
291
- 1
292
- ],
293
- [
294
- 4,
295
- 1
296
- ]
297
- ],
298
- performAction: function performAction(t, i, n, r, c, s, V) {
299
- var x = s.length - 1;
300
- switch(c){
301
- case 3:
302
- r.setShowData(true);
303
- break;
304
- case 6:
305
- this.$ = s[x - 1];
306
- break;
307
- case 8:
308
- r.addSection(s[x - 1], r.cleanupValue(s[x]));
309
- break;
310
- case 9:
311
- this.$ = s[x].trim(), r.setDiagramTitle(this.$);
312
- break;
313
- case 10:
314
- this.$ = s[x].trim(), r.setAccTitle(this.$);
315
- break;
316
- case 11:
317
- case 12:
318
- this.$ = s[x].trim(), r.setAccDescription(this.$);
319
- break;
320
- case 13:
321
- r.addSection(s[x].substr(8)), this.$ = s[x].substr(8);
322
- break;
323
- }
324
- },
325
- table: [
326
- {
327
- 3: 1,
328
- 4: 2,
329
- 5: u,
330
- 20: E,
331
- 21: p,
332
- 22: g
333
- },
334
- {
335
- 1: [
336
- 3
337
- ]
338
- },
339
- {
340
- 3: 7,
341
- 4: 2,
342
- 5: u,
343
- 20: E,
344
- 21: p,
345
- 22: g
346
- },
347
- e(A, y, {
348
- 6: 8,
349
- 7: [
350
- 1,
351
- 9
352
- ]
353
- }),
354
- e(a, [
355
- 2,
356
- 14
357
- ]),
358
- e(a, [
359
- 2,
360
- 15
361
- ]),
362
- e(a, [
363
- 2,
364
- 16
365
- ]),
366
- {
367
- 1: [
368
- 2,
369
- 1
370
- ]
371
- },
372
- e(l, d, {
373
- 8: 10,
374
- 9: 11,
375
- 1: [
376
- 2,
377
- 2
378
- ],
379
- 10: m,
380
- 12: I,
381
- 14: $,
382
- 16: _,
383
- 18: v,
384
- 19: o
385
- }),
386
- e(A, y, {
387
- 6: 18
388
- }),
389
- e(A, [
390
- 2,
391
- 5
392
- ]),
393
- {
394
- 4: 19,
395
- 20: E,
396
- 21: p,
397
- 22: g
398
- },
399
- {
400
- 11: [
401
- 1,
402
- 20
403
- ]
404
- },
405
- {
406
- 13: [
407
- 1,
408
- 21
409
- ]
410
- },
411
- {
412
- 15: [
413
- 1,
414
- 22
415
- ]
416
- },
417
- {
418
- 17: [
419
- 1,
420
- 23
421
- ]
422
- },
423
- e(l, [
424
- 2,
425
- 12
426
- ]),
427
- e(l, [
428
- 2,
429
- 13
430
- ]),
431
- e(l, d, {
432
- 8: 10,
433
- 9: 11,
434
- 1: [
435
- 2,
436
- 3
437
- ],
438
- 10: m,
439
- 12: I,
440
- 14: $,
441
- 16: _,
442
- 18: v,
443
- 19: o
444
- }),
445
- e(A, [
446
- 2,
447
- 6
448
- ]),
449
- e(l, [
450
- 2,
451
- 8
452
- ]),
453
- e(l, [
454
- 2,
455
- 9
456
- ]),
457
- e(l, [
458
- 2,
459
- 10
460
- ]),
461
- e(l, [
462
- 2,
463
- 11
464
- ])
465
- ],
466
- defaultActions: {
467
- 7: [
468
- 2,
469
- 1
470
- ]
471
- },
472
- parseError: function parseError(t, i) {
473
- if (i.recoverable) this.trace(t);
474
- else {
475
- var n = new Error(t);
476
- throw n.hash = i, n;
477
- }
478
- },
479
- parse: function parse(t) {
480
- var i = this, n = [
481
- 0
482
- ], r = [], c = [
483
- null
484
- ], s = [], V = this.table, x = "", f = 0, P = 0, R = 2, M = 1, Y = s.slice.call(arguments, 1), h = Object.create(this.lexer), N = {
485
- yy: {}
486
- };
487
- for(var B in this.yy)Object.prototype.hasOwnProperty.call(this.yy, B) && (N.yy[B] = this.yy[B]);
488
- h.setInput(t, N.yy), N.yy.lexer = h, N.yy.parser = this, _type_of(h.yylloc) > "u" && (h.yylloc = {});
489
- var X = h.yylloc;
490
- s.push(X);
491
- var st = h.options && h.options.ranges;
492
- typeof N.yy.parseError == "function" ? this.parseError = N.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
493
- function rt() {
494
- var C;
495
- return C = r.pop() || h.lex() || M, typeof C != "number" && (_instanceof(C, Array) && (r = C, C = r.pop()), C = i.symbols_[C] || C), C;
496
- }
497
- for(var k, L, S, Z, z = {}, W, D, Q, j;;){
498
- if (L = n[n.length - 1], this.defaultActions[L] ? S = this.defaultActions[L] : ((k === null || (typeof k === "undefined" ? "undefined" : _type_of(k)) > "u") && (k = rt()), S = V[L] && V[L][k]), (typeof S === "undefined" ? "undefined" : _type_of(S)) > "u" || !S.length || !S[0]) {
499
- var q = "";
500
- j = [];
501
- for(W in V[L])this.terminals_[W] && W > R && j.push("'" + this.terminals_[W] + "'");
502
- h.showPosition ? q = "Parse error on line " + (f + 1) + ":\n" + h.showPosition() + "\nExpecting " + j.join(", ") + ", got '" + (this.terminals_[k] || k) + "'" : q = "Parse error on line " + (f + 1) + ": Unexpected " + (k == M ? "end of input" : "'" + (this.terminals_[k] || k) + "'"), this.parseError(q, {
503
- text: h.match,
504
- token: this.terminals_[k] || k,
505
- line: h.yylineno,
506
- loc: X,
507
- expected: j
508
- });
509
- }
510
- if (_instanceof(S[0], Array) && S.length > 1) throw new Error("Parse Error: multiple actions possible at state: " + L + ", token: " + k);
511
- switch(S[0]){
512
- case 1:
513
- n.push(k), c.push(h.yytext), s.push(h.yylloc), n.push(S[1]), k = null, P = h.yyleng, x = h.yytext, f = h.yylineno, X = h.yylloc;
514
- break;
515
- case 2:
516
- if (D = this.productions_[S[1]][1], z.$ = c[c.length - D], z._$ = {
517
- first_line: s[s.length - (D || 1)].first_line,
518
- last_line: s[s.length - 1].last_line,
519
- first_column: s[s.length - (D || 1)].first_column,
520
- last_column: s[s.length - 1].last_column
521
- }, st && (z._$.range = [
522
- s[s.length - (D || 1)].range[0],
523
- s[s.length - 1].range[1]
524
- ]), Z = this.performAction.apply(z, [
525
- x,
526
- P,
527
- f,
528
- N.yy,
529
- S[1],
530
- c,
531
- s
532
- ].concat(Y)), (typeof Z === "undefined" ? "undefined" : _type_of(Z)) < "u") return Z;
533
- D && (n = n.slice(0, -1 * D * 2), c = c.slice(0, -1 * D), s = s.slice(0, -1 * D)), n.push(this.productions_[S[1]][0]), c.push(z.$), s.push(z._$), Q = V[n[n.length - 2]][n[n.length - 1]], n.push(Q);
534
- break;
535
- case 3:
536
- return true;
537
- }
538
- }
539
- return true;
540
- }
541
- }, O = function() {
542
- var b = {
543
- EOF: 1,
544
- parseError: function parseError(i, n) {
545
- if (this.yy.parser) this.yy.parser.parseError(i, n);
546
- else throw new Error(i);
547
- },
548
- // resets the lexer, sets new input
549
- setInput: function setInput(t, i) {
550
- return this.yy = i || this.yy || {}, this._input = t, this._more = this._backtrack = this.done = false, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = [
551
- "INITIAL"
552
- ], this.yylloc = {
553
- first_line: 1,
554
- first_column: 0,
555
- last_line: 1,
556
- last_column: 0
557
- }, this.options.ranges && (this.yylloc.range = [
558
- 0,
559
- 0
560
- ]), this.offset = 0, this;
561
- },
562
- // consumes and returns one char from the input
563
- input: function input() {
564
- var t = this._input[0];
565
- this.yytext += t, this.yyleng++, this.offset++, this.match += t, this.matched += t;
566
- var i = t.match(/(?:\r\n?|\n).*/g);
567
- return i ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), t;
568
- },
569
- // unshifts one char (or a string) into the input
570
- unput: function unput(t) {
571
- var i = t.length, n = t.split(/(?:\r\n?|\n)/g);
572
- this._input = t + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - i), this.offset -= i;
573
- var r = this.match.split(/(?:\r\n?|\n)/g);
574
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
575
- var c = this.yylloc.range;
576
- return this.yylloc = {
577
- first_line: this.yylloc.first_line,
578
- last_line: this.yylineno + 1,
579
- first_column: this.yylloc.first_column,
580
- last_column: n ? (n.length === r.length ? this.yylloc.first_column : 0) + r[r.length - n.length].length - n[0].length : this.yylloc.first_column - i
581
- }, this.options.ranges && (this.yylloc.range = [
582
- c[0],
583
- c[0] + this.yyleng - i
584
- ]), this.yyleng = this.yytext.length, this;
585
- },
586
- // When called from action, caches matched text and appends it on next action
587
- more: function more() {
588
- return this._more = true, this;
589
- },
590
- // 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.
591
- reject: function reject() {
592
- if (this.options.backtrack_lexer) this._backtrack = true;
593
- else return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n" + this.showPosition(), {
594
- text: "",
595
- token: null,
596
- line: this.yylineno
597
- });
598
- return this;
599
- },
600
- // retain first n characters of the match
601
- less: function less(t) {
602
- this.unput(this.match.slice(t));
603
- },
604
- // displays already matched input, i.e. for error messages
605
- pastInput: function pastInput() {
606
- var t = this.matched.substr(0, this.matched.length - this.match.length);
607
- return (t.length > 20 ? "..." : "") + t.substr(-20).replace(/\n/g, "");
608
- },
609
- // displays upcoming input, i.e. for error messages
610
- upcomingInput: function upcomingInput() {
611
- var t = this.match;
612
- return t.length < 20 && (t += this._input.substr(0, 20 - t.length)), (t.substr(0, 20) + (t.length > 20 ? "..." : "")).replace(/\n/g, "");
613
- },
614
- // displays the character position where the lexing error occurred, i.e. for error messages
615
- showPosition: function showPosition() {
616
- var t = this.pastInput(), i = new Array(t.length + 1).join("-");
617
- return t + this.upcomingInput() + "\n" + i + "^";
618
- },
619
- // test the lexed token: return FALSE when not a match, otherwise return token
620
- test_match: function test_match(t, i) {
621
- var n, r, c;
622
- if (this.options.backtrack_lexer && (c = {
623
- yylineno: this.yylineno,
624
- yylloc: {
625
- first_line: this.yylloc.first_line,
626
- last_line: this.last_line,
627
- first_column: this.yylloc.first_column,
628
- last_column: this.yylloc.last_column
629
- },
630
- yytext: this.yytext,
631
- match: this.match,
632
- matches: this.matches,
633
- matched: this.matched,
634
- yyleng: this.yyleng,
635
- offset: this.offset,
636
- _more: this._more,
637
- _input: this._input,
638
- yy: this.yy,
639
- conditionStack: this.conditionStack.slice(0),
640
- done: this.done
641
- }, this.options.ranges && (c.yylloc.range = this.yylloc.range.slice(0))), r = t[0].match(/(?:\r\n?|\n).*/g), r && (this.yylineno += r.length), this.yylloc = {
642
- first_line: this.yylloc.last_line,
643
- last_line: this.yylineno + 1,
644
- first_column: this.yylloc.last_column,
645
- last_column: r ? r[r.length - 1].length - r[r.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + t[0].length
646
- }, this.yytext += t[0], this.match += t[0], this.matches = t, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [
647
- this.offset,
648
- this.offset += this.yyleng
649
- ]), this._more = false, this._backtrack = false, this._input = this._input.slice(t[0].length), this.matched += t[0], n = this.performAction.call(this, this.yy, this, i, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = false), n) return n;
650
- if (this._backtrack) {
651
- for(var s in c)this[s] = c[s];
652
- return false;
653
- }
654
- return false;
655
- },
656
- // return next match in input
657
- next: function next() {
658
- if (this.done) return this.EOF;
659
- this._input || (this.done = true);
660
- var t, i, n, r;
661
- this._more || (this.yytext = "", this.match = "");
662
- for(var c = this._currentRules(), s = 0; s < c.length; s++)if (n = this._input.match(this.rules[c[s]]), n && (!i || n[0].length > i[0].length)) {
663
- if (i = n, r = s, this.options.backtrack_lexer) {
664
- if (t = this.test_match(n, c[s]), t !== false) return t;
665
- if (this._backtrack) {
666
- i = false;
667
- continue;
668
- } else return false;
669
- } else if (!this.options.flex) break;
670
- }
671
- return i ? (t = this.test_match(i, c[r]), t !== false ? t : false) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), {
672
- text: "",
673
- token: null,
674
- line: this.yylineno
675
- });
676
- },
677
- // return next match that has a token
678
- lex: function lex() {
679
- var i = this.next();
680
- return i || this.lex();
681
- },
682
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
683
- begin: function begin(i) {
684
- this.conditionStack.push(i);
685
- },
686
- // pop the previously active lexer condition state off the condition stack
687
- popState: function popState() {
688
- var i = this.conditionStack.length - 1;
689
- return i > 0 ? this.conditionStack.pop() : this.conditionStack[0];
690
- },
691
- // produce the lexer rule set which is active for the currently active lexer condition state
692
- _currentRules: function _currentRules() {
693
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
694
- },
695
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
696
- topState: function topState(i) {
697
- return i = this.conditionStack.length - 1 - Math.abs(i || 0), i >= 0 ? this.conditionStack[i] : "INITIAL";
698
- },
699
- // alias for begin(condition)
700
- pushState: function pushState(i) {
701
- this.begin(i);
702
- },
703
- // return the number of states currently on the stack
704
- stateStackSize: function stateStackSize() {
705
- return this.conditionStack.length;
706
- },
707
- options: {
708
- "case-insensitive": true
709
- },
710
- performAction: function performAction(i, n, r, c) {
711
- switch(r){
712
- case 0:
713
- break;
714
- case 1:
715
- break;
716
- case 2:
717
- return 20;
718
- case 3:
719
- break;
720
- case 4:
721
- break;
722
- case 5:
723
- return this.begin("title"), 12;
724
- case 6:
725
- return this.popState(), "title_value";
726
- case 7:
727
- return this.begin("acc_title"), 14;
728
- case 8:
729
- return this.popState(), "acc_title_value";
730
- case 9:
731
- return this.begin("acc_descr"), 16;
732
- case 10:
733
- return this.popState(), "acc_descr_value";
734
- case 11:
735
- this.begin("acc_descr_multiline");
736
- break;
737
- case 12:
738
- this.popState();
739
- break;
740
- case 13:
741
- return "acc_descr_multiline_value";
742
- case 14:
743
- this.begin("string");
744
- break;
745
- case 15:
746
- this.popState();
747
- break;
748
- case 16:
749
- return "txt";
750
- case 17:
751
- return 5;
752
- case 18:
753
- return 7;
754
- case 19:
755
- return "value";
756
- case 20:
757
- return 22;
758
- }
759
- },
760
- rules: [
761
- /^(?:%%(?!\{)[^\n]*)/i,
762
- /^(?:[^\}]%%[^\n]*)/i,
763
- /^(?:[\n\r]+)/i,
764
- /^(?:%%[^\n]*)/i,
765
- /^(?:[\s]+)/i,
766
- /^(?:title\b)/i,
767
- /^(?:(?!\n||)*[^\n]*)/i,
768
- /^(?:accTitle\s*:\s*)/i,
769
- /^(?:(?!\n||)*[^\n]*)/i,
770
- /^(?:accDescr\s*:\s*)/i,
771
- /^(?:(?!\n||)*[^\n]*)/i,
772
- /^(?:accDescr\s*\{\s*)/i,
773
- /^(?:[\}])/i,
774
- /^(?:[^\}]*)/i,
775
- /^(?:["])/i,
776
- /^(?:["])/i,
777
- /^(?:[^"]*)/i,
778
- /^(?:pie\b)/i,
779
- /^(?:showData\b)/i,
780
- /^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,
781
- /^(?:$)/i
782
- ],
783
- conditions: {
784
- acc_descr_multiline: {
785
- rules: [
786
- 12,
787
- 13
788
- ],
789
- inclusive: false
790
- },
791
- acc_descr: {
792
- rules: [
793
- 10
794
- ],
795
- inclusive: false
796
- },
797
- acc_title: {
798
- rules: [
799
- 8
800
- ],
801
- inclusive: false
802
- },
803
- title: {
804
- rules: [
805
- 6
806
- ],
807
- inclusive: false
808
- },
809
- string: {
810
- rules: [
811
- 15,
812
- 16
813
- ],
814
- inclusive: false
815
- },
816
- INITIAL: {
817
- rules: [
818
- 0,
819
- 1,
820
- 2,
821
- 3,
822
- 4,
823
- 5,
824
- 7,
825
- 9,
826
- 11,
827
- 14,
828
- 17,
829
- 18,
830
- 19,
831
- 20
832
- ],
833
- inclusive: true
834
- }
835
- }
836
- };
837
- return b;
838
- }();
839
- T.lexer = O;
840
- function w() {
841
- this.yy = {};
842
- }
843
- return w.prototype = T, T.Parser = w, new w();
844
- }();
845
- J.parser = J;
846
- var Et = J, nt = index.yp.pie, G = {
847
- sections: {},
848
- showData: false};
849
- var U = G.sections, K = G.showData;
850
- var At = structuredClone(nt), wt = function() {
851
- return structuredClone(At);
852
- }, $t = function() {
853
- U = structuredClone(G.sections), K = G.showData, index.B_();
854
- }, Tt = function(e, u) {
855
- e = index.ai(e, index.Vn()), U[e] === void 0 && (U[e] = u, index.L.debug("added new section: ".concat(e, ", with value: ").concat(u)));
856
- }, It = function() {
857
- return U;
858
- }, Dt = function(e) {
859
- return e.substring(0, 1) === ":" && (e = e.substring(1).trim()), Number(e.trim());
860
- }, Ct = function(e) {
861
- K = e;
862
- }, Ot = function() {
863
- return K;
864
- }, Vt = {
865
- getConfig: wt,
866
- clear: $t,
867
- setDiagramTitle: index.M_,
868
- getDiagramTitle: index.O_,
869
- setAccTitle: index.F_,
870
- getAccTitle: index.A_,
871
- setAccDescription: index.L_,
872
- getAccDescription: index.E_,
873
- addSection: Tt,
874
- getSections: It,
875
- cleanupValue: Dt,
876
- setShowData: Ct,
877
- getShowData: Ot
878
- }, Pt = function(e) {
879
- return "\n .pieCircle{\n stroke: ".concat(e.pieStrokeColor, ";\n stroke-width : ").concat(e.pieStrokeWidth, ";\n opacity : ").concat(e.pieOpacity, ";\n }\n .pieOuterCircle{\n stroke: ").concat(e.pieOuterStrokeColor, ";\n stroke-width: ").concat(e.pieOuterStrokeWidth, ";\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ").concat(e.pieTitleTextSize, ";\n fill: ").concat(e.pieTitleTextColor, ";\n font-family: ").concat(e.fontFamily, ";\n }\n .slice {\n font-family: ").concat(e.fontFamily, ";\n fill: ").concat(e.pieSectionTextColor, ";\n font-size:").concat(e.pieSectionTextSize, ";\n // fill: white;\n }\n .legend text {\n fill: ").concat(e.pieLegendTextColor, ";\n font-family: ").concat(e.fontFamily, ";\n font-size: ").concat(e.pieLegendTextSize, ";\n }\n");
880
- }, Nt = Pt, Lt = function(e) {
881
- var u = Object.entries(e).map(function(p) {
882
- return {
883
- label: p[0],
884
- value: p[1]
885
- };
886
- }).sort(function(p, g) {
887
- return g.value - p.value;
888
- });
889
- return St().value(function(p) {
890
- return p.value;
891
- })(u);
892
- }, Ft = function(e, u, E, p) {
893
- var _Math;
894
- index.L.debug("rendering pie chart\n" + e);
895
- var g = p.db, A = index.Vn(), y = index.nl(g.getConfig(), A.pie), a = 40, l = 18, d = 4, m = 450, I = m, $ = index.z_(u), _ = $.append("g"), v = g.getSections();
896
- _.attr("transform", "translate(" + I / 2 + "," + m / 2 + ")");
897
- var o = A.themeVariables;
898
- var _mt = _sliced_to_array(index.zn(o.pieOuterStrokeWidth), 1), T = _mt[0];
899
- T !== null && T !== void 0 ? T : T = 2;
900
- var O = y.textPosition, w = Math.min(I, m) / 2 - a, b = arcD1f6357e.vn().innerRadius(0).outerRadius(w), t = arcD1f6357e.vn().innerRadius(w * O).outerRadius(w * O);
901
- _.append("circle").attr("cx", 0).attr("cy", 0).attr("r", w + T / 2).attr("class", "pieOuterCircle");
902
- var i = Lt(v), n = [
903
- o.pie1,
904
- o.pie2,
905
- o.pie3,
906
- o.pie4,
907
- o.pie5,
908
- o.pie6,
909
- o.pie7,
910
- o.pie8,
911
- o.pie9,
912
- o.pie10,
913
- o.pie11,
914
- o.pie12
915
- ], r = ordinal5695958c.h(n);
916
- _.selectAll("mySlices").data(i).enter().append("path").attr("d", b).attr("fill", function(f) {
917
- return r(f.data.label);
918
- }).attr("class", "pieCircle");
919
- var c = 0;
920
- Object.keys(v).forEach(function(f) {
921
- c += v[f];
922
- }), _.selectAll("mySlices").data(i).enter().append("text").text(function(f) {
923
- return (f.data.value / c * 100).toFixed(0) + "%";
924
- }).attr("transform", function(f) {
925
- return "translate(" + t.centroid(f) + ")";
926
- }).style("text-anchor", "middle").attr("class", "slice"), _.append("text").text(g.getDiagramTitle()).attr("x", 0).attr("y", -400 / 2).attr("class", "pieTitleText");
927
- var s = _.selectAll(".legend").data(r.domain()).enter().append("g").attr("class", "legend").attr("transform", function(f, P) {
928
- var R = l + d, M = R * r.domain().length / 2, Y = 12 * l, h = P * R - M;
929
- return "translate(" + Y + "," + h + ")";
930
- });
931
- s.append("rect").attr("width", l).attr("height", l).style("fill", r).style("stroke", r), s.data(i).append("text").attr("x", l + d).attr("y", l - d).text(function(f) {
932
- var _f_data = f.data, P = _f_data.label, R = _f_data.value;
933
- return g.getShowData() ? "".concat(P, " [").concat(R, "]") : P;
934
- });
935
- var V = (_Math = Math).max.apply(_Math, _to_consumable_array(s.selectAll("text").nodes().map(function(f) {
936
- var _ref;
937
- return (_ref = f == null ? void 0 : f.getBoundingClientRect().width) !== null && _ref !== void 0 ? _ref : 0;
938
- }))), x = I + a + l + d + V;
939
- $.attr("viewBox", "0 0 ".concat(x, " ").concat(m)), index.Ol($, m, x, y.useMaxWidth);
940
- }, Rt = {
941
- draw: Ft
942
- }, Yt = {
943
- parser: Et,
944
- db: Vt,
945
- renderer: Rt,
946
- styles: Nt
947
- };
948
-
949
- exports.diagram = Yt;