@carbon/charts 1.15.3 → 1.15.5
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/CHANGELOG.md +18 -0
- package/dist/_baseEach-BxXSF0fB.mjs +20 -0
- package/dist/{_baseEach-FYvKsL62.mjs.map → _baseEach-BxXSF0fB.mjs.map} +1 -1
- package/dist/{a11y-SOU26cr5.mjs → a11y-ePqvrObQ.mjs} +1 -1
- package/dist/{a11y-SOU26cr5.mjs.map → a11y-ePqvrObQ.mjs.map} +1 -1
- package/dist/{angle-utils-f1TpgqMV.mjs → angle-utils-CGNQcrjg.mjs} +98 -100
- package/dist/{angle-utils-f1TpgqMV.mjs.map → angle-utils-CGNQcrjg.mjs.map} +1 -1
- package/dist/{choropleth-nq4Ls6mL.mjs → choropleth-C_tUN7Ur.mjs} +1354 -1355
- package/dist/choropleth-C_tUN7Ur.mjs.map +1 -0
- package/dist/{color-scale-utils-ePX_zGmy.mjs → color-scale-utils-CbAVUUep.mjs} +803 -843
- package/dist/{color-scale-utils-ePX_zGmy.mjs.map → color-scale-utils-CbAVUUep.mjs.map} +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/demo/index.mjs +223 -223
- package/dist/demo/index.mjs.map +1 -1
- package/dist/demo/styles.css +872 -747
- package/dist/demo/styles.css.map +1 -1
- package/dist/{enums-sKf02OL8.mjs → enums-DwsxZqjR.mjs} +1 -1
- package/dist/{enums-sKf02OL8.mjs.map → enums-DwsxZqjR.mjs.map} +1 -1
- package/dist/{index-937eoUHH.mjs → index-zSuueE1Q.mjs} +3 -3
- package/dist/index-zSuueE1Q.mjs.map +1 -0
- package/dist/index.mjs +171 -173
- package/dist/index.mjs.map +1 -1
- package/dist/interfaces/index.mjs +2 -2
- package/dist/model/index.mjs +1 -1
- package/dist/services/index.mjs +3 -3
- package/dist/styles.css +96 -148
- package/dist/styles.css.map +1 -1
- package/dist/styles.min.css +1 -1
- package/dist/styles.min.css.map +1 -1
- package/dist/umd/bundle.umd.js +18 -18
- package/dist/umd/bundle.umd.js.map +1 -1
- package/dist/{wordcloud-EFHcMnWt.mjs → wordcloud-DNFY5X97.mjs} +37 -38
- package/dist/{wordcloud-EFHcMnWt.mjs.map → wordcloud-DNFY5X97.mjs.map} +1 -1
- package/dist/{zoom-llJ5-h9M.mjs → zoom-DlSAWtwE.mjs} +4 -4
- package/dist/{zoom-llJ5-h9M.mjs.map → zoom-DlSAWtwE.mjs.map} +1 -1
- package/package.json +16 -16
- package/styles.css +96 -148
- package/styles.min.css +1 -1
- package/dist/_baseEach-FYvKsL62.mjs +0 -21
- package/dist/choropleth-nq4Ls6mL.mjs.map +0 -1
- package/dist/index-937eoUHH.mjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,24 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See
|
|
4
4
|
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## 1.15.5 (2024-03-21)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @carbon/charts
|
|
9
|
+
|
|
10
|
+
# Change Log
|
|
11
|
+
|
|
12
|
+
All notable changes to this project will be documented in this file. See
|
|
13
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
14
|
+
|
|
15
|
+
## 1.15.4 (2024-03-19)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @carbon/charts
|
|
18
|
+
|
|
19
|
+
# Change Log
|
|
20
|
+
|
|
21
|
+
All notable changes to this project will be documented in this file. See
|
|
22
|
+
[Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
23
|
+
|
|
6
24
|
## 1.15.3 (2024-03-09)
|
|
7
25
|
|
|
8
26
|
### Bug Fixes
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { e as b, k as h, h as t } from "./color-scale-utils-CbAVUUep.mjs";
|
|
2
|
+
function i(a, e) {
|
|
3
|
+
return a && b(a, e, h);
|
|
4
|
+
}
|
|
5
|
+
function k(a, e) {
|
|
6
|
+
return function(r, n) {
|
|
7
|
+
if (r == null)
|
|
8
|
+
return r;
|
|
9
|
+
if (!t(r))
|
|
10
|
+
return a(r, n);
|
|
11
|
+
for (var u = r.length, s = e ? u : -1, f = Object(r); (e ? s-- : ++s < u) && n(f[s], s, f) !== !1; )
|
|
12
|
+
;
|
|
13
|
+
return r;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
var v = k(i);
|
|
17
|
+
export {
|
|
18
|
+
v as b
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=_baseEach-BxXSF0fB.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_baseEach-
|
|
1
|
+
{"version":3,"file":"_baseEach-BxXSF0fB.mjs","sources":["../../../node_modules/lodash-es/_baseForOwn.js","../../../node_modules/lodash-es/_createBaseEach.js","../../../node_modules/lodash-es/_baseEach.js"],"sourcesContent":["import baseFor from './_baseFor.js';\nimport keys from './keys.js';\n\n/**\n * The base implementation of `_.forOwn` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The object to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Object} Returns `object`.\n */\nfunction baseForOwn(object, iteratee) {\n return object && baseFor(object, iteratee, keys);\n}\n\nexport default baseForOwn;\n","import isArrayLike from './isArrayLike.js';\n\n/**\n * Creates a `baseEach` or `baseEachRight` function.\n *\n * @private\n * @param {Function} eachFunc The function to iterate over a collection.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {Function} Returns the new base function.\n */\nfunction createBaseEach(eachFunc, fromRight) {\n return function(collection, iteratee) {\n if (collection == null) {\n return collection;\n }\n if (!isArrayLike(collection)) {\n return eachFunc(collection, iteratee);\n }\n var length = collection.length,\n index = fromRight ? length : -1,\n iterable = Object(collection);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (iteratee(iterable[index], index, iterable) === false) {\n break;\n }\n }\n return collection;\n };\n}\n\nexport default createBaseEach;\n","import baseForOwn from './_baseForOwn.js';\nimport createBaseEach from './_createBaseEach.js';\n\n/**\n * The base implementation of `_.forEach` without support for iteratee shorthands.\n *\n * @private\n * @param {Array|Object} collection The collection to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array|Object} Returns `collection`.\n */\nvar baseEach = createBaseEach(baseForOwn);\n\nexport default baseEach;\n"],"names":["baseForOwn","object","iteratee","baseFor","keys","createBaseEach","eachFunc","fromRight","collection","isArrayLike","length","index","iterable","baseEach"],"mappings":";AAWA,SAASA,EAAWC,GAAQC,GAAU;AACpC,SAAOD,KAAUE,EAAQF,GAAQC,GAAUE,CAAI;AACjD;ACHA,SAASC,EAAeC,GAAUC,GAAW;AAC3C,SAAO,SAASC,GAAYN,GAAU;AACpC,QAAIM,KAAc;AAChB,aAAOA;AAET,QAAI,CAACC,EAAYD,CAAU;AACzB,aAAOF,EAASE,GAAYN,CAAQ;AAMtC,aAJIQ,IAASF,EAAW,QACpBG,IAAQJ,IAAYG,IAAS,IAC7BE,IAAW,OAAOJ,CAAU,IAExBD,IAAYI,MAAU,EAAEA,IAAQD,MAClCR,EAASU,EAASD,CAAK,GAAGA,GAAOC,CAAQ,MAAM;AAAnD;AAIF,WAAOJ;AAAA,EACX;AACA;AClBG,IAACK,IAAWR,EAAeL,CAAU;","x_google_ignoreList":[0,1,2]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"a11y-
|
|
1
|
+
{"version":3,"file":"a11y-ePqvrObQ.mjs","sources":["../src/interfaces/a11y.ts"],"sourcesContent":["export enum Roles {\n\tGRAPHICS_DOCUMENT = 'graphics-document',\n\tGRAPHICS_OBJECT = 'graphics-object',\n\tGRAPHICS_SYMBOL = 'graphics-symbol',\n\tGROUP = 'group',\n\tDOCUMENT = 'document',\n\tCHECKBOX = 'checkbox',\n\tBUTTON = 'button',\n\tMENU = 'menu',\n\tMENU_ITEM = 'menuitem',\n\tIMG = 'img'\n}\n"],"names":["Roles"],"mappings":"AAAY,IAAAA,sBAAAA,OACXA,EAAA,oBAAoB,qBACpBA,EAAA,kBAAkB,mBAClBA,EAAA,kBAAkB,mBAClBA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,WAAW,YACXA,EAAA,SAAS,UACTA,EAAA,OAAO,QACPA,EAAA,YAAY,YACZA,EAAA,MAAM,OAVKA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { select as d } from "d3";
|
|
2
|
-
import { j as fe, l as O, r as de, m as T, n as _ } from "./color-scale-utils-
|
|
3
|
-
import { _ as P, T as E, o as b } from "./enums-
|
|
2
|
+
import { j as fe, l as O, r as de, m as T, n as _ } from "./color-scale-utils-CbAVUUep.mjs";
|
|
3
|
+
import { _ as P, T as E, o as b } from "./enums-DwsxZqjR.mjs";
|
|
4
4
|
var me = /\s/;
|
|
5
5
|
function ge(t) {
|
|
6
6
|
for (var e = t.length; e-- && me.test(t.charAt(e)); )
|
|
@@ -27,16 +27,14 @@ function j(t) {
|
|
|
27
27
|
var n = Se.test(t);
|
|
28
28
|
return n || Ee.test(t) ? be(t.slice(2), n ? 2 : 8) : we.test(t) ? q : +t;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var M = function() {
|
|
31
31
|
return de.Date.now();
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
var Re = "Expected a function", Ce = Math.max, Te = Math.min;
|
|
35
|
-
function Ie(t, e, n) {
|
|
32
|
+
}, xe = "Expected a function", Re = Math.max, Ce = Math.min;
|
|
33
|
+
function Te(t, e, n) {
|
|
36
34
|
var r, i, s, a, c, o, u = 0, f = !1, m = !1, h = !0;
|
|
37
35
|
if (typeof t != "function")
|
|
38
|
-
throw new TypeError(
|
|
39
|
-
e = j(e) || 0, O(n) && (f = !!n.leading, m = "maxWait" in n, s = m ?
|
|
36
|
+
throw new TypeError(xe);
|
|
37
|
+
e = j(e) || 0, O(n) && (f = !!n.leading, m = "maxWait" in n, s = m ? Re(j(n.maxWait) || 0, e) : s, h = "trailing" in n ? !!n.trailing : h);
|
|
40
38
|
function w(l) {
|
|
41
39
|
var S = r, C = i;
|
|
42
40
|
return r = i = void 0, u = l, a = t.apply(C, S), a;
|
|
@@ -46,7 +44,7 @@ function Ie(t, e, n) {
|
|
|
46
44
|
}
|
|
47
45
|
function I(l) {
|
|
48
46
|
var S = l - o, C = l - u, U = e - S;
|
|
49
|
-
return m ?
|
|
47
|
+
return m ? Ce(U, s - C) : U;
|
|
50
48
|
}
|
|
51
49
|
function z(l) {
|
|
52
50
|
var S = l - o, C = l - u;
|
|
@@ -79,7 +77,7 @@ function Ie(t, e, n) {
|
|
|
79
77
|
}
|
|
80
78
|
return $.cancel = ue, $.flush = he, $;
|
|
81
79
|
}
|
|
82
|
-
function
|
|
80
|
+
function Ie(t, e) {
|
|
83
81
|
if (t.match(/^[a-z]+:\/\//i))
|
|
84
82
|
return t;
|
|
85
83
|
if (t.match(/^\/\//))
|
|
@@ -89,7 +87,7 @@ function Le(t, e) {
|
|
|
89
87
|
const n = document.implementation.createHTMLDocument(), r = n.createElement("base"), i = n.createElement("a");
|
|
90
88
|
return n.head.appendChild(r), n.body.appendChild(i), e && (r.href = e), i.href = t, i.href;
|
|
91
89
|
}
|
|
92
|
-
const
|
|
90
|
+
const Le = /* @__PURE__ */ (() => {
|
|
93
91
|
let t = 0;
|
|
94
92
|
const e = () => (
|
|
95
93
|
// eslint-disable-next-line no-bitwise
|
|
@@ -107,19 +105,19 @@ function v(t, e) {
|
|
|
107
105
|
const r = (t.ownerDocument.defaultView || window).getComputedStyle(t).getPropertyValue(e);
|
|
108
106
|
return r ? parseFloat(r.replace("px", "")) : 0;
|
|
109
107
|
}
|
|
110
|
-
function
|
|
108
|
+
function De(t) {
|
|
111
109
|
const e = v(t, "border-left-width"), n = v(t, "border-right-width");
|
|
112
110
|
return t.clientWidth + e + n;
|
|
113
111
|
}
|
|
114
|
-
function
|
|
112
|
+
function ve(t) {
|
|
115
113
|
const e = v(t, "border-top-width"), n = v(t, "border-bottom-width");
|
|
116
114
|
return t.clientHeight + e + n;
|
|
117
115
|
}
|
|
118
116
|
function ee(t, e = {}) {
|
|
119
|
-
const n = e.width ||
|
|
117
|
+
const n = e.width || De(t), r = e.height || ve(t);
|
|
120
118
|
return { width: n, height: r };
|
|
121
119
|
}
|
|
122
|
-
function
|
|
120
|
+
function Ae() {
|
|
123
121
|
let t, e;
|
|
124
122
|
try {
|
|
125
123
|
e = process;
|
|
@@ -129,7 +127,7 @@ function Fe() {
|
|
|
129
127
|
return n && (t = parseInt(n, 10), Number.isNaN(t) && (t = 1)), t || window.devicePixelRatio || 1;
|
|
130
128
|
}
|
|
131
129
|
const p = 16384;
|
|
132
|
-
function
|
|
130
|
+
function Fe(t) {
|
|
133
131
|
(t.width > p || t.height > p) && (t.width > p && t.height > p ? t.width > t.height ? (t.height *= p / t.width, t.width = p) : (t.width *= p / t.height, t.height = p) : t.width > p ? (t.height *= p / t.width, t.width = p) : (t.width *= p / t.height, t.height = p));
|
|
134
132
|
}
|
|
135
133
|
function A(t) {
|
|
@@ -138,12 +136,12 @@ function A(t) {
|
|
|
138
136
|
r.decode = () => e(r), r.onload = () => e(r), r.onerror = n, r.crossOrigin = "anonymous", r.decoding = "async", r.src = t;
|
|
139
137
|
});
|
|
140
138
|
}
|
|
141
|
-
async function
|
|
139
|
+
async function $e(t) {
|
|
142
140
|
return Promise.resolve().then(() => new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then((e) => `data:image/svg+xml;charset=utf-8,${e}`);
|
|
143
141
|
}
|
|
144
|
-
async function
|
|
142
|
+
async function Pe(t, e, n) {
|
|
145
143
|
const r = "http://www.w3.org/2000/svg", i = document.createElementNS(r, "svg"), s = document.createElementNS(r, "foreignObject");
|
|
146
|
-
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${e} ${n}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(t),
|
|
144
|
+
return i.setAttribute("width", `${e}`), i.setAttribute("height", `${n}`), i.setAttribute("viewBox", `0 0 ${e} ${n}`), s.setAttribute("width", "100%"), s.setAttribute("height", "100%"), s.setAttribute("x", "0"), s.setAttribute("y", "0"), s.setAttribute("externalResourcesRequired", "true"), i.appendChild(s), s.appendChild(t), $e(i);
|
|
147
145
|
}
|
|
148
146
|
const g = (t, e) => {
|
|
149
147
|
if (t instanceof e)
|
|
@@ -151,37 +149,37 @@ const g = (t, e) => {
|
|
|
151
149
|
const n = Object.getPrototypeOf(t);
|
|
152
150
|
return n === null ? !1 : n.constructor.name === e.name || g(n, e);
|
|
153
151
|
};
|
|
154
|
-
function
|
|
152
|
+
function Me(t) {
|
|
155
153
|
const e = t.getPropertyValue("content");
|
|
156
154
|
return `${t.cssText} content: '${e.replace(/'|"/g, "")}';`;
|
|
157
155
|
}
|
|
158
|
-
function
|
|
156
|
+
function He(t) {
|
|
159
157
|
return y(t).map((e) => {
|
|
160
158
|
const n = t.getPropertyValue(e), r = t.getPropertyPriority(e);
|
|
161
159
|
return `${e}: ${n}${r ? " !important" : ""};`;
|
|
162
160
|
}).join(" ");
|
|
163
161
|
}
|
|
164
|
-
function
|
|
165
|
-
const r = `.${t}:${e}`, i = n.cssText ?
|
|
162
|
+
function Oe(t, e, n) {
|
|
163
|
+
const r = `.${t}:${e}`, i = n.cssText ? Me(n) : He(n);
|
|
166
164
|
return document.createTextNode(`${r}{${i}}`);
|
|
167
165
|
}
|
|
168
166
|
function N(t, e, n) {
|
|
169
167
|
const r = window.getComputedStyle(t, n), i = r.getPropertyValue("content");
|
|
170
168
|
if (i === "" || i === "none")
|
|
171
169
|
return;
|
|
172
|
-
const s =
|
|
170
|
+
const s = Le();
|
|
173
171
|
try {
|
|
174
172
|
e.className = `${e.className} ${s}`;
|
|
175
173
|
} catch {
|
|
176
174
|
return;
|
|
177
175
|
}
|
|
178
176
|
const a = document.createElement("style");
|
|
179
|
-
a.appendChild(
|
|
177
|
+
a.appendChild(Oe(s, n, r)), e.appendChild(a);
|
|
180
178
|
}
|
|
181
|
-
function
|
|
179
|
+
function Be(t, e) {
|
|
182
180
|
N(t, e, ":before"), N(t, e, ":after");
|
|
183
181
|
}
|
|
184
|
-
const X = "application/font-woff", J = "image/jpeg",
|
|
182
|
+
const X = "application/font-woff", J = "image/jpeg", ke = {
|
|
185
183
|
woff: X,
|
|
186
184
|
woff2: X,
|
|
187
185
|
ttf: "application/font-truetype",
|
|
@@ -194,15 +192,15 @@ const X = "application/font-woff", J = "image/jpeg", Ve = {
|
|
|
194
192
|
svg: "image/svg+xml",
|
|
195
193
|
webp: "image/webp"
|
|
196
194
|
};
|
|
197
|
-
function
|
|
195
|
+
function Ve(t) {
|
|
198
196
|
const e = /\.([^./]*?)$/g.exec(t);
|
|
199
197
|
return e ? e[1] : "";
|
|
200
198
|
}
|
|
201
199
|
function V(t) {
|
|
202
|
-
const e =
|
|
203
|
-
return
|
|
200
|
+
const e = Ve(t).toLowerCase();
|
|
201
|
+
return ke[e] || "";
|
|
204
202
|
}
|
|
205
|
-
function
|
|
203
|
+
function We(t) {
|
|
206
204
|
return t.split(/,/)[1];
|
|
207
205
|
}
|
|
208
206
|
function B(t) {
|
|
@@ -228,18 +226,18 @@ async function ne(t, e, n) {
|
|
|
228
226
|
});
|
|
229
227
|
}
|
|
230
228
|
const H = {};
|
|
231
|
-
function
|
|
229
|
+
function ze(t, e, n) {
|
|
232
230
|
let r = t.replace(/\?.*/, "");
|
|
233
231
|
return n && (r = t), /ttf|otf|eot|woff2?/i.test(r) && (r = r.replace(/.*\//, "")), e ? `[${e}]${r}` : r;
|
|
234
232
|
}
|
|
235
233
|
async function W(t, e, n) {
|
|
236
|
-
const r =
|
|
234
|
+
const r = ze(t, e, n.includeQueryParams);
|
|
237
235
|
if (H[r] != null)
|
|
238
236
|
return H[r];
|
|
239
237
|
n.cacheBust && (t += (/\?/.test(t) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
|
|
240
238
|
let i;
|
|
241
239
|
try {
|
|
242
|
-
const s = await ne(t, n.fetchRequestInit, ({ res: a, result: c }) => (e || (e = a.headers.get("Content-Type") || ""),
|
|
240
|
+
const s = await ne(t, n.fetchRequestInit, ({ res: a, result: c }) => (e || (e = a.headers.get("Content-Type") || ""), We(c)));
|
|
243
241
|
i = te(s, e);
|
|
244
242
|
} catch (s) {
|
|
245
243
|
i = n.imagePlaceholder || "";
|
|
@@ -248,11 +246,11 @@ async function W(t, e, n) {
|
|
|
248
246
|
}
|
|
249
247
|
return H[r] = i, i;
|
|
250
248
|
}
|
|
251
|
-
async function
|
|
249
|
+
async function Ge(t) {
|
|
252
250
|
const e = t.toDataURL();
|
|
253
251
|
return e === "data:," ? t.cloneNode(!1) : A(e);
|
|
254
252
|
}
|
|
255
|
-
async function
|
|
253
|
+
async function Ue(t, e) {
|
|
256
254
|
if (t.currentSrc) {
|
|
257
255
|
const s = document.createElement("canvas"), a = s.getContext("2d");
|
|
258
256
|
s.width = t.clientWidth, s.height = t.clientHeight, a == null || a.drawImage(t, 0, 0, s.width, s.height);
|
|
@@ -262,7 +260,7 @@ async function _e(t, e) {
|
|
|
262
260
|
const n = t.poster, r = V(n), i = await W(n, r, e);
|
|
263
261
|
return A(i);
|
|
264
262
|
}
|
|
265
|
-
async function
|
|
263
|
+
async function _e(t) {
|
|
266
264
|
var e;
|
|
267
265
|
try {
|
|
268
266
|
if (!((e = t == null ? void 0 : t.contentDocument) === null || e === void 0) && e.body)
|
|
@@ -271,18 +269,18 @@ async function qe(t) {
|
|
|
271
269
|
}
|
|
272
270
|
return t.cloneNode(!1);
|
|
273
271
|
}
|
|
274
|
-
async function
|
|
275
|
-
return g(t, HTMLCanvasElement) ?
|
|
272
|
+
async function qe(t, e) {
|
|
273
|
+
return g(t, HTMLCanvasElement) ? Ge(t) : g(t, HTMLVideoElement) ? Ue(t, e) : g(t, HTMLIFrameElement) ? _e(t) : t.cloneNode(!1);
|
|
276
274
|
}
|
|
277
|
-
const
|
|
278
|
-
async function
|
|
275
|
+
const je = (t) => t.tagName != null && t.tagName.toUpperCase() === "SLOT";
|
|
276
|
+
async function Ne(t, e, n) {
|
|
279
277
|
var r, i;
|
|
280
278
|
let s = [];
|
|
281
|
-
return
|
|
279
|
+
return je(t) && t.assignedNodes ? s = y(t.assignedNodes()) : g(t, HTMLIFrameElement) && (!((r = t.contentDocument) === null || r === void 0) && r.body) ? s = y(t.contentDocument.body.childNodes) : s = y(((i = t.shadowRoot) !== null && i !== void 0 ? i : t).childNodes), s.length === 0 || g(t, HTMLVideoElement) || await s.reduce((a, c) => a.then(() => F(c, n)).then((o) => {
|
|
282
280
|
o && e.appendChild(o);
|
|
283
281
|
}), Promise.resolve()), e;
|
|
284
282
|
}
|
|
285
|
-
function
|
|
283
|
+
function Xe(t, e) {
|
|
286
284
|
const n = e.style;
|
|
287
285
|
if (!n)
|
|
288
286
|
return;
|
|
@@ -292,19 +290,19 @@ function Je(t, e) {
|
|
|
292
290
|
i === "font-size" && s.endsWith("px") && (s = `${Math.floor(parseFloat(s.substring(0, s.length - 2))) - 0.1}px`), g(t, HTMLIFrameElement) && i === "display" && s === "inline" && (s = "block"), i === "d" && e.getAttribute("d") && (s = `path(${e.getAttribute("d")})`), n.setProperty(i, s, r.getPropertyPriority(i));
|
|
293
291
|
});
|
|
294
292
|
}
|
|
295
|
-
function
|
|
293
|
+
function Je(t, e) {
|
|
296
294
|
g(t, HTMLTextAreaElement) && (e.innerHTML = t.value), g(t, HTMLInputElement) && e.setAttribute("value", t.value);
|
|
297
295
|
}
|
|
298
|
-
function
|
|
296
|
+
function Qe(t, e) {
|
|
299
297
|
if (g(t, HTMLSelectElement)) {
|
|
300
298
|
const n = e, r = Array.from(n.children).find((i) => t.value === i.getAttribute("value"));
|
|
301
299
|
r && r.setAttribute("selected", "");
|
|
302
300
|
}
|
|
303
301
|
}
|
|
304
|
-
function
|
|
305
|
-
return g(e, Element) && (
|
|
302
|
+
function Ye(t, e) {
|
|
303
|
+
return g(e, Element) && (Xe(t, e), Be(t, e), Je(t, e), Qe(t, e)), e;
|
|
306
304
|
}
|
|
307
|
-
async function
|
|
305
|
+
async function Ze(t, e) {
|
|
308
306
|
const n = t.querySelectorAll ? t.querySelectorAll("use") : [];
|
|
309
307
|
if (n.length === 0)
|
|
310
308
|
return t;
|
|
@@ -329,35 +327,35 @@ async function Ke(t, e) {
|
|
|
329
327
|
return t;
|
|
330
328
|
}
|
|
331
329
|
async function F(t, e, n) {
|
|
332
|
-
return !n && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((r) =>
|
|
330
|
+
return !n && e.filter && !e.filter(t) ? null : Promise.resolve(t).then((r) => qe(r, e)).then((r) => Ne(t, r, e)).then((r) => Ye(t, r)).then((r) => Ze(r, e));
|
|
333
331
|
}
|
|
334
|
-
const re = /url\((['"]?)([^'"]+?)\1\)/g,
|
|
335
|
-
function
|
|
332
|
+
const re = /url\((['"]?)([^'"]+?)\1\)/g, Ke = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, et = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
|
|
333
|
+
function tt(t) {
|
|
336
334
|
const e = t.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
|
|
337
335
|
return new RegExp(`(url\\(['"]?)(${e})(['"]?\\))`, "g");
|
|
338
336
|
}
|
|
339
|
-
function
|
|
337
|
+
function nt(t) {
|
|
340
338
|
const e = [];
|
|
341
339
|
return t.replace(re, (n, r, i) => (e.push(i), n)), e.filter((n) => !B(n));
|
|
342
340
|
}
|
|
343
|
-
async function
|
|
341
|
+
async function rt(t, e, n, r, i) {
|
|
344
342
|
try {
|
|
345
|
-
const s = n ?
|
|
343
|
+
const s = n ? Ie(e, n) : e, a = V(e);
|
|
346
344
|
let c;
|
|
347
345
|
if (i) {
|
|
348
346
|
const o = await i(s);
|
|
349
347
|
c = te(o, a);
|
|
350
348
|
} else
|
|
351
349
|
c = await W(s, a, r);
|
|
352
|
-
return t.replace(
|
|
350
|
+
return t.replace(tt(e), `$1${c}$3`);
|
|
353
351
|
} catch {
|
|
354
352
|
}
|
|
355
353
|
return t;
|
|
356
354
|
}
|
|
357
|
-
function
|
|
358
|
-
return e ? t.replace(
|
|
355
|
+
function it(t, { preferredFontFormat: e }) {
|
|
356
|
+
return e ? t.replace(et, (n) => {
|
|
359
357
|
for (; ; ) {
|
|
360
|
-
const [r, , i] =
|
|
358
|
+
const [r, , i] = Ke.exec(n) || [];
|
|
361
359
|
if (!i)
|
|
362
360
|
return "";
|
|
363
361
|
if (i === e)
|
|
@@ -371,8 +369,8 @@ function ie(t) {
|
|
|
371
369
|
async function se(t, e, n) {
|
|
372
370
|
if (!ie(t))
|
|
373
371
|
return t;
|
|
374
|
-
const r =
|
|
375
|
-
return
|
|
372
|
+
const r = it(t, n);
|
|
373
|
+
return nt(r).reduce((s, a) => s.then((c) => rt(c, a, e, n)), Promise.resolve(r));
|
|
376
374
|
}
|
|
377
375
|
async function D(t, e, n) {
|
|
378
376
|
var r;
|
|
@@ -383,10 +381,10 @@ async function D(t, e, n) {
|
|
|
383
381
|
}
|
|
384
382
|
return !1;
|
|
385
383
|
}
|
|
386
|
-
async function
|
|
384
|
+
async function st(t, e) {
|
|
387
385
|
await D("background", t, e) || await D("background-image", t, e), await D("mask", t, e) || await D("mask-image", t, e);
|
|
388
386
|
}
|
|
389
|
-
async function
|
|
387
|
+
async function at(t, e) {
|
|
390
388
|
const n = g(t, HTMLImageElement);
|
|
391
389
|
if (!(n && !B(t.src)) && !(g(t, SVGImageElement) && !B(t.href.baseVal)))
|
|
392
390
|
return;
|
|
@@ -397,14 +395,14 @@ async function ct(t, e) {
|
|
|
397
395
|
c.decode && (c.decode = s), c.loading === "lazy" && (c.loading = "eager"), n ? (t.srcset = "", t.src = i) : t.href.baseVal = i;
|
|
398
396
|
});
|
|
399
397
|
}
|
|
400
|
-
async function
|
|
398
|
+
async function ct(t, e) {
|
|
401
399
|
const r = y(t.childNodes).map((i) => ae(i, e));
|
|
402
400
|
await Promise.all(r).then(() => t);
|
|
403
401
|
}
|
|
404
402
|
async function ae(t, e) {
|
|
405
|
-
g(t, Element) && (await
|
|
403
|
+
g(t, Element) && (await st(t, e), await at(t, e), await ct(t, e));
|
|
406
404
|
}
|
|
407
|
-
function
|
|
405
|
+
function ot(t, e) {
|
|
408
406
|
const { style: n } = t;
|
|
409
407
|
e.backgroundColor && (n.backgroundColor = e.backgroundColor), e.width && (n.width = `${e.width}px`), e.height && (n.height = `${e.height}px`);
|
|
410
408
|
const r = e.style;
|
|
@@ -454,7 +452,7 @@ function K(t) {
|
|
|
454
452
|
}
|
|
455
453
|
return e;
|
|
456
454
|
}
|
|
457
|
-
async function
|
|
455
|
+
async function lt(t, e) {
|
|
458
456
|
const n = [], r = [];
|
|
459
457
|
return t.forEach((i) => {
|
|
460
458
|
if ("cssRules" in i)
|
|
@@ -496,42 +494,42 @@ async function ut(t, e) {
|
|
|
496
494
|
}
|
|
497
495
|
}), n));
|
|
498
496
|
}
|
|
499
|
-
function
|
|
497
|
+
function ut(t) {
|
|
500
498
|
return t.filter((e) => e.type === CSSRule.FONT_FACE_RULE).filter((e) => ie(e.style.getPropertyValue("src")));
|
|
501
499
|
}
|
|
502
|
-
async function
|
|
500
|
+
async function ht(t, e) {
|
|
503
501
|
if (t.ownerDocument == null)
|
|
504
502
|
throw new Error("Provided element is not within a Document");
|
|
505
|
-
const n = y(t.ownerDocument.styleSheets), r = await
|
|
506
|
-
return
|
|
503
|
+
const n = y(t.ownerDocument.styleSheets), r = await lt(n, e);
|
|
504
|
+
return ut(r);
|
|
507
505
|
}
|
|
508
|
-
async function
|
|
509
|
-
const n = await
|
|
506
|
+
async function ft(t, e) {
|
|
507
|
+
const n = await ht(t, e);
|
|
510
508
|
return (await Promise.all(n.map((i) => {
|
|
511
509
|
const s = i.parentStyleSheet ? i.parentStyleSheet.href : null;
|
|
512
510
|
return se(i.cssText, s, e);
|
|
513
511
|
}))).join(`
|
|
514
512
|
`);
|
|
515
513
|
}
|
|
516
|
-
async function
|
|
517
|
-
const n = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await
|
|
514
|
+
async function dt(t, e) {
|
|
515
|
+
const n = e.fontEmbedCSS != null ? e.fontEmbedCSS : e.skipFonts ? null : await ft(t, e);
|
|
518
516
|
if (n) {
|
|
519
517
|
const r = document.createElement("style"), i = document.createTextNode(n);
|
|
520
518
|
r.appendChild(i), t.firstChild ? t.insertBefore(r, t.firstChild) : t.appendChild(r);
|
|
521
519
|
}
|
|
522
520
|
}
|
|
523
|
-
async function
|
|
521
|
+
async function mt(t, e = {}) {
|
|
524
522
|
const { width: n, height: r } = ee(t, e), i = await F(t, e, !0);
|
|
525
|
-
return await
|
|
523
|
+
return await dt(i, e), await ae(i, e), ot(i, e), await Pe(i, n, r);
|
|
526
524
|
}
|
|
527
525
|
async function ce(t, e = {}) {
|
|
528
|
-
const { width: n, height: r } = ee(t, e), i = await
|
|
529
|
-
return a.width = u * o, a.height = f * o, e.skipAutoScale ||
|
|
526
|
+
const { width: n, height: r } = ee(t, e), i = await mt(t, e), s = await A(i), a = document.createElement("canvas"), c = a.getContext("2d"), o = e.pixelRatio || Ae(), u = e.canvasWidth || n, f = e.canvasHeight || r;
|
|
527
|
+
return a.width = u * o, a.height = f * o, e.skipAutoScale || Fe(a), a.style.width = `${u}`, a.style.height = `${f}`, e.backgroundColor && (c.fillStyle = e.backgroundColor, c.fillRect(0, 0, a.width, a.height)), c.drawImage(s, 0, 0, a.width, a.height), a;
|
|
530
528
|
}
|
|
531
|
-
async function
|
|
529
|
+
async function gt(t, e = {}) {
|
|
532
530
|
return (await ce(t, e)).toDataURL();
|
|
533
531
|
}
|
|
534
|
-
async function
|
|
532
|
+
async function pt(t, e = {}) {
|
|
535
533
|
return (await ce(t, e)).toDataURL("image/jpeg", e.quality || 1);
|
|
536
534
|
}
|
|
537
535
|
class oe {
|
|
@@ -551,7 +549,7 @@ class oe {
|
|
|
551
549
|
this.services = e;
|
|
552
550
|
}
|
|
553
551
|
}
|
|
554
|
-
const
|
|
552
|
+
const yt = "DONT_STYLE_ME_css_styles_verifier";
|
|
555
553
|
class k extends oe {
|
|
556
554
|
// initialized in initializeID() called by init()
|
|
557
555
|
constructor(e, n) {
|
|
@@ -657,7 +655,7 @@ class k extends oe {
|
|
|
657
655
|
}
|
|
658
656
|
addMainContainer() {
|
|
659
657
|
const e = this.model.getOptions(), n = T(e, "style", "prefix"), r = d(this.getHolder()).append("div").classed(`${_}--${n}--chart-wrapper`, !0).attr("id", `chart-${this.getChartID()}`).style("height", "100%").style("width", "100%");
|
|
660
|
-
r.append("g").attr("class",
|
|
658
|
+
r.append("g").attr("class", yt), this.mainContainer = r.node();
|
|
661
659
|
}
|
|
662
660
|
update() {
|
|
663
661
|
this.styleHolderElement();
|
|
@@ -671,7 +669,7 @@ class k extends oe {
|
|
|
671
669
|
}
|
|
672
670
|
exportToJPG() {
|
|
673
671
|
const e = this, n = this.model.getOptions(), r = this.getHolder(), i = d(r);
|
|
674
|
-
i.classed("filled", !0),
|
|
672
|
+
i.classed("filled", !0), pt(this.getMainContainer(), {
|
|
675
673
|
quality: 1,
|
|
676
674
|
// Remove toolbar
|
|
677
675
|
filter: (s) => !(s.classList && s.classList.contains("cds--cc--toolbar"))
|
|
@@ -684,7 +682,7 @@ class k extends oe {
|
|
|
684
682
|
}
|
|
685
683
|
exportToPNG() {
|
|
686
684
|
const e = this, n = this.model.getOptions(), r = this.getHolder(), i = d(r);
|
|
687
|
-
i.classed("filled", !0),
|
|
685
|
+
i.classed("filled", !0), gt(this.getMainContainer(), {
|
|
688
686
|
quality: 1,
|
|
689
687
|
// Remove toolbar
|
|
690
688
|
filter: (s) => !(s.classList && s.classList.contains("cds--cc--toolbar"))
|
|
@@ -746,7 +744,7 @@ class k extends oe {
|
|
|
746
744
|
if (!e)
|
|
747
745
|
return;
|
|
748
746
|
let n = e.clientWidth, r = e.clientHeight;
|
|
749
|
-
const i =
|
|
747
|
+
const i = Te(() => {
|
|
750
748
|
var a;
|
|
751
749
|
e && (Math.abs(n - e.clientWidth) > 1 || Math.abs(r - e.clientHeight) > 1) && (n = e.clientWidth, r = e.clientHeight, (a = this.services.events) == null || a.dispatchEvent(P.Chart.RESIZE));
|
|
752
750
|
}, 12.5);
|
|
@@ -794,8 +792,8 @@ class le extends oe {
|
|
|
794
792
|
]), i;
|
|
795
793
|
}
|
|
796
794
|
}
|
|
797
|
-
function
|
|
798
|
-
const e = St(
|
|
795
|
+
function Rt(t) {
|
|
796
|
+
const e = wt(St(t), 360);
|
|
799
797
|
return x(e, [0, 10]) || x(e, [350, 0]) ? {
|
|
800
798
|
textAnchor: E.START,
|
|
801
799
|
dominantBaseline: b.MIDDLE
|
|
@@ -822,35 +820,35 @@ function Ct(t) {
|
|
|
822
820
|
dominantBaseline: b.BASELINE
|
|
823
821
|
};
|
|
824
822
|
}
|
|
825
|
-
function
|
|
823
|
+
function wt(t, e) {
|
|
826
824
|
return (t % e + e) % e;
|
|
827
825
|
}
|
|
828
826
|
function x(t, [e, n]) {
|
|
829
827
|
return t >= e && t <= n;
|
|
830
828
|
}
|
|
831
|
-
function
|
|
829
|
+
function St(t) {
|
|
832
830
|
return t * (180 / Math.PI);
|
|
833
831
|
}
|
|
834
|
-
function
|
|
832
|
+
function Ct(t) {
|
|
835
833
|
return t * (Math.PI / 180);
|
|
836
834
|
}
|
|
837
|
-
function
|
|
835
|
+
function Tt(t, e, n = { x: 0, y: 0 }) {
|
|
838
836
|
const r = e * Math.cos(t) + n.x, i = e * Math.sin(t) + n.y;
|
|
839
837
|
return { x: isNaN(r) ? 0 : r, y: isNaN(i) ? 0 : i };
|
|
840
838
|
}
|
|
841
|
-
function
|
|
839
|
+
function It(t, e) {
|
|
842
840
|
return e * Math.sin(t - Math.PI / 2);
|
|
843
841
|
}
|
|
844
842
|
export {
|
|
845
843
|
k as D,
|
|
846
844
|
le as G,
|
|
847
845
|
oe as S,
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
846
|
+
It as a,
|
|
847
|
+
St as b,
|
|
848
|
+
Te as c,
|
|
849
|
+
Ct as d,
|
|
850
|
+
Tt as p,
|
|
851
|
+
Rt as r,
|
|
854
852
|
j as t
|
|
855
853
|
};
|
|
856
|
-
//# sourceMappingURL=angle-utils-
|
|
854
|
+
//# sourceMappingURL=angle-utils-CGNQcrjg.mjs.map
|