billboard.js 3.18.0-next.2 → 3.18.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.
- package/dist/billboard.css +1 -1
- package/dist/billboard.js +319 -100
- package/dist/billboard.min.css +1 -1
- package/dist/billboard.min.js +10 -9
- package/dist/billboard.pkgd.js +2059 -1625
- package/dist/billboard.pkgd.min.js +23 -22
- package/dist/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
- package/dist/plugin/billboardjs-plugin-sparkline.js +305 -79
- package/dist/plugin/billboardjs-plugin-sparkline.min.js +4 -4
- package/dist/plugin/billboardjs-plugin-stanford.js +305 -79
- package/dist/plugin/billboardjs-plugin-stanford.min.js +11 -11
- package/dist/plugin/billboardjs-plugin-tableview.js +305 -79
- package/dist/plugin/billboardjs-plugin-tableview.min.js +6 -5
- package/dist/plugin/billboardjs-plugin-textoverlap.js +305 -79
- package/dist/plugin/billboardjs-plugin-textoverlap.min.js +4 -4
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +1743 -1528
- package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +8 -8
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +2047 -1606
- package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +10 -10
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +2048 -1607
- package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +17 -17
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +2049 -1608
- package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +13 -12
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +2050 -1609
- package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +10 -10
- package/dist/theme/dark.css +1 -1
- package/dist/theme/dark.min.css +1 -1
- package/dist/theme/datalab.css +1 -1
- package/dist/theme/datalab.min.css +1 -1
- package/dist/theme/graph.css +1 -1
- package/dist/theme/graph.min.css +1 -1
- package/dist/theme/insight.css +1 -1
- package/dist/theme/insight.min.css +1 -1
- package/dist/theme/modern.css +1 -1
- package/dist/theme/modern.min.css +1 -1
- package/dist-esm/billboard.js +441 -135
- package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
- package/dist-esm/plugin/billboardjs-plugin-tableview.js +416 -102
- package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
- package/package.json +1 -1
- package/src/ChartInternal/ChartInternal.ts +1 -1
- package/src/ChartInternal/internals/tooltip.ts +11 -9
- package/src/config/Options/axis/y2.ts +0 -13
- package/src/config/Options/common/legend.ts +1 -0
- package/src/config/Options/common/point.ts +1 -1
- package/src/config/Options/common/tooltip.ts +3 -1
- package/src/module/sanitize.ts +471 -0
- package/src/module/util.ts +1 -131
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.18.0
|
|
8
|
+
* @version 3.18.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
11
|
*/
|
|
@@ -120,6 +120,308 @@ const [
|
|
|
120
120
|
] = getFallback(win);
|
|
121
121
|
|
|
122
122
|
|
|
123
|
+
;// ./src/module/sanitize.ts
|
|
124
|
+
const ALLOWED_TAGS = /* @__PURE__ */ new Set([
|
|
125
|
+
// HTML tags for tooltip/legend templates
|
|
126
|
+
"span",
|
|
127
|
+
"div",
|
|
128
|
+
"p",
|
|
129
|
+
"br",
|
|
130
|
+
"b",
|
|
131
|
+
"i",
|
|
132
|
+
"em",
|
|
133
|
+
"strong",
|
|
134
|
+
"u",
|
|
135
|
+
"s",
|
|
136
|
+
"sub",
|
|
137
|
+
"sup",
|
|
138
|
+
"ul",
|
|
139
|
+
"ol",
|
|
140
|
+
"li",
|
|
141
|
+
"dl",
|
|
142
|
+
"dt",
|
|
143
|
+
"dd",
|
|
144
|
+
"table",
|
|
145
|
+
"thead",
|
|
146
|
+
"tbody",
|
|
147
|
+
"tfoot",
|
|
148
|
+
"tr",
|
|
149
|
+
"th",
|
|
150
|
+
"td",
|
|
151
|
+
"caption",
|
|
152
|
+
"colgroup",
|
|
153
|
+
"col",
|
|
154
|
+
"hr",
|
|
155
|
+
"pre",
|
|
156
|
+
"code",
|
|
157
|
+
"blockquote",
|
|
158
|
+
"a",
|
|
159
|
+
"img",
|
|
160
|
+
// SVG tags for point patterns
|
|
161
|
+
"svg",
|
|
162
|
+
"g",
|
|
163
|
+
"path",
|
|
164
|
+
"circle",
|
|
165
|
+
"ellipse",
|
|
166
|
+
"rect",
|
|
167
|
+
"line",
|
|
168
|
+
"polyline",
|
|
169
|
+
"polygon",
|
|
170
|
+
"text",
|
|
171
|
+
"tspan",
|
|
172
|
+
"textPath",
|
|
173
|
+
"use",
|
|
174
|
+
"defs",
|
|
175
|
+
"symbol",
|
|
176
|
+
"clipPath",
|
|
177
|
+
"mask",
|
|
178
|
+
"linearGradient",
|
|
179
|
+
"radialGradient",
|
|
180
|
+
"stop",
|
|
181
|
+
"pattern",
|
|
182
|
+
"marker",
|
|
183
|
+
"title",
|
|
184
|
+
"desc"
|
|
185
|
+
]);
|
|
186
|
+
const ALLOWED_ATTRS = /* @__PURE__ */ new Set([
|
|
187
|
+
// Common attributes
|
|
188
|
+
"class",
|
|
189
|
+
"id",
|
|
190
|
+
"style",
|
|
191
|
+
"title",
|
|
192
|
+
"lang",
|
|
193
|
+
"dir",
|
|
194
|
+
// HTML specific
|
|
195
|
+
"href",
|
|
196
|
+
"src",
|
|
197
|
+
"alt",
|
|
198
|
+
"width",
|
|
199
|
+
"height",
|
|
200
|
+
"colspan",
|
|
201
|
+
"rowspan",
|
|
202
|
+
"scope",
|
|
203
|
+
"headers",
|
|
204
|
+
// SVG presentation attributes
|
|
205
|
+
"d",
|
|
206
|
+
"points",
|
|
207
|
+
"x",
|
|
208
|
+
"y",
|
|
209
|
+
"x1",
|
|
210
|
+
"x2",
|
|
211
|
+
"y1",
|
|
212
|
+
"y2",
|
|
213
|
+
"cx",
|
|
214
|
+
"cy",
|
|
215
|
+
"r",
|
|
216
|
+
"rx",
|
|
217
|
+
"ry",
|
|
218
|
+
"dx",
|
|
219
|
+
"dy",
|
|
220
|
+
"viewBox",
|
|
221
|
+
"preserveAspectRatio",
|
|
222
|
+
"transform",
|
|
223
|
+
"fill",
|
|
224
|
+
"fill-opacity",
|
|
225
|
+
"fill-rule",
|
|
226
|
+
"stroke",
|
|
227
|
+
"stroke-width",
|
|
228
|
+
"stroke-opacity",
|
|
229
|
+
"stroke-linecap",
|
|
230
|
+
"stroke-linejoin",
|
|
231
|
+
"stroke-dasharray",
|
|
232
|
+
"stroke-dashoffset",
|
|
233
|
+
"opacity",
|
|
234
|
+
"clip-path",
|
|
235
|
+
"clip-rule",
|
|
236
|
+
"mask",
|
|
237
|
+
"font-family",
|
|
238
|
+
"font-size",
|
|
239
|
+
"font-weight",
|
|
240
|
+
"font-style",
|
|
241
|
+
"text-anchor",
|
|
242
|
+
"dominant-baseline",
|
|
243
|
+
"offset",
|
|
244
|
+
"stop-color",
|
|
245
|
+
"stop-opacity",
|
|
246
|
+
"gradientUnits",
|
|
247
|
+
"gradientTransform",
|
|
248
|
+
"spreadMethod",
|
|
249
|
+
"patternUnits",
|
|
250
|
+
"patternTransform",
|
|
251
|
+
"marker-start",
|
|
252
|
+
"marker-mid",
|
|
253
|
+
"marker-end",
|
|
254
|
+
"markerWidth",
|
|
255
|
+
"markerHeight",
|
|
256
|
+
"refX",
|
|
257
|
+
"refY",
|
|
258
|
+
"xlink:href"
|
|
259
|
+
]);
|
|
260
|
+
const ALLOWED_URI_PROTOCOLS = /* @__PURE__ */ new Set([
|
|
261
|
+
"http:",
|
|
262
|
+
"https:",
|
|
263
|
+
"mailto:"
|
|
264
|
+
]);
|
|
265
|
+
const URI_ATTRS = /* @__PURE__ */ new Set(["href", "src", "xlink:href"]);
|
|
266
|
+
const TAG_NAME_REGEX = /^<\/?([a-zA-Z][a-zA-Z0-9]*)/;
|
|
267
|
+
const CLOSING_TAG_REGEX = /^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/;
|
|
268
|
+
const OPENING_TAG_REGEX = /^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/;
|
|
269
|
+
const ATTR_REGEX = /([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g;
|
|
270
|
+
const URL_IN_STYLE_REGEX = /url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi;
|
|
271
|
+
const DANGEROUS_CSS_PATTERNS = [
|
|
272
|
+
"expression(",
|
|
273
|
+
"behavior:",
|
|
274
|
+
"binding:",
|
|
275
|
+
"@import",
|
|
276
|
+
"@charset",
|
|
277
|
+
"-moz-binding:"
|
|
278
|
+
];
|
|
279
|
+
function decodeHTMLEntities(str) {
|
|
280
|
+
return str.replace(/:/gi, ":").replace(/&newline;/gi, "\n").replace(/&tab;/gi, " ").replace(/ /gi, " ").replace(/</gi, "<").replace(/>/gi, ">").replace(/&/gi, "&").replace(/"/gi, '"').replace(/'/gi, "'").replace(/&#(\d+);/gi, (_, code) => String.fromCharCode(parseInt(code, 10))).replace(/&#x([0-9a-f]+);/gi, (_, code) => String.fromCharCode(parseInt(code, 16)));
|
|
281
|
+
}
|
|
282
|
+
function isSafeURI(uri) {
|
|
283
|
+
const decoded = decodeHTMLEntities(uri).trim();
|
|
284
|
+
const normalized = decoded.replace(/[\s\u0000-\u001f]/g, "").toLowerCase();
|
|
285
|
+
if (!normalized || normalized.startsWith("#")) {
|
|
286
|
+
return true;
|
|
287
|
+
}
|
|
288
|
+
if (normalized.startsWith("/") || normalized.startsWith("./") || normalized.startsWith("../") || !normalized.includes(":")) {
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
const colonIndex = normalized.indexOf(":");
|
|
292
|
+
if (colonIndex > 0) {
|
|
293
|
+
const protocol = normalized.substring(0, colonIndex + 1);
|
|
294
|
+
return ALLOWED_URI_PROTOCOLS.has(protocol);
|
|
295
|
+
}
|
|
296
|
+
return false;
|
|
297
|
+
}
|
|
298
|
+
function sanitizeStyleValue(style) {
|
|
299
|
+
const decoded = decodeHTMLEntities(style);
|
|
300
|
+
const cleaned = decoded.replace(/[\u0000-\u001f]/g, "");
|
|
301
|
+
URL_IN_STYLE_REGEX.lastIndex = 0;
|
|
302
|
+
let match;
|
|
303
|
+
while ((match = URL_IN_STYLE_REGEX.exec(cleaned)) !== null) {
|
|
304
|
+
if (!isSafeURI(match[1])) {
|
|
305
|
+
return null;
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
const normalizedLower = cleaned.toLowerCase().replace(/\s/g, "");
|
|
309
|
+
for (const pattern of DANGEROUS_CSS_PATTERNS) {
|
|
310
|
+
if (normalizedLower.includes(pattern)) {
|
|
311
|
+
return null;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
314
|
+
return style;
|
|
315
|
+
}
|
|
316
|
+
const ATTR_ENCODE_MAP = {
|
|
317
|
+
'"': """,
|
|
318
|
+
"'": "'",
|
|
319
|
+
"`": "`"
|
|
320
|
+
};
|
|
321
|
+
const ATTR_ENCODE_REGEX = /["'`]/g;
|
|
322
|
+
function encodeAttrValue(value) {
|
|
323
|
+
return value.replace(ATTR_ENCODE_REGEX, (char) => ATTR_ENCODE_MAP[char]);
|
|
324
|
+
}
|
|
325
|
+
function sanitizeAttrValue(name, value, wasUnquoted = false) {
|
|
326
|
+
if (URI_ATTRS.has(name)) {
|
|
327
|
+
if (!isSafeURI(value)) {
|
|
328
|
+
return null;
|
|
329
|
+
}
|
|
330
|
+
return wasUnquoted ? encodeAttrValue(value) : value;
|
|
331
|
+
}
|
|
332
|
+
if (name === "style") {
|
|
333
|
+
const sanitizedStyle = sanitizeStyleValue(value);
|
|
334
|
+
if (sanitizedStyle === null) {
|
|
335
|
+
return null;
|
|
336
|
+
}
|
|
337
|
+
return wasUnquoted ? encodeAttrValue(sanitizedStyle) : sanitizedStyle;
|
|
338
|
+
}
|
|
339
|
+
const decoded = decodeHTMLEntities(value).toLowerCase().replace(/\s/g, "");
|
|
340
|
+
if (/\bon\w+=/.test(decoded)) {
|
|
341
|
+
return null;
|
|
342
|
+
}
|
|
343
|
+
return wasUnquoted ? encodeAttrValue(value) : value;
|
|
344
|
+
}
|
|
345
|
+
function extractTagName(tag) {
|
|
346
|
+
const match = tag.match(TAG_NAME_REGEX);
|
|
347
|
+
return match ? match[1].toLowerCase() : null;
|
|
348
|
+
}
|
|
349
|
+
function isAllowedTag(tag) {
|
|
350
|
+
const tagName = extractTagName(tag);
|
|
351
|
+
return tagName !== null && ALLOWED_TAGS.has(tagName);
|
|
352
|
+
}
|
|
353
|
+
function sanitizeTag(fullTag) {
|
|
354
|
+
const closingMatch = fullTag.match(CLOSING_TAG_REGEX);
|
|
355
|
+
if (closingMatch) {
|
|
356
|
+
return `</${closingMatch[1].toLowerCase()}>`;
|
|
357
|
+
}
|
|
358
|
+
const openingMatch = fullTag.match(OPENING_TAG_REGEX);
|
|
359
|
+
if (!openingMatch) {
|
|
360
|
+
return "";
|
|
361
|
+
}
|
|
362
|
+
const [, tagName, attrString, selfClose] = openingMatch;
|
|
363
|
+
const lowerTagName = tagName.toLowerCase();
|
|
364
|
+
const allowedAttrs = [];
|
|
365
|
+
ATTR_REGEX.lastIndex = 0;
|
|
366
|
+
let attrMatch;
|
|
367
|
+
while ((attrMatch = ATTR_REGEX.exec(attrString)) !== null) {
|
|
368
|
+
const attrName = attrMatch[1].toLowerCase();
|
|
369
|
+
const doubleQuotedValue = attrMatch[2];
|
|
370
|
+
const singleQuotedValue = attrMatch[3];
|
|
371
|
+
const unquotedValue = attrMatch[4];
|
|
372
|
+
if (attrName.startsWith("on")) {
|
|
373
|
+
continue;
|
|
374
|
+
}
|
|
375
|
+
let attrValue;
|
|
376
|
+
let quoteChar;
|
|
377
|
+
if (doubleQuotedValue !== void 0) {
|
|
378
|
+
attrValue = doubleQuotedValue;
|
|
379
|
+
quoteChar = '"';
|
|
380
|
+
} else if (singleQuotedValue !== void 0) {
|
|
381
|
+
attrValue = singleQuotedValue;
|
|
382
|
+
quoteChar = "'";
|
|
383
|
+
} else if (unquotedValue !== void 0) {
|
|
384
|
+
attrValue = unquotedValue;
|
|
385
|
+
quoteChar = '"';
|
|
386
|
+
} else {
|
|
387
|
+
if (ALLOWED_ATTRS.has(attrName)) {
|
|
388
|
+
allowedAttrs.push(attrName);
|
|
389
|
+
}
|
|
390
|
+
continue;
|
|
391
|
+
}
|
|
392
|
+
if (ALLOWED_ATTRS.has(attrName)) {
|
|
393
|
+
const wasUnquoted = unquotedValue !== void 0;
|
|
394
|
+
const sanitizedValue = sanitizeAttrValue(attrName, attrValue, wasUnquoted);
|
|
395
|
+
if (sanitizedValue !== null) {
|
|
396
|
+
allowedAttrs.push(`${attrName}=${quoteChar}${sanitizedValue}${quoteChar}`);
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
}
|
|
400
|
+
const attrsStr = allowedAttrs.length > 0 ? ` ${allowedAttrs.join(" ")}` : "";
|
|
401
|
+
const selfCloseStr = selfClose ? "/>" : ">";
|
|
402
|
+
return `<${lowerTagName}${attrsStr}${selfCloseStr}`;
|
|
403
|
+
}
|
|
404
|
+
function sanitize(str) {
|
|
405
|
+
if (typeof str !== "string" || !str || str.indexOf("<") === -1) {
|
|
406
|
+
return str;
|
|
407
|
+
}
|
|
408
|
+
return str.replace(
|
|
409
|
+
/<\/?[^>]*>|[^<>\s]+>/g,
|
|
410
|
+
(match) => {
|
|
411
|
+
if (match.startsWith("<!--")) {
|
|
412
|
+
return "";
|
|
413
|
+
}
|
|
414
|
+
if (!match.startsWith("<")) {
|
|
415
|
+
return match.slice(0, -1) + ">";
|
|
416
|
+
}
|
|
417
|
+
if (isAllowedTag(match)) {
|
|
418
|
+
return sanitizeTag(match);
|
|
419
|
+
}
|
|
420
|
+
return match.replace(/</g, "<");
|
|
421
|
+
}
|
|
422
|
+
);
|
|
423
|
+
}
|
|
424
|
+
|
|
123
425
|
;// ./src/module/util.ts
|
|
124
426
|
var __defProp = Object.defineProperty;
|
|
125
427
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
@@ -140,6 +442,7 @@ var __spreadValues = (a, b) => {
|
|
|
140
442
|
|
|
141
443
|
|
|
142
444
|
|
|
445
|
+
|
|
143
446
|
function _getRect(relativeViewport, node, forceEval = false) {
|
|
144
447
|
const _ = (n) => n[relativeViewport ? "getBoundingClientRect" : "getBBox"]();
|
|
145
448
|
if (forceEval) {
|
|
@@ -157,66 +460,6 @@ function _forEachValidItem(items, callback) {
|
|
|
157
460
|
}
|
|
158
461
|
}
|
|
159
462
|
}
|
|
160
|
-
const _sanitize = (() => {
|
|
161
|
-
const DANGEROUS_TAGS = "script|iframe|object|embed|form|input|button|textarea|select|style|link|meta|base|math|isindex";
|
|
162
|
-
const ENTITY_MAP = {
|
|
163
|
-
quot: 34,
|
|
164
|
-
amp: 38,
|
|
165
|
-
apos: 39,
|
|
166
|
-
lt: 60,
|
|
167
|
-
gt: 62,
|
|
168
|
-
nbsp: 160,
|
|
169
|
-
iexcl: 161,
|
|
170
|
-
cent: 162,
|
|
171
|
-
pound: 163,
|
|
172
|
-
curren: 164,
|
|
173
|
-
yen: 165
|
|
174
|
-
};
|
|
175
|
-
const LT_CODE = 60;
|
|
176
|
-
const GT_CODE = 62;
|
|
177
|
-
const MAX_ITERATIONS = 10;
|
|
178
|
-
const rx = {
|
|
179
|
-
tags: new RegExp(
|
|
180
|
-
`<(${DANGEROUS_TAGS})\\b[\\s\\S]*?>([\\s\\S]*?<\\/(${DANGEROUS_TAGS})\\s*>)?`,
|
|
181
|
-
"gi"
|
|
182
|
-
),
|
|
183
|
-
htmlEntity: /&#x([0-9a-f]+);?|&#([0-9]+);?|&([a-z]+);/gi,
|
|
184
|
-
// eslint-disable-next-line no-control-regex
|
|
185
|
-
controlChar: /[\x00-\x1F\x7F]/g,
|
|
186
|
-
eventHandler: /\s+on\w+\s*=\s*(?:"[^"]*"|'[^']*'|`[^`]*`|[^\s>]*)|on\w+\s*=\s*(?:"[^"]*"|'[^']*'|`[^`]*`|[^\s>]*)/gi,
|
|
187
|
-
dangerousUri: /(href|src|action|xlink:href)\s*=\s*(['"`]?)([^'"`>\s]*)\2/gi,
|
|
188
|
-
dangerousProtocol: /^(javascript|data|vbscript):/
|
|
189
|
-
};
|
|
190
|
-
return {
|
|
191
|
-
ENTITY_MAP,
|
|
192
|
-
LT_CODE,
|
|
193
|
-
GT_CODE,
|
|
194
|
-
MAX_ITERATIONS,
|
|
195
|
-
rx,
|
|
196
|
-
/**
|
|
197
|
-
* Decode HTML entities to prevent bypass attacks
|
|
198
|
-
* @param {string} str String with potential HTML entities
|
|
199
|
-
* @returns {string} Decoded string
|
|
200
|
-
*/
|
|
201
|
-
decodeEntities(str) {
|
|
202
|
-
return str.replace(rx.htmlEntity, (match, hex, dec, named) => {
|
|
203
|
-
const code = hex ? parseInt(hex, 16) : dec ? parseInt(dec, 10) : named ? ENTITY_MAP[named.toLowerCase()] || 0 : 0;
|
|
204
|
-
return code && code !== LT_CODE && code !== GT_CODE ? String.fromCharCode(code) : match;
|
|
205
|
-
});
|
|
206
|
-
},
|
|
207
|
-
/**
|
|
208
|
-
* Remove dangerous URI protocols from attribute values
|
|
209
|
-
* @param {string} str String to sanitize
|
|
210
|
-
* @returns {string} Sanitized string
|
|
211
|
-
*/
|
|
212
|
-
removeDangerousUris(str) {
|
|
213
|
-
return str.replace(rx.dangerousUri, (match, attr, quote, value) => {
|
|
214
|
-
const normalized = value.toLowerCase().replace(/\s/g, "");
|
|
215
|
-
return rx.dangerousProtocol.test(normalized) ? `${attr}=${quote}${quote}` : match;
|
|
216
|
-
});
|
|
217
|
-
}
|
|
218
|
-
};
|
|
219
|
-
})();
|
|
220
463
|
const isValue = (v) => v || v === 0;
|
|
221
464
|
const isFunction = (v) => typeof v === "function";
|
|
222
465
|
const isString = (v) => typeof v === "string";
|
|
@@ -263,23 +506,6 @@ function endall(transition, cb) {
|
|
|
263
506
|
transition.call(end);
|
|
264
507
|
}
|
|
265
508
|
}
|
|
266
|
-
function sanitize(str) {
|
|
267
|
-
if (!isString(str) || !str || str.indexOf("<") === -1) {
|
|
268
|
-
return str;
|
|
269
|
-
}
|
|
270
|
-
let result = str;
|
|
271
|
-
let prev;
|
|
272
|
-
let iterations = 0;
|
|
273
|
-
do {
|
|
274
|
-
prev = result;
|
|
275
|
-
result = _sanitize.decodeEntities(result).replace(_sanitize.rx.controlChar, "").replace(_sanitize.rx.tags, "").replace(_sanitize.rx.eventHandler, "");
|
|
276
|
-
result = _sanitize.removeDangerousUris(result);
|
|
277
|
-
if (++iterations >= _sanitize.MAX_ITERATIONS) {
|
|
278
|
-
break;
|
|
279
|
-
}
|
|
280
|
-
} while (result !== prev);
|
|
281
|
-
return result;
|
|
282
|
-
}
|
|
283
509
|
function setTextValue(node, text, dy = [-1, 1], toMiddle = false) {
|
|
284
510
|
if (!node || !isString(text)) {
|
|
285
511
|
return;
|
|
@@ -770,7 +996,7 @@ class Plugin {
|
|
|
770
996
|
});
|
|
771
997
|
}
|
|
772
998
|
}
|
|
773
|
-
__publicField(Plugin, "version", "3.18.0
|
|
999
|
+
__publicField(Plugin, "version", "3.18.0");
|
|
774
1000
|
|
|
775
1001
|
;// ./src/Plugin/tableview/const.ts
|
|
776
1002
|
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* billboard.js, JavaScript chart library
|
|
6
6
|
* https://naver.github.io/billboard.js/
|
|
7
7
|
*
|
|
8
|
-
* @version 3.18.0
|
|
8
|
+
* @version 3.18.0
|
|
9
9
|
* @requires billboard.js
|
|
10
10
|
* @summary billboard.js plugin
|
|
11
|
-
*/(function(
|
|
11
|
+
*/(function(a,p){typeof exports=="object"&&typeof module=="object"?module.exports=p(require("d3-brush"),require("d3-selection")):typeof define=="function"&&define.amd?define("bb",["d3-brush","d3-selection"],p):typeof exports=="object"?exports.bb=p(require("d3-brush"),require("d3-selection")):(a.bb=a.bb||{},a.bb.plugin=a.bb.plugin||{},a.bb.plugin.tableview=p(a.d3,a.d3))})(this,function(N,a){return(function(){"use strict";var p={747:(function(e){e.exports=a}),853:(function(e){e.exports=N})},j={};function u(e){var t=j[e];if(t!==void 0)return t.exports;var n=j[e]={exports:{}};return p[e](n,n.exports,u),n.exports}(function(){u.d=function(e,t){for(var n in t)u.o(t,n)&&!u.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),(function(){u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}})();var y={};u.d(y,{default:function(){return Ve}});var ke=u(853),Ue=u(747);function J(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function ee(e){const t=typeof(e==null?void 0:e.requestAnimationFrame)=="function"&&typeof(e==null?void 0:e.cancelAnimationFrame)=="function",n=typeof(e==null?void 0:e.requestIdleCallback)=="function"&&typeof(e==null?void 0:e.cancelIdleCallback)=="function",o=i=>setTimeout(i,1),r=i=>clearTimeout(i);return[t?e.requestAnimationFrame:o,t?e.cancelAnimationFrame:r,n?e.requestIdleCallback:o,n?e.cancelIdleCallback:r]}const v=J(),te=v==null?void 0:v.document,[Ge,Xe,We,Ye]=ee(v),ne=new Set(["span","div","p","br","b","i","em","strong","u","s","sub","sup","ul","ol","li","dl","dt","dd","table","thead","tbody","tfoot","tr","th","td","caption","colgroup","col","hr","pre","code","blockquote","a","img","svg","g","path","circle","ellipse","rect","line","polyline","polygon","text","tspan","textPath","use","defs","symbol","clipPath","mask","linearGradient","radialGradient","stop","pattern","marker","title","desc"]),I=new Set(["class","id","style","title","lang","dir","href","src","alt","width","height","colspan","rowspan","scope","headers","d","points","x","y","x1","x2","y1","y2","cx","cy","r","rx","ry","dx","dy","viewBox","preserveAspectRatio","transform","fill","fill-opacity","fill-rule","stroke","stroke-width","stroke-opacity","stroke-linecap","stroke-linejoin","stroke-dasharray","stroke-dashoffset","opacity","clip-path","clip-rule","mask","font-family","font-size","font-weight","font-style","text-anchor","dominant-baseline","offset","stop-color","stop-opacity","gradientUnits","gradientTransform","spreadMethod","patternUnits","patternTransform","marker-start","marker-mid","marker-end","markerWidth","markerHeight","refX","refY","xlink:href"]),oe=new Set(["http:","https:","mailto:"]),re=new Set(["href","src","xlink:href"]),ie=/^<\/?([a-zA-Z][a-zA-Z0-9]*)/,se=/^<\/([a-zA-Z][a-zA-Z0-9]*)\s*>$/,le=/^<([a-zA-Z][a-zA-Z0-9]*)([\s\S]*?)(\/?)>$/,D=/([a-zA-Z][\w:-]*)\s*(?:=\s*(?:"([^"]*)"|'([^']*)'|([^\s>]+)))?/g,L=/url\s*\(\s*["']?([^"')]+)["']?\s*\)/gi,ce=["expression(","behavior:","binding:","@import","@charset","-moz-binding:"];function O(e){return e.replace(/:/gi,":").replace(/&newline;/gi,`
|
|
12
|
+
`).replace(/&tab;/gi," ").replace(/ /gi," ").replace(/</gi,"<").replace(/>/gi,">").replace(/&/gi,"&").replace(/"/gi,'"').replace(/'/gi,"'").replace(/&#(\d+);/gi,(t,n)=>String.fromCharCode(parseInt(n,10))).replace(/&#x([0-9a-f]+);/gi,(t,n)=>String.fromCharCode(parseInt(n,16)))}function z(e){const n=O(e).trim().replace(/[\s\u0000-\u001f]/g,"").toLowerCase();if(!n||n.startsWith("#")||n.startsWith("/")||n.startsWith("./")||n.startsWith("../")||!n.includes(":"))return!0;const o=n.indexOf(":");if(o>0){const r=n.substring(0,o+1);return oe.has(r)}return!1}function ae(e){const n=O(e).replace(/[\u0000-\u001f]/g,"");L.lastIndex=0;let o;for(;(o=L.exec(n))!==null;)if(!z(o[1]))return null;const r=n.toLowerCase().replace(/\s/g,"");for(const i of ce)if(r.includes(i))return null;return e}const ue={'"':""","'":"'","`":"`"},fe=/["'`]/g;function A(e){return e.replace(fe,t=>ue[t])}function de(e,t,n=!1){if(re.has(e))return z(t)?n?A(t):t:null;if(e==="style"){const r=ae(t);return r===null?null:n?A(r):r}const o=O(t).toLowerCase().replace(/\s/g,"");return/\bon\w+=/.test(o)?null:n?A(t):t}function pe(e){const t=e.match(ie);return t?t[1].toLowerCase():null}function he(e){const t=pe(e);return t!==null&&ne.has(t)}function be(e){const t=e.match(se);if(t)return`</${t[1].toLowerCase()}>`;const n=e.match(le);if(!n)return"";const[,o,r,i]=n,s=o.toLowerCase(),l=[];D.lastIndex=0;let c;for(;(c=D.exec(r))!==null;){const b=c[1].toLowerCase(),Z=c[2],Q=c[3],M=c[4];if(b.startsWith("on"))continue;let T,w;if(Z!==void 0)T=Z,w='"';else if(Q!==void 0)T=Q,w="'";else if(M!==void 0)T=M,w='"';else{I.has(b)&&l.push(b);continue}if(I.has(b)){const K=de(b,T,M!==void 0);K!==null&&l.push(`${b}=${w}${K}${w}`)}}const f=l.length>0?` ${l.join(" ")}`:"";return`<${s}${f}${i?"/>":">"}`}function ge(e){return typeof e!="string"||!e||e.indexOf("<")===-1?e:e.replace(/<\/?[^>]*>|[^<>\s]+>/g,t=>t.startsWith("<!--")?"":t.startsWith("<")?he(t)?be(t):t.replace(/</g,"<"):t.slice(0,-1)+">")}var me=Object.defineProperty,B=Object.getOwnPropertySymbols,_e=Object.prototype.hasOwnProperty,we=Object.prototype.propertyIsEnumerable,q=(e,t,n)=>t in e?me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,F=(e,t)=>{for(var n in t||(t={}))_e.call(t,n)&&q(e,n,t[n]);if(B)for(var n of B(t))we.call(t,n)&&q(e,n,t[n]);return e};function V(e,t,n=!1){const o=r=>r[e?"getBoundingClientRect":"getBBox"]();return n?o(t):!("rect"in t)||"rect"in t&&t.hasAttribute("width")&&t.rect.width!==+(t.getAttribute("width")||0)?t.rect=o(t):t.rect}function k(e,t){for(let n=0;n<e.length;n++){const o=e[n];o&&t(o,n)}}const He=e=>e||e===0,ye=e=>typeof e=="function",g=e=>typeof e=="string",x=e=>typeof e=="number",ve=e=>typeof e=="undefined",U=e=>typeof e!="undefined",Ze=e=>typeof e=="boolean",Qe=e=>Math.ceil(e/10)*10,Ke=e=>Math.ceil(e)+.5,Je=e=>e[1]-e[0],$=e=>typeof e=="object",xe=e=>{for(const t in e)return!1;return!0},Ee=e=>ve(e)||e===null||g(e)&&e.length===0||$(e)&&!(e instanceof Date)&&xe(e)||x(e)&&isNaN(e),Te=e=>!Ee(e),S=e=>Array.isArray(e),m=e=>e&&!(e!=null&&e.nodeType)&&$(e)&&!S(e);function et(e,t,n){return U(e[t])?e[t]:n}function tt(e,t){let n=!1;return Object.keys(e).forEach(o=>e[o]===t&&(n=!0)),n}function nt(e,t,...n){const o=ye(e);return o&&e.call(t,...n),o}function ot(e,t){let n=0;const o=function(...r){!--n&&t.apply(this,...r)};"duration"in e?e.each(()=>++n).on("end",o):(++n,e.call(o))}function rt(e,t,n=[-1,1],o=!1){if(!(!e||!g(t)))if(t.indexOf(`
|
|
12
13
|
`)===-1)e.text(t);else{const r=[e.text(),t].map(i=>i.replace(/[\s\n]/g,""));if(r[0]!==r[1]){const i=t.split(`
|
|
13
|
-
`),s=o?i.length-1:1;e.html(""),i.forEach((l,c)=>{e.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*s:n[1]}em`).text(l)})}}}function
|
|
14
|
+
`),s=o?i.length-1:1;e.html(""),i.forEach((l,c)=>{e.append("tspan").attr("x",0).attr("dy",`${c===0?n[0]*s:n[1]}em`).text(l)})}}}function Oe(e){const{x:t,y:n,width:o,height:r}=e.getBBox();return[{x:t,y:n+r},{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r}]}function it(e){const{width:t,height:n}=G(e),o=Oe(e),r=o[0].x,i=Math.min(o[0].y,o[1].y);return{x:r,y:i,width:t,height:n}}function st(e,t){var n;const o=e&&((n=e.touches||e.sourceEvent&&e.sourceEvent.touches)==null?void 0:n[0]);let r=[0,0];try{r=d3Pointer(o||e,t)}catch(i){}return r.map(i=>isNaN(i)?0:i)}function Ae(e){const{event:t,$el:n}=e,o=n.subchart.main||n.main;let r;return t&&t.type==="brush"?r=t.selection:o&&(r=o.select(".bb-brush").node())&&(r=d3BrushSelection(r)),r}function G(e,t=!1){return V(!0,e,t)}function lt(e,t=!1){return V(!1,e,t)}function ct(e=!0,t=0,n=1e4){const o=window.crypto||window.msCrypto,r=o?t+o.getRandomValues(new Uint32Array(1))[0]%(n-t+1):Math.floor(Math.random()*(n-t)+t);return e?String(r):r}function X(e,t,n,o,r){if(n>o)return-1;const i=Math.floor((n+o)/2);let{x:s,w:l=0}=e[i];return r&&(s=e[i].y,l=e[i].h),t>=s&&t<=s+l?i:t<s?X(e,t,n,i-1,r):X(e,t,i+1,o,r)}function at(e){const t=Ae(e);return t?t[0]===t[1]:!0}function ut(...e){const t=n=>{if(m(n)&&n.constructor){const o=new n.constructor;for(const r in n)o[r]=t(n[r]);return o}return n};return e.map(n=>t(n)).reduce((n,o)=>F(F({},n),o))}function $e(e={},t){S(t)&&t.forEach(n=>$e(e,n));for(const n in t)/^\d+$/.test(n)||n in e||(e[n]=t[n]);return e}const ft=e=>e.charAt(0).toUpperCase()+e.slice(1);function dt(e,t="-"){return e.split(t).map((n,o)=>o?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const Se=e=>[].slice.call(e);function pt(e,t,n){const{rootSelector:o="",sheet:r}=e,s=`${o} ${(l=>l.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,"."))(t)} {${n.join(";")}}`;return r[r.insertRule?"insertRule":"addRule"](s,r.cssRules.length)}function ht(e){let t=[];return e.forEach(n=>{var o;try{n.cssRules&&n.cssRules.length&&(t=t.concat(Se(n.cssRules)))}catch(r){(o=window.console)==null||o.warn(`Error while reading rules from ${n.href}: ${r.toString()}`)}}),t}function bt(e){var t,n,o,r,i,s;return{x:((n=(t=window.pageXOffset)!=null?t:window.scrollX)!=null?n:0)+((o=e.scrollLeft)!=null?o:0),y:((i=(r=window.pageYOffset)!=null?r:window.scrollY)!=null?i:0)+((s=e.scrollTop)!=null?s:0)}}function gt(e,t=0,n=0,o=!0){const r=new DOMPoint(t,n),i=e.getScreenCTM(),s=r.matrixTransform(o?i==null?void 0:i.inverse():i);if(o===!1){const l=G(e);s.x-=l.x,s.y-=l.y}return s}function mt(e){const t=e?e.transform:null,n=t&&t.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function _t(e){const t=e[0]instanceof Date,n=(t?e.map(Number):e).filter((o,r,i)=>i.indexOf(o)===r);return t?n.map(o=>new Date(o)):n}function wt(e){return e&&e.length?e.reduce((t,n)=>t.concat(n)):[]}function C(e,...t){if(!t.length||t.length===1&&!t[0])return e;const n=t.shift();return m(e)&&m(n)&&Object.keys(n).forEach(o=>{if(!/^(__proto__|constructor|prototype)$/i.test(o)){const r=n[o];m(r)?(!e[o]&&(e[o]={}),e[o]=C(e[o],r)):e[o]=S(r)?r.concat():r}}),C(e,...t)}function Ce(e,t=!0){let n;return e[0]instanceof Date?n=t?(o,r)=>o-r:(o,r)=>r-o:t&&!e.every(isNaN)?n=(o,r)=>o-r:t||(n=(o,r)=>o>r&&-1||o<r&&1||o===r&&0),e.concat().sort(n)}function yt(e,t){let n=t.filter(o=>Te(o));return n.length?x(n[0])?n=Math[e](...n):n[0]instanceof Date&&(n=Ce(n,e==="min")[0]):n=void 0,n}const vt=(e,t,n=1)=>{const o=[],r=Math.max(0,Math.ceil((t-e)/n))|0;for(let i=e;i<r;i++)o.push(e+i*n);return o},xt={mouse:(()=>{const e=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(t,n,o=e())=>{t.dispatchEvent(new MouseEvent(n,o))}}catch(t){return(n,o,r=e())=>{const i=te.createEvent("MouseEvent");i.initMouseEvent(o,r.bubbles,r.cancelable,v,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}}})(),touch:(e,t,n)=>{const o=new Touch(C({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(t,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}};function E(e,t){let n=e;for(const o in t)n=n.replace(new RegExp(`{=${o}}`,"g"),t[o]);return ge(n)}function Et(e){var t;let n;if(e instanceof Date)n=e;else if(g(e)){const{config:o,format:r}=this;n=(t=r.dataTime(o.data_xFormat)(e))!=null?t:new Date(e)}else x(e)&&!isNaN(e)&&(n=new Date(+e));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),n}function Tt(e){const t=e.attr("viewBox");return t?/(\d+(\.\d+)?){3}/.test(t):!1}function Ot(e,t,n=!1){const o=!!e.node;let r=!1;for(const[i,s]of Object.entries(t))if(r=o?e.style(i)===s:e.style[i]===s,n===!1&&r)break;return r}function At(){var e,t;return((e=document)==null?void 0:e.hidden)===!1||((t=document)==null?void 0:t.visibilityState)==="visible"}function $t(e,t){const{DocumentTouch:n,matchMedia:o,navigator:r}=window,i=o==null?void 0:o("(pointer:coarse)").matches;let s=!1;if(t)if(r&&"maxTouchPoints"in r)s=r.maxTouchPoints>0;else if("ontouchmove"in window||n&&document instanceof n)s=!0;else if(i)s=!0;else{const c=r.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return e&&!i&&(o==null?void 0:o("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function Pe(e,t){t()===!1?requestAnimationFrame(()=>Pe(e,t)):e()}function St(e){if(m(e)&&!g(e)){const s=e;return{top:s.top||0,right:s.right||0,bottom:s.bottom||0,left:s.left||0}}const t=(g(e)?e.trim().split(/\s+/):[e]).map(s=>+s||0),[n,o=n,r=n,i=o]=t;return{top:n,right:o,bottom:r,left:i}}function Ct(e,t){e.pendingRaf!==null?(window.cancelAnimationFrame(e.pendingRaf),e.pendingRaf=window.requestAnimationFrame(()=>{e.pendingRaf=null,t()})):(e.pendingRaf=window.requestAnimationFrame(()=>{e.pendingRaf=null}),t())}function Pt(e,t=(n=>n)){const n=new Set;return k(e,(o,r)=>{n.add(t(o,r))}),n}function Rt(e,t,n=(o=>o)){const o=new Map;return k(e,(r,i)=>{o.set(t(r,i),n(r,i))}),o}function Re(e){const t=this.config;let n,o,r;const i=()=>{const s=o.shift();if(s&&n&&$(n)&&s in n)return n=n[s],i();if(!s)return n};Object.keys(t).forEach(s=>{n=e,o=s.split("_"),r=i(),U(r)&&(t[s]=r)}),this.api&&(this.state.orgConfig=e)}var Me=Object.defineProperty,Ne=(e,t,n)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>Ne(e,typeof t!="symbol"?t+"":t,n);class W{constructor(t={}){P(this,"$$"),P(this,"options"),this.options=t}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(t=>{this[t]=null,delete this[t]})}}P(W,"version","3.18.0");const h={id:"__tableview-style__",class:"bb-tableview",rule:`.bb-tableview {
|
|
14
15
|
border-collapse:collapse;
|
|
15
16
|
border-spacing:0;
|
|
16
17
|
background:#fff;
|
|
@@ -34,6 +35,6 @@
|
|
|
34
35
|
font-size:1.1em;
|
|
35
36
|
font-weight:700;
|
|
36
37
|
margin-bottom: -1px;
|
|
37
|
-
}`},
|
|
38
|
+
}`},_={body:`<caption>{=title}</caption>
|
|
38
39
|
<thead><tr>{=thead}</tr></thead>
|
|
39
|
-
<tbody>{=tbody}</tbody>`,thead:'<th scope="col">{=title}</th>',tbodyHeader:'<th scope="row">{=value}</th>',tbody:"<td>{=value}</td>"};class
|
|
40
|
+
<tbody>{=tbody}</tbody>`,thead:'<th scope="col">{=title}</th>',tbodyHeader:'<th scope="row">{=value}</th>',tbody:"<td>{=value}</td>"};class je{constructor(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let n=t;return this.$$.axis.isCategorized()?n=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(n=t.toLocaleDateString()),n},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-"}}}var Ie=Object.defineProperty,De=Object.defineProperties,Le=Object.getOwnPropertyDescriptors,Y=Object.getOwnPropertySymbols,ze=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable,R=(e,t,n)=>t in e?Ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,qe=(e,t)=>{for(var n in t||(t={}))ze.call(t,n)&&R(e,n,t[n]);if(Y)for(var n of Y(t))Be.call(t,n)&&R(e,n,t[n]);return e},Fe=(e,t)=>De(e,Le(t)),H=(e,t,n)=>R(e,typeof t!="symbol"?t+"":t,n);class Ve extends W{constructor(t){return super(t),H(this,"config"),H(this,"element"),this.config=new je,this}$beforeInit(){Re.call(this,this.options)}$init(){const{class:t,selector:n,style:o}=this.config;let r=document.querySelector(n||`.${t||h.class}`);if(!r){const i=this.$$.$el.chart.node();r=document.createElement("table"),i.parentNode.insertBefore(r,i.nextSibling)}if(r.tagName!=="TABLE"){const i=document.createElement("table");r.appendChild(i),r=i}if(o&&!document.getElementById(h.id)){const i=document.createElement("style");i.id=h.id,i.innerHTML=h.rule,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}r.classList.add(...[o&&h.class,t].filter(Boolean)),this.element=r}generateTable(){const{$$:t,config:n,element:o}=this,r=t.filterTargetsToShow(t.data.targets);let i=E(_.thead,{title:r.length?this.config.categoryTitle:""}),s="";const l=[];r.forEach(c=>{i+=E(_.thead,{title:c.id}),c.values.forEach((f,d)=>{l[d]||(l[d]=[f.x]),l[d].push(f.value)})}),l.forEach(c=>{s+=`<tr>${c.map((f,d)=>E(d?_.tbody:_.tbodyHeader,{value:d===0?n.categoryFormat.bind(this)(f):x(f)?f.toLocaleString():n.nullString})).join("")}</tr>`}),o.innerHTML=E(_.body,Fe(qe({},n),{title:n.title||t.config.title_text||"",thead:i,tbody:s}))}$redraw(){const{state:t}=this.$$;!(t.resizing||!this.config.updateOnToggle&&t.toggling)&&this.generateTable()}$willDestroy(){var t,n;if((t=this.element.parentNode)==null||t.removeChild(this.element),this.$$.charts.length===1){const o=document.getElementById(h.id);(n=o==null?void 0:o.parentNode)==null||n.removeChild(o)}}}return y=y.default,y})()});
|