@digipair/skill-web-chatbot 0.89.0 → 0.91.0-0

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 (136) hide show
  1. package/.swcrc +28 -0
  2. package/README.md +7 -0
  3. package/eslint.config.mjs +22 -0
  4. package/package.json +22 -7
  5. package/rollup.config.cjs +28 -0
  6. package/src/digipair__engine.d.ts +2 -0
  7. package/src/handlebars.d.ts +1 -0
  8. package/src/index.html +18 -0
  9. package/src/lib/chat.element.ts +603 -0
  10. package/src/lib/common.data.ts +1 -0
  11. package/src/lib/config.ts +30 -0
  12. package/src/lib/digipair-full.data.ts +101 -0
  13. package/src/lib/digipair-full.element.ts +358 -0
  14. package/src/lib/digipair.data.ts +103 -0
  15. package/src/lib/digipair.element.ts +446 -0
  16. package/src/lib/inputs.element.ts +46 -0
  17. package/src/lib/mermaid.d.ts +1 -0
  18. package/src/lib/message.interface.ts +10 -0
  19. package/src/lib/pins/chatbot.actions.ts +32 -0
  20. package/src/lib/tools/css-selector.ts +12 -0
  21. package/tsconfig.json +13 -0
  22. package/tsconfig.lib.json +19 -0
  23. package/SAP-icons.cjs.js +0 -2489
  24. package/SAP-icons.cjs2.js +0 -2489
  25. package/SAP-icons.esm.js +0 -2482
  26. package/SAP-icons.esm2.js +0 -2482
  27. package/Tableau10-558cc280.cjs.js +0 -9
  28. package/Tableau10-558cc280.esm.js +0 -7
  29. package/arc-d1f6357e.cjs.js +0 -88
  30. package/arc-d1f6357e.esm.js +0 -86
  31. package/array-2ff2c7a6.cjs.js +0 -7
  32. package/array-2ff2c7a6.esm.js +0 -5
  33. package/blockDiagram-5dc23a45.cjs.js +0 -2921
  34. package/blockDiagram-5dc23a45.esm.js +0 -2919
  35. package/c4Diagram-1e775db3.cjs.js +0 -4387
  36. package/c4Diagram-1e775db3.esm.js +0 -4385
  37. package/channel-ebbc4130.cjs.js +0 -9
  38. package/channel-ebbc4130.esm.js +0 -7
  39. package/classDiagram-f52caa06.cjs.js +0 -209
  40. package/classDiagram-f52caa06.esm.js +0 -207
  41. package/classDiagram-v2-640c694e.cjs.js +0 -401
  42. package/classDiagram-v2-640c694e.esm.js +0 -399
  43. package/clone-afc2f047.cjs.js +0 -10
  44. package/clone-afc2f047.esm.js +0 -8
  45. package/createText-03b82060.cjs.js +0 -2936
  46. package/createText-03b82060.esm.js +0 -2933
  47. package/edges-16357fde.cjs.js +0 -1998
  48. package/edges-16357fde.esm.js +0 -1981
  49. package/erDiagram-c7ff1bec.cjs.js +0 -1807
  50. package/erDiagram-c7ff1bec.esm.js +0 -1805
  51. package/flowDb-9a89ea33.cjs.js +0 -5542
  52. package/flowDb-9a89ea33.esm.js +0 -5538
  53. package/flowDiagram-aadb13b0.cjs.js +0 -1351
  54. package/flowDiagram-aadb13b0.esm.js +0 -1349
  55. package/flowDiagram-v2-f2119625.cjs.js +0 -31
  56. package/flowDiagram-v2-f2119625.esm.js +0 -29
  57. package/flowchart-elk-definition-cf813a97.cjs.js +0 -50257
  58. package/flowchart-elk-definition-cf813a97.esm.js +0 -50255
  59. package/ganttDiagram-3c2fde2b.cjs.js +0 -3710
  60. package/ganttDiagram-3c2fde2b.esm.js +0 -3708
  61. package/gitGraphDiagram-c3a0619c.cjs.js +0 -3820
  62. package/gitGraphDiagram-c3a0619c.esm.js +0 -3818
  63. package/graph-0ee63739.cjs.js +0 -961
  64. package/graph-0ee63739.esm.js +0 -938
  65. package/index-bb6d8841.cjs.js +0 -648
  66. package/index-bb6d8841.esm.js +0 -646
  67. package/index.cjs.d.ts +0 -1
  68. package/index.cjs.js +0 -17
  69. package/index.cjs2.js +0 -60723
  70. package/index.esm.js +0 -1
  71. package/index.esm2.js +0 -60574
  72. package/infoDiagram-2f5c50c0.cjs.js +0 -460
  73. package/infoDiagram-2f5c50c0.esm.js +0 -458
  74. package/init-f9637058.cjs.js +0 -17
  75. package/init-f9637058.esm.js +0 -15
  76. package/journeyDiagram-14fe341a.cjs.js +0 -1061
  77. package/journeyDiagram-14fe341a.esm.js +0 -1059
  78. package/katex-d90b6d29.cjs.js +0 -25690
  79. package/katex-d90b6d29.esm.js +0 -25688
  80. package/layout-fd473db2.cjs.js +0 -1626
  81. package/layout-fd473db2.esm.js +0 -1619
  82. package/libs/engine/src/index.d.ts +0 -2
  83. package/libs/engine/src/lib/alias.interface.d.ts +0 -9
  84. package/libs/engine/src/lib/engine.d.ts +0 -13
  85. package/libs/engine/src/lib/pins-settings.interface.d.ts +0 -15
  86. package/libs/skill-web-chatbot/src/lib/chat.element.d.ts +0 -28
  87. package/libs/skill-web-chatbot/src/lib/common.data.d.ts +0 -1
  88. package/libs/skill-web-chatbot/src/lib/config.d.ts +0 -9
  89. package/libs/skill-web-chatbot/src/lib/digipair-full.data.d.ts +0 -1
  90. package/libs/skill-web-chatbot/src/lib/digipair-full.element.d.ts +0 -36
  91. package/libs/skill-web-chatbot/src/lib/digipair.data.d.ts +0 -1
  92. package/libs/skill-web-chatbot/src/lib/digipair.element.d.ts +0 -44
  93. package/libs/skill-web-chatbot/src/lib/inputs.element.d.ts +0 -10
  94. package/libs/skill-web-chatbot/src/lib/message.interface.d.ts +0 -10
  95. package/libs/skill-web-chatbot/src/lib/pins/chatbot.actions.d.ts +0 -1
  96. package/libs/skill-web-chatbot/src/lib/tools/css-selector.d.ts +0 -1
  97. package/line-24d93f1b.cjs.js +0 -34
  98. package/line-24d93f1b.esm.js +0 -32
  99. package/linear-9bcf74c4.cjs.js +0 -537
  100. package/linear-9bcf74c4.esm.js +0 -531
  101. package/mindmap-definition-9399c7e6.cjs.js +0 -20489
  102. package/mindmap-definition-9399c7e6.esm.js +0 -20487
  103. package/ordinal-5695958c.cjs.js +0 -331
  104. package/ordinal-5695958c.esm.js +0 -329
  105. package/path-428ebac9.cjs.js +0 -317
  106. package/path-428ebac9.esm.js +0 -314
  107. package/pieDiagram-828dae43.cjs.js +0 -951
  108. package/pieDiagram-828dae43.esm.js +0 -949
  109. package/quadrantDiagram-5fa00455.cjs.js +0 -2410
  110. package/quadrantDiagram-5fa00455.esm.js +0 -2408
  111. package/requirementDiagram-03163dc4.cjs.js +0 -2267
  112. package/requirementDiagram-03163dc4.esm.js +0 -2265
  113. package/sankeyDiagram-52ec8976.cjs.js +0 -1848
  114. package/sankeyDiagram-52ec8976.esm.js +0 -1846
  115. package/sequenceDiagram-b517d154.cjs.js +0 -5949
  116. package/sequenceDiagram-b517d154.esm.js +0 -5947
  117. package/stateDiagram-fca82b5b.cjs.js +0 -283
  118. package/stateDiagram-fca82b5b.esm.js +0 -281
  119. package/stateDiagram-v2-ed04200a.cjs.js +0 -373
  120. package/stateDiagram-v2-ed04200a.esm.js +0 -371
  121. package/styles-11e81fdd.cjs.js +0 -3944
  122. package/styles-11e81fdd.esm.js +0 -3940
  123. package/styles-cacbff60.cjs.js +0 -2120
  124. package/styles-cacbff60.esm.js +0 -2111
  125. package/styles-e75131e4.cjs.js +0 -671
  126. package/styles-e75131e4.esm.js +0 -661
  127. package/svgDrawCommon-ecc5f780.cjs.js +0 -68
  128. package/svgDrawCommon-ecc5f780.esm.js +0 -60
  129. package/timeline-definition-4ee9bff4.cjs.js +0 -1161
  130. package/timeline-definition-4ee9bff4.esm.js +0 -1159
  131. package/xychartDiagram-e5e6b652.cjs.js +0 -3150
  132. package/xychartDiagram-e5e6b652.esm.js +0 -3148
  133. /package/{index.d.ts → src/index.d.ts} +0 -0
  134. /package/{libs/skill-web-chatbot/src/index.d.ts → src/index.ts} +0 -0
  135. /package/{schema.fr.json → src/schema.fr.json} +0 -0
  136. /package/{schema.json → src/schema.json} +0 -0
@@ -1,317 +0,0 @@
1
- 'use strict';
2
-
3
- function _class_call_check(instance, Constructor) {
4
- if (!(instance instanceof Constructor)) {
5
- throw new TypeError("Cannot call a class as a function");
6
- }
7
- }
8
- function _defineProperties(target, props) {
9
- for(var i = 0; i < props.length; i++){
10
- var descriptor = props[i];
11
- descriptor.enumerable = descriptor.enumerable || false;
12
- descriptor.configurable = true;
13
- if ("value" in descriptor) descriptor.writable = true;
14
- Object.defineProperty(target, descriptor.key, descriptor);
15
- }
16
- }
17
- function _create_class(Constructor, protoProps, staticProps) {
18
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
19
- if (staticProps) _defineProperties(Constructor, staticProps);
20
- return Constructor;
21
- }
22
- function _tagged_template_literal(strings, raw) {
23
- if (!raw) {
24
- raw = strings.slice(0);
25
- }
26
- return Object.freeze(Object.defineProperties(strings, {
27
- raw: {
28
- value: Object.freeze(raw)
29
- }
30
- }));
31
- }
32
- function _templateObject() {
33
- var data = _tagged_template_literal([
34
- "M",
35
- ",",
36
- ""
37
- ]);
38
- _templateObject = function _templateObject() {
39
- return data;
40
- };
41
- return data;
42
- }
43
- function _templateObject1() {
44
- var data = _tagged_template_literal([
45
- "Z"
46
- ]);
47
- _templateObject1 = function _templateObject() {
48
- return data;
49
- };
50
- return data;
51
- }
52
- function _templateObject2() {
53
- var data = _tagged_template_literal([
54
- "L",
55
- ",",
56
- ""
57
- ]);
58
- _templateObject2 = function _templateObject() {
59
- return data;
60
- };
61
- return data;
62
- }
63
- function _templateObject3() {
64
- var data = _tagged_template_literal([
65
- "Q",
66
- ",",
67
- ",",
68
- ",",
69
- ""
70
- ]);
71
- _templateObject3 = function _templateObject() {
72
- return data;
73
- };
74
- return data;
75
- }
76
- function _templateObject4() {
77
- var data = _tagged_template_literal([
78
- "C",
79
- ",",
80
- ",",
81
- ",",
82
- ",",
83
- ",",
84
- ""
85
- ]);
86
- _templateObject4 = function _templateObject() {
87
- return data;
88
- };
89
- return data;
90
- }
91
- function _templateObject5() {
92
- var data = _tagged_template_literal([
93
- "M",
94
- ",",
95
- ""
96
- ]);
97
- _templateObject5 = function _templateObject() {
98
- return data;
99
- };
100
- return data;
101
- }
102
- function _templateObject6() {
103
- var data = _tagged_template_literal([
104
- "L",
105
- ",",
106
- ""
107
- ]);
108
- _templateObject6 = function _templateObject() {
109
- return data;
110
- };
111
- return data;
112
- }
113
- function _templateObject7() {
114
- var data = _tagged_template_literal([
115
- "L",
116
- ",",
117
- ""
118
- ]);
119
- _templateObject7 = function _templateObject() {
120
- return data;
121
- };
122
- return data;
123
- }
124
- function _templateObject8() {
125
- var data = _tagged_template_literal([
126
- "A",
127
- ",",
128
- ",0,0,",
129
- ",",
130
- ",",
131
- ""
132
- ]);
133
- _templateObject8 = function _templateObject() {
134
- return data;
135
- };
136
- return data;
137
- }
138
- function _templateObject9() {
139
- var data = _tagged_template_literal([
140
- "M",
141
- ",",
142
- ""
143
- ]);
144
- _templateObject9 = function _templateObject() {
145
- return data;
146
- };
147
- return data;
148
- }
149
- function _templateObject10() {
150
- var data = _tagged_template_literal([
151
- "L",
152
- ",",
153
- ""
154
- ]);
155
- _templateObject10 = function _templateObject() {
156
- return data;
157
- };
158
- return data;
159
- }
160
- function _templateObject11() {
161
- var data = _tagged_template_literal([
162
- "A",
163
- ",",
164
- ",0,1,",
165
- ",",
166
- ",",
167
- "A",
168
- ",",
169
- ",0,1,",
170
- ",",
171
- ",",
172
- ""
173
- ]);
174
- _templateObject11 = function _templateObject() {
175
- return data;
176
- };
177
- return data;
178
- }
179
- function _templateObject12() {
180
- var data = _tagged_template_literal([
181
- "A",
182
- ",",
183
- ",0,",
184
- ",",
185
- ",",
186
- ",",
187
- ""
188
- ]);
189
- _templateObject12 = function _templateObject() {
190
- return data;
191
- };
192
- return data;
193
- }
194
- function _templateObject13() {
195
- var data = _tagged_template_literal([
196
- "M",
197
- ",",
198
- "h",
199
- "v",
200
- "h",
201
- "Z"
202
- ]);
203
- _templateObject13 = function _templateObject() {
204
- return data;
205
- };
206
- return data;
207
- }
208
- var c = Math.PI, x = 2 * c, u = 1e-6, m = x - u;
209
- function E(e) {
210
- this._ += e[0];
211
- for(var t = 1, h = e.length; t < h; ++t)this._ += arguments[t] + e[t];
212
- }
213
- function A(e) {
214
- var t = Math.floor(e);
215
- if (!(t >= 0)) throw new Error("invalid digits: ".concat(e));
216
- if (t > 15) return E;
217
- var h = Math.pow(10, t);
218
- return function(i) {
219
- this._ += i[0];
220
- for(var s = 1, n = i.length; s < n; ++s)this._ += Math.round(arguments[s] * h) / h + i[s];
221
- };
222
- }
223
- var L = /*#__PURE__*/ function() {
224
- function L(t) {
225
- _class_call_check(this, L);
226
- this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = t == null ? E : A(t);
227
- }
228
- _create_class(L, [
229
- {
230
- key: "moveTo",
231
- value: function moveTo(t, h) {
232
- this._append(_templateObject(), this._x0 = this._x1 = +t, this._y0 = this._y1 = +h);
233
- }
234
- },
235
- {
236
- key: "closePath",
237
- value: function closePath() {
238
- this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append(_templateObject1()));
239
- }
240
- },
241
- {
242
- key: "lineTo",
243
- value: function lineTo(t, h) {
244
- this._append(_templateObject2(), this._x1 = +t, this._y1 = +h);
245
- }
246
- },
247
- {
248
- key: "quadraticCurveTo",
249
- value: function quadraticCurveTo(t, h, i, s) {
250
- this._append(_templateObject3(), +t, +h, this._x1 = +i, this._y1 = +s);
251
- }
252
- },
253
- {
254
- key: "bezierCurveTo",
255
- value: function bezierCurveTo(t, h, i, s, n, $) {
256
- this._append(_templateObject4(), +t, +h, +i, +s, this._x1 = +n, this._y1 = +$);
257
- }
258
- },
259
- {
260
- key: "arcTo",
261
- value: function arcTo(t, h, i, s, n) {
262
- if (t = +t, h = +h, i = +i, s = +s, n = +n, n < 0) throw new Error("negative radius: ".concat(n));
263
- var $ = this._x1, r = this._y1, p = i - t, l = s - h, _ = $ - t, o = r - h, a = _ * _ + o * o;
264
- if (this._x1 === null) this._append(_templateObject5(), this._x1 = t, this._y1 = h);
265
- else if (a > u) if (!(Math.abs(o * p - l * _) > u) || !n) this._append(_templateObject6(), this._x1 = t, this._y1 = h);
266
- else {
267
- var d = i - $, f = s - r, y = p * p + l * l, T = d * d + f * f, g = Math.sqrt(y), v = Math.sqrt(a), w = n * Math.tan((c - Math.acos((y + a - T) / (2 * g * v))) / 2), M = w / v, b = w / g;
268
- Math.abs(M - 1) > u && this._append(_templateObject7(), t + M * _, h + M * o), this._append(_templateObject8(), n, n, +(o * d > _ * f), this._x1 = t + b * p, this._y1 = h + b * l);
269
- }
270
- }
271
- },
272
- {
273
- key: "arc",
274
- value: function arc(t, h, i, s, n, $) {
275
- if (t = +t, h = +h, i = +i, $ = !!$, i < 0) throw new Error("negative radius: ".concat(i));
276
- var r = i * Math.cos(s), p = i * Math.sin(s), l = t + r, _ = h + p, o = 1 ^ $, a = $ ? s - n : n - s;
277
- this._x1 === null ? this._append(_templateObject9(), l, _) : (Math.abs(this._x1 - l) > u || Math.abs(this._y1 - _) > u) && this._append(_templateObject10(), l, _), i && (a < 0 && (a = a % x + x), a > m ? this._append(_templateObject11(), i, i, o, t - r, h - p, i, i, o, this._x1 = l, this._y1 = _) : a > u && this._append(_templateObject12(), i, i, +(a >= c), o, this._x1 = t + i * Math.cos(n), this._y1 = h + i * Math.sin(n)));
278
- }
279
- },
280
- {
281
- key: "rect",
282
- value: function rect(t, h, i, s) {
283
- this._append(_templateObject13(), this._x0 = this._x1 = +t, this._y0 = this._y1 = +h, i = +i, +s, -i);
284
- }
285
- },
286
- {
287
- key: "toString",
288
- value: function toString() {
289
- return this._;
290
- }
291
- }
292
- ]);
293
- return L;
294
- }();
295
- function P(e) {
296
- return function() {
297
- return e;
298
- };
299
- }
300
- function q(e) {
301
- var t = 3;
302
- return e.digits = function(h) {
303
- if (!arguments.length) return t;
304
- if (h == null) t = null;
305
- else {
306
- var i = Math.floor(h);
307
- if (!(i >= 0)) throw new RangeError("invalid digits: ".concat(h));
308
- t = i;
309
- }
310
- return e;
311
- }, function() {
312
- return new L(t);
313
- };
314
- }
315
-
316
- exports.P = P;
317
- exports.q = q;
@@ -1,314 +0,0 @@
1
- function _class_call_check(instance, Constructor) {
2
- if (!(instance instanceof Constructor)) {
3
- throw new TypeError("Cannot call a class as a function");
4
- }
5
- }
6
- function _defineProperties(target, props) {
7
- for(var i = 0; i < props.length; i++){
8
- var descriptor = props[i];
9
- descriptor.enumerable = descriptor.enumerable || false;
10
- descriptor.configurable = true;
11
- if ("value" in descriptor) descriptor.writable = true;
12
- Object.defineProperty(target, descriptor.key, descriptor);
13
- }
14
- }
15
- function _create_class(Constructor, protoProps, staticProps) {
16
- if (protoProps) _defineProperties(Constructor.prototype, protoProps);
17
- if (staticProps) _defineProperties(Constructor, staticProps);
18
- return Constructor;
19
- }
20
- function _tagged_template_literal(strings, raw) {
21
- if (!raw) {
22
- raw = strings.slice(0);
23
- }
24
- return Object.freeze(Object.defineProperties(strings, {
25
- raw: {
26
- value: Object.freeze(raw)
27
- }
28
- }));
29
- }
30
- function _templateObject() {
31
- var data = _tagged_template_literal([
32
- "M",
33
- ",",
34
- ""
35
- ]);
36
- _templateObject = function _templateObject() {
37
- return data;
38
- };
39
- return data;
40
- }
41
- function _templateObject1() {
42
- var data = _tagged_template_literal([
43
- "Z"
44
- ]);
45
- _templateObject1 = function _templateObject() {
46
- return data;
47
- };
48
- return data;
49
- }
50
- function _templateObject2() {
51
- var data = _tagged_template_literal([
52
- "L",
53
- ",",
54
- ""
55
- ]);
56
- _templateObject2 = function _templateObject() {
57
- return data;
58
- };
59
- return data;
60
- }
61
- function _templateObject3() {
62
- var data = _tagged_template_literal([
63
- "Q",
64
- ",",
65
- ",",
66
- ",",
67
- ""
68
- ]);
69
- _templateObject3 = function _templateObject() {
70
- return data;
71
- };
72
- return data;
73
- }
74
- function _templateObject4() {
75
- var data = _tagged_template_literal([
76
- "C",
77
- ",",
78
- ",",
79
- ",",
80
- ",",
81
- ",",
82
- ""
83
- ]);
84
- _templateObject4 = function _templateObject() {
85
- return data;
86
- };
87
- return data;
88
- }
89
- function _templateObject5() {
90
- var data = _tagged_template_literal([
91
- "M",
92
- ",",
93
- ""
94
- ]);
95
- _templateObject5 = function _templateObject() {
96
- return data;
97
- };
98
- return data;
99
- }
100
- function _templateObject6() {
101
- var data = _tagged_template_literal([
102
- "L",
103
- ",",
104
- ""
105
- ]);
106
- _templateObject6 = function _templateObject() {
107
- return data;
108
- };
109
- return data;
110
- }
111
- function _templateObject7() {
112
- var data = _tagged_template_literal([
113
- "L",
114
- ",",
115
- ""
116
- ]);
117
- _templateObject7 = function _templateObject() {
118
- return data;
119
- };
120
- return data;
121
- }
122
- function _templateObject8() {
123
- var data = _tagged_template_literal([
124
- "A",
125
- ",",
126
- ",0,0,",
127
- ",",
128
- ",",
129
- ""
130
- ]);
131
- _templateObject8 = function _templateObject() {
132
- return data;
133
- };
134
- return data;
135
- }
136
- function _templateObject9() {
137
- var data = _tagged_template_literal([
138
- "M",
139
- ",",
140
- ""
141
- ]);
142
- _templateObject9 = function _templateObject() {
143
- return data;
144
- };
145
- return data;
146
- }
147
- function _templateObject10() {
148
- var data = _tagged_template_literal([
149
- "L",
150
- ",",
151
- ""
152
- ]);
153
- _templateObject10 = function _templateObject() {
154
- return data;
155
- };
156
- return data;
157
- }
158
- function _templateObject11() {
159
- var data = _tagged_template_literal([
160
- "A",
161
- ",",
162
- ",0,1,",
163
- ",",
164
- ",",
165
- "A",
166
- ",",
167
- ",0,1,",
168
- ",",
169
- ",",
170
- ""
171
- ]);
172
- _templateObject11 = function _templateObject() {
173
- return data;
174
- };
175
- return data;
176
- }
177
- function _templateObject12() {
178
- var data = _tagged_template_literal([
179
- "A",
180
- ",",
181
- ",0,",
182
- ",",
183
- ",",
184
- ",",
185
- ""
186
- ]);
187
- _templateObject12 = function _templateObject() {
188
- return data;
189
- };
190
- return data;
191
- }
192
- function _templateObject13() {
193
- var data = _tagged_template_literal([
194
- "M",
195
- ",",
196
- "h",
197
- "v",
198
- "h",
199
- "Z"
200
- ]);
201
- _templateObject13 = function _templateObject() {
202
- return data;
203
- };
204
- return data;
205
- }
206
- var c = Math.PI, x = 2 * c, u = 1e-6, m = x - u;
207
- function E(e) {
208
- this._ += e[0];
209
- for(var t = 1, h = e.length; t < h; ++t)this._ += arguments[t] + e[t];
210
- }
211
- function A(e) {
212
- var t = Math.floor(e);
213
- if (!(t >= 0)) throw new Error("invalid digits: ".concat(e));
214
- if (t > 15) return E;
215
- var h = Math.pow(10, t);
216
- return function(i) {
217
- this._ += i[0];
218
- for(var s = 1, n = i.length; s < n; ++s)this._ += Math.round(arguments[s] * h) / h + i[s];
219
- };
220
- }
221
- var L = /*#__PURE__*/ function() {
222
- function L(t) {
223
- _class_call_check(this, L);
224
- this._x0 = this._y0 = this._x1 = this._y1 = null, this._ = "", this._append = t == null ? E : A(t);
225
- }
226
- _create_class(L, [
227
- {
228
- key: "moveTo",
229
- value: function moveTo(t, h) {
230
- this._append(_templateObject(), this._x0 = this._x1 = +t, this._y0 = this._y1 = +h);
231
- }
232
- },
233
- {
234
- key: "closePath",
235
- value: function closePath() {
236
- this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append(_templateObject1()));
237
- }
238
- },
239
- {
240
- key: "lineTo",
241
- value: function lineTo(t, h) {
242
- this._append(_templateObject2(), this._x1 = +t, this._y1 = +h);
243
- }
244
- },
245
- {
246
- key: "quadraticCurveTo",
247
- value: function quadraticCurveTo(t, h, i, s) {
248
- this._append(_templateObject3(), +t, +h, this._x1 = +i, this._y1 = +s);
249
- }
250
- },
251
- {
252
- key: "bezierCurveTo",
253
- value: function bezierCurveTo(t, h, i, s, n, $) {
254
- this._append(_templateObject4(), +t, +h, +i, +s, this._x1 = +n, this._y1 = +$);
255
- }
256
- },
257
- {
258
- key: "arcTo",
259
- value: function arcTo(t, h, i, s, n) {
260
- if (t = +t, h = +h, i = +i, s = +s, n = +n, n < 0) throw new Error("negative radius: ".concat(n));
261
- var $ = this._x1, r = this._y1, p = i - t, l = s - h, _ = $ - t, o = r - h, a = _ * _ + o * o;
262
- if (this._x1 === null) this._append(_templateObject5(), this._x1 = t, this._y1 = h);
263
- else if (a > u) if (!(Math.abs(o * p - l * _) > u) || !n) this._append(_templateObject6(), this._x1 = t, this._y1 = h);
264
- else {
265
- var d = i - $, f = s - r, y = p * p + l * l, T = d * d + f * f, g = Math.sqrt(y), v = Math.sqrt(a), w = n * Math.tan((c - Math.acos((y + a - T) / (2 * g * v))) / 2), M = w / v, b = w / g;
266
- Math.abs(M - 1) > u && this._append(_templateObject7(), t + M * _, h + M * o), this._append(_templateObject8(), n, n, +(o * d > _ * f), this._x1 = t + b * p, this._y1 = h + b * l);
267
- }
268
- }
269
- },
270
- {
271
- key: "arc",
272
- value: function arc(t, h, i, s, n, $) {
273
- if (t = +t, h = +h, i = +i, $ = !!$, i < 0) throw new Error("negative radius: ".concat(i));
274
- var r = i * Math.cos(s), p = i * Math.sin(s), l = t + r, _ = h + p, o = 1 ^ $, a = $ ? s - n : n - s;
275
- this._x1 === null ? this._append(_templateObject9(), l, _) : (Math.abs(this._x1 - l) > u || Math.abs(this._y1 - _) > u) && this._append(_templateObject10(), l, _), i && (a < 0 && (a = a % x + x), a > m ? this._append(_templateObject11(), i, i, o, t - r, h - p, i, i, o, this._x1 = l, this._y1 = _) : a > u && this._append(_templateObject12(), i, i, +(a >= c), o, this._x1 = t + i * Math.cos(n), this._y1 = h + i * Math.sin(n)));
276
- }
277
- },
278
- {
279
- key: "rect",
280
- value: function rect(t, h, i, s) {
281
- this._append(_templateObject13(), this._x0 = this._x1 = +t, this._y0 = this._y1 = +h, i = +i, +s, -i);
282
- }
283
- },
284
- {
285
- key: "toString",
286
- value: function toString() {
287
- return this._;
288
- }
289
- }
290
- ]);
291
- return L;
292
- }();
293
- function P(e) {
294
- return function() {
295
- return e;
296
- };
297
- }
298
- function q(e) {
299
- var t = 3;
300
- return e.digits = function(h) {
301
- if (!arguments.length) return t;
302
- if (h == null) t = null;
303
- else {
304
- var i = Math.floor(h);
305
- if (!(i >= 0)) throw new RangeError("invalid digits: ".concat(h));
306
- t = i;
307
- }
308
- return e;
309
- }, function() {
310
- return new L(t);
311
- };
312
- }
313
-
314
- export { P, q };