katucharts.js 0.2.7 → 0.2.8
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/export/Export.d.ts +14 -0
- package/dist/katucharts.es.js +586 -548
- package/dist/katucharts.umd.js +5 -5
- package/package.json +1 -1
package/dist/katucharts.es.js
CHANGED
|
@@ -161,7 +161,7 @@ var Dr = 0.7, Lo = 1 / Dr, zi = "\\s*([+-]?\\d+)\\s*", zr = "\\s*([+-]?(?:\\d*\\
|
|
|
161
161
|
yellow: 16776960,
|
|
162
162
|
yellowgreen: 10145074
|
|
163
163
|
};
|
|
164
|
-
bc(Yr,
|
|
164
|
+
bc(Yr, ae, {
|
|
165
165
|
copy(n) {
|
|
166
166
|
return Object.assign(new this.constructor(), this, n);
|
|
167
167
|
},
|
|
@@ -188,7 +188,7 @@ function Vp() {
|
|
|
188
188
|
function Al() {
|
|
189
189
|
return this.rgb().formatRgb();
|
|
190
190
|
}
|
|
191
|
-
function
|
|
191
|
+
function ae(n) {
|
|
192
192
|
var t, e;
|
|
193
193
|
return n = (n + "").trim().toLowerCase(), (t = Rp.exec(n)) ? (e = t[1].length, t = parseInt(t[1], 16), e === 6 ? Sl(t) : e === 3 ? new We(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : e === 8 ? Kr(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : e === 4 ? Kr(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = Dp.exec(n)) ? new We(t[1], t[2], t[3], 1) : (t = zp.exec(n)) ? new We(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = Bp.exec(n)) ? Kr(t[1], t[2], t[3], t[4]) : (t = Op.exec(n)) ? Kr(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = Np.exec(n)) ? Pl(t[1], t[2] / 100, t[3] / 100, 1) : (t = Wp.exec(n)) ? Pl(t[1], t[2] / 100, t[3] / 100, t[4]) : kl.hasOwnProperty(n) ? Sl(kl[n]) : n === "transparent" ? new We(NaN, NaN, NaN, 0) : null;
|
|
194
194
|
}
|
|
@@ -199,7 +199,7 @@ function Kr(n, t, e, i) {
|
|
|
199
199
|
return i <= 0 && (n = t = e = NaN), new We(n, t, e, i);
|
|
200
200
|
}
|
|
201
201
|
function Gp(n) {
|
|
202
|
-
return n instanceof Yr || (n =
|
|
202
|
+
return n instanceof Yr || (n = ae(n)), n ? (n = n.rgb(), new We(n.r, n.g, n.b, n.opacity)) : new We();
|
|
203
203
|
}
|
|
204
204
|
function Xe(n, t, e, i) {
|
|
205
205
|
return arguments.length === 1 ? Gp(n) : new We(n, t, e, i ?? 1);
|
|
@@ -254,7 +254,7 @@ function Pl(n, t, e, i) {
|
|
|
254
254
|
}
|
|
255
255
|
function of(n) {
|
|
256
256
|
if (n instanceof pn) return new pn(n.h, n.s, n.l, n.opacity);
|
|
257
|
-
if (n instanceof Yr || (n =
|
|
257
|
+
if (n instanceof Yr || (n = ae(n)), !n) return new pn();
|
|
258
258
|
if (n instanceof pn) return n;
|
|
259
259
|
n = n.rgb();
|
|
260
260
|
var t = n.r / 255, e = n.g / 255, i = n.b / 255, r = Math.min(t, e, i), o = Math.max(t, e, i), s = NaN, a = o - r, l = (o + r) / 2;
|
|
@@ -306,7 +306,7 @@ const Qr = /* @__PURE__ */ new Map(), Xp = 256;
|
|
|
306
306
|
function va(n) {
|
|
307
307
|
const t = n || "rgba(0,0,0,0)", e = Qr.get(t);
|
|
308
308
|
if (e) return e;
|
|
309
|
-
const i = "rgba(0,0,0,0)", r =
|
|
309
|
+
const i = "rgba(0,0,0,0)", r = ae(n || i), o = Xe(r || i), s = {
|
|
310
310
|
r: Math.round(o.r),
|
|
311
311
|
g: Math.round(o.g),
|
|
312
312
|
b: Math.round(o.b),
|
|
@@ -455,7 +455,7 @@ const Is = {
|
|
|
455
455
|
function af(n) {
|
|
456
456
|
return Ro[n];
|
|
457
457
|
}
|
|
458
|
-
const Mt = "12px",
|
|
458
|
+
const Mt = "12px", Ee = "#000000", Ll = "#1a1a1a", Kp = "#ffffff", Jp = 3;
|
|
459
459
|
function Fs(n) {
|
|
460
460
|
const t = n / 255;
|
|
461
461
|
return t <= 0.03928 ? t / 12.92 : ((t + 0.055) / 1.055) ** 2.4;
|
|
@@ -470,8 +470,8 @@ const Qp = cf(26, 26, 26);
|
|
|
470
470
|
function Dn(n, t) {
|
|
471
471
|
var s;
|
|
472
472
|
if (t) return t;
|
|
473
|
-
const e = n ? (s =
|
|
474
|
-
if (!e || isNaN(e.r) || e.opacity === 0) return
|
|
473
|
+
const e = n ? (s = ae(n)) == null ? void 0 : s.rgb() : null;
|
|
474
|
+
if (!e || isNaN(e.r) || e.opacity === 0) return Ee;
|
|
475
475
|
const i = cf(e.r, e.g, e.b), r = Il(i, Qp);
|
|
476
476
|
return r >= Jp ? Ll : Il(i, 1) >= r ? Kp : Ll;
|
|
477
477
|
}
|
|
@@ -480,14 +480,14 @@ function Fl() {
|
|
|
480
480
|
const n = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
|
481
481
|
return n > 0 ? n : 16;
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function Ae(n) {
|
|
484
484
|
if (!n) return 12;
|
|
485
485
|
const t = n.trim();
|
|
486
486
|
if (/^(clamp|min|max)\s*\(/i.test(t)) {
|
|
487
487
|
const r = t.slice(t.indexOf("(") + 1, t.lastIndexOf(")")).match(/-?\d*\.?\d+\s*(px|rem|em)/gi) || [];
|
|
488
488
|
let o = 0;
|
|
489
489
|
for (const s of r) {
|
|
490
|
-
const a =
|
|
490
|
+
const a = Ae(s.trim());
|
|
491
491
|
a > o && (o = a);
|
|
492
492
|
}
|
|
493
493
|
return o > 0 ? o : 12;
|
|
@@ -883,7 +883,7 @@ const hf = 20;
|
|
|
883
883
|
function Rl(n) {
|
|
884
884
|
return typeof n == "object" && n !== null && !Array.isArray(n) && Object.getPrototypeOf(n) === Object.prototype;
|
|
885
885
|
}
|
|
886
|
-
function
|
|
886
|
+
function fe(n, ...t) {
|
|
887
887
|
return uf(n, t, 0);
|
|
888
888
|
}
|
|
889
889
|
function uf(n, t, e) {
|
|
@@ -1085,7 +1085,7 @@ class fg {
|
|
|
1085
1085
|
return this._cloneInto();
|
|
1086
1086
|
}
|
|
1087
1087
|
}
|
|
1088
|
-
const
|
|
1088
|
+
const be = /* @__PURE__ */ Uint32Array.from([
|
|
1089
1089
|
1779033703,
|
|
1090
1090
|
4089235720,
|
|
1091
1091
|
3144134277,
|
|
@@ -1241,22 +1241,22 @@ class Mg extends fg {
|
|
|
1241
1241
|
class Ag extends Mg {
|
|
1242
1242
|
constructor() {
|
|
1243
1243
|
super(64);
|
|
1244
|
-
xt(this, "Ah",
|
|
1245
|
-
xt(this, "Al",
|
|
1246
|
-
xt(this, "Bh",
|
|
1247
|
-
xt(this, "Bl",
|
|
1248
|
-
xt(this, "Ch",
|
|
1249
|
-
xt(this, "Cl",
|
|
1250
|
-
xt(this, "Dh",
|
|
1251
|
-
xt(this, "Dl",
|
|
1252
|
-
xt(this, "Eh",
|
|
1253
|
-
xt(this, "El",
|
|
1254
|
-
xt(this, "Fh",
|
|
1255
|
-
xt(this, "Fl",
|
|
1256
|
-
xt(this, "Gh",
|
|
1257
|
-
xt(this, "Gl",
|
|
1258
|
-
xt(this, "Hh",
|
|
1259
|
-
xt(this, "Hl",
|
|
1244
|
+
xt(this, "Ah", be[0] | 0);
|
|
1245
|
+
xt(this, "Al", be[1] | 0);
|
|
1246
|
+
xt(this, "Bh", be[2] | 0);
|
|
1247
|
+
xt(this, "Bl", be[3] | 0);
|
|
1248
|
+
xt(this, "Ch", be[4] | 0);
|
|
1249
|
+
xt(this, "Cl", be[5] | 0);
|
|
1250
|
+
xt(this, "Dh", be[6] | 0);
|
|
1251
|
+
xt(this, "Dl", be[7] | 0);
|
|
1252
|
+
xt(this, "Eh", be[8] | 0);
|
|
1253
|
+
xt(this, "El", be[9] | 0);
|
|
1254
|
+
xt(this, "Fh", be[10] | 0);
|
|
1255
|
+
xt(this, "Fl", be[11] | 0);
|
|
1256
|
+
xt(this, "Gh", be[12] | 0);
|
|
1257
|
+
xt(this, "Gl", be[13] | 0);
|
|
1258
|
+
xt(this, "Hh", be[14] | 0);
|
|
1259
|
+
xt(this, "Hl", be[15] | 0);
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
const Sg = /* @__PURE__ */ lg(
|
|
@@ -1264,7 +1264,7 @@ const Sg = /* @__PURE__ */ lg(
|
|
|
1264
1264
|
/* @__PURE__ */ ug(3)
|
|
1265
1265
|
);
|
|
1266
1266
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1267
|
-
const
|
|
1267
|
+
const Le = (n, t, e) => wi(n, t, e), gf = vc, mf = wc, Wl = (...n) => cg(...n), _g = (n) => kc(n), Cg = ff, Pg = (n) => hg(n), Do = /* @__PURE__ */ BigInt(0), Ma = /* @__PURE__ */ BigInt(1);
|
|
1268
1268
|
function zo(n, t = "") {
|
|
1269
1269
|
if (typeof n != "boolean") {
|
|
1270
1270
|
const e = t && `"${t}" `;
|
|
@@ -1314,7 +1314,7 @@ function $g(n, t) {
|
|
|
1314
1314
|
return xf(n, t).reverse();
|
|
1315
1315
|
}
|
|
1316
1316
|
function Lg(n, t) {
|
|
1317
|
-
if (n =
|
|
1317
|
+
if (n = Le(n), t = Le(t), n.length !== t.length)
|
|
1318
1318
|
return !1;
|
|
1319
1319
|
let e = 0;
|
|
1320
1320
|
for (let i = 0; i < n.length; i++)
|
|
@@ -1322,7 +1322,7 @@ function Lg(n, t) {
|
|
|
1322
1322
|
return e === 0;
|
|
1323
1323
|
}
|
|
1324
1324
|
function Sa(n) {
|
|
1325
|
-
return Uint8Array.from(
|
|
1325
|
+
return Uint8Array.from(Le(n));
|
|
1326
1326
|
}
|
|
1327
1327
|
const bo = (n) => typeof n == "bigint" && Do <= n;
|
|
1328
1328
|
function Ig(n, t, e) {
|
|
@@ -1361,34 +1361,34 @@ const Vl = () => {
|
|
|
1361
1361
|
throw new Error("not implemented");
|
|
1362
1362
|
};
|
|
1363
1363
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1364
|
-
const
|
|
1365
|
-
function
|
|
1366
|
-
if (t <=
|
|
1364
|
+
const _e = /* @__PURE__ */ BigInt(0), me = /* @__PURE__ */ BigInt(1), ci = /* @__PURE__ */ BigInt(2), bf = /* @__PURE__ */ BigInt(3), vf = /* @__PURE__ */ BigInt(4), wf = /* @__PURE__ */ BigInt(5), Dg = /* @__PURE__ */ BigInt(7), kf = /* @__PURE__ */ BigInt(8), zg = /* @__PURE__ */ BigInt(9), Mf = /* @__PURE__ */ BigInt(16);
|
|
1365
|
+
function oe(n, t) {
|
|
1366
|
+
if (t <= _e)
|
|
1367
1367
|
throw new Error("mod: expected positive modulus, got " + t);
|
|
1368
1368
|
const e = n % t;
|
|
1369
|
-
return e >=
|
|
1369
|
+
return e >= _e ? e : t + e;
|
|
1370
1370
|
}
|
|
1371
1371
|
function bn(n, t, e) {
|
|
1372
|
-
if (t <
|
|
1372
|
+
if (t < _e)
|
|
1373
1373
|
throw new Error("pow2: expected non-negative exponent, got " + t);
|
|
1374
1374
|
let i = n;
|
|
1375
|
-
for (; t-- >
|
|
1375
|
+
for (; t-- > _e; )
|
|
1376
1376
|
i *= i, i %= e;
|
|
1377
1377
|
return i;
|
|
1378
1378
|
}
|
|
1379
1379
|
function Gl(n, t) {
|
|
1380
|
-
if (n ===
|
|
1380
|
+
if (n === _e)
|
|
1381
1381
|
throw new Error("invert: expected non-zero number");
|
|
1382
|
-
if (t <=
|
|
1382
|
+
if (t <= _e)
|
|
1383
1383
|
throw new Error("invert: expected positive modulus, got " + t);
|
|
1384
|
-
let e =
|
|
1385
|
-
for (; e !==
|
|
1384
|
+
let e = oe(n, t), i = t, r = _e, o = me;
|
|
1385
|
+
for (; e !== _e; ) {
|
|
1386
1386
|
const a = i / e, l = i - e * a, c = r - o * a;
|
|
1387
1387
|
i = e, e = l, r = o, o = c;
|
|
1388
1388
|
}
|
|
1389
|
-
if (i !==
|
|
1389
|
+
if (i !== me)
|
|
1390
1390
|
throw new Error("invert: does not exist");
|
|
1391
|
-
return
|
|
1391
|
+
return oe(r, t);
|
|
1392
1392
|
}
|
|
1393
1393
|
function Ac(n, t, e) {
|
|
1394
1394
|
const i = n;
|
|
@@ -1396,7 +1396,7 @@ function Ac(n, t, e) {
|
|
|
1396
1396
|
throw new Error("Cannot find square root");
|
|
1397
1397
|
}
|
|
1398
1398
|
function Af(n, t) {
|
|
1399
|
-
const e = n, i = (e.ORDER +
|
|
1399
|
+
const e = n, i = (e.ORDER + me) / vf, r = e.pow(t, i);
|
|
1400
1400
|
return Ac(e, r, t), r;
|
|
1401
1401
|
}
|
|
1402
1402
|
function Bg(n, t) {
|
|
@@ -1417,8 +1417,8 @@ function Og(n) {
|
|
|
1417
1417
|
function Sf(n) {
|
|
1418
1418
|
if (n < bf)
|
|
1419
1419
|
throw new Error("sqrt is not defined for small field");
|
|
1420
|
-
let t = n -
|
|
1421
|
-
for (; t % ci ===
|
|
1420
|
+
let t = n - me, e = 0;
|
|
1421
|
+
for (; t % ci === _e; )
|
|
1422
1422
|
t /= ci, e++;
|
|
1423
1423
|
let i = ci;
|
|
1424
1424
|
const r = Sc(n);
|
|
@@ -1428,7 +1428,7 @@ function Sf(n) {
|
|
|
1428
1428
|
if (e === 1)
|
|
1429
1429
|
return Af;
|
|
1430
1430
|
let o = r.pow(i, t);
|
|
1431
|
-
const s = (t +
|
|
1431
|
+
const s = (t + me) / ci;
|
|
1432
1432
|
return function(l, c) {
|
|
1433
1433
|
const h = l;
|
|
1434
1434
|
if (h.is0(c))
|
|
@@ -1443,7 +1443,7 @@ function Sf(n) {
|
|
|
1443
1443
|
for (; !h.eql(g, h.ONE); )
|
|
1444
1444
|
if (y++, g = h.sqr(g), y === f)
|
|
1445
1445
|
throw new Error("Cannot find square root");
|
|
1446
|
-
const m =
|
|
1446
|
+
const m = me << BigInt(f - y - 1), x = h.pow(u, m);
|
|
1447
1447
|
f = y, u = h.sqr(x), d = h.mul(d, u), p = h.mul(p, x);
|
|
1448
1448
|
}
|
|
1449
1449
|
return p;
|
|
@@ -1452,7 +1452,7 @@ function Sf(n) {
|
|
|
1452
1452
|
function Ng(n) {
|
|
1453
1453
|
return n % vf === bf ? Af : n % kf === wf ? Bg : n % Mf === zg ? Og(n) : Sf(n);
|
|
1454
1454
|
}
|
|
1455
|
-
const ii = (n, t) => (
|
|
1455
|
+
const ii = (n, t) => (oe(n, t) & me) === me, Wg = [
|
|
1456
1456
|
"create",
|
|
1457
1457
|
"isValid",
|
|
1458
1458
|
"is0",
|
|
@@ -1479,21 +1479,21 @@ function Hg(n) {
|
|
|
1479
1479
|
}, e = Wg.reduce((i, r) => (i[r] = "function", i), t);
|
|
1480
1480
|
if (Mc(n, e), Aa(n.BYTES, "BYTES"), Aa(n.BITS, "BITS"), n.BYTES < 1 || n.BITS < 1)
|
|
1481
1481
|
throw new Error("invalid field: expected BYTES/BITS > 0");
|
|
1482
|
-
if (n.ORDER <=
|
|
1482
|
+
if (n.ORDER <= me)
|
|
1483
1483
|
throw new Error("invalid field: expected ORDER > 1, got " + n.ORDER);
|
|
1484
1484
|
return n;
|
|
1485
1485
|
}
|
|
1486
1486
|
function Vg(n, t, e) {
|
|
1487
1487
|
const i = n;
|
|
1488
|
-
if (e <
|
|
1488
|
+
if (e < _e)
|
|
1489
1489
|
throw new Error("invalid exponent, negatives unsupported");
|
|
1490
|
-
if (e ===
|
|
1490
|
+
if (e === _e)
|
|
1491
1491
|
return i.ONE;
|
|
1492
|
-
if (e ===
|
|
1492
|
+
if (e === me)
|
|
1493
1493
|
return t;
|
|
1494
1494
|
let r = i.ONE, o = t;
|
|
1495
|
-
for (; e >
|
|
1496
|
-
e &
|
|
1495
|
+
for (; e > _e; )
|
|
1496
|
+
e & me && (r = i.mul(r, o)), o = i.sqr(o), e >>= me;
|
|
1497
1497
|
return r;
|
|
1498
1498
|
}
|
|
1499
1499
|
function _f(n, t, e = !1) {
|
|
@@ -1501,13 +1501,13 @@ function _f(n, t, e = !1) {
|
|
|
1501
1501
|
return t.reduceRight((a, l, c) => i.is0(l) ? a : (r[c] = i.mul(a, r[c]), i.mul(a, l)), s), r;
|
|
1502
1502
|
}
|
|
1503
1503
|
function Yl(n, t) {
|
|
1504
|
-
const e = n, i = (e.ORDER -
|
|
1504
|
+
const e = n, i = (e.ORDER - me) / ci, r = e.pow(t, i), o = e.eql(r, e.ONE), s = e.eql(r, e.ZERO), a = e.eql(r, e.neg(e.ONE));
|
|
1505
1505
|
if (!o && !s && !a)
|
|
1506
1506
|
throw new Error("invalid Legendre symbol result");
|
|
1507
1507
|
return o ? 1 : s ? 0 : -1;
|
|
1508
1508
|
}
|
|
1509
1509
|
function Gg(n, t) {
|
|
1510
|
-
if (t !== void 0 && gf(t), n <=
|
|
1510
|
+
if (t !== void 0 && gf(t), n <= _e)
|
|
1511
1511
|
throw new Error("invalid n length: expected positive n, got " + n);
|
|
1512
1512
|
if (t !== void 0 && t < 1)
|
|
1513
1513
|
throw new Error("invalid n length: expected positive bit length, got " + t);
|
|
@@ -1524,11 +1524,11 @@ class Cf {
|
|
|
1524
1524
|
xt(this, "BITS");
|
|
1525
1525
|
xt(this, "BYTES");
|
|
1526
1526
|
xt(this, "isLE");
|
|
1527
|
-
xt(this, "ZERO",
|
|
1528
|
-
xt(this, "ONE",
|
|
1527
|
+
xt(this, "ZERO", _e);
|
|
1528
|
+
xt(this, "ONE", me);
|
|
1529
1529
|
xt(this, "_lengths");
|
|
1530
1530
|
xt(this, "_mod");
|
|
1531
|
-
if (t <=
|
|
1531
|
+
if (t <= me)
|
|
1532
1532
|
throw new Error("invalid field: expected ORDER > 1, got " + t);
|
|
1533
1533
|
let i;
|
|
1534
1534
|
this.isLE = !1, e != null && typeof e == "object" && (typeof e.BITS == "number" && (i = e.BITS), typeof e.sqrt == "function" && Object.defineProperty(this, "sqrt", { value: e.sqrt, enumerable: !0 }), typeof e.isLE == "boolean" && (this.isLE = e.isLE), e.allowedLengths && (this._lengths = Object.freeze(e.allowedLengths.slice())), typeof e.modFromBytes == "boolean" && (this._mod = e.modFromBytes));
|
|
@@ -1538,46 +1538,46 @@ class Cf {
|
|
|
1538
1538
|
this.ORDER = t, this.BITS = r, this.BYTES = o, Object.freeze(this);
|
|
1539
1539
|
}
|
|
1540
1540
|
create(t) {
|
|
1541
|
-
return
|
|
1541
|
+
return oe(t, this.ORDER);
|
|
1542
1542
|
}
|
|
1543
1543
|
isValid(t) {
|
|
1544
1544
|
if (typeof t != "bigint")
|
|
1545
1545
|
throw new TypeError("invalid field element: expected bigint, got " + typeof t);
|
|
1546
|
-
return
|
|
1546
|
+
return _e <= t && t < this.ORDER;
|
|
1547
1547
|
}
|
|
1548
1548
|
is0(t) {
|
|
1549
|
-
return t ===
|
|
1549
|
+
return t === _e;
|
|
1550
1550
|
}
|
|
1551
1551
|
// is valid and invertible
|
|
1552
1552
|
isValidNot0(t) {
|
|
1553
1553
|
return !this.is0(t) && this.isValid(t);
|
|
1554
1554
|
}
|
|
1555
1555
|
isOdd(t) {
|
|
1556
|
-
return (t &
|
|
1556
|
+
return (t & me) === me;
|
|
1557
1557
|
}
|
|
1558
1558
|
neg(t) {
|
|
1559
|
-
return
|
|
1559
|
+
return oe(-t, this.ORDER);
|
|
1560
1560
|
}
|
|
1561
1561
|
eql(t, e) {
|
|
1562
1562
|
return t === e;
|
|
1563
1563
|
}
|
|
1564
1564
|
sqr(t) {
|
|
1565
|
-
return
|
|
1565
|
+
return oe(t * t, this.ORDER);
|
|
1566
1566
|
}
|
|
1567
1567
|
add(t, e) {
|
|
1568
|
-
return
|
|
1568
|
+
return oe(t + e, this.ORDER);
|
|
1569
1569
|
}
|
|
1570
1570
|
sub(t, e) {
|
|
1571
|
-
return
|
|
1571
|
+
return oe(t - e, this.ORDER);
|
|
1572
1572
|
}
|
|
1573
1573
|
mul(t, e) {
|
|
1574
|
-
return
|
|
1574
|
+
return oe(t * e, this.ORDER);
|
|
1575
1575
|
}
|
|
1576
1576
|
pow(t, e) {
|
|
1577
1577
|
return Vg(this, t, e);
|
|
1578
1578
|
}
|
|
1579
1579
|
div(t, e) {
|
|
1580
|
-
return
|
|
1580
|
+
return oe(t * Gl(e, this.ORDER), this.ORDER);
|
|
1581
1581
|
}
|
|
1582
1582
|
// Same as above, but doesn't normalize
|
|
1583
1583
|
sqrN(t) {
|
|
@@ -1603,7 +1603,7 @@ class Cf {
|
|
|
1603
1603
|
return this.isLE ? $g(t, this.BYTES) : xf(t, this.BYTES);
|
|
1604
1604
|
}
|
|
1605
1605
|
fromBytes(t, e = !1) {
|
|
1606
|
-
|
|
1606
|
+
Le(t);
|
|
1607
1607
|
const { _lengths: i, BYTES: r, isLE: o, ORDER: s, _mod: a } = this;
|
|
1608
1608
|
if (i) {
|
|
1609
1609
|
if (t.length < 1 || !i.includes(t.length) || t.length > r)
|
|
@@ -1614,7 +1614,7 @@ class Cf {
|
|
|
1614
1614
|
if (t.length !== r)
|
|
1615
1615
|
throw new Error("Field.fromBytes: expected " + r + " bytes, got " + t.length);
|
|
1616
1616
|
let l = o ? Br(t) : Tg(t);
|
|
1617
|
-
if (a && (l =
|
|
1617
|
+
if (a && (l = oe(l, s)), !e && !this.isValid(l))
|
|
1618
1618
|
throw new Error("invalid field element: outside of range 0..ORDER");
|
|
1619
1619
|
return l;
|
|
1620
1620
|
}
|
|
@@ -1790,7 +1790,7 @@ function Ug(n, t) {
|
|
|
1790
1790
|
};
|
|
1791
1791
|
}
|
|
1792
1792
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
1793
|
-
const qn = /* @__PURE__ */ BigInt(0),
|
|
1793
|
+
const qn = /* @__PURE__ */ BigInt(0), ue = /* @__PURE__ */ BigInt(1), Ws = /* @__PURE__ */ BigInt(2), qg = /* @__PURE__ */ BigInt(8);
|
|
1794
1794
|
function jg(n, t, e, i) {
|
|
1795
1795
|
const r = n.sqr(e), o = n.sqr(i), s = n.add(n.mul(t.a, r), o), a = n.add(n.ONE, n.mul(t.d, n.mul(r, o)));
|
|
1796
1796
|
return n.eql(s, a);
|
|
@@ -1800,7 +1800,7 @@ function Zg(n, t = {}) {
|
|
|
1800
1800
|
let s = i.CURVE;
|
|
1801
1801
|
const { h: a } = s;
|
|
1802
1802
|
Mc(e, {}, { uvRatio: "function" });
|
|
1803
|
-
const l = Ws << BigInt(o.BYTES * 8) -
|
|
1803
|
+
const l = Ws << BigInt(o.BYTES * 8) - ue, c = (g) => r.create(g), h = e.uvRatio === void 0 ? (g, m) => {
|
|
1804
1804
|
try {
|
|
1805
1805
|
return { isValid: !0, value: r.sqrt(r.div(g, m)) };
|
|
1806
1806
|
} catch {
|
|
@@ -1810,7 +1810,7 @@ function Zg(n, t = {}) {
|
|
|
1810
1810
|
if (!jg(r, s, s.Gx, s.Gy))
|
|
1811
1811
|
throw new Error("bad curve params: generator point");
|
|
1812
1812
|
function f(g, m, x = !1) {
|
|
1813
|
-
const v = x ?
|
|
1813
|
+
const v = x ? ue : qn;
|
|
1814
1814
|
return Hl("coordinate " + g, m, v, l), m;
|
|
1815
1815
|
}
|
|
1816
1816
|
function u(g) {
|
|
@@ -1837,21 +1837,21 @@ function Zg(n, t = {}) {
|
|
|
1837
1837
|
if (m instanceof y)
|
|
1838
1838
|
throw new Error("extended point not allowed");
|
|
1839
1839
|
const { x, y: v } = m || {};
|
|
1840
|
-
return f("x", x), f("y", v), new y(x, v,
|
|
1840
|
+
return f("x", x), f("y", v), new y(x, v, ue, c(x * v));
|
|
1841
1841
|
}
|
|
1842
1842
|
// Uses algo from RFC8032 5.1.3.
|
|
1843
1843
|
static fromBytes(m, x = !1) {
|
|
1844
1844
|
const v = r.BYTES, { a: b, d: k } = s;
|
|
1845
|
-
m = Sa(
|
|
1845
|
+
m = Sa(Le(m, v, "point")), zo(x, "zip215");
|
|
1846
1846
|
const M = Sa(m), C = m[v - 1];
|
|
1847
1847
|
M[v - 1] = C & -129;
|
|
1848
1848
|
const L = Br(M), _ = x ? l : r.ORDER;
|
|
1849
1849
|
Hl("point.y", L, qn, _);
|
|
1850
|
-
const T = c(L * L), I = c(T -
|
|
1850
|
+
const T = c(L * L), I = c(T - ue), E = c(k * T - b);
|
|
1851
1851
|
let { isValid: P, value: S } = h(I, E);
|
|
1852
1852
|
if (!P)
|
|
1853
1853
|
throw new Error("bad point: invalid y coordinate");
|
|
1854
|
-
const w = (S &
|
|
1854
|
+
const w = (S & ue) === ue, A = (C & 128) !== 0;
|
|
1855
1855
|
if (!x && S === qn && A)
|
|
1856
1856
|
throw new Error("bad point: x=0 and x_0=1");
|
|
1857
1857
|
return A !== w && (S = c(-S)), y.fromAffine({ x: S, y: L });
|
|
@@ -1925,7 +1925,7 @@ function Zg(n, t = {}) {
|
|
|
1925
1925
|
multiplyUnsafe(m) {
|
|
1926
1926
|
if (!o.isValid(m))
|
|
1927
1927
|
throw new RangeError("invalid scalar: expected 0 <= sc < curve.n");
|
|
1928
|
-
return m === qn ? y.ZERO : this.is0() || m ===
|
|
1928
|
+
return m === qn ? y.ZERO : this.is0() || m === ue ? this : p.unsafe(this, m, (x) => zs(y, x));
|
|
1929
1929
|
}
|
|
1930
1930
|
// Checks if point is of small order.
|
|
1931
1931
|
// If you add something to small order point, you will have "dirty"
|
|
@@ -1948,17 +1948,17 @@ function Zg(n, t = {}) {
|
|
|
1948
1948
|
v == null && (v = C ? qg : r.inv(M));
|
|
1949
1949
|
const L = c(b * v), _ = c(k * v), T = r.mul(M, v);
|
|
1950
1950
|
if (C)
|
|
1951
|
-
return { x: qn, y:
|
|
1952
|
-
if (T !==
|
|
1951
|
+
return { x: qn, y: ue };
|
|
1952
|
+
if (T !== ue)
|
|
1953
1953
|
throw new Error("invZ was invalid");
|
|
1954
1954
|
return { x: L, y: _ };
|
|
1955
1955
|
}
|
|
1956
1956
|
clearCofactor() {
|
|
1957
|
-
return a ===
|
|
1957
|
+
return a === ue ? this : this.multiplyUnsafe(a);
|
|
1958
1958
|
}
|
|
1959
1959
|
toBytes() {
|
|
1960
1960
|
const { x: m, y: x } = this.toAffine(), v = r.toBytes(x);
|
|
1961
|
-
return v[v.length - 1] |= m &
|
|
1961
|
+
return v[v.length - 1] |= m & ue ? 128 : 0, v;
|
|
1962
1962
|
}
|
|
1963
1963
|
toHex() {
|
|
1964
1964
|
return mf(this.toBytes());
|
|
@@ -1968,8 +1968,8 @@ function Zg(n, t = {}) {
|
|
|
1968
1968
|
}
|
|
1969
1969
|
};
|
|
1970
1970
|
// base / generator point
|
|
1971
|
-
xt(y, "BASE", new y(s.Gx, s.Gy,
|
|
1972
|
-
xt(y, "ZERO", new y(qn,
|
|
1971
|
+
xt(y, "BASE", new y(s.Gx, s.Gy, ue, c(s.Gx * s.Gy))), // zero / infinity / identity point
|
|
1972
|
+
xt(y, "ZERO", new y(qn, ue, ue, qn)), // 0, 1, 1, 0
|
|
1973
1973
|
// math field
|
|
1974
1974
|
xt(y, "Fp", r), // scalar field
|
|
1975
1975
|
xt(y, "Fn", o);
|
|
@@ -2076,8 +2076,8 @@ function Kg(n, t, e = {}) {
|
|
|
2076
2076
|
}
|
|
2077
2077
|
function y(E) {
|
|
2078
2078
|
const P = C.secretKey;
|
|
2079
|
-
|
|
2080
|
-
const S =
|
|
2079
|
+
Le(E, C.secretKey, "secretKey");
|
|
2080
|
+
const S = Le(i(E), 2 * P, "hashedSecretKey"), w = u(S.slice(0, P)), A = S.slice(P, 2 * P), $ = p(w);
|
|
2081
2081
|
return { head: w, prefix: A, scalar: $ };
|
|
2082
2082
|
}
|
|
2083
2083
|
function g(E) {
|
|
@@ -2089,22 +2089,22 @@ function Kg(n, t, e = {}) {
|
|
|
2089
2089
|
}
|
|
2090
2090
|
function x(E = Uint8Array.of(), ...P) {
|
|
2091
2091
|
const S = Wl(...P);
|
|
2092
|
-
return p(i(d(S,
|
|
2092
|
+
return p(i(d(S, Le(E, void 0, "context"), !!o)));
|
|
2093
2093
|
}
|
|
2094
2094
|
function v(E, P, S = {}) {
|
|
2095
|
-
E =
|
|
2095
|
+
E = Le(E, void 0, "message"), o && (E = o(E));
|
|
2096
2096
|
const { prefix: w, scalar: A, pointBytes: $ } = g(P), R = x(S.context, w, E), F = s.multiply(R).toBytes(), D = x(S.context, F, $, E), z = l.create(R + D * A);
|
|
2097
2097
|
if (!l.isValid(z))
|
|
2098
2098
|
throw new Error("sign failed: invalid s");
|
|
2099
2099
|
const B = Wl(F, l.toBytes(z));
|
|
2100
|
-
return
|
|
2100
|
+
return Le(B, C.signature, "result");
|
|
2101
2101
|
}
|
|
2102
2102
|
const b = {
|
|
2103
2103
|
zip215: r.zip215
|
|
2104
2104
|
};
|
|
2105
2105
|
function k(E, P, S, w = b) {
|
|
2106
2106
|
const { context: A } = w, $ = w.zip215 === void 0 ? !!b.zip215 : w.zip215, R = C.signature;
|
|
2107
|
-
E =
|
|
2107
|
+
E = Le(E, R, "signature"), P = Le(P, void 0, "message"), S = Le(S, C.publicKey, "publicKey"), $ !== void 0 && zo($, "zip215"), o && (P = o(P));
|
|
2108
2108
|
const F = R / 2, D = E.subarray(0, F), z = Br(E.subarray(F, R));
|
|
2109
2109
|
let B, H, J;
|
|
2110
2110
|
try {
|
|
@@ -2124,7 +2124,7 @@ function Kg(n, t, e = {}) {
|
|
|
2124
2124
|
seed: M
|
|
2125
2125
|
};
|
|
2126
2126
|
function L(E) {
|
|
2127
|
-
return E = E === void 0 ? f(C.seed) : E,
|
|
2127
|
+
return E = E === void 0 ? f(C.seed) : E, Le(E, C.seed, "seed");
|
|
2128
2128
|
}
|
|
2129
2129
|
function _(E) {
|
|
2130
2130
|
return Cg(E) && E.length === C.secretKey;
|
|
@@ -2154,12 +2154,12 @@ function Kg(n, t, e = {}) {
|
|
|
2154
2154
|
const { y: P } = n.fromBytes(E), S = C.publicKey, w = S === 32;
|
|
2155
2155
|
if (!w && S !== 57)
|
|
2156
2156
|
throw new Error("only defined for 25519 and 448");
|
|
2157
|
-
const A = w ? a.div(
|
|
2157
|
+
const A = w ? a.div(ue + P, ue - P) : a.div(P - ue, P + ue);
|
|
2158
2158
|
return a.toBytes(A);
|
|
2159
2159
|
},
|
|
2160
2160
|
toMontgomerySecret(E) {
|
|
2161
2161
|
const P = C.secretKey;
|
|
2162
|
-
|
|
2162
|
+
Le(E, P);
|
|
2163
2163
|
const S = i(E.subarray(0, P));
|
|
2164
2164
|
return u(S).subarray(0, P);
|
|
2165
2165
|
}
|
|
@@ -2193,16 +2193,16 @@ function n0(n) {
|
|
|
2193
2193
|
}
|
|
2194
2194
|
const Ca = /* @__PURE__ */ BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");
|
|
2195
2195
|
function $f(n, t) {
|
|
2196
|
-
const e = Or, i =
|
|
2197
|
-
let s =
|
|
2198
|
-
const a =
|
|
2199
|
-
return h && (s = l), (f || u) && (s = c), ii(s, e) && (s =
|
|
2196
|
+
const e = Or, i = oe(t * t * t, e), r = oe(i * i * t, e), o = e0(n * r).pow_p_5_8;
|
|
2197
|
+
let s = oe(n * i * o, e);
|
|
2198
|
+
const a = oe(t * s * s, e), l = s, c = oe(s * Ca, e), h = a === n, f = a === oe(-n, e), u = a === oe(-n * Ca, e);
|
|
2199
|
+
return h && (s = l), (f || u) && (s = c), ii(s, e) && (s = oe(-s, e)), { isValid: h || f, value: s };
|
|
2200
2200
|
}
|
|
2201
2201
|
const li = /* @__PURE__ */ Zg(Tf, { uvRatio: $f }), ri = li.Fp, i0 = li.Fn;
|
|
2202
2202
|
function r0(n) {
|
|
2203
2203
|
return Kg(li, Sg, Object.assign({ adjustScalarBytes: n0, zip215: !0 }, n));
|
|
2204
2204
|
}
|
|
2205
|
-
const o0 = /* @__PURE__ */ r0({}), Jl = Ca, s0 = /* @__PURE__ */ BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"), Ql = (n) => $f(Pr, n), a0 = /* @__PURE__ */ BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), c0 = (n) => ri.create(Br(n) & a0),
|
|
2205
|
+
const o0 = /* @__PURE__ */ r0({}), Jl = Ca, s0 = /* @__PURE__ */ BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"), Ql = (n) => $f(Pr, n), a0 = /* @__PURE__ */ BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"), c0 = (n) => ri.create(Br(n) & a0), Ne = class Ne extends xr {
|
|
2206
2206
|
constructor(t) {
|
|
2207
2207
|
super(t);
|
|
2208
2208
|
}
|
|
@@ -2213,14 +2213,14 @@ const o0 = /* @__PURE__ */ r0({}), Jl = Ca, s0 = /* @__PURE__ */ BigInt("5446930
|
|
|
2213
2213
|
* Use `toBytes()` / `fromBytes()` if canonical ristretto255 bytes matter.
|
|
2214
2214
|
*/
|
|
2215
2215
|
static fromAffine(t) {
|
|
2216
|
-
return new
|
|
2216
|
+
return new Ne(li.fromAffine(t));
|
|
2217
2217
|
}
|
|
2218
2218
|
assertSame(t) {
|
|
2219
|
-
if (!(t instanceof
|
|
2219
|
+
if (!(t instanceof Ne))
|
|
2220
2220
|
throw new Error("RistrettoPoint expected");
|
|
2221
2221
|
}
|
|
2222
2222
|
init(t) {
|
|
2223
|
-
return new
|
|
2223
|
+
return new Ne(t);
|
|
2224
2224
|
}
|
|
2225
2225
|
static fromBytes(t) {
|
|
2226
2226
|
wi(t, 32);
|
|
@@ -2233,7 +2233,7 @@ const o0 = /* @__PURE__ */ r0({}), Jl = Ca, s0 = /* @__PURE__ */ BigInt("5446930
|
|
|
2233
2233
|
const x = o(l * g), v = o(m * x);
|
|
2234
2234
|
if (!d || ii(v, r) || x === Jg)
|
|
2235
2235
|
throw new Error("invalid ristretto255 encoding 2");
|
|
2236
|
-
return new
|
|
2236
|
+
return new Ne(new li(m, x, Pr, v));
|
|
2237
2237
|
}
|
|
2238
2238
|
/**
|
|
2239
2239
|
* Converts ristretto-encoded string to ristretto point.
|
|
@@ -2241,7 +2241,7 @@ const o0 = /* @__PURE__ */ r0({}), Jl = Ca, s0 = /* @__PURE__ */ BigInt("5446930
|
|
|
2241
2241
|
* @param hex - Ristretto-encoded 32 bytes. Not every 32-byte string is valid ristretto encoding
|
|
2242
2242
|
*/
|
|
2243
2243
|
static fromHex(t) {
|
|
2244
|
-
return
|
|
2244
|
+
return Ne.fromBytes(kc(t));
|
|
2245
2245
|
}
|
|
2246
2246
|
/**
|
|
2247
2247
|
* Encodes ristretto point to Uint8Array.
|
|
@@ -2270,17 +2270,17 @@ const o0 = /* @__PURE__ */ r0({}), Jl = Ca, s0 = /* @__PURE__ */ BigInt("5446930
|
|
|
2270
2270
|
return a || l;
|
|
2271
2271
|
}
|
|
2272
2272
|
is0() {
|
|
2273
|
-
return this.equals(
|
|
2273
|
+
return this.equals(Ne.ZERO);
|
|
2274
2274
|
}
|
|
2275
2275
|
};
|
|
2276
2276
|
// Do NOT change syntax: the following gymnastics is done,
|
|
2277
2277
|
// because typescript strips comments, which makes bundlers disable tree-shaking.
|
|
2278
2278
|
// prettier-ignore
|
|
2279
|
-
xt(
|
|
2280
|
-
xt(
|
|
2281
|
-
xt(
|
|
2282
|
-
xt(
|
|
2283
|
-
let Wi =
|
|
2279
|
+
xt(Ne, "BASE", new Ne(li.BASE)), // prettier-ignore
|
|
2280
|
+
xt(Ne, "ZERO", new Ne(li.ZERO)), // prettier-ignore
|
|
2281
|
+
xt(Ne, "Fp", ri), // prettier-ignore
|
|
2282
|
+
xt(Ne, "Fn", i0);
|
|
2283
|
+
let Wi = Ne;
|
|
2284
2284
|
Object.freeze(Wi.BASE);
|
|
2285
2285
|
Object.freeze(Wi.ZERO);
|
|
2286
2286
|
Object.freeze(Wi.prototype);
|
|
@@ -2574,7 +2574,7 @@ function M0(n) {
|
|
|
2574
2574
|
}
|
|
2575
2575
|
let Oo = {};
|
|
2576
2576
|
function rh(n) {
|
|
2577
|
-
Oo =
|
|
2577
|
+
Oo = fe(Oo, n);
|
|
2578
2578
|
}
|
|
2579
2579
|
function A0() {
|
|
2580
2580
|
return Oo;
|
|
@@ -2593,8 +2593,8 @@ const jn = class jn {
|
|
|
2593
2593
|
* directly still wins over it.
|
|
2594
2594
|
*/
|
|
2595
2595
|
mergeWithDefaults(t, e) {
|
|
2596
|
-
return
|
|
2597
|
-
|
|
2596
|
+
return fe(
|
|
2597
|
+
fe({}, Rs),
|
|
2598
2598
|
Oo,
|
|
2599
2599
|
e ?? {},
|
|
2600
2600
|
t
|
|
@@ -2603,7 +2603,7 @@ const jn = class jn {
|
|
|
2603
2603
|
normalize(t) {
|
|
2604
2604
|
var c, h, f;
|
|
2605
2605
|
const e = { ...t };
|
|
2606
|
-
e.xAxis && !Array.isArray(e.xAxis) && (e.xAxis = [e.xAxis]), e.yAxis && !Array.isArray(e.yAxis) && (e.yAxis = [e.yAxis]), e.colorAxis && !Array.isArray(e.colorAxis) && (e.colorAxis = [e.colorAxis]), (!e.xAxis || Array.isArray(e.xAxis) && e.xAxis.length === 0) && (e.xAxis = [
|
|
2606
|
+
e.xAxis && !Array.isArray(e.xAxis) && (e.xAxis = [e.xAxis]), e.yAxis && !Array.isArray(e.yAxis) && (e.yAxis = [e.yAxis]), e.colorAxis && !Array.isArray(e.colorAxis) && (e.colorAxis = [e.colorAxis]), (!e.xAxis || Array.isArray(e.xAxis) && e.xAxis.length === 0) && (e.xAxis = [fe({}, Rs.xAxis)]), (!e.yAxis || Array.isArray(e.yAxis) && e.yAxis.length === 0) && (e.yAxis = [fe({}, Rs.yAxis)]);
|
|
2607
2607
|
for (const u of [e.xAxis, e.yAxis])
|
|
2608
2608
|
if (Array.isArray(u))
|
|
2609
2609
|
for (const d of u)
|
|
@@ -2693,7 +2693,7 @@ const jn = class jn {
|
|
|
2693
2693
|
const i = Array.isArray(t) ? t : [t], r = Array.isArray(e) ? e : [e], o = Math.max(i.length, r.length), s = [];
|
|
2694
2694
|
for (let a = 0; a < o; a++) {
|
|
2695
2695
|
const l = i[a] ?? i[0] ?? {}, c = r[a] ?? r[0] ?? {};
|
|
2696
|
-
s.push(
|
|
2696
|
+
s.push(fe({}, l, c));
|
|
2697
2697
|
}
|
|
2698
2698
|
return s.length === 1 && !Array.isArray(t) && !Array.isArray(e) ? s[0] : s;
|
|
2699
2699
|
}
|
|
@@ -2703,7 +2703,7 @@ const jn = class jn {
|
|
|
2703
2703
|
const o = i.series || {}, s = i[r.type] || {}, a = r._polarSubType, l = a ? i[a] || {} : {}, c = jn.mergeDataLabels(
|
|
2704
2704
|
[o, l, s, r].map((h) => h.dataLabels)
|
|
2705
2705
|
);
|
|
2706
|
-
r =
|
|
2706
|
+
r = fe({}, o, l, s, r), c !== void 0 && (r.dataLabels = c);
|
|
2707
2707
|
}
|
|
2708
2708
|
if (Array.isArray(r.data)) {
|
|
2709
2709
|
const o = r.turboThreshold ?? 1e3;
|
|
@@ -3570,7 +3570,7 @@ class sy {
|
|
|
3570
3570
|
return this.config;
|
|
3571
3571
|
}
|
|
3572
3572
|
updateConfig(t) {
|
|
3573
|
-
this.config =
|
|
3573
|
+
this.config = fe(this.config, t), this.events.emit("state:configChanged", this.config);
|
|
3574
3574
|
}
|
|
3575
3575
|
getSeries() {
|
|
3576
3576
|
return this.config.series;
|
|
@@ -3590,7 +3590,7 @@ class sy {
|
|
|
3590
3590
|
}
|
|
3591
3591
|
updateSeries(t, e) {
|
|
3592
3592
|
const i = this.config.series[t];
|
|
3593
|
-
i && (this.config.series[t] =
|
|
3593
|
+
i && (this.config.series[t] = fe(i, e), this.events.emit("state:seriesUpdated", this.config.series[t], t));
|
|
3594
3594
|
}
|
|
3595
3595
|
getXAxes() {
|
|
3596
3596
|
return this.config.xAxis;
|
|
@@ -3600,7 +3600,7 @@ class sy {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
updateAxis(t, e, i) {
|
|
3602
3602
|
const r = t ? this.config.xAxis : this.config.yAxis;
|
|
3603
|
-
r[e] && (r[e] =
|
|
3603
|
+
r[e] && (r[e] = fe(r[e], i), this.events.emit("state:axisUpdated", { isX: t, index: e, config: r[e] }));
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
3606
|
class ay {
|
|
@@ -3708,10 +3708,10 @@ class hy {
|
|
|
3708
3708
|
};
|
|
3709
3709
|
}
|
|
3710
3710
|
estimateTextHeight(t) {
|
|
3711
|
-
return
|
|
3711
|
+
return Ae(t == null ? void 0 : t.fontSize) * 1.4;
|
|
3712
3712
|
}
|
|
3713
3713
|
estimateWrappedTextHeight(t, e, i) {
|
|
3714
|
-
const r =
|
|
3714
|
+
const r = Ae(e == null ? void 0 : e.fontSize), o = r * 1.4;
|
|
3715
3715
|
if (!i || i <= 0) return o;
|
|
3716
3716
|
const s = r * 0.55, a = Math.floor(i / s);
|
|
3717
3717
|
if (a <= 0) return o;
|
|
@@ -3742,7 +3742,7 @@ class hy {
|
|
|
3742
3742
|
var u;
|
|
3743
3743
|
const e = t.legend;
|
|
3744
3744
|
if (!e) return 0;
|
|
3745
|
-
const i = t.series.filter((d) => d.showInLegend !== !1), r = e.itemStyle || {}, o =
|
|
3745
|
+
const i = t.series.filter((d) => d.showInLegend !== !1), r = e.itemStyle || {}, o = Ae(r.fontSize || Mt), s = e.symbolWidth ?? 12, a = e.symbolPadding ?? 5, l = e.padding ?? 8;
|
|
3746
3746
|
let c = 0;
|
|
3747
3747
|
i.forEach((d, p) => {
|
|
3748
3748
|
const y = tn(d.name || `Series ${p + 1}`, o);
|
|
@@ -3766,7 +3766,7 @@ class hy {
|
|
|
3766
3766
|
if (r === 0) return 0;
|
|
3767
3767
|
const o = t.legend.margin ?? 8, s = t.legend.layout || "horizontal", l = (t.legend.itemStyle || {}).fontSize || Mt, c = this.computeAutoFontSize(r, l), h = t.legend.lineHeight ?? 16, f = t.legend.itemMarginBottom ?? 2, u = t.legend.itemMarginTop ?? 0, d = h + f + u;
|
|
3768
3768
|
if (s === "horizontal") {
|
|
3769
|
-
const y = t.legend.padding ?? 4, g = t.legend.symbolWidth ?? 10, m = t.legend.symbolPadding ?? 5, x = t.legend.itemDistance ?? 20, v = this.getSpacing(t), b = t.legend.width || e - v.left - v.right - y * 2, k =
|
|
3769
|
+
const y = t.legend.padding ?? 4, g = t.legend.symbolWidth ?? 10, m = t.legend.symbolPadding ?? 5, x = t.legend.itemDistance ?? 20, v = this.getSpacing(t), b = t.legend.width || e - v.left - v.right - y * 2, k = Ae(c), M = i.map((P, S) => P.name || `Series ${S + 1}`);
|
|
3770
3770
|
let C = 0;
|
|
3771
3771
|
for (let P = 0; P < M.length; P++) {
|
|
3772
3772
|
const S = t.legend.itemWidth || tn(M[P], k), w = g + m + S;
|
|
@@ -3813,7 +3813,7 @@ class hy {
|
|
|
3813
3813
|
estimateLabelWidth(t, e, i) {
|
|
3814
3814
|
var s, a, l, c;
|
|
3815
3815
|
if (t.categories && t.categories.length > 0) {
|
|
3816
|
-
const h =
|
|
3816
|
+
const h = Ae(((a = (s = t.labels) == null ? void 0 : s.style) == null ? void 0 : a.fontSize) || Mt);
|
|
3817
3817
|
let f = h;
|
|
3818
3818
|
if (e && t.categories.length > 1) {
|
|
3819
3819
|
const m = e * 0.8 / t.categories.length * 0.7;
|
|
@@ -3849,7 +3849,7 @@ class hy {
|
|
|
3849
3849
|
let m = 0;
|
|
3850
3850
|
for (const k of f.categories)
|
|
3851
3851
|
k.length > m && (m = k.length);
|
|
3852
|
-
const x =
|
|
3852
|
+
const x = Ae(((l = (a = f.labels) == null ? void 0 : a.style) == null ? void 0 : l.fontSize) || Mt), v = Math.abs(f.labels.rotation) * (Math.PI / 180), b = Math.min(m * x * 0.62 * Math.sin(v), 150);
|
|
3853
3853
|
y = Math.max(30, b);
|
|
3854
3854
|
} else if (p)
|
|
3855
3855
|
y = 45;
|
|
@@ -3857,7 +3857,7 @@ class hy {
|
|
|
3857
3857
|
let m = 0;
|
|
3858
3858
|
for (const b of f.categories)
|
|
3859
3859
|
b.length > m && (m = b.length);
|
|
3860
|
-
const x =
|
|
3860
|
+
const x = Ae(((h = (c = f.labels) == null ? void 0 : c.style) == null ? void 0 : h.fontSize) || Mt);
|
|
3861
3861
|
if (f.categories.length > 6 || m > 8) {
|
|
3862
3862
|
const b = Math.min(m * x * 0.4 * Math.sin(Math.PI / 4), 120);
|
|
3863
3863
|
y = Math.max(30, b);
|
|
@@ -4163,7 +4163,7 @@ function Ly(n) {
|
|
|
4163
4163
|
}
|
|
4164
4164
|
function Iy(n, t) {
|
|
4165
4165
|
var e = t ? t.length : 0, i = n ? Math.min(e, n.length) : 0, r = new Array(i), o = new Array(e), s;
|
|
4166
|
-
for (s = 0; s < i; ++s) r[s] =
|
|
4166
|
+
for (s = 0; s < i; ++s) r[s] = se(n[s], t[s]);
|
|
4167
4167
|
for (; s < e; ++s) o[s] = t[s];
|
|
4168
4168
|
return function(a) {
|
|
4169
4169
|
for (s = 0; s < i; ++s) o[s] = r[s](a);
|
|
@@ -4185,7 +4185,7 @@ function Ry(n, t) {
|
|
|
4185
4185
|
var e = {}, i = {}, r;
|
|
4186
4186
|
(n === null || typeof n != "object") && (n = {}), (t === null || typeof t != "object") && (t = {});
|
|
4187
4187
|
for (r in t)
|
|
4188
|
-
r in n ? e[r] =
|
|
4188
|
+
r in n ? e[r] = se(n[r], t[r]) : i[r] = t[r];
|
|
4189
4189
|
return function(o) {
|
|
4190
4190
|
for (r in e) i[r] = e[r](o);
|
|
4191
4191
|
return i;
|
|
@@ -4211,9 +4211,9 @@ function qf(n, t) {
|
|
|
4211
4211
|
return a.join("");
|
|
4212
4212
|
});
|
|
4213
4213
|
}
|
|
4214
|
-
function
|
|
4214
|
+
function se(n, t) {
|
|
4215
4215
|
var e = typeof t, i;
|
|
4216
|
-
return t == null || e === "boolean" ? Ec(t) : (e === "number" ? dn : e === "string" ? (i =
|
|
4216
|
+
return t == null || e === "boolean" ? Ec(t) : (e === "number" ? dn : e === "string" ? (i = ae(t)) ? (t = i, xi) : qf : t instanceof ae ? xi : t instanceof Date ? Fy : Ly(t) ? $y : Array.isArray(t) ? Iy : typeof t.valueOf != "function" && typeof t.toString != "function" || isNaN(t) ? Ry : dn)(n, t);
|
|
4217
4217
|
}
|
|
4218
4218
|
function jf(n, t) {
|
|
4219
4219
|
return n = +n, t = +t, function(e) {
|
|
@@ -4358,7 +4358,7 @@ function ds(n, t) {
|
|
|
4358
4358
|
return t.domain(n.domain()).range(n.range()).interpolate(n.interpolate()).clamp(n.clamp()).unknown(n.unknown());
|
|
4359
4359
|
}
|
|
4360
4360
|
function Tc() {
|
|
4361
|
-
var n = fh, t = fh, e =
|
|
4361
|
+
var n = fh, t = fh, e = se, i, r, o, s = rn, a, l, c;
|
|
4362
4362
|
function h() {
|
|
4363
4363
|
var u = Math.min(n.length, t.length);
|
|
4364
4364
|
return s !== rn && (s = qy(n[0], n[u - 1])), a = u > 2 ? Zy : jy, l = c = null, f;
|
|
@@ -4609,10 +4609,10 @@ function Lc(n) {
|
|
|
4609
4609
|
return n;
|
|
4610
4610
|
}, n;
|
|
4611
4611
|
}
|
|
4612
|
-
function
|
|
4612
|
+
function Ce() {
|
|
4613
4613
|
var n = Jf();
|
|
4614
4614
|
return n.copy = function() {
|
|
4615
|
-
return ds(n,
|
|
4615
|
+
return ds(n, Ce());
|
|
4616
4616
|
}, ki.apply(n, arguments), Lc(n);
|
|
4617
4617
|
}
|
|
4618
4618
|
function td(n, t) {
|
|
@@ -4726,7 +4726,7 @@ function xx() {
|
|
|
4726
4726
|
return ed.apply(null, arguments).exponent(0.5);
|
|
4727
4727
|
}
|
|
4728
4728
|
const Ys = /* @__PURE__ */ new Date(), Xs = /* @__PURE__ */ new Date();
|
|
4729
|
-
function
|
|
4729
|
+
function ce(n, t, e, i) {
|
|
4730
4730
|
function r(o) {
|
|
4731
4731
|
return n(o = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+o)), o;
|
|
4732
4732
|
}
|
|
@@ -4741,7 +4741,7 @@ function ae(n, t, e, i) {
|
|
|
4741
4741
|
l.push(c = /* @__PURE__ */ new Date(+o)), t(o, a), n(o);
|
|
4742
4742
|
while (c < o && o < s);
|
|
4743
4743
|
return l;
|
|
4744
|
-
}, r.filter = (o) =>
|
|
4744
|
+
}, r.filter = (o) => ce((s) => {
|
|
4745
4745
|
if (s >= s) for (; n(s), !o(s); ) s.setTime(s - 1);
|
|
4746
4746
|
}, (s, a) => {
|
|
4747
4747
|
if (s >= s)
|
|
@@ -4753,67 +4753,67 @@ function ae(n, t, e, i) {
|
|
|
4753
4753
|
;
|
|
4754
4754
|
}), e && (r.count = (o, s) => (Ys.setTime(+o), Xs.setTime(+s), n(Ys), n(Xs), Math.floor(e(Ys, Xs))), r.every = (o) => (o = Math.floor(o), !isFinite(o) || !(o > 0) ? null : o > 1 ? r.filter(i ? (s) => i(s) % o === 0 : (s) => r.count(0, s) % o === 0) : r)), r;
|
|
4755
4755
|
}
|
|
4756
|
-
const Go =
|
|
4756
|
+
const Go = ce(() => {
|
|
4757
4757
|
}, (n, t) => {
|
|
4758
4758
|
n.setTime(+n + t);
|
|
4759
4759
|
}, (n, t) => t - n);
|
|
4760
|
-
Go.every = (n) => (n = Math.floor(n), !isFinite(n) || !(n > 0) ? null : n > 1 ?
|
|
4760
|
+
Go.every = (n) => (n = Math.floor(n), !isFinite(n) || !(n > 0) ? null : n > 1 ? ce((t) => {
|
|
4761
4761
|
t.setTime(Math.floor(t / n) * n);
|
|
4762
4762
|
}, (t, e) => {
|
|
4763
4763
|
t.setTime(+t + e * n);
|
|
4764
4764
|
}, (t, e) => (e - t) / n) : Go);
|
|
4765
4765
|
Go.range;
|
|
4766
|
-
const In = 1e3, on = In * 60, Fn = on * 60, zn = Fn * 24, Ic = zn * 7, kh = zn * 30, Us = zn * 365, fi =
|
|
4766
|
+
const In = 1e3, on = In * 60, Fn = on * 60, zn = Fn * 24, Ic = zn * 7, kh = zn * 30, Us = zn * 365, fi = ce((n) => {
|
|
4767
4767
|
n.setTime(n - n.getMilliseconds());
|
|
4768
4768
|
}, (n, t) => {
|
|
4769
4769
|
n.setTime(+n + t * In);
|
|
4770
4770
|
}, (n, t) => (t - n) / In, (n) => n.getUTCSeconds());
|
|
4771
4771
|
fi.range;
|
|
4772
|
-
const Fc =
|
|
4772
|
+
const Fc = ce((n) => {
|
|
4773
4773
|
n.setTime(n - n.getMilliseconds() - n.getSeconds() * In);
|
|
4774
4774
|
}, (n, t) => {
|
|
4775
4775
|
n.setTime(+n + t * on);
|
|
4776
4776
|
}, (n, t) => (t - n) / on, (n) => n.getMinutes());
|
|
4777
4777
|
Fc.range;
|
|
4778
|
-
const Rc =
|
|
4778
|
+
const Rc = ce((n) => {
|
|
4779
4779
|
n.setUTCSeconds(0, 0);
|
|
4780
4780
|
}, (n, t) => {
|
|
4781
4781
|
n.setTime(+n + t * on);
|
|
4782
4782
|
}, (n, t) => (t - n) / on, (n) => n.getUTCMinutes());
|
|
4783
4783
|
Rc.range;
|
|
4784
|
-
const Dc =
|
|
4784
|
+
const Dc = ce((n) => {
|
|
4785
4785
|
n.setTime(n - n.getMilliseconds() - n.getSeconds() * In - n.getMinutes() * on);
|
|
4786
4786
|
}, (n, t) => {
|
|
4787
4787
|
n.setTime(+n + t * Fn);
|
|
4788
4788
|
}, (n, t) => (t - n) / Fn, (n) => n.getHours());
|
|
4789
4789
|
Dc.range;
|
|
4790
|
-
const zc =
|
|
4790
|
+
const zc = ce((n) => {
|
|
4791
4791
|
n.setUTCMinutes(0, 0, 0);
|
|
4792
4792
|
}, (n, t) => {
|
|
4793
4793
|
n.setTime(+n + t * Fn);
|
|
4794
4794
|
}, (n, t) => (t - n) / Fn, (n) => n.getUTCHours());
|
|
4795
4795
|
zc.range;
|
|
4796
|
-
const qr =
|
|
4796
|
+
const qr = ce(
|
|
4797
4797
|
(n) => n.setHours(0, 0, 0, 0),
|
|
4798
4798
|
(n, t) => n.setDate(n.getDate() + t),
|
|
4799
4799
|
(n, t) => (t - n - (t.getTimezoneOffset() - n.getTimezoneOffset()) * on) / zn,
|
|
4800
4800
|
(n) => n.getDate() - 1
|
|
4801
4801
|
);
|
|
4802
4802
|
qr.range;
|
|
4803
|
-
const gs =
|
|
4803
|
+
const gs = ce((n) => {
|
|
4804
4804
|
n.setUTCHours(0, 0, 0, 0);
|
|
4805
4805
|
}, (n, t) => {
|
|
4806
4806
|
n.setUTCDate(n.getUTCDate() + t);
|
|
4807
4807
|
}, (n, t) => (t - n) / zn, (n) => n.getUTCDate() - 1);
|
|
4808
4808
|
gs.range;
|
|
4809
|
-
const nd =
|
|
4809
|
+
const nd = ce((n) => {
|
|
4810
4810
|
n.setUTCHours(0, 0, 0, 0);
|
|
4811
4811
|
}, (n, t) => {
|
|
4812
4812
|
n.setUTCDate(n.getUTCDate() + t);
|
|
4813
4813
|
}, (n, t) => (t - n) / zn, (n) => Math.floor(n / zn));
|
|
4814
4814
|
nd.range;
|
|
4815
4815
|
function Mi(n) {
|
|
4816
|
-
return
|
|
4816
|
+
return ce((t) => {
|
|
4817
4817
|
t.setDate(t.getDate() - (t.getDay() + 7 - n) % 7), t.setHours(0, 0, 0, 0);
|
|
4818
4818
|
}, (t, e) => {
|
|
4819
4819
|
t.setDate(t.getDate() + e * 7);
|
|
@@ -4828,7 +4828,7 @@ Gi.range;
|
|
|
4828
4828
|
wx.range;
|
|
4829
4829
|
kx.range;
|
|
4830
4830
|
function Ai(n) {
|
|
4831
|
-
return
|
|
4831
|
+
return ce((t) => {
|
|
4832
4832
|
t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - n) % 7), t.setUTCHours(0, 0, 0, 0);
|
|
4833
4833
|
}, (t, e) => {
|
|
4834
4834
|
t.setUTCDate(t.getUTCDate() + e * 7);
|
|
@@ -4842,35 +4842,35 @@ Ax.range;
|
|
|
4842
4842
|
Yi.range;
|
|
4843
4843
|
Sx.range;
|
|
4844
4844
|
_x.range;
|
|
4845
|
-
const Bc =
|
|
4845
|
+
const Bc = ce((n) => {
|
|
4846
4846
|
n.setDate(1), n.setHours(0, 0, 0, 0);
|
|
4847
4847
|
}, (n, t) => {
|
|
4848
4848
|
n.setMonth(n.getMonth() + t);
|
|
4849
4849
|
}, (n, t) => t.getMonth() - n.getMonth() + (t.getFullYear() - n.getFullYear()) * 12, (n) => n.getMonth());
|
|
4850
4850
|
Bc.range;
|
|
4851
|
-
const Oc =
|
|
4851
|
+
const Oc = ce((n) => {
|
|
4852
4852
|
n.setUTCDate(1), n.setUTCHours(0, 0, 0, 0);
|
|
4853
4853
|
}, (n, t) => {
|
|
4854
4854
|
n.setUTCMonth(n.getUTCMonth() + t);
|
|
4855
4855
|
}, (n, t) => t.getUTCMonth() - n.getUTCMonth() + (t.getUTCFullYear() - n.getUTCFullYear()) * 12, (n) => n.getUTCMonth());
|
|
4856
4856
|
Oc.range;
|
|
4857
|
-
const Bn =
|
|
4857
|
+
const Bn = ce((n) => {
|
|
4858
4858
|
n.setMonth(0, 1), n.setHours(0, 0, 0, 0);
|
|
4859
4859
|
}, (n, t) => {
|
|
4860
4860
|
n.setFullYear(n.getFullYear() + t);
|
|
4861
4861
|
}, (n, t) => t.getFullYear() - n.getFullYear(), (n) => n.getFullYear());
|
|
4862
|
-
Bn.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null :
|
|
4862
|
+
Bn.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : ce((t) => {
|
|
4863
4863
|
t.setFullYear(Math.floor(t.getFullYear() / n) * n), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
|
|
4864
4864
|
}, (t, e) => {
|
|
4865
4865
|
t.setFullYear(t.getFullYear() + e * n);
|
|
4866
4866
|
});
|
|
4867
4867
|
Bn.range;
|
|
4868
|
-
const On =
|
|
4868
|
+
const On = ce((n) => {
|
|
4869
4869
|
n.setUTCMonth(0, 1), n.setUTCHours(0, 0, 0, 0);
|
|
4870
4870
|
}, (n, t) => {
|
|
4871
4871
|
n.setUTCFullYear(n.getUTCFullYear() + t);
|
|
4872
4872
|
}, (n, t) => t.getUTCFullYear() - n.getUTCFullYear(), (n) => n.getUTCFullYear());
|
|
4873
|
-
On.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null :
|
|
4873
|
+
On.every = (n) => !isFinite(n = Math.floor(n)) || !(n > 0) ? null : ce((t) => {
|
|
4874
4874
|
t.setUTCFullYear(Math.floor(t.getUTCFullYear() / n) * n), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
|
|
4875
4875
|
}, (t, e) => {
|
|
4876
4876
|
t.setUTCFullYear(t.getUTCFullYear() + e * n);
|
|
@@ -5155,7 +5155,7 @@ function $x(n) {
|
|
|
5155
5155
|
}
|
|
5156
5156
|
};
|
|
5157
5157
|
}
|
|
5158
|
-
var Mh = { "-": "", _: " ", 0: "0" },
|
|
5158
|
+
var Mh = { "-": "", _: " ", 0: "0" }, pe = /^\s*\d+/, Lx = /^%/, Ix = /[\\^$*+?|[\]().{}]/g;
|
|
5159
5159
|
function Yt(n, t, e) {
|
|
5160
5160
|
var i = n < 0 ? "-" : "", r = (i ? -n : n) + "", o = r.length;
|
|
5161
5161
|
return i + (o < e ? new Array(e - o + 1).join(t) + r : r);
|
|
@@ -5170,31 +5170,31 @@ function ur(n) {
|
|
|
5170
5170
|
return new Map(n.map((t, e) => [t.toLowerCase(), e]));
|
|
5171
5171
|
}
|
|
5172
5172
|
function Rx(n, t, e) {
|
|
5173
|
-
var i =
|
|
5173
|
+
var i = pe.exec(t.slice(e, e + 1));
|
|
5174
5174
|
return i ? (n.w = +i[0], e + i[0].length) : -1;
|
|
5175
5175
|
}
|
|
5176
5176
|
function Dx(n, t, e) {
|
|
5177
|
-
var i =
|
|
5177
|
+
var i = pe.exec(t.slice(e, e + 1));
|
|
5178
5178
|
return i ? (n.u = +i[0], e + i[0].length) : -1;
|
|
5179
5179
|
}
|
|
5180
5180
|
function zx(n, t, e) {
|
|
5181
|
-
var i =
|
|
5181
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5182
5182
|
return i ? (n.U = +i[0], e + i[0].length) : -1;
|
|
5183
5183
|
}
|
|
5184
5184
|
function Bx(n, t, e) {
|
|
5185
|
-
var i =
|
|
5185
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5186
5186
|
return i ? (n.V = +i[0], e + i[0].length) : -1;
|
|
5187
5187
|
}
|
|
5188
5188
|
function Ox(n, t, e) {
|
|
5189
|
-
var i =
|
|
5189
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5190
5190
|
return i ? (n.W = +i[0], e + i[0].length) : -1;
|
|
5191
5191
|
}
|
|
5192
5192
|
function Ah(n, t, e) {
|
|
5193
|
-
var i =
|
|
5193
|
+
var i = pe.exec(t.slice(e, e + 4));
|
|
5194
5194
|
return i ? (n.y = +i[0], e + i[0].length) : -1;
|
|
5195
5195
|
}
|
|
5196
5196
|
function Sh(n, t, e) {
|
|
5197
|
-
var i =
|
|
5197
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5198
5198
|
return i ? (n.y = +i[0] + (+i[0] > 68 ? 1900 : 2e3), e + i[0].length) : -1;
|
|
5199
5199
|
}
|
|
5200
5200
|
function Nx(n, t, e) {
|
|
@@ -5202,39 +5202,39 @@ function Nx(n, t, e) {
|
|
|
5202
5202
|
return i ? (n.Z = i[1] ? 0 : -(i[2] + (i[3] || "00")), e + i[0].length) : -1;
|
|
5203
5203
|
}
|
|
5204
5204
|
function Wx(n, t, e) {
|
|
5205
|
-
var i =
|
|
5205
|
+
var i = pe.exec(t.slice(e, e + 1));
|
|
5206
5206
|
return i ? (n.q = i[0] * 3 - 3, e + i[0].length) : -1;
|
|
5207
5207
|
}
|
|
5208
5208
|
function Hx(n, t, e) {
|
|
5209
|
-
var i =
|
|
5209
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5210
5210
|
return i ? (n.m = i[0] - 1, e + i[0].length) : -1;
|
|
5211
5211
|
}
|
|
5212
5212
|
function _h(n, t, e) {
|
|
5213
|
-
var i =
|
|
5213
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5214
5214
|
return i ? (n.d = +i[0], e + i[0].length) : -1;
|
|
5215
5215
|
}
|
|
5216
5216
|
function Vx(n, t, e) {
|
|
5217
|
-
var i =
|
|
5217
|
+
var i = pe.exec(t.slice(e, e + 3));
|
|
5218
5218
|
return i ? (n.m = 0, n.d = +i[0], e + i[0].length) : -1;
|
|
5219
5219
|
}
|
|
5220
5220
|
function Ch(n, t, e) {
|
|
5221
|
-
var i =
|
|
5221
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5222
5222
|
return i ? (n.H = +i[0], e + i[0].length) : -1;
|
|
5223
5223
|
}
|
|
5224
5224
|
function Gx(n, t, e) {
|
|
5225
|
-
var i =
|
|
5225
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5226
5226
|
return i ? (n.M = +i[0], e + i[0].length) : -1;
|
|
5227
5227
|
}
|
|
5228
5228
|
function Yx(n, t, e) {
|
|
5229
|
-
var i =
|
|
5229
|
+
var i = pe.exec(t.slice(e, e + 2));
|
|
5230
5230
|
return i ? (n.S = +i[0], e + i[0].length) : -1;
|
|
5231
5231
|
}
|
|
5232
5232
|
function Xx(n, t, e) {
|
|
5233
|
-
var i =
|
|
5233
|
+
var i = pe.exec(t.slice(e, e + 3));
|
|
5234
5234
|
return i ? (n.L = +i[0], e + i[0].length) : -1;
|
|
5235
5235
|
}
|
|
5236
5236
|
function Ux(n, t, e) {
|
|
5237
|
-
var i =
|
|
5237
|
+
var i = pe.exec(t.slice(e, e + 6));
|
|
5238
5238
|
return i ? (n.L = Math.floor(i[0] / 1e3), e + i[0].length) : -1;
|
|
5239
5239
|
}
|
|
5240
5240
|
function qx(n, t, e) {
|
|
@@ -5242,11 +5242,11 @@ function qx(n, t, e) {
|
|
|
5242
5242
|
return i ? e + i[0].length : -1;
|
|
5243
5243
|
}
|
|
5244
5244
|
function jx(n, t, e) {
|
|
5245
|
-
var i =
|
|
5245
|
+
var i = pe.exec(t.slice(e));
|
|
5246
5246
|
return i ? (n.Q = +i[0], e + i[0].length) : -1;
|
|
5247
5247
|
}
|
|
5248
5248
|
function Zx(n, t, e) {
|
|
5249
|
-
var i =
|
|
5249
|
+
var i = pe.exec(t.slice(e));
|
|
5250
5250
|
return i ? (n.s = +i[0], e + i[0].length) : -1;
|
|
5251
5251
|
}
|
|
5252
5252
|
function Ph(n, t) {
|
|
@@ -5450,7 +5450,7 @@ function D1() {
|
|
|
5450
5450
|
return arguments.length ? ([d, p] = u, s = f(d, p), c) : [s(0), s(1)];
|
|
5451
5451
|
};
|
|
5452
5452
|
}
|
|
5453
|
-
return c.range = h(
|
|
5453
|
+
return c.range = h(se), c.rangeRound = h(jf), c.unknown = function(f) {
|
|
5454
5454
|
return arguments.length ? (l = f, c) : l;
|
|
5455
5455
|
}, function(f) {
|
|
5456
5456
|
return o = f, e = f(n), i = f(t), r = e === i ? 0 : 1 / (i - e), c;
|
|
@@ -5797,7 +5797,7 @@ function Vc(n, t, e) {
|
|
|
5797
5797
|
}
|
|
5798
5798
|
function fd(n, t) {
|
|
5799
5799
|
var e;
|
|
5800
|
-
return (typeof t == "number" ? dn : t instanceof
|
|
5800
|
+
return (typeof t == "number" ? dn : t instanceof ae ? xi : (e = ae(t)) ? (t = e, xi) : qf)(n, t);
|
|
5801
5801
|
}
|
|
5802
5802
|
function rb(n) {
|
|
5803
5803
|
return function() {
|
|
@@ -6244,7 +6244,7 @@ function Yc(n) {
|
|
|
6244
6244
|
return String(n);
|
|
6245
6245
|
}
|
|
6246
6246
|
const cv = /\{([^}]+)\}/g;
|
|
6247
|
-
function
|
|
6247
|
+
function Jt(n, t, e = !1) {
|
|
6248
6248
|
return n.replace(cv, (i, r) => {
|
|
6249
6249
|
const o = r.indexOf(":");
|
|
6250
6250
|
let s = r, a = null;
|
|
@@ -6294,7 +6294,7 @@ function md(n, t = "#333") {
|
|
|
6294
6294
|
return dv.test(e) ? e : t;
|
|
6295
6295
|
}
|
|
6296
6296
|
const pv = /<\/?[^>]+(>|$)/g, gv = /<br\s*\/?>/gi;
|
|
6297
|
-
function
|
|
6297
|
+
function de(n) {
|
|
6298
6298
|
return n.replace(gv, " ").replace(pv, "").trim();
|
|
6299
6299
|
}
|
|
6300
6300
|
function Ks(n, t) {
|
|
@@ -6618,7 +6618,7 @@ class Ss {
|
|
|
6618
6618
|
}
|
|
6619
6619
|
class mv extends Ss {
|
|
6620
6620
|
constructor(t, e) {
|
|
6621
|
-
super(t, e), this.scale =
|
|
6621
|
+
super(t, e), this.scale = Ce().range(this.getRange()).domain([0, 1]);
|
|
6622
6622
|
}
|
|
6623
6623
|
updateDomain(t) {
|
|
6624
6624
|
let { min: e, max: i } = t;
|
|
@@ -6839,7 +6839,7 @@ class yd extends Ss {
|
|
|
6839
6839
|
if (((s = this.config.labels) == null ? void 0 : s.enabled) === !1) return;
|
|
6840
6840
|
const e = this.scale.bandwidth();
|
|
6841
6841
|
if (e <= 0) return;
|
|
6842
|
-
const i =
|
|
6842
|
+
const i = Ae(((l = (a = this.config.labels) == null ? void 0 : a.style) == null ? void 0 : l.fontSize) || Mt);
|
|
6843
6843
|
if (i <= e) return;
|
|
6844
6844
|
const o = Math.min(i, Math.max(5, Math.round(e * 1.1)));
|
|
6845
6845
|
t.selectAll(".tick text").style("font-size", `${o}px`);
|
|
@@ -6885,13 +6885,13 @@ class Xc {
|
|
|
6885
6885
|
x: l.x,
|
|
6886
6886
|
y: l.y,
|
|
6887
6887
|
percentage: l.percentage
|
|
6888
|
-
}) : i.format ? h =
|
|
6888
|
+
}) : i.format ? h = de(Jt(i.format, {
|
|
6889
6889
|
point: l,
|
|
6890
6890
|
series: { name: s },
|
|
6891
6891
|
x: l.x,
|
|
6892
6892
|
y: l.y
|
|
6893
6893
|
})) : h = String(l.y);
|
|
6894
|
-
const f = r.getPixelForValue(l.x ?? c) + (i.x ?? 0), u = o.getPixelForValue(l.y) + (i.y ?? -8), d = a.append("text").attr("x", f).attr("y", u).attr("text-anchor", i.align || "center").attr("dominant-baseline", "auto").attr("font-size", ((p = i.style) == null ? void 0 : p.fontSize) || Mt).attr("fill", i.color || ((y = i.style) == null ? void 0 : y.color) ||
|
|
6894
|
+
const f = r.getPixelForValue(l.x ?? c) + (i.x ?? 0), u = o.getPixelForValue(l.y) + (i.y ?? -8), d = a.append("text").attr("x", f).attr("y", u).attr("text-anchor", i.align || "center").attr("dominant-baseline", "auto").attr("font-size", ((p = i.style) == null ? void 0 : p.fontSize) || Mt).attr("fill", i.color || ((y = i.style) == null ? void 0 : y.color) || Ee).attr("font-weight", ((g = i.style) == null ? void 0 : g.fontWeight) || "normal").text(h);
|
|
6895
6895
|
if (i.className && d.attr("class", i.className), i.rotation && d.attr("transform", `rotate(${i.rotation},${f},${u})`), i.shadow && d.attr("filter", "drop-shadow(1px 1px 2px rgba(0,0,0,0.3))"), (m = i.textPath) != null && m.enabled) {
|
|
6896
6896
|
const b = i.textPath.attributes || {};
|
|
6897
6897
|
d.selectAll("*").remove();
|
|
@@ -7180,11 +7180,11 @@ const Rr = class Rr {
|
|
|
7180
7180
|
}, u = (e == null ? void 0 : e.pointFormatter) ?? this.config.pointFormatter;
|
|
7181
7181
|
if (u) {
|
|
7182
7182
|
const M = u.call(this.buildFormatterContext(t)), C = (e == null ? void 0 : e.headerFormat) ?? this.config.headerFormat ?? "", L = (e == null ? void 0 : e.footerFormat) ?? this.config.footerFormat ?? "";
|
|
7183
|
-
return
|
|
7183
|
+
return Jt(C, f, !0) + M + Jt(L, f, !0);
|
|
7184
7184
|
}
|
|
7185
7185
|
if (this.config.format)
|
|
7186
|
-
return
|
|
7187
|
-
const d = (e == null ? void 0 : e.headerFormat) ?? this.config.headerFormat ?? "", p = (e == null ? void 0 : e.pointFormat) ?? this.config.pointFormat ?? "", y = (e == null ? void 0 : e.footerFormat) ?? this.config.footerFormat ?? "", g =
|
|
7186
|
+
return Jt(this.config.format, f, !0);
|
|
7187
|
+
const d = (e == null ? void 0 : e.headerFormat) ?? this.config.headerFormat ?? "", p = (e == null ? void 0 : e.pointFormat) ?? this.config.pointFormat ?? "", y = (e == null ? void 0 : e.footerFormat) ?? this.config.footerFormat ?? "", g = Jt(d, f, !0), m = Jt(p, f, !0), x = Jt(y, f, !0);
|
|
7188
7188
|
let v = "";
|
|
7189
7189
|
const b = !!((e == null ? void 0 : e.pointFormat) ?? this.config.pointFormat);
|
|
7190
7190
|
if (t.point.total !== void 0 && !y && !b) {
|
|
@@ -7230,7 +7230,7 @@ const Rr = class Rr {
|
|
|
7230
7230
|
point: this.buildFormatterPoint(l),
|
|
7231
7231
|
series: { ...l.series, name: l.series.name || "" }
|
|
7232
7232
|
};
|
|
7233
|
-
e.push(
|
|
7233
|
+
e.push(Jt(h, p, !0));
|
|
7234
7234
|
continue;
|
|
7235
7235
|
}
|
|
7236
7236
|
const f = md(l.point.color || l.series.color || "#333"), u = Jn(l.series.name || ""), d = this.formatValue(l.point.y);
|
|
@@ -7343,7 +7343,7 @@ class Uc {
|
|
|
7343
7343
|
index: t.config.index,
|
|
7344
7344
|
legendIndex: t.config.legendIndex
|
|
7345
7345
|
};
|
|
7346
|
-
i =
|
|
7346
|
+
i = de(Jt(this.config.labelFormat, o));
|
|
7347
7347
|
} else
|
|
7348
7348
|
i = t.config.name || `Series ${t.config.index + 1}`;
|
|
7349
7349
|
if (this.config.valueSuffix && (i += ` ${this.config.valueSuffix}`), this.config.valueDecimals !== void 0 && this.config.valueDecimals >= 0) {
|
|
@@ -7356,13 +7356,13 @@ class Uc {
|
|
|
7356
7356
|
return e || Mt;
|
|
7357
7357
|
}
|
|
7358
7358
|
estimateTextWidth(t, e) {
|
|
7359
|
-
const i =
|
|
7359
|
+
const i = Ae(e);
|
|
7360
7360
|
return t.length * i * 0.62;
|
|
7361
7361
|
}
|
|
7362
7362
|
static computeGridLayout(t, e, i, r) {
|
|
7363
7363
|
if (r.itemWidth)
|
|
7364
7364
|
return { columns: Math.max(2, Math.floor(i / r.itemWidth)), itemWidth: r.itemWidth };
|
|
7365
|
-
const o =
|
|
7365
|
+
const o = Ae(r.fontSize);
|
|
7366
7366
|
let s = 0;
|
|
7367
7367
|
for (const c of e) {
|
|
7368
7368
|
const h = c.length * o * 0.62;
|
|
@@ -7422,42 +7422,42 @@ class Uc {
|
|
|
7422
7422
|
}
|
|
7423
7423
|
const F = [];
|
|
7424
7424
|
T.forEach((ot, q) => {
|
|
7425
|
-
var
|
|
7425
|
+
var ne;
|
|
7426
7426
|
const st = ot.series, wt = ot.color, Ct = ot.isLine, kt = ot.label;
|
|
7427
7427
|
let _t, Vt;
|
|
7428
7428
|
if (P) {
|
|
7429
|
-
const Tt = q % S,
|
|
7430
|
-
_t = o + Ve + Tt * w, Vt = C +
|
|
7429
|
+
const Tt = q % S, Kt = Math.floor(q / S), le = S * w, Ve = Math.max(0, (L - le) / 2);
|
|
7430
|
+
_t = o + Ve + Tt * w, Vt = C + Kt * _ + d;
|
|
7431
7431
|
} else if (r === "horizontal") {
|
|
7432
|
-
const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v),
|
|
7433
|
-
q > 0 && b +
|
|
7432
|
+
const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + Tt;
|
|
7433
|
+
q > 0 && b + Kt > L && (b = o, k += _), _t = b, Vt = k + d, M = Math.max(M, b + Kt), b += Kt + f;
|
|
7434
7434
|
} else {
|
|
7435
|
-
const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v),
|
|
7436
|
-
_t = b, Vt = k + d, M = Math.max(M, b +
|
|
7435
|
+
const Tt = this.config.itemWidth || this.estimateTextWidth(kt, v), Kt = s + l + Tt;
|
|
7436
|
+
_t = b, Vt = k + d, M = Math.max(M, b + Kt), b = o, k += _;
|
|
7437
7437
|
}
|
|
7438
7438
|
const Nt = this.group.append("g").attr("class", "katucharts-legend-item").attr("transform", `translate(${_t},${Vt})`).style("cursor", "pointer"), Ot = st.getLegendSymbolShape();
|
|
7439
7439
|
if (Ct)
|
|
7440
7440
|
Nt.append("line").attr("x1", 0).attr("x2", s).attr("y1", 6).attr("y2", 6).attr("stroke", wt).attr("stroke-width", 2), Nt.append("circle").attr("cx", s / 2).attr("cy", 6).attr("r", 3).attr("fill", wt);
|
|
7441
7441
|
else if (Ot) {
|
|
7442
|
-
const Tt = s / 2,
|
|
7443
|
-
Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy",
|
|
7442
|
+
const Tt = s / 2, Kt = a / 2, le = Math.min(s, a) / 2;
|
|
7443
|
+
Ot === "circle" ? Nt.append("circle").attr("cx", Tt).attr("cy", Kt).attr("r", le).attr("fill", wt) : Ot === "square" ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("fill", wt) : Ot === "diamond" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${Kt} L ${Tt} ${a} L 0 ${Kt} Z`).attr("fill", wt) : Ot === "triangle" ? Nt.append("path").attr("d", `M ${Tt} 0 L ${s} ${a} L 0 ${a} Z`).attr("fill", wt) : Ot === "triangle-down" ? Nt.append("path").attr("d", `M 0 0 L ${s} 0 L ${Tt} ${a} Z`).attr("fill", wt) : Ot === "cross" ? Nt.append("path").attr("d", `M 0 ${Kt} L ${s} ${Kt} M ${Tt} 0 L ${Tt} ${a}`).attr("stroke", wt).attr("stroke-width", 2) : Nt.append("circle").attr("cx", Tt).attr("cy", Kt).attr("r", le).attr("fill", wt);
|
|
7444
7444
|
} else h ? Nt.append("rect").attr("x", 0).attr("y", 0).attr("width", s).attr("height", a).attr("rx", c).attr("fill", wt) : Nt.append("circle").attr("cx", s / 2).attr("cy", a / 2).attr("r", Math.min(s, a) / 2).attr("fill", wt);
|
|
7445
|
-
const
|
|
7446
|
-
this.config.rtl && (
|
|
7447
|
-
var
|
|
7445
|
+
const Zt = Nt.append("text").attr("x", s + l).attr("y", 10).attr("fill", st.visible ? u.color || this.autoText() : ((ne = this.config.itemHiddenStyle) == null ? void 0 : ne.color) || "#cccccc").attr("font-size", v).attr("font-weight", u.fontWeight || "normal").text(kt);
|
|
7446
|
+
this.config.rtl && (Zt.attr("text-anchor", "end").attr("x", -l), Nt.select("rect, circle, line").attr("transform", `translate(${-(s + l)}, 0)`)), Nt.on("click", () => {
|
|
7447
|
+
var le, Ve, he;
|
|
7448
7448
|
const Tt = this.config.events;
|
|
7449
7449
|
if (Tt != null && Tt.itemClick && Tt.itemClick.call(st, new Event("legendItemClick")) === !1)
|
|
7450
7450
|
return;
|
|
7451
|
-
st.toggleVisible(),
|
|
7451
|
+
st.toggleVisible(), Zt.attr(
|
|
7452
7452
|
"fill",
|
|
7453
|
-
st.visible ? u.color || this.autoText() : ((
|
|
7454
|
-
), ((
|
|
7453
|
+
st.visible ? u.color || this.autoText() : ((le = this.config.itemHiddenStyle) == null ? void 0 : le.color) || "#cccccc"
|
|
7454
|
+
), ((he = (Ve = st.config.events) == null ? void 0 : Ve.legendItemClick) == null ? void 0 : he.call(st, new Event("legendItemClick"))) !== !1 && this.events.emit("legend:itemClick", st, q);
|
|
7455
7455
|
}), Nt.on("mouseover", () => {
|
|
7456
7456
|
var Tt;
|
|
7457
|
-
|
|
7457
|
+
Zt.attr("fill", ((Tt = this.config.itemHoverStyle) == null ? void 0 : Tt.color) || this.autoText()), this.events.emit("legend:itemHover", st);
|
|
7458
7458
|
}), Nt.on("mouseout", () => {
|
|
7459
7459
|
var Tt;
|
|
7460
|
-
|
|
7460
|
+
Zt.attr(
|
|
7461
7461
|
"fill",
|
|
7462
7462
|
st.visible ? u.color || this.autoText() : ((Tt = this.config.itemHiddenStyle) == null ? void 0 : Tt.color) || "#cccccc"
|
|
7463
7463
|
), this.events.emit("legend:itemLeave");
|
|
@@ -7488,8 +7488,8 @@ class Uc {
|
|
|
7488
7488
|
F.forEach((Ct, kt) => {
|
|
7489
7489
|
const _t = Math.floor(kt / S);
|
|
7490
7490
|
if (_t >= st && _t < wt) {
|
|
7491
|
-
const Nt = kt % S, Ot = S * w,
|
|
7492
|
-
Ct.style("display", "block"), q ? Ct.style("opacity", "0").attr("transform", `translate(${
|
|
7491
|
+
const Nt = kt % S, Ot = S * w, Zt = Math.max(0, (L - Ot) / 2), ne = o + Zt + Nt * w, Tt = C + (_t - st) * _ + (this.config.itemMarginTop ?? 0);
|
|
7492
|
+
Ct.style("display", "block"), q ? Ct.style("opacity", "0").attr("transform", `translate(${ne},${Tt})`).transition().duration(250).style("opacity", "1") : Ct.attr("transform", `translate(${ne},${Tt})`).style("opacity", "1");
|
|
7493
7493
|
} else
|
|
7494
7494
|
q ? Ct.transition().duration(150).style("opacity", "0").on("end", function() {
|
|
7495
7495
|
Ct.style("display", "none");
|
|
@@ -7569,13 +7569,13 @@ class Uc {
|
|
|
7569
7569
|
if (r.layout === "separate") return this.renderBubbleLegendSeparate(t, e, i);
|
|
7570
7570
|
const o = [...t.ranges].sort((T, I) => I.radius - T.radius), s = o[0].radius;
|
|
7571
7571
|
if (!(s > 0)) return { width: 0, height: 0 };
|
|
7572
|
-
const a = ((k = (b = r.labels) == null ? void 0 : b.style) == null ? void 0 : k.fontSize) || Mt, l = r.borderColor || t.color, c = r.borderWidth ?? 1.5, h = r.color || "rgba(0,0,0,0)", f = r.connectorColor || l, u = r.connectorWidth ?? 1, d = r.connectorDistance ?? 16, p = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.color) ||
|
|
7572
|
+
const a = ((k = (b = r.labels) == null ? void 0 : b.style) == null ? void 0 : k.fontSize) || Mt, l = r.borderColor || t.color, c = r.borderWidth ?? 1.5, h = r.color || "rgba(0,0,0,0)", f = r.connectorColor || l, u = r.connectorWidth ?? 1, d = r.connectorDistance ?? 16, p = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.color) || Ee, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = e + s, m = i + 2 * s, x = e + 2 * s + d;
|
|
7573
7573
|
let v = 0;
|
|
7574
7574
|
for (const T of o) {
|
|
7575
7575
|
const I = m - 2 * T.radius;
|
|
7576
7576
|
y.append("circle").attr("cx", g).attr("cy", m - T.radius).attr("r", T.radius).attr("fill", h).attr("stroke", l).attr("stroke-width", c), y.append("line").attr("x1", g).attr("y1", I).attr("x2", x).attr("y2", I).attr("stroke", f).attr("stroke-width", u).attr("stroke-dasharray", "2,2");
|
|
7577
7577
|
let E;
|
|
7578
|
-
(L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: T.value }) : (_ = r.labels) != null && _.format ? E =
|
|
7578
|
+
(L = r.labels) != null && L.formatter ? E = r.labels.formatter.call({ value: T.value }) : (_ = r.labels) != null && _.format ? E = de(Jt(r.labels.format, { value: T.value })) : E = String(T.value), y.append("text").attr("x", x + 4).attr("y", I).attr("dominant-baseline", "middle").attr("font-size", a).attr("fill", p).text(E), v = Math.max(v, this.estimateTextWidth(E, a));
|
|
7579
7579
|
}
|
|
7580
7580
|
return {
|
|
7581
7581
|
width: 2 * s + d + v + 8,
|
|
@@ -7592,9 +7592,9 @@ class Uc {
|
|
|
7592
7592
|
var M, C, L, _;
|
|
7593
7593
|
const r = this.config.bubbleLegend || {}, o = [...t.ranges].sort((T, I) => T.radius - I.radius), s = o[o.length - 1].radius;
|
|
7594
7594
|
if (!(s > 0)) return { width: 0, height: 0 };
|
|
7595
|
-
const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) ||
|
|
7595
|
+
const a = ((C = (M = r.labels) == null ? void 0 : M.style) == null ? void 0 : C.fontSize) || Mt, l = parseFloat(a) || 12, c = r.borderColor || t.color, h = r.borderWidth ?? 1.5, f = r.color || "rgba(0,0,0,0)", u = ((_ = (L = r.labels) == null ? void 0 : L.style) == null ? void 0 : _.color) || Ee, d = r.connectorDistance ?? 8, p = (T) => {
|
|
7596
7596
|
var I, E;
|
|
7597
|
-
return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: T }) : (E = r.labels) != null && E.format ?
|
|
7597
|
+
return (I = r.labels) != null && I.formatter ? r.labels.formatter.call({ value: T }) : (E = r.labels) != null && E.format ? de(Jt(r.labels.format, { value: T })) : String(T);
|
|
7598
7598
|
}, y = this.group.append("g").attr("class", "katucharts-bubble-legend"), g = (T, I, E) => y.append("circle").attr("cx", T).attr("cy", I).attr("r", E).attr("fill", f).attr("stroke", c).attr("stroke-width", h);
|
|
7599
7599
|
if (this.config.layout === "horizontal") {
|
|
7600
7600
|
const T = l + 6, I = i + T + 2 * s;
|
|
@@ -7767,7 +7767,7 @@ class Sv {
|
|
|
7767
7767
|
let t = this.svg.node();
|
|
7768
7768
|
for (; t; ) {
|
|
7769
7769
|
if (typeof getComputedStyle == "function") {
|
|
7770
|
-
const e = getComputedStyle(t).backgroundColor, i = e ?
|
|
7770
|
+
const e = getComputedStyle(t).backgroundColor, i = e ? ae(e) : null;
|
|
7771
7771
|
if (i && i.opacity > 0) return e;
|
|
7772
7772
|
}
|
|
7773
7773
|
t = t.parentElement;
|
|
@@ -7786,7 +7786,7 @@ class Sv {
|
|
|
7786
7786
|
i = s && s !== "none" ? s : null;
|
|
7787
7787
|
}
|
|
7788
7788
|
if (!i || i === "none" || i.indexOf("url(") === 0) return null;
|
|
7789
|
-
const r =
|
|
7789
|
+
const r = ae(i);
|
|
7790
7790
|
return !r || r.opacity === 0 ? null : i;
|
|
7791
7791
|
}
|
|
7792
7792
|
startProtection() {
|
|
@@ -8151,7 +8151,7 @@ function $v(n) {
|
|
|
8151
8151
|
x.className = "katucharts-title-html", x.innerHTML = g.text, x.style.cssText = `position:absolute;top:${r.titleArea.y + 5}px;left:0;width:100%;text-align:${g.align || "center"};color:${((l = g.style) == null ? void 0 : l.color) || "#333333"};font-size:${m};font-weight:${((c = g.style) == null ? void 0 : c.fontWeight) || "bold"};pointer-events:none;box-sizing:border-box;padding:0 22px;`, e.appendChild(x);
|
|
8152
8152
|
} else {
|
|
8153
8153
|
const x = Xh(n, g.align), v = o + (g.widthAdjust ?? -44), b = t.append("text").attr("class", "katucharts-chart-title").attr("x", x).attr("y", r.titleArea.y + 20).attr("text-anchor", Uh(g.align)).attr("fill", ((h = g.style) == null ? void 0 : h.color) || "#333333").attr("font-size", m).attr("font-weight", ((f = g.style) == null ? void 0 : f.fontWeight) || "bold").text(g.text);
|
|
8154
|
-
qh(b, v, x,
|
|
8154
|
+
qh(b, v, x, Ae(m));
|
|
8155
8155
|
}
|
|
8156
8156
|
}
|
|
8157
8157
|
if ((u = i.subtitle) != null && u.text) {
|
|
@@ -8161,7 +8161,7 @@ function $v(n) {
|
|
|
8161
8161
|
x.className = "katucharts-subtitle-html", x.innerHTML = g.text, x.style.cssText = `position:absolute;top:${r.subtitleArea.y + 5}px;left:0;width:100%;text-align:${g.align || "center"};color:${((p = g.style) == null ? void 0 : p.color) || "#666666"};font-size:${m};pointer-events:none;box-sizing:border-box;padding:0 22px;`, e.appendChild(x);
|
|
8162
8162
|
} else {
|
|
8163
8163
|
const x = Xh(n, g.align), v = o + (g.widthAdjust ?? -44), b = t.append("text").attr("class", "katucharts-chart-subtitle").attr("x", x).attr("y", r.subtitleArea.y + 15).attr("text-anchor", Uh(g.align)).attr("fill", ((y = g.style) == null ? void 0 : y.color) || "#666666").attr("font-size", m).text(g.text);
|
|
8164
|
-
qh(b, v, x,
|
|
8164
|
+
qh(b, v, x, Ae(m));
|
|
8165
8165
|
}
|
|
8166
8166
|
}
|
|
8167
8167
|
}
|
|
@@ -8262,7 +8262,7 @@ function Lv(n) {
|
|
|
8262
8262
|
}
|
|
8263
8263
|
return t.appendChild(C), C;
|
|
8264
8264
|
}
|
|
8265
|
-
const
|
|
8265
|
+
const jt = class jt {
|
|
8266
8266
|
/**
|
|
8267
8267
|
* Clone the SVG node, inline computed styles on every element, strip the
|
|
8268
8268
|
* export button group, and return a self-contained SVG string.
|
|
@@ -8273,7 +8273,7 @@ const Ne = class Ne {
|
|
|
8273
8273
|
const l = i[a], c = r[a];
|
|
8274
8274
|
try {
|
|
8275
8275
|
const h = window.getComputedStyle(c);
|
|
8276
|
-
for (const f of
|
|
8276
|
+
for (const f of jt.INLINE_PROPS) {
|
|
8277
8277
|
const u = h.getPropertyValue(f);
|
|
8278
8278
|
u && u !== "" && u !== "none" && u !== "normal" && u !== "0" && l.style.setProperty(f, u);
|
|
8279
8279
|
}
|
|
@@ -8281,7 +8281,7 @@ const Ne = class Ne {
|
|
|
8281
8281
|
}
|
|
8282
8282
|
}
|
|
8283
8283
|
const o = e.querySelector(".katucharts-export-button-group");
|
|
8284
|
-
return o && o.remove(), fn.isLicensed() ||
|
|
8284
|
+
return o && o.remove(), fn.isLicensed() || jt.stampWatermark(e), new XMLSerializer().serializeToString(e);
|
|
8285
8285
|
}
|
|
8286
8286
|
/** Append a guaranteed, render-safe attribution watermark to an export clone. */
|
|
8287
8287
|
static stampWatermark(t) {
|
|
@@ -8310,38 +8310,76 @@ const Ne = class Ne {
|
|
|
8310
8310
|
}
|
|
8311
8311
|
static exportSVG(t, e = "chart") {
|
|
8312
8312
|
const i = new Blob([t], { type: "image/svg+xml;charset=utf-8" });
|
|
8313
|
-
|
|
8313
|
+
jt.downloadBlob(i, `${e}.svg`);
|
|
8314
8314
|
}
|
|
8315
8315
|
static async exportPNG(t, e = "chart", i = 2) {
|
|
8316
|
-
const r = await
|
|
8316
|
+
const r = await jt.svgToCanvas(t, i);
|
|
8317
8317
|
return new Promise((o, s) => {
|
|
8318
8318
|
r.toBlob((a) => {
|
|
8319
|
-
a ? (
|
|
8319
|
+
a ? (jt.downloadBlob(a, `${e}.png`), o()) : s(new Error("Failed to generate PNG"));
|
|
8320
8320
|
}, "image/png");
|
|
8321
8321
|
});
|
|
8322
8322
|
}
|
|
8323
8323
|
static async exportJPEG(t, e = "chart", i = 2, r = 0.95) {
|
|
8324
|
-
const o = await
|
|
8324
|
+
const o = await jt.svgToCanvas(t, i, "#ffffff");
|
|
8325
8325
|
return new Promise((s, a) => {
|
|
8326
8326
|
o.toBlob((l) => {
|
|
8327
|
-
l ? (
|
|
8327
|
+
l ? (jt.downloadBlob(l, `${e}.jpeg`), s()) : a(new Error("Failed to generate JPEG"));
|
|
8328
8328
|
}, "image/jpeg", r);
|
|
8329
8329
|
});
|
|
8330
8330
|
}
|
|
8331
|
+
/**
|
|
8332
|
+
* Resolve the `jsPDF` constructor across every runtime the library ships to.
|
|
8333
|
+
* Tries, in order: a `jspdf` global already on the page (UMD consumers who
|
|
8334
|
+
* loaded it themselves), the bundler-resolved module (consumers who ran
|
|
8335
|
+
* `npm install jspdf`), and finally the UMD build from a CDN. The CDN fallback
|
|
8336
|
+
* is what makes PDF export work in the plain-browser UMD build and in setups
|
|
8337
|
+
* where `jspdf` was never installed — a bare `import('jspdf')` can't resolve
|
|
8338
|
+
* without a bundler, so it always failed there before.
|
|
8339
|
+
*/
|
|
8340
|
+
static loadJsPDF() {
|
|
8341
|
+
return jt.jsPDFLoader || (jt.jsPDFLoader = (async () => {
|
|
8342
|
+
var r;
|
|
8343
|
+
const t = () => {
|
|
8344
|
+
var s;
|
|
8345
|
+
const o = ((s = globalThis.jspdf) == null ? void 0 : s.jsPDF) ?? globalThis.jsPDF;
|
|
8346
|
+
return typeof o == "function" ? o : null;
|
|
8347
|
+
}, e = t();
|
|
8348
|
+
if (e) return e;
|
|
8349
|
+
try {
|
|
8350
|
+
const o = await import(
|
|
8351
|
+
/* @vite-ignore */
|
|
8352
|
+
"./__vite-optional-peer-dep_jspdf_katucharts-BDMct_Gn.js"
|
|
8353
|
+
), s = o.jsPDF ?? ((r = o.default) == null ? void 0 : r.jsPDF) ?? o.default;
|
|
8354
|
+
if (typeof s == "function") return s;
|
|
8355
|
+
} catch {
|
|
8356
|
+
}
|
|
8357
|
+
await jt.injectScript(jt.JSPDF_CDN_URL);
|
|
8358
|
+
const i = t();
|
|
8359
|
+
if (i) return i;
|
|
8360
|
+
throw new Error("jsPDF unavailable");
|
|
8361
|
+
})().catch((t) => {
|
|
8362
|
+
throw jt.jsPDFLoader = null, t;
|
|
8363
|
+
})), jt.jsPDFLoader;
|
|
8364
|
+
}
|
|
8365
|
+
/** Inject a `<script>` once and resolve when it loads. */
|
|
8366
|
+
static injectScript(t) {
|
|
8367
|
+
return new Promise((e, i) => {
|
|
8368
|
+
const r = document.createElement("script");
|
|
8369
|
+
r.src = t, r.async = !0, r.onload = () => e(), r.onerror = () => {
|
|
8370
|
+
r.remove(), i(new Error(`Failed to load ${t}`));
|
|
8371
|
+
}, document.head.appendChild(r);
|
|
8372
|
+
});
|
|
8373
|
+
}
|
|
8331
8374
|
static async exportPDF(t, e = "chart", i = 2) {
|
|
8332
8375
|
let r;
|
|
8333
8376
|
try {
|
|
8334
|
-
|
|
8335
|
-
r = f.jsPDF ?? f.default;
|
|
8377
|
+
r = await jt.loadJsPDF();
|
|
8336
8378
|
} catch {
|
|
8337
|
-
console.warn("KatuCharts: jspdf
|
|
8379
|
+
console.warn("KatuCharts: jspdf could not be loaded. Install it with `npm install jspdf`, expose it as a global, or allow the CDN fallback to enable PDF export.");
|
|
8338
8380
|
return;
|
|
8339
8381
|
}
|
|
8340
|
-
|
|
8341
|
-
console.warn("KatuCharts: jspdf is not installed. Install it with `npm install jspdf` to enable PDF export.");
|
|
8342
|
-
return;
|
|
8343
|
-
}
|
|
8344
|
-
const o = await Ne.svgToCanvas(t, i, "#ffffff"), s = o.toDataURL("image/jpeg", 0.95), a = o.width / i, l = o.height / i, c = a > l ? "landscape" : "portrait", h = new r({ orientation: c, unit: "px", format: [a, l] });
|
|
8382
|
+
const o = await jt.svgToCanvas(t, i, "#ffffff"), s = o.toDataURL("image/jpeg", 0.95), a = o.width / i, l = o.height / i, c = a > l ? "landscape" : "portrait", h = new r({ orientation: c, unit: "px", format: [a, l] });
|
|
8345
8383
|
h.addImage(s, "JPEG", 0, 0, a, l), h.save(`${e}.pdf`);
|
|
8346
8384
|
}
|
|
8347
8385
|
static print(t, e) {
|
|
@@ -8410,7 +8448,7 @@ const Ne = class Ne {
|
|
|
8410
8448
|
a.map((d) => ao(d, r)).join(r),
|
|
8411
8449
|
...h.map((d) => d.map((p) => ao(p, r)).join(r))
|
|
8412
8450
|
].join(o), u = new Blob([f], { type: "text/csv;charset=utf-8" });
|
|
8413
|
-
|
|
8451
|
+
jt.downloadBlob(u, `${e}.csv`);
|
|
8414
8452
|
}
|
|
8415
8453
|
static getCSV(t, e) {
|
|
8416
8454
|
const i = (e == null ? void 0 : e.itemDelimiter) ?? ",", r = (e == null ? void 0 : e.lineDelimiter) ?? `
|
|
@@ -8463,7 +8501,7 @@ const Ne = class Ne {
|
|
|
8463
8501
|
return r;
|
|
8464
8502
|
}
|
|
8465
8503
|
static getTable(t, e) {
|
|
8466
|
-
const i =
|
|
8504
|
+
const i = jt.getDataRows(t);
|
|
8467
8505
|
if (i.length === 0) return "<table></table>";
|
|
8468
8506
|
const r = i[0], o = i.slice(1);
|
|
8469
8507
|
let s = '<table class="katucharts-data-table">';
|
|
@@ -8491,7 +8529,7 @@ const Ne = class Ne {
|
|
|
8491
8529
|
marginTop: "10px",
|
|
8492
8530
|
fontSize: "11px"
|
|
8493
8531
|
});
|
|
8494
|
-
const o =
|
|
8532
|
+
const o = jt.getTable(t, i);
|
|
8495
8533
|
r.innerHTML = o;
|
|
8496
8534
|
const s = r.querySelector("table");
|
|
8497
8535
|
return s && (Object.assign(s.style, {
|
|
@@ -8515,7 +8553,7 @@ const Ne = class Ne {
|
|
|
8515
8553
|
r.href = i, r.download = e, document.body.appendChild(r), r.click(), document.body.removeChild(r), URL.revokeObjectURL(i);
|
|
8516
8554
|
}
|
|
8517
8555
|
};
|
|
8518
|
-
|
|
8556
|
+
jt.INLINE_PROPS = [
|
|
8519
8557
|
"fill",
|
|
8520
8558
|
"stroke",
|
|
8521
8559
|
"stroke-width",
|
|
@@ -8534,8 +8572,8 @@ Ne.INLINE_PROPS = [
|
|
|
8534
8572
|
"text-decoration",
|
|
8535
8573
|
"visibility",
|
|
8536
8574
|
"display"
|
|
8537
|
-
];
|
|
8538
|
-
let
|
|
8575
|
+
], jt.JSPDF_CDN_URL = "https://cdn.jsdelivr.net/npm/jspdf@2.5.2/dist/jspdf.umd.min.js", jt.jsPDFLoader = null;
|
|
8576
|
+
let re = jt;
|
|
8539
8577
|
class Iv {
|
|
8540
8578
|
constructor(t) {
|
|
8541
8579
|
this.host = t;
|
|
@@ -8545,31 +8583,31 @@ class Iv {
|
|
|
8545
8583
|
}
|
|
8546
8584
|
getInlinedSVG() {
|
|
8547
8585
|
const t = this.host.getRenderer(), e = t.getSVGNode();
|
|
8548
|
-
return e ?
|
|
8586
|
+
return e ? re.inlineStyles(e) : t.getSerializedSVG();
|
|
8549
8587
|
}
|
|
8550
8588
|
handleExportAction(t) {
|
|
8551
8589
|
const e = this.host.getOptions(), i = this.getInlinedSVG(), r = e.exporting.filename ?? "chart", o = e.exporting.scale ?? 2;
|
|
8552
8590
|
switch (t) {
|
|
8553
8591
|
case "downloadPNG":
|
|
8554
|
-
|
|
8592
|
+
re.exportPNG(i, r, o).catch((s) => console.warn("KatuCharts: PNG export failed.", s));
|
|
8555
8593
|
break;
|
|
8556
8594
|
case "downloadJPEG":
|
|
8557
|
-
|
|
8595
|
+
re.exportJPEG(i, r, o).catch((s) => console.warn("KatuCharts: JPEG export failed.", s));
|
|
8558
8596
|
break;
|
|
8559
8597
|
case "downloadSVG":
|
|
8560
|
-
|
|
8598
|
+
re.exportSVG(i, r);
|
|
8561
8599
|
break;
|
|
8562
8600
|
case "downloadPDF":
|
|
8563
|
-
|
|
8601
|
+
re.exportPDF(i, r, o).catch((s) => console.warn("KatuCharts: PDF export failed.", s));
|
|
8564
8602
|
break;
|
|
8565
8603
|
case "downloadCSV":
|
|
8566
|
-
|
|
8604
|
+
re.exportCSV(this.getSeriesDataForExport(), r, e.exporting.csv);
|
|
8567
8605
|
break;
|
|
8568
8606
|
case "downloadXLS":
|
|
8569
8607
|
this.exportXLS(r);
|
|
8570
8608
|
break;
|
|
8571
8609
|
case "viewDataTable":
|
|
8572
|
-
|
|
8610
|
+
re.viewDataTable(
|
|
8573
8611
|
this.getSeriesDataForExport(),
|
|
8574
8612
|
this.host.getContainer(),
|
|
8575
8613
|
e.exporting.tableCaption
|
|
@@ -8579,7 +8617,7 @@ class Iv {
|
|
|
8579
8617
|
this.toggleFullScreen();
|
|
8580
8618
|
break;
|
|
8581
8619
|
case "printChart":
|
|
8582
|
-
this.host.fireEvent("beforePrint"),
|
|
8620
|
+
this.host.fireEvent("beforePrint"), re.print(i, e.exporting.printMaxWidth), this.host.fireEvent("afterPrint");
|
|
8583
8621
|
break;
|
|
8584
8622
|
}
|
|
8585
8623
|
}
|
|
@@ -8659,7 +8697,7 @@ class Iv {
|
|
|
8659
8697
|
}));
|
|
8660
8698
|
}
|
|
8661
8699
|
exportXLS(t) {
|
|
8662
|
-
const e =
|
|
8700
|
+
const e = re.getDataRows(this.getSeriesDataForExport());
|
|
8663
8701
|
let i = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:spreadsheet" xmlns="http://www.w3.org/TR/REC-html40"><head><meta charset="utf-8"/></head><body><table>';
|
|
8664
8702
|
for (const o of e) {
|
|
8665
8703
|
i += "<tr>";
|
|
@@ -8669,39 +8707,39 @@ class Iv {
|
|
|
8669
8707
|
}
|
|
8670
8708
|
i += "</table></body></html>";
|
|
8671
8709
|
const r = new Blob([i], { type: "application/vnd.ms-excel" });
|
|
8672
|
-
|
|
8710
|
+
re.downloadBlob(r, `${t}.xls`);
|
|
8673
8711
|
}
|
|
8674
8712
|
getCSV() {
|
|
8675
|
-
return
|
|
8713
|
+
return re.getCSV(this.getSeriesDataForExport(), this.host.getOptions().exporting.csv);
|
|
8676
8714
|
}
|
|
8677
8715
|
getTable() {
|
|
8678
|
-
return
|
|
8716
|
+
return re.getTable(this.getSeriesDataForExport(), this.host.getOptions().exporting.tableCaption);
|
|
8679
8717
|
}
|
|
8680
8718
|
getDataRows() {
|
|
8681
|
-
return
|
|
8719
|
+
return re.getDataRows(this.getSeriesDataForExport());
|
|
8682
8720
|
}
|
|
8683
8721
|
exportChart(t) {
|
|
8684
8722
|
const e = { ...this.host.getOptions().exporting, ...t }, i = this.getInlinedSVG(), r = e.filename ?? "chart", o = e.scale ?? 2;
|
|
8685
8723
|
switch (e.type) {
|
|
8686
8724
|
case "image/jpeg":
|
|
8687
|
-
|
|
8725
|
+
re.exportJPEG(i, r, o);
|
|
8688
8726
|
break;
|
|
8689
8727
|
case "image/svg+xml":
|
|
8690
|
-
|
|
8728
|
+
re.exportSVG(i, r);
|
|
8691
8729
|
break;
|
|
8692
8730
|
case "application/pdf":
|
|
8693
|
-
|
|
8731
|
+
re.exportPDF(i, r, o);
|
|
8694
8732
|
break;
|
|
8695
8733
|
case "image/png":
|
|
8696
8734
|
default:
|
|
8697
|
-
|
|
8735
|
+
re.exportPNG(i, r, o);
|
|
8698
8736
|
break;
|
|
8699
8737
|
}
|
|
8700
8738
|
}
|
|
8701
8739
|
print() {
|
|
8702
8740
|
this.host.fireEvent("beforePrint");
|
|
8703
8741
|
const t = this.getInlinedSVG();
|
|
8704
|
-
|
|
8742
|
+
re.print(t, this.host.getOptions().exporting.printMaxWidth), this.host.fireEvent("afterPrint");
|
|
8705
8743
|
}
|
|
8706
8744
|
optionsToExternal() {
|
|
8707
8745
|
const t = this.host.getOptions();
|
|
@@ -9900,7 +9938,7 @@ function na(n) {
|
|
|
9900
9938
|
n.preventDefault(), n.stopImmediatePropagation();
|
|
9901
9939
|
}
|
|
9902
9940
|
var Zh = { name: "drag" }, ia = { name: "space" }, Ti = { name: "handle" }, $i = { name: "center" };
|
|
9903
|
-
const { abs: Kh, max:
|
|
9941
|
+
const { abs: Kh, max: ve, min: we } = Math;
|
|
9904
9942
|
function Jh(n) {
|
|
9905
9943
|
return [+n[0], +n[1]];
|
|
9906
9944
|
}
|
|
@@ -10010,7 +10048,7 @@ function o2(n) {
|
|
|
10010
10048
|
}).on("interrupt.brush end.brush", function(v) {
|
|
10011
10049
|
h(this, arguments).end(v);
|
|
10012
10050
|
}).tween("brush", function() {
|
|
10013
|
-
var v = this, b = v.__brush, k = h(v, arguments), M = b.selection, C = n.input(typeof m == "function" ? m.apply(this, arguments) : m, b.extent), L =
|
|
10051
|
+
var v = this, b = v.__brush, k = h(v, arguments), M = b.selection, C = n.input(typeof m == "function" ? m.apply(this, arguments) : m, b.extent), L = se(M, C);
|
|
10014
10052
|
function _(T) {
|
|
10015
10053
|
b.selection = T === 1 && C === null ? null : L(T), c.call(v), k.brush();
|
|
10016
10054
|
}
|
|
@@ -10082,11 +10120,11 @@ function o2(n) {
|
|
|
10082
10120
|
L && (H = !0);
|
|
10083
10121
|
const at = [W[0], W[1] || W[0]];
|
|
10084
10122
|
M.selection = L = [[
|
|
10085
|
-
T = n === ra ? _ :
|
|
10086
|
-
P = n === Co ? E :
|
|
10123
|
+
T = n === ra ? _ : we(at[0][0], at[1][0]),
|
|
10124
|
+
P = n === Co ? E : we(at[0][1], at[1][1])
|
|
10087
10125
|
], [
|
|
10088
|
-
A = n === ra ? w :
|
|
10089
|
-
F = n === Co ? R :
|
|
10126
|
+
A = n === ra ? w : ve(at[0][0], at[1][0]),
|
|
10127
|
+
F = n === Co ? R : ve(at[0][1], at[1][1])
|
|
10090
10128
|
]], W.length > 1 && ct(g);
|
|
10091
10129
|
} else
|
|
10092
10130
|
T = L[0][0], P = L[0][1], A = L[1][0], F = L[1][1];
|
|
@@ -10117,15 +10155,15 @@ function o2(n) {
|
|
|
10117
10155
|
switch (z = ot[0] - q[0], B = ot[1] - q[1], v) {
|
|
10118
10156
|
case ia:
|
|
10119
10157
|
case Zh: {
|
|
10120
|
-
b && (z =
|
|
10158
|
+
b && (z = ve(_ - T, we(w - A, z)), I = T + z, $ = A + z), k && (B = ve(E - P, we(R - F, B)), S = P + B, D = F + B);
|
|
10121
10159
|
break;
|
|
10122
10160
|
}
|
|
10123
10161
|
case Ti: {
|
|
10124
|
-
W[1] ? (b && (I =
|
|
10162
|
+
W[1] ? (b && (I = ve(_, we(w, W[0][0])), $ = ve(_, we(w, W[1][0])), b = 1), k && (S = ve(E, we(R, W[0][1])), D = ve(E, we(R, W[1][1])), k = 1)) : (b < 0 ? (z = ve(_ - T, we(w - T, z)), I = T + z, $ = A) : b > 0 && (z = ve(_ - A, we(w - A, z)), I = T, $ = A + z), k < 0 ? (B = ve(E - P, we(R - P, B)), S = P + B, D = F) : k > 0 && (B = ve(E - F, we(R - F, B)), S = P, D = F + B));
|
|
10125
10163
|
break;
|
|
10126
10164
|
}
|
|
10127
10165
|
case $i: {
|
|
10128
|
-
b && (I =
|
|
10166
|
+
b && (I = ve(_, we(w, T - z * b)), $ = ve(_, we(w, A + z * b))), k && (S = ve(E, we(R, P - B * k)), D = ve(E, we(R, F + B * k)));
|
|
10129
10167
|
break;
|
|
10130
10168
|
}
|
|
10131
10169
|
}
|
|
@@ -10210,7 +10248,7 @@ function Rt(n) {
|
|
|
10210
10248
|
return n;
|
|
10211
10249
|
};
|
|
10212
10250
|
}
|
|
10213
|
-
const nu = Math.abs,
|
|
10251
|
+
const nu = Math.abs, ke = Math.atan2, ni = Math.cos, s2 = Math.max, sa = Math.min, vn = Math.sin, Re = Math.sqrt, Me = 1e-12, Ui = Math.PI, Ko = Ui / 2, Er = 2 * Ui;
|
|
10214
10252
|
function a2(n) {
|
|
10215
10253
|
return n > 1 ? 0 : n < -1 ? Ui : Math.acos(n);
|
|
10216
10254
|
}
|
|
@@ -10309,11 +10347,11 @@ function g2(n) {
|
|
|
10309
10347
|
}
|
|
10310
10348
|
function m2(n, t, e, i, r, o, s, a) {
|
|
10311
10349
|
var l = e - n, c = i - t, h = s - r, f = a - o, u = f * l - h * c;
|
|
10312
|
-
if (!(u * u <
|
|
10350
|
+
if (!(u * u < Me))
|
|
10313
10351
|
return u = (h * (t - o) - f * (n - r)) / u, [n + u * l, t + u * c];
|
|
10314
10352
|
}
|
|
10315
10353
|
function ho(n, t, e, i, r, o, s) {
|
|
10316
|
-
var a = n - e, l = t - i, c = (s ? o : -o) /
|
|
10354
|
+
var a = n - e, l = t - i, c = (s ? o : -o) / Re(a * a + l * l), h = c * l, f = -c * a, u = n + h, d = t + f, p = e + h, y = i + f, g = (u + p) / 2, m = (d + y) / 2, x = p - u, v = y - d, b = x * x + v * v, k = r - o, M = u * y - p * d, C = (v < 0 ? -1 : 1) * Re(s2(0, k * k * b - M * M)), L = (M * v - x * C) / b, _ = (-M * x - v * C) / b, T = (M * v + x * C) / b, I = (-M * x + v * C) / b, E = L - g, P = _ - m, S = T - g, w = I - m;
|
|
10317
10355
|
return E * E + P * P > S * S + w * w && (L = T, _ = I), {
|
|
10318
10356
|
cx: L,
|
|
10319
10357
|
cy: _,
|
|
@@ -10323,30 +10361,30 @@ function ho(n, t, e, i, r, o, s) {
|
|
|
10323
10361
|
y11: _ * (r / k - 1)
|
|
10324
10362
|
};
|
|
10325
10363
|
}
|
|
10326
|
-
function
|
|
10364
|
+
function Se() {
|
|
10327
10365
|
var n = u2, t = f2, e = Rt(0), i = null, r = d2, o = p2, s = g2, a = null, l = jr(c);
|
|
10328
10366
|
function c() {
|
|
10329
10367
|
var h, f, u = +n.apply(this, arguments), d = +t.apply(this, arguments), p = r.apply(this, arguments) - Ko, y = o.apply(this, arguments) - Ko, g = nu(y - p), m = y > p;
|
|
10330
|
-
if (a || (a = h = l()), d < u && (f = d, d = u, u = f), !(d >
|
|
10331
|
-
else if (g > Er -
|
|
10332
|
-
a.moveTo(d * ni(p), d * vn(p)), a.arc(0, 0, d, p, y, !m), u >
|
|
10368
|
+
if (a || (a = h = l()), d < u && (f = d, d = u, u = f), !(d > Me)) a.moveTo(0, 0);
|
|
10369
|
+
else if (g > Er - Me)
|
|
10370
|
+
a.moveTo(d * ni(p), d * vn(p)), a.arc(0, 0, d, p, y, !m), u > Me && (a.moveTo(u * ni(y), u * vn(y)), a.arc(0, 0, u, y, p, m));
|
|
10333
10371
|
else {
|
|
10334
|
-
var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L >
|
|
10335
|
-
if (_ >
|
|
10372
|
+
var x = p, v = y, b = p, k = y, M = g, C = g, L = s.apply(this, arguments) / 2, _ = L > Me && (i ? +i.apply(this, arguments) : Re(u * u + d * d)), T = sa(nu(d - u) / 2, +e.apply(this, arguments)), I = T, E = T, P, S;
|
|
10373
|
+
if (_ > Me) {
|
|
10336
10374
|
var w = iu(_ / u * vn(L)), A = iu(_ / d * vn(L));
|
|
10337
|
-
(M -= w * 2) >
|
|
10375
|
+
(M -= w * 2) > Me ? (w *= m ? 1 : -1, b += w, k -= w) : (M = 0, b = k = (p + y) / 2), (C -= A * 2) > Me ? (A *= m ? 1 : -1, x += A, v -= A) : (C = 0, x = v = (p + y) / 2);
|
|
10338
10376
|
}
|
|
10339
10377
|
var $ = d * ni(x), R = d * vn(x), F = u * ni(k), D = u * vn(k);
|
|
10340
|
-
if (T >
|
|
10378
|
+
if (T > Me) {
|
|
10341
10379
|
var z = d * ni(v), B = d * vn(v), H = u * ni(b), J = u * vn(b), X;
|
|
10342
10380
|
if (g < Ui)
|
|
10343
10381
|
if (X = m2($, R, H, J, z, B, F, D)) {
|
|
10344
|
-
var j = $ - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(a2((j * U + W * G) / (
|
|
10382
|
+
var j = $ - X[0], W = R - X[1], U = z - X[0], G = B - X[1], N = 1 / vn(a2((j * U + W * G) / (Re(j * j + W * W) * Re(U * U + G * G))) / 2), Y = Re(X[0] * X[0] + X[1] * X[1]);
|
|
10345
10383
|
I = sa(T, (u - Y) / (N - 1)), E = sa(T, (d - Y) / (N + 1));
|
|
10346
10384
|
} else
|
|
10347
10385
|
I = E = 0;
|
|
10348
10386
|
}
|
|
10349
|
-
C >
|
|
10387
|
+
C > Me ? E > Me ? (P = ho(H, J, $, R, d, E, m), S = ho(z, B, F, D, d, E, m), a.moveTo(P.cx + P.x01, P.cy + P.y01), E < T ? a.arc(P.cx, P.cy, E, ke(P.y01, P.x01), ke(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, E, ke(P.y01, P.x01), ke(P.y11, P.x11), !m), a.arc(0, 0, d, ke(P.cy + P.y11, P.cx + P.x11), ke(S.cy + S.y11, S.cx + S.x11), !m), a.arc(S.cx, S.cy, E, ke(S.y11, S.x11), ke(S.y01, S.x01), !m))) : (a.moveTo($, R), a.arc(0, 0, d, x, v, !m)) : a.moveTo($, R), !(u > Me) || !(M > Me) ? a.lineTo(F, D) : I > Me ? (P = ho(F, D, z, B, u, -I, m), S = ho($, R, H, J, u, -I, m), a.lineTo(P.cx + P.x01, P.cy + P.y01), I < T ? a.arc(P.cx, P.cy, I, ke(P.y01, P.x01), ke(S.y01, S.x01), !m) : (a.arc(P.cx, P.cy, I, ke(P.y01, P.x01), ke(P.y11, P.x11), !m), a.arc(0, 0, u, ke(P.cy + P.y11, P.cx + P.x11), ke(S.cy + S.y11, S.cx + S.x11), m), a.arc(S.cx, S.cy, I, ke(S.y11, S.x11), ke(S.y01, S.x01), !m))) : a.arc(0, 0, u, k, b, m);
|
|
10350
10388
|
}
|
|
10351
10389
|
if (a.closePath(), h) return a = null, h + "" || null;
|
|
10352
10390
|
}
|
|
@@ -10643,32 +10681,32 @@ function P2() {
|
|
|
10643
10681
|
}
|
|
10644
10682
|
const ti = {
|
|
10645
10683
|
draw(n, t) {
|
|
10646
|
-
const e =
|
|
10684
|
+
const e = Re(t / Ui);
|
|
10647
10685
|
n.moveTo(e, 0), n.arc(0, 0, e, 0, Er);
|
|
10648
10686
|
}
|
|
10649
10687
|
}, tl = {
|
|
10650
10688
|
draw(n, t) {
|
|
10651
|
-
const e =
|
|
10689
|
+
const e = Re(t / 5) / 2;
|
|
10652
10690
|
n.moveTo(-3 * e, -e), n.lineTo(-e, -e), n.lineTo(-e, -3 * e), n.lineTo(e, -3 * e), n.lineTo(e, -e), n.lineTo(3 * e, -e), n.lineTo(3 * e, e), n.lineTo(e, e), n.lineTo(e, 3 * e), n.lineTo(-e, 3 * e), n.lineTo(-e, e), n.lineTo(-3 * e, e), n.closePath();
|
|
10653
10691
|
}
|
|
10654
|
-
}, Cd =
|
|
10692
|
+
}, Cd = Re(1 / 3), E2 = Cd * 2, el = {
|
|
10655
10693
|
draw(n, t) {
|
|
10656
|
-
const e =
|
|
10694
|
+
const e = Re(t / E2), i = e * Cd;
|
|
10657
10695
|
n.moveTo(0, -e), n.lineTo(i, 0), n.lineTo(0, e), n.lineTo(-i, 0), n.closePath();
|
|
10658
10696
|
}
|
|
10659
10697
|
}, nl = {
|
|
10660
10698
|
draw(n, t) {
|
|
10661
|
-
const e =
|
|
10699
|
+
const e = Re(t), i = -e / 2;
|
|
10662
10700
|
n.rect(i, i, e, e);
|
|
10663
10701
|
}
|
|
10664
|
-
}, aa =
|
|
10702
|
+
}, aa = Re(3), il = {
|
|
10665
10703
|
draw(n, t) {
|
|
10666
|
-
const e = -
|
|
10704
|
+
const e = -Re(t / (aa * 3));
|
|
10667
10705
|
n.moveTo(0, e * 2), n.lineTo(-aa * e, -e), n.lineTo(aa * e, -e), n.closePath();
|
|
10668
10706
|
}
|
|
10669
|
-
}, T2 =
|
|
10707
|
+
}, T2 = Re(3), rl = {
|
|
10670
10708
|
draw(n, t) {
|
|
10671
|
-
const e =
|
|
10709
|
+
const e = Re(t) * 0.6824, i = e / 2, r = e * T2 / 2;
|
|
10672
10710
|
n.moveTo(0, -e), n.lineTo(r, i), n.lineTo(-r, i), n.closePath();
|
|
10673
10711
|
}
|
|
10674
10712
|
};
|
|
@@ -10750,11 +10788,11 @@ ol.prototype = {
|
|
|
10750
10788
|
})(0);
|
|
10751
10789
|
function $2(n, t, e) {
|
|
10752
10790
|
var i = n._x1, r = n._y1, o = n._x2, s = n._y2;
|
|
10753
|
-
if (n._l01_a >
|
|
10791
|
+
if (n._l01_a > Me) {
|
|
10754
10792
|
var a = 2 * n._l01_2a + 3 * n._l01_a * n._l12_a + n._l12_2a, l = 3 * n._l01_a * (n._l01_a + n._l12_a);
|
|
10755
10793
|
i = (i * a - n._x0 * n._l12_2a + n._x2 * n._l01_2a) / l, r = (r * a - n._y0 * n._l12_2a + n._y2 * n._l01_2a) / l;
|
|
10756
10794
|
}
|
|
10757
|
-
if (n._l23_a >
|
|
10795
|
+
if (n._l23_a > Me) {
|
|
10758
10796
|
var c = 2 * n._l23_2a + 3 * n._l23_a * n._l12_a + n._l12_2a, h = 3 * n._l23_a * (n._l23_a + n._l12_a);
|
|
10759
10797
|
o = (o * c + n._x1 * n._l23_2a - t * n._l12_2a) / h, s = (s * c + n._y1 * n._l23_2a - e * n._l12_2a) / h;
|
|
10760
10798
|
}
|
|
@@ -10908,7 +10946,7 @@ class I2 {
|
|
|
10908
10946
|
], r = [
|
|
10909
10947
|
Math.min(...t.map((l) => l.y)),
|
|
10910
10948
|
Math.max(...t.map((l) => l.y))
|
|
10911
|
-
], o =
|
|
10949
|
+
], o = Ce().domain(i).range([0, this.width]), s = Ce().domain(r).range([this.height - 2, 2]), a = gi().x((l) => o(l.x)).y((l) => s(l.y));
|
|
10912
10950
|
this.group.selectAll(".katucharts-navigator-line").remove(), this.group.append("path").datum(t).attr("class", "katucharts-navigator-line").attr("d", a).attr("fill", "none").attr("stroke", e).attr("stroke-width", 1);
|
|
10913
10951
|
}
|
|
10914
10952
|
updateSeriesLine(t, e) {
|
|
@@ -11367,7 +11405,7 @@ const Zn = class Zn {
|
|
|
11367
11405
|
this.updateAxesDomains(), this.updateTooltipCategories(), this.renderAxes(), this.renderSeriesInstances(), this.renderStackLabels(), this.raiseplotLineLabels(), this.renderLegend(), this.fireEvent("render");
|
|
11368
11406
|
}
|
|
11369
11407
|
formatStackLabel(t, e) {
|
|
11370
|
-
return e.formatter ? e.formatter.call({ total: t }) : e.format ?
|
|
11408
|
+
return e.formatter ? e.formatter.call({ total: t }) : e.format ? de(Jt(e.format, { total: t })) : this.options.chart.numberFormatter ? this.options.chart.numberFormatter(t) : As(t, 0, ".", ",");
|
|
11371
11409
|
}
|
|
11372
11410
|
renderStackLabels() {
|
|
11373
11411
|
if (this.stackLabelsGroup) {
|
|
@@ -11572,7 +11610,7 @@ const Zn = class Zn {
|
|
|
11572
11610
|
const e = this.responsiveEngine.getRules();
|
|
11573
11611
|
let i = eo(this.originalUserOptions);
|
|
11574
11612
|
for (const o of t.matchingIndices)
|
|
11575
|
-
i =
|
|
11613
|
+
i = fe(i, e[o].chartOptions);
|
|
11576
11614
|
const r = new hi();
|
|
11577
11615
|
this.options = r.parse(i), this.state.updateConfig(this.options);
|
|
11578
11616
|
}
|
|
@@ -11614,11 +11652,11 @@ const Zn = class Zn {
|
|
|
11614
11652
|
}
|
|
11615
11653
|
update(t, e = !0) {
|
|
11616
11654
|
var a;
|
|
11617
|
-
this.isResponsiveUpdate || (this.originalUserOptions =
|
|
11655
|
+
this.isResponsiveUpdate || (this.originalUserOptions = fe(
|
|
11618
11656
|
eo(this.originalUserOptions),
|
|
11619
11657
|
t
|
|
11620
11658
|
));
|
|
11621
|
-
const i = new hi(), r =
|
|
11659
|
+
const i = new hi(), r = fe(this.optionsToExternal(), t);
|
|
11622
11660
|
(a = t.chart) != null && a.type && Array.isArray(r.series) && r.series.forEach((l, c) => {
|
|
11623
11661
|
var f, u;
|
|
11624
11662
|
const h = Array.isArray(t.series) ? (f = t.series[c]) == null ? void 0 : f.type : void 0;
|
|
@@ -11693,7 +11731,7 @@ const Zn = class Zn {
|
|
|
11693
11731
|
const s = this.responsiveEngine.getRules();
|
|
11694
11732
|
let a = eo(this.originalUserOptions);
|
|
11695
11733
|
for (const l of o.matchingIndices)
|
|
11696
|
-
a =
|
|
11734
|
+
a = fe(a, s[l].chartOptions);
|
|
11697
11735
|
this.isResponsiveUpdate = !0, this.update(a, !1), this.isResponsiveUpdate = !1;
|
|
11698
11736
|
}
|
|
11699
11737
|
}
|
|
@@ -11726,7 +11764,7 @@ const Zn = class Zn {
|
|
|
11726
11764
|
this.setSize(r, o), this.createFixedAxisOverlay();
|
|
11727
11765
|
}
|
|
11728
11766
|
setTitle(t, e) {
|
|
11729
|
-
t && (this.options.title =
|
|
11767
|
+
t && (this.options.title = fe(this.options.title, t), this.originalUserOptions.title = fe(this.originalUserOptions.title || {}, t)), e && (this.options.subtitle = fe(this.options.subtitle, e), this.originalUserOptions.subtitle = fe(this.originalUserOptions.subtitle || {}, e)), this.renderTitles();
|
|
11730
11768
|
}
|
|
11731
11769
|
addAxis(t, e = !0, i = !0) {
|
|
11732
11770
|
const r = e ? this.options.xAxis : this.options.yAxis, o = { ...t, index: r.length, isX: e };
|
|
@@ -11804,7 +11842,7 @@ const Zn = class Zn {
|
|
|
11804
11842
|
Zn.MIN_AUTO_PLOT_HEIGHT = 160, Zn.MAX_AUTO_HEIGHT = 900, Zn.MIN_CATEGORY_ROW_HEIGHT = 22;
|
|
11805
11843
|
let Za = Zn;
|
|
11806
11844
|
const bt = 600, Wt = 8, Fd = 0, Qn = bt + 100, K = 300, Jo = 250, pt = gd, Z = gd, B2 = 500;
|
|
11807
|
-
function
|
|
11845
|
+
function Pe(n, t, e, i) {
|
|
11808
11846
|
return i > B2 ? t : t + n * e;
|
|
11809
11847
|
}
|
|
11810
11848
|
const O2 = {
|
|
@@ -12094,7 +12132,7 @@ class Xt {
|
|
|
12094
12132
|
x: s.x ?? a,
|
|
12095
12133
|
y: s.y,
|
|
12096
12134
|
percentage: s._percentage
|
|
12097
|
-
}) : c.format ? h =
|
|
12135
|
+
}) : c.format ? h = de(Jt(c.format, {
|
|
12098
12136
|
point: s,
|
|
12099
12137
|
series: { name: this.config.name ?? "" },
|
|
12100
12138
|
x: s.x,
|
|
@@ -12441,7 +12479,7 @@ class zd extends Xt {
|
|
|
12441
12479
|
const { xAxis: a, yAxis: l } = this.context, c = (r == null ? void 0 : r.radius) ?? 4, h = (r == null ? void 0 : r.symbol) || "circle", f = this.group.append("g").attr("class", "katucharts-markers"), u = t.filter((d) => d.y !== null && d.y !== void 0);
|
|
12442
12480
|
if (h === "circle") {
|
|
12443
12481
|
const d = f.selectAll("circle").data(u).join("circle").attr("cx", (p) => a.getPixelForValue(p.x ?? 0)).attr("cy", (p) => l.getPixelForValue(p.y ?? 0)).attr("fill", (p, y) => this.getMarkerFill(p, y, r, e)).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
|
|
12444
|
-
i ? d.attr("r", 0).transition().delay((p, y) =>
|
|
12482
|
+
i ? d.attr("r", 0).transition().delay((p, y) => Pe(y, Qn, Wt, u.length)).duration(bt).ease(pt).attr("r", (p) => {
|
|
12445
12483
|
var y;
|
|
12446
12484
|
return ((y = p.marker) == null ? void 0 : y.radius) ?? c;
|
|
12447
12485
|
}) : d.attr("r", (p) => {
|
|
@@ -12457,7 +12495,7 @@ class zd extends Xt {
|
|
|
12457
12495
|
).attr("fill", (g, m) => this.getMarkerFill(g, m, r, e)).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
|
|
12458
12496
|
if (i) {
|
|
12459
12497
|
const g = en().type(d).size(0);
|
|
12460
|
-
y.attr("d", g).transition().delay((m, x) =>
|
|
12498
|
+
y.attr("d", g).transition().delay((m, x) => Pe(x, Qn, Wt, u.length)).duration(bt).ease(pt).attr("d", (m) => {
|
|
12461
12499
|
var v;
|
|
12462
12500
|
const x = ((v = m.marker) == null ? void 0 : v.radius) ?? c;
|
|
12463
12501
|
return en().type(d).size(Math.PI * x * x)();
|
|
@@ -12622,7 +12660,7 @@ class Bd extends Xt {
|
|
|
12622
12660
|
const { xAxis: o, yAxis: s } = this.context, a = (r == null ? void 0 : r.radius) ?? 4, l = (r == null ? void 0 : r.symbol) || "circle", c = this.group.append("g").attr("class", "katucharts-markers"), h = t.filter((f) => f.y !== null && f.y !== void 0);
|
|
12623
12661
|
if (l === "circle") {
|
|
12624
12662
|
const f = c.selectAll("circle").data(h).join("circle").attr("cx", (u) => o.getPixelForValue(u.x ?? 0)).attr("cy", (u) => s.getPixelForValue(u.y ?? 0)).attr("fill", (u) => u.color || (r == null ? void 0 : r.fillColor) || e).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
|
|
12625
|
-
i ? f.attr("r", 0).transition().delay((u, d) =>
|
|
12663
|
+
i ? f.attr("r", 0).transition().delay((u, d) => Pe(d, Qn, Wt, h.length)).duration(bt).ease(pt).attr("r", (u) => {
|
|
12626
12664
|
var d;
|
|
12627
12665
|
return ((d = u.marker) == null ? void 0 : d.radius) ?? a;
|
|
12628
12666
|
}) : f.attr("r", (u) => {
|
|
@@ -12636,7 +12674,7 @@ class Bd extends Xt {
|
|
|
12636
12674
|
).attr("fill", (d) => d.color || (r == null ? void 0 : r.fillColor) || e).attr("stroke", (r == null ? void 0 : r.lineColor) || this.autoBorderColor()).attr("stroke-width", (r == null ? void 0 : r.lineWidth) ?? 1).attr("class", "katucharts-marker");
|
|
12637
12675
|
if (i) {
|
|
12638
12676
|
const d = en().type(f).size(0);
|
|
12639
|
-
u.attr("d", d).transition().delay((p, y) =>
|
|
12677
|
+
u.attr("d", d).transition().delay((p, y) => Pe(y, Qn, Wt, h.length)).duration(bt).ease(pt).attr("d", (p) => {
|
|
12640
12678
|
var g;
|
|
12641
12679
|
const y = ((g = p.marker) == null ? void 0 : g.radius) ?? a;
|
|
12642
12680
|
return en().type(f).size(Math.PI * y * y)();
|
|
@@ -12776,7 +12814,7 @@ class Od extends Xt {
|
|
|
12776
12814
|
const { xAxis: h, yAxis: f } = this.context, u = this.config.threshold ?? 0, d = this.config.negativeColor;
|
|
12777
12815
|
if (t.attr("x", (p) => this.crispCoord(h.getPixelForValue(p.x ?? 0) + r, l)).attr("width", l ? Math.round(i) : i).attr("fill", (p, y) => this.getPointColor(p, y, s, d, u)).attr("display", (p) => p.y == null ? "none" : null), c) {
|
|
12778
12816
|
const p = this.getEntryDuration();
|
|
12779
|
-
t.attr("y", o).attr("height", 0).transition().duration(p).ease(pt).delay((y, g) =>
|
|
12817
|
+
t.attr("y", o).attr("height", 0).transition().duration(p).ease(pt).delay((y, g) => Pe(g, 0, Wt, e.length)).attr("y", (y) => this.getBarY(y, f, o, a)).attr("height", (y) => this.getBarHeight(y, f, o, a));
|
|
12780
12818
|
} else
|
|
12781
12819
|
t.attr("y", (p) => this.getBarY(p, f, o, a)).attr("height", (p) => this.getBarHeight(p, f, o, a));
|
|
12782
12820
|
}
|
|
@@ -12784,7 +12822,7 @@ class Od extends Xt {
|
|
|
12784
12822
|
const { xAxis: h, yAxis: f } = this.context, u = this.config.threshold ?? 0, d = this.config.negativeColor;
|
|
12785
12823
|
if (t.attr("y", (p) => this.crispCoord(h.getPixelForValue(p.x ?? 0) + r, l)).attr("height", l ? Math.round(i) : i).attr("fill", (p, y) => this.getPointColor(p, y, s, d, u)).attr("display", (p) => p.y == null ? "none" : null), c) {
|
|
12786
12824
|
const p = this.getEntryDuration();
|
|
12787
|
-
t.attr("x", o).attr("width", 0).transition().duration(p).ease(pt).delay((y, g) =>
|
|
12825
|
+
t.attr("x", o).attr("width", 0).transition().duration(p).ease(pt).delay((y, g) => Pe(g, 0, Wt, e.length)).attr("x", (y) => {
|
|
12788
12826
|
const g = f.getPixelForValue(y.y ?? 0);
|
|
12789
12827
|
return Math.min(o, g);
|
|
12790
12828
|
}).attr("width", (y) => {
|
|
@@ -12800,8 +12838,8 @@ class Od extends Xt {
|
|
|
12800
12838
|
const m = this.getEntryDuration();
|
|
12801
12839
|
t.each((x, v, b) => {
|
|
12802
12840
|
const k = rt(b[v]), M = this.computeStackedStartParams(x, e, i, r, s, c), C = this.computeStackedRectParams(x, e, i, r, o, s, c, l);
|
|
12803
|
-
x._rectParams = C, k.attr("d", this.rectParamsToPath(M, g, p, y)).transition().duration(m).ease(pt).delay(
|
|
12804
|
-
const L =
|
|
12841
|
+
x._rectParams = C, k.attr("d", this.rectParamsToPath(M, g, p, y)).transition().duration(m).ease(pt).delay(Pe(v, 0, Wt, e.length)).attrTween("d", () => {
|
|
12842
|
+
const L = se(M.x, C.x), _ = se(M.y, C.y), T = se(M.w, C.w), I = se(M.h, C.h);
|
|
12805
12843
|
return (E) => this.rectParamsToPath(
|
|
12806
12844
|
{ x: L(E), y: _(E), w: T(E), h: I(E) },
|
|
12807
12845
|
g,
|
|
@@ -12889,7 +12927,7 @@ class Od extends Xt {
|
|
|
12889
12927
|
L.each((_, T, I) => {
|
|
12890
12928
|
const E = rt(I[T]), P = this.computeStackedRectParams(_, s, a, l, m, x, d, y), S = _._rectParams || P;
|
|
12891
12929
|
_._rectParams = P, E.transition().duration(t).attrTween("d", () => {
|
|
12892
|
-
const w =
|
|
12930
|
+
const w = se(S.x, P.x), A = se(S.y, P.y), $ = se(S.w, P.w), R = se(S.h, P.h);
|
|
12893
12931
|
return (F) => this.rectParamsToPath(
|
|
12894
12932
|
{ x: w(F), y: A(F), w: $(F), h: R(F) },
|
|
12895
12933
|
C,
|
|
@@ -13119,7 +13157,7 @@ class j2 extends Xt {
|
|
|
13119
13157
|
var l, c;
|
|
13120
13158
|
return ((l = a.marker) == null ? void 0 : l.lineWidth) ?? ((c = this.config.marker) == null ? void 0 : c.lineWidth) ?? 1;
|
|
13121
13159
|
}).attr("opacity", this.config.opacity ?? 1).style("cursor", this.config.cursor || "pointer");
|
|
13122
|
-
o ? s.attr("r", 0).transition().duration(this.getEntryDuration()).ease(pt).delay((a, l) =>
|
|
13160
|
+
o ? s.attr("r", 0).transition().duration(this.getEntryDuration()).ease(pt).delay((a, l) => Pe(l, 0, Wt, t.length)).attr("r", (a) => {
|
|
13123
13161
|
var l;
|
|
13124
13162
|
return ((l = a.marker) == null ? void 0 : l.radius) ?? i;
|
|
13125
13163
|
}) : s.attr("r", (a) => {
|
|
@@ -13144,7 +13182,7 @@ class j2 extends Xt {
|
|
|
13144
13182
|
};
|
|
13145
13183
|
if (s) {
|
|
13146
13184
|
const h = en().type(a).size(0);
|
|
13147
|
-
l.attr("d", h).transition().duration(this.getEntryDuration()).ease(pt).delay((f, u) =>
|
|
13185
|
+
l.attr("d", h).transition().duration(this.getEntryDuration()).ease(pt).delay((f, u) => Pe(u, 0, Wt, t.length)).attr("d", c);
|
|
13148
13186
|
} else
|
|
13149
13187
|
l.attr("d", c);
|
|
13150
13188
|
this.attachScatterEvents(l, t, i, r, e, "symbol", a);
|
|
@@ -13207,7 +13245,7 @@ class Z2 extends Xt {
|
|
|
13207
13245
|
})), h = this.group.selectAll(".katucharts-bubble").data(l).join("circle").attr("class", "katucharts-bubble").attr("cx", (f, u) => c[u].cx).attr("cy", (f, u) => c[u].cy).attr("fill", (f, u) => this.getBubbleFill(f, u, r)).attr("fill-opacity", this.config.fillOpacity ?? 0.5).attr("stroke", (f, u) => this.config.lineColor || this.getBubbleFill(f, u, r)).attr("stroke-width", this.config.lineWidth ?? 1).style("cursor", this.config.cursor || "pointer");
|
|
13208
13246
|
if (s) {
|
|
13209
13247
|
const u = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
|
|
13210
|
-
h.attr("r", 0).transition().duration(u).ease(pt).delay((d, p) =>
|
|
13248
|
+
h.attr("r", 0).transition().duration(u).ease(pt).delay((d, p) => Pe(p, 0, Wt, l.length)).attr("r", (d) => this.sizeScale(this.getZValue(d)));
|
|
13211
13249
|
} else
|
|
13212
13250
|
h.attr("r", (f) => this.sizeScale(this.getZValue(f)));
|
|
13213
13251
|
this.attachBubbleEvents(h, l, c, r), this.renderDataLabels(
|
|
@@ -13251,7 +13289,7 @@ class Z2 extends Xt {
|
|
|
13251
13289
|
}
|
|
13252
13290
|
buildSizeScale(t) {
|
|
13253
13291
|
const e = t.map((l) => this.getZValue(l)), i = this.config.zMin ?? Math.min(...e, 0), r = this.config.zMax ?? Math.max(...e, 1), o = this.parseSize(this.config.minSize, 8), s = this.parseSize(this.config.maxSize, 30);
|
|
13254
|
-
(this.config.sizeBy || "area") === "width" ? this.sizeScale =
|
|
13292
|
+
(this.config.sizeBy || "area") === "width" ? this.sizeScale = Ce().domain([i, r]).range([o, s]).clamp(!0) : this.sizeScale = xx().domain([i, r]).range([o, s]).clamp(!0);
|
|
13255
13293
|
}
|
|
13256
13294
|
parseSize(t, e) {
|
|
13257
13295
|
if (t === void 0) return e;
|
|
@@ -13353,11 +13391,11 @@ class lu extends Xt {
|
|
|
13353
13391
|
var G, N, Y, O, ct, it, ft, dt, at, ot;
|
|
13354
13392
|
const { plotArea: t, colors: e } = this.context, i = this.config.ignoreHiddenPoint !== !1, r = this.data.filter((q) => q.y !== null && q.y !== void 0 && (q.y ?? 0) > 0), o = i ? r.filter((q) => q.visible !== !1) : r, s = this.context.animate, a = this.dataLabelConfigs().filter((q) => (q.distance ?? 30) >= 0), l = a.length > 0, c = l ? Math.max(...a.map((q) => (q.distance ?? 30) + 10)) : 0, h = this.config.center || ["50%", "50%"], f = this.resolvePercent(h[0], t.width), u = this.resolvePercent(h[1], t.height), d = t.width - c * 2, p = t.height - c, y = Math.min(d, p), g = Math.min(t.width, t.height), m = this.config.size !== void 0 && this.config.size !== null, x = m ? this.resolvePercent(this.config.size, g) : y, v = this.config.minSize ? this.resolvePercent(this.config.minSize, g) : 0, k = Math.max(l ? Math.min(x, y) : m ? x : g, v) / 2, M = this.resolvePercent(this.config.innerSize || 0, k * 2) / 2, C = this.config.depth ?? 0, L = (this.config.startAngle ?? 0) * Math.PI / 180, _ = this.config.endAngle !== void 0 ? this.config.endAngle * Math.PI / 180 : L + 2 * Math.PI, T = o.reduce((q, st) => q + (st.y ?? 0), 0), I = this.config.fillColor;
|
|
13355
13393
|
if (T === 0 && I) {
|
|
13356
|
-
const q = this.group.append("g").attr("transform", `translate(${f},${u})`), st =
|
|
13394
|
+
const q = this.group.append("g").attr("transform", `translate(${f},${u})`), st = Se().innerRadius(M).outerRadius(k).startAngle(L).endAngle(_);
|
|
13357
13395
|
q.append("path").attr("d", st({})).attr("fill", I);
|
|
13358
13396
|
return;
|
|
13359
13397
|
}
|
|
13360
|
-
const E = v2().value((q) => q.y ?? 0).sort(null).startAngle(L).endAngle(_), P = this.resolveBorderRadius(this.config.borderRadius), S =
|
|
13398
|
+
const E = v2().value((q) => q.y ?? 0).sort(null).startAngle(L).endAngle(_), P = this.resolveBorderRadius(this.config.borderRadius), S = Se().innerRadius(M).outerRadius(k).cornerRadius(P), w = this.config.slicedOffset ?? 10, A = Se().innerRadius(M).outerRadius(k + w * 0.4).cornerRadius(P), $ = E(o), R = _ - L;
|
|
13361
13399
|
for (const q of $)
|
|
13362
13400
|
q.data.percentage = (q.endAngle - q.startAngle) / R * 100, q.data.total = T;
|
|
13363
13401
|
const F = this.group.append("g").attr("transform", `translate(${f},${u})`);
|
|
@@ -13372,10 +13410,10 @@ class lu extends Xt {
|
|
|
13372
13410
|
const wt = rt(this);
|
|
13373
13411
|
(q.data.sliced || W.selectedIndices.has(st)) && wt.attr("transform", j(q));
|
|
13374
13412
|
}), s ? U.each(function(q, st) {
|
|
13375
|
-
const wt = rt(this), Ct = { startAngle: q.startAngle, endAngle: q.startAngle }, kt =
|
|
13413
|
+
const wt = rt(this), Ct = { startAngle: q.startAngle, endAngle: q.startAngle }, kt = se(Ct, q);
|
|
13376
13414
|
wt.transition().duration(bt).ease(pt).delay(Fd + st * Wt).attrTween("d", () => (_t) => S(kt(_t)));
|
|
13377
13415
|
}) : U.attr("d", S), this.config.enableMouseTracking !== !1 && U.on("mouseover", function(q, st) {
|
|
13378
|
-
var Vt, Nt, Ot,
|
|
13416
|
+
var Vt, Nt, Ot, Zt, ne;
|
|
13379
13417
|
const wt = rt(this), Ct = $.indexOf(st);
|
|
13380
13418
|
W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", A(st)), wt.style("filter", "drop-shadow(0 2px 6px rgba(0,0,0,0.25))"), U.interrupt("highlight"), U.attr("opacity", W.config.opacity ?? 1), U.filter((Tt) => Tt !== st).transition("highlight").duration(K).ease(Z).attr("opacity", J);
|
|
13381
13419
|
const _t = S.centroid(st);
|
|
@@ -13386,18 +13424,18 @@ class lu extends Xt {
|
|
|
13386
13424
|
event: q,
|
|
13387
13425
|
plotX: f + _t[0],
|
|
13388
13426
|
plotY: u + _t[1]
|
|
13389
|
-
}), (Nt = (Vt = st.data.events) == null ? void 0 : Vt.mouseOver) == null || Nt.call(st.data, q), (
|
|
13427
|
+
}), (Nt = (Vt = st.data.events) == null ? void 0 : Vt.mouseOver) == null || Nt.call(st.data, q), (ne = (Zt = (Ot = W.config.point) == null ? void 0 : Ot.events) == null ? void 0 : Zt.mouseOver) == null || ne.call(st.data, q);
|
|
13390
13428
|
}).on("mouseout", function(q, st) {
|
|
13391
|
-
var _t, Vt, Nt, Ot,
|
|
13429
|
+
var _t, Vt, Nt, Ot, Zt;
|
|
13392
13430
|
const wt = rt(this), Ct = $.indexOf(st);
|
|
13393
|
-
W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Ct, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (
|
|
13431
|
+
W.selectedIndices.has(Ct) || wt.transition("arc").duration(K).ease(Z).attr("d", S(st)), wt.style("filter", ""), U.interrupt("highlight"), U.transition("highlight").duration(K).ease(Z).attr("opacity", W.config.opacity ?? 1), W.context.events.emit("point:mouseout", { point: st.data, index: Ct, series: W, event: q }), (Vt = (_t = st.data.events) == null ? void 0 : _t.mouseOut) == null || Vt.call(st.data, q), (Zt = (Ot = (Nt = W.config.point) == null ? void 0 : Nt.events) == null ? void 0 : Ot.mouseOut) == null || Zt.call(st.data, q);
|
|
13394
13432
|
}).on("click", function(q, st) {
|
|
13395
|
-
var Ct, kt, _t, Vt, Nt, Ot,
|
|
13433
|
+
var Ct, kt, _t, Vt, Nt, Ot, Zt, ne, Tt, Kt, le, Ve, he, mn;
|
|
13396
13434
|
const wt = $.indexOf(st);
|
|
13397
|
-
D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Ct = st.data.events) == null ? void 0 : Ct.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (
|
|
13435
|
+
D && (W.selectedIndices.has(wt) ? (W.selectedIndices.delete(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", ""), (kt = (Ct = st.data.events) == null ? void 0 : Ct.unselect) == null || kt.call(st.data, q), (Nt = (Vt = (_t = W.config.point) == null ? void 0 : _t.events) == null ? void 0 : Vt.unselect) == null || Nt.call(st.data, q)) : (W.selectedIndices.add(wt), rt(this).transition("slice").duration(K).ease(Z).attr("transform", j(st)), (Zt = (Ot = st.data.events) == null ? void 0 : Ot.select) == null || Zt.call(st.data, q), (Kt = (Tt = (ne = W.config.point) == null ? void 0 : ne.events) == null ? void 0 : Tt.select) == null || Kt.call(st.data, q)), (z || B || H !== void 0) && U.each(function(ze, Be) {
|
|
13398
13436
|
const Ze = rt(this);
|
|
13399
|
-
W.selectedIndices.has(
|
|
13400
|
-
})), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (
|
|
13437
|
+
W.selectedIndices.has(Be) ? (z && Ze.attr("fill", z), B && Ze.attr("stroke", B), H !== void 0 && Ze.attr("stroke-width", H)) : (Ze.attr("fill", X(ze, Be)), Ze.attr("stroke", W.config.borderColor || W.autoBorderColor()), Ze.attr("stroke-width", W.config.borderWidth ?? 1));
|
|
13438
|
+
})), W.context.events.emit("point:click", { point: st.data, index: wt, series: W, event: q }), (Ve = (le = st.data.events) == null ? void 0 : le.click) == null || Ve.call(st.data, q), (mn = (he = W.config.events) == null ? void 0 : he.click) == null || mn.call(W, q);
|
|
13401
13439
|
});
|
|
13402
13440
|
for (const q of this.dataLabelConfigs())
|
|
13403
13441
|
this.renderPieLabels(F, $, S, k, _ - L, q);
|
|
@@ -13408,7 +13446,7 @@ class lu extends Xt {
|
|
|
13408
13446
|
if (!s || s.enabled === !1) return;
|
|
13409
13447
|
const a = this.context.plotArea.width, l = this.context.plotArea.height, c = a / 2, h = l / 2, f = s.distance ?? 30, u = s.connectorWidth ?? 1, d = s.connectorColor || "#999", p = s.connectorPadding ?? 5;
|
|
13410
13448
|
s.softConnector;
|
|
13411
|
-
const y = ((L = s.style) == null ? void 0 : L.fontSize) || Mt, g = s.color || ((_ = s.style) == null ? void 0 : _.color) ||
|
|
13449
|
+
const y = ((L = s.style) == null ? void 0 : L.fontSize) || Mt, g = s.color || ((_ = s.style) == null ? void 0 : _.color) || Ee, m = s.alignTo, x = f < 0, v = Ae(y), b = v * 1.4, k = [], { colors: M } = this.context;
|
|
13412
13450
|
if (e.forEach((T, I) => {
|
|
13413
13451
|
const E = T.data.percentage, P = i.centroid(T), S = (T.startAngle + T.endAngle) / 2, w = T.data.color || (this.config.colors ? this.config.colors[I % this.config.colors.length] : M[I % M.length]), A = r + f;
|
|
13414
13452
|
let $ = A * Math.sin(S), R = -A * Math.cos(S);
|
|
@@ -13421,12 +13459,12 @@ class lu extends Xt {
|
|
|
13421
13459
|
x: T.data.x,
|
|
13422
13460
|
y: T.data.y,
|
|
13423
13461
|
percentage: E
|
|
13424
|
-
}) : s.format ? F =
|
|
13462
|
+
}) : s.format ? F = Jt(s.format, {
|
|
13425
13463
|
point: z,
|
|
13426
13464
|
series: { name: this.config.name }
|
|
13427
13465
|
}) : F = T.data.name || String(T.data.y);
|
|
13428
13466
|
const B = /(?:^|[\s;"'])color\s*:\s*([^;"'>]+)/i.exec(F);
|
|
13429
|
-
B && (D = md(B[1], w)), F =
|
|
13467
|
+
B && (D = md(B[1], w)), F = de(F), k.push({ lx: $, ly: R, text: F, midAngle: S, centroid: P, percentage: E, data: T.data, visible: !0, color: w, inlineColor: D });
|
|
13430
13468
|
}), !x && !s.allowOverlap) {
|
|
13431
13469
|
const T = k.filter((P) => P.midAngle < Math.PI), I = k.filter((P) => P.midAngle >= Math.PI);
|
|
13432
13470
|
this.distribute(T, b, h, c, y), this.distribute(I, b, h, c, y);
|
|
@@ -13540,7 +13578,7 @@ class lu extends Xt {
|
|
|
13540
13578
|
for (const l of e) {
|
|
13541
13579
|
const c = e.indexOf(l), h = l.data.color || (this.config.colors ? this.config.colors[c % this.config.colors.length] : s[c % s.length]), f = l.startAngle - Math.PI / 2, u = l.endAngle - Math.PI / 2;
|
|
13542
13580
|
if (f > 0 && u > 0 || f < 0 && u < 0 && f < -Math.PI && u < -Math.PI) continue;
|
|
13543
|
-
const d =
|
|
13581
|
+
const d = Se().innerRadius(i).outerRadius(r).startAngle(l.startAngle).endAngle(l.endAngle);
|
|
13544
13582
|
a.append("path").attr("d", d({})).attr("fill", h).attr("opacity", 0.7).attr("transform", `translate(0,${o})`);
|
|
13545
13583
|
}
|
|
13546
13584
|
}
|
|
@@ -13570,15 +13608,15 @@ class Nd extends Xt {
|
|
|
13570
13608
|
`L ${l - k / 2} ${M + s}`,
|
|
13571
13609
|
"Z"
|
|
13572
13610
|
].join(" "), L = g.color || e[m % e.length], _ = this.group.append("path").attr("d", C).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("class", "katucharts-funnel-segment").style("cursor", this.config.cursor || "pointer");
|
|
13573
|
-
if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(
|
|
13574
|
-
const P = this.config.dataLabels, S = ((I = P.style) == null ? void 0 : I.fontSize) || Mt, w = P.color || ((E = P.style) == null ? void 0 : E.color) ||
|
|
13611
|
+
if (d.push(_), r ? _.attr("fill", L).attr("opacity", 0).transition().duration(bt).ease(pt).delay(Pe(m, 0, Wt, i.length)).attr("opacity", 1) : _.attr("fill", L), (T = this.config.dataLabels) != null && T.enabled) {
|
|
13612
|
+
const P = this.config.dataLabels, S = ((I = P.style) == null ? void 0 : I.fontSize) || Mt, w = P.color || ((E = P.style) == null ? void 0 : E.color) || Ee;
|
|
13575
13613
|
let A;
|
|
13576
13614
|
P.formatter ? A = P.formatter.call({
|
|
13577
13615
|
point: g,
|
|
13578
13616
|
series: { name: this.config.name },
|
|
13579
13617
|
x: g.x,
|
|
13580
13618
|
y: g.y
|
|
13581
|
-
}) : P.format ? A =
|
|
13619
|
+
}) : P.format ? A = de(Jt(P.format, {
|
|
13582
13620
|
point: g,
|
|
13583
13621
|
series: { name: this.config.name }
|
|
13584
13622
|
})) : A = g.name || String(g.y), this.group.append("text").attr("class", "katucharts-funnel-label").attr("x", l + (P.x ?? 0)).attr("y", M + s / 2 + (P.y ?? 0)).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("font-size", S).attr("fill", w).style("pointer-events", "none").text(A);
|
|
@@ -13740,7 +13778,7 @@ class xw extends Xt {
|
|
|
13740
13778
|
const P = this.group.selectAll(".katucharts-heatmap-cell").data(i).join("rect").attr("class", "katucharts-heatmap-cell").attr("x", (A) => k(A) + C).attr("y", (A) => M(A) + L).attr("width", I).attr("height", E).attr("stroke", this.config.borderColor || this.autoBorderColor()).attr("stroke-width", this.config.borderWidth ?? 1).attr("rx", yw(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
|
|
13741
13779
|
e ? P.attr("fill", "#fff").transition().duration(600).delay((A, $) => $ * 8).attr("fill", (A) => b(A)) : P.attr("fill", (A) => b(A)), this.config.enableMouseTracking !== !1 && P.on("mouseover", (A, $) => {
|
|
13742
13780
|
var H, J, X, j;
|
|
13743
|
-
const R = rt(A.currentTarget), F = b($), D = ((J = (H =
|
|
13781
|
+
const R = rt(A.currentTarget), F = b($), D = ((J = (H = ae(F)) == null ? void 0 : H.brighter(0.4)) == null ? void 0 : J.toString()) || F;
|
|
13744
13782
|
R.interrupt("hover").transition("hover").duration(K).ease(Z).attr("fill", D).attr("stroke", "#333").attr("stroke-width", 2), R.style("filter", "drop-shadow(0 1px 3px rgba(0,0,0,0.3))"), P.interrupt("highlight"), P.attr("opacity", 1), P.filter((W) => W !== $).transition("highlight").duration(K).ease(Z).attr("opacity", c);
|
|
13745
13783
|
const z = i.indexOf($), B = $.value ?? $.z ?? $.y;
|
|
13746
13784
|
this.context.events.emit("point:mouseover", {
|
|
@@ -13807,7 +13845,7 @@ class xw extends Xt {
|
|
|
13807
13845
|
return ((p = u[u.length - 1]) == null ? void 0 : p.color) || "#cccccc";
|
|
13808
13846
|
};
|
|
13809
13847
|
}
|
|
13810
|
-
const a = t.type === "logarithmic", l = a ? Math.max(o, 1e-10) : o, c = () => a ? ps().domain([l, s]).clamp(!0) :
|
|
13848
|
+
const a = t.type === "logarithmic", l = a ? Math.max(o, 1e-10) : o, c = () => a ? ps().domain([l, s]).clamp(!0) : Ce().domain([o, s]).clamp(!0);
|
|
13811
13849
|
if (t.stops && t.stops.length >= 2) {
|
|
13812
13850
|
const u = t.stops, d = c();
|
|
13813
13851
|
return (p) => {
|
|
@@ -13883,7 +13921,7 @@ class xw extends Xt {
|
|
|
13883
13921
|
series: { name: this.config.name },
|
|
13884
13922
|
x: d.x,
|
|
13885
13923
|
y: d.y
|
|
13886
|
-
}) : a.format ?
|
|
13924
|
+
}) : a.format ? de(Jt(a.format, {
|
|
13887
13925
|
point: { ...d, value: p },
|
|
13888
13926
|
series: { name: this.config.name },
|
|
13889
13927
|
x: d.x,
|
|
@@ -13916,7 +13954,7 @@ class vw extends Xt {
|
|
|
13916
13954
|
for (let k = 0; k < o.length; k++) {
|
|
13917
13955
|
const M = o[k], C = t.getPixelForValue(M.x ?? k) + l + a / 2, L = M.low ?? 0, _ = M.q1 ?? M.low ?? 0, T = M.median ?? M.y ?? 0, I = M.q3 ?? M.high ?? 0, E = M.high ?? 0, P = e.getPixelForValue((L + E) / 2), S = M.color || this.getPointColor(k, r), w = this.config.fillColor ?? "transparent", A = this.config.stemColor || S, $ = this.config.whiskerColor || S, R = this.group.append("g").attr("class", "katucharts-boxplot-point").style("cursor", this.config.cursor || "pointer"), F = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), D = R.append("line").attr("x1", C).attr("x2", C).attr("stroke", A).attr("stroke-width", u).attr("stroke-dasharray", d), z = R.append("rect").attr("x", C - a / 2).attr("width", a).attr("fill", w).attr("stroke", S).attr("stroke-width", x).attr("stroke-dasharray", m).attr("rx", bw(this.config.borderRadius)), B = R.append("line").attr("x1", C - a / 2).attr("x2", C + a / 2).attr("stroke", c || this.config.lineColor || S).attr("stroke-width", h).attr("stroke-dasharray", f), H = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y), J = R.append("line").attr("x1", C - g / 2).attr("x2", C + g / 2).attr("stroke", $).attr("stroke-width", p).attr("stroke-dasharray", y);
|
|
13918
13956
|
if (s) {
|
|
13919
|
-
const X =
|
|
13957
|
+
const X = Pe(k, 0, Wt, o.length), j = b;
|
|
13920
13958
|
F.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", P).attr("height", 0).transition().duration(j).ease(pt).delay(X).attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", P).attr("y2", P).transition().duration(j).ease(pt).delay(X).attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
|
|
13921
13959
|
} else
|
|
13922
13960
|
F.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(_)), D.attr("y1", e.getPixelForValue(I)).attr("y2", e.getPixelForValue(E)), z.attr("y", e.getPixelForValue(I)).attr("height", Math.abs(e.getPixelForValue(_) - e.getPixelForValue(I))), B.attr("y1", e.getPixelForValue(T)).attr("y2", e.getPixelForValue(T)), H.attr("y1", e.getPixelForValue(L)).attr("y2", e.getPixelForValue(L)), J.attr("y1", e.getPixelForValue(E)).attr("y2", e.getPixelForValue(E));
|
|
@@ -14016,7 +14054,7 @@ class kw extends Xt {
|
|
|
14016
14054
|
const { xAxis: t, yAxis: e, plotArea: i } = this.context, r = this.getColor(), o = this.data, s = this.context.animate, { barWidth: a, barOffset: l } = this.computeBarGeometry();
|
|
14017
14055
|
this.processed = this.processWaterfallData(o);
|
|
14018
14056
|
const c = this.group.selectAll(".katucharts-waterfall-bar").data(this.processed).join("rect").attr("class", "katucharts-waterfall-bar").attr("x", (d) => t.getPixelForValue(d.x ?? 0) + l).attr("width", a).attr("rx", hu(this.config.borderRadius)).attr("fill", (d, p) => this.getBarColor(d, p, r)).attr("stroke", this.config.borderColor || "none").attr("stroke-width", this.config.borderWidth ?? 0).style("cursor", this.config.cursor || "pointer"), h = e.getPixelForValue(0), u = (typeof this.config.animation == "object" ? this.config.animation : {}).duration ?? bt;
|
|
14019
|
-
s ? c.attr("y", h).attr("height", 0).transition().duration(u).ease(pt).delay((d, p) =>
|
|
14057
|
+
s ? c.attr("y", h).attr("height", 0).transition().duration(u).ease(pt).delay((d, p) => Pe(p, 0, Wt, this.processed.length)).attr("y", (d) => Math.min(e.getPixelForValue(d._start), e.getPixelForValue(d._end))).attr("height", (d) => Math.max(Math.abs(e.getPixelForValue(d._start) - e.getPixelForValue(d._end)), this.config.minPointLength ?? 0)) : c.attr("y", (d) => Math.min(e.getPixelForValue(d._start), e.getPixelForValue(d._end))).attr("height", (d) => Math.max(Math.abs(e.getPixelForValue(d._start) - e.getPixelForValue(d._end)), this.config.minPointLength ?? 0)), this.attachBarEvents(c), this.renderConnectors(a, l, !!s), this.renderDataLabels(
|
|
14020
14058
|
this.processed,
|
|
14021
14059
|
(d) => t.getPixelForValue(d.x ?? 0) + l + a / 2,
|
|
14022
14060
|
(d) => e.getPixelForValue(d._end)
|
|
@@ -14570,10 +14608,10 @@ function hk(n, t, e) {
|
|
|
14570
14608
|
let a = 0, l;
|
|
14571
14609
|
for (; (l = s.exec(r)) !== null; ) {
|
|
14572
14610
|
if (l.index > a) {
|
|
14573
|
-
const d =
|
|
14611
|
+
const d = de(r.slice(a, l.index));
|
|
14574
14612
|
d && o.push({ text: d, fontSize: t, fontWeight: e });
|
|
14575
14613
|
}
|
|
14576
|
-
const c = l[1] || "", h = c.match(/font-size\s*:\s*([^;"]+)/i), f = c.match(/font-weight\s*:\s*([^;"]+)/i), u =
|
|
14614
|
+
const c = l[1] || "", h = c.match(/font-size\s*:\s*([^;"]+)/i), f = c.match(/font-weight\s*:\s*([^;"]+)/i), u = de(l[2]);
|
|
14577
14615
|
u && o.push({
|
|
14578
14616
|
text: u,
|
|
14579
14617
|
fontSize: h ? h[1].trim() : t,
|
|
@@ -14581,7 +14619,7 @@ function hk(n, t, e) {
|
|
|
14581
14619
|
}), a = l.index + l[0].length;
|
|
14582
14620
|
}
|
|
14583
14621
|
if (a < r.length) {
|
|
14584
|
-
const c =
|
|
14622
|
+
const c = de(r.slice(a));
|
|
14585
14623
|
c && o.push({ text: c, fontSize: t, fontWeight: e });
|
|
14586
14624
|
}
|
|
14587
14625
|
return o;
|
|
@@ -14619,7 +14657,7 @@ class fk extends Xt {
|
|
|
14619
14657
|
if (w != null && w.color) {
|
|
14620
14658
|
const z = w.colorVariation;
|
|
14621
14659
|
if ((z == null ? void 0 : z.key) === "brightness" && ((A = P.parent) != null && A.children)) {
|
|
14622
|
-
const B = P.parent.children, H = B.indexOf(P), J = B.length, X = J > 1 ? -0.5 + H / (J - 1) * (z.to ?? 0.5) : 0, j = pi((($ =
|
|
14660
|
+
const B = P.parent.children, H = B.indexOf(P), J = B.length, X = J > 1 ? -0.5 + H / (J - 1) * (z.to ?? 0.5) : 0, j = pi((($ = ae(w.color)) == null ? void 0 : $.toString()) || w.color);
|
|
14623
14661
|
return j.l = Math.max(0.1, Math.min(0.95, j.l + X * 0.3)), j.toString();
|
|
14624
14662
|
}
|
|
14625
14663
|
return w.color;
|
|
@@ -14629,7 +14667,7 @@ class fk extends Xt {
|
|
|
14629
14667
|
if (s) {
|
|
14630
14668
|
const z = e[S % e.length], B = P.parent ? k(P.parent.depth) : void 0;
|
|
14631
14669
|
if (((R = B == null ? void 0 : B.colorVariation) == null ? void 0 : R.key) === "brightness") {
|
|
14632
|
-
const H = ((F = P.parent) == null ? void 0 : F.children) || [], J = H.indexOf(P), X = H.length, j = B.colorVariation.to ?? 0.5, W = X > 1 ? J / (X - 1) * j : j * 0.5, U = pi(((D =
|
|
14670
|
+
const H = ((F = P.parent) == null ? void 0 : F.children) || [], J = H.indexOf(P), X = H.length, j = B.colorVariation.to ?? 0.5, W = X > 1 ? J / (X - 1) * j : j * 0.5, U = pi(((D = ae(z)) == null ? void 0 : D.toString()) || z);
|
|
14633
14671
|
return U.l = Math.max(0.1, Math.min(0.95, U.l + W * 0.3)), U.toString();
|
|
14634
14672
|
}
|
|
14635
14673
|
return z;
|
|
@@ -14645,9 +14683,9 @@ class fk extends Xt {
|
|
|
14645
14683
|
const S = k(P.depth);
|
|
14646
14684
|
return (S == null ? void 0 : S.borderWidth) ?? this.config.borderWidth ?? 1;
|
|
14647
14685
|
}).attr("rx", uk(this.config.borderRadius)).style("cursor", this.config.cursor || "pointer");
|
|
14648
|
-
i ? _.attr("opacity", 0).transition().duration(bt).ease(pt).delay((P, S) =>
|
|
14686
|
+
i ? _.attr("opacity", 0).transition().duration(bt).ease(pt).delay((P, S) => Pe(S, 0, Wt, b.length)).attr("opacity", m) : m !== 1 && _.attr("opacity", m), this.config.enableMouseTracking !== !1 && _.on("mouseover", (P, S) => {
|
|
14649
14687
|
var D, z, B, H, J, X;
|
|
14650
|
-
const w = rt(P.currentTarget), A = w.attr("fill"), $ = ((z = (D = this.config.states) == null ? void 0 : D.hover) == null ? void 0 : z.brightness) ?? 0.3, R = ((H = (B =
|
|
14688
|
+
const w = rt(P.currentTarget), A = w.attr("fill"), $ = ((z = (D = this.config.states) == null ? void 0 : D.hover) == null ? void 0 : z.brightness) ?? 0.3, R = ((H = (B = ae(A)) == null ? void 0 : B.brighter($)) == null ? void 0 : H.toString()) || A;
|
|
14651
14689
|
w.transition("fill").duration(K).ease(Z).attr("fill", R), w.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"), _.interrupt("highlight"), _.attr("opacity", 1), _.filter((j) => j !== S).transition("highlight").duration(K).ease(Z).attr("opacity", h);
|
|
14652
14690
|
const F = b.indexOf(S);
|
|
14653
14691
|
this.context.events.emit("point:mouseover", {
|
|
@@ -14686,7 +14724,7 @@ class fk extends Xt {
|
|
|
14686
14724
|
* Renders breadcrumb navigation trail showing the path from root to current node.
|
|
14687
14725
|
*/
|
|
14688
14726
|
renderBreadcrumbs(t, e) {
|
|
14689
|
-
const i = this.config.breadcrumbs || {}, r = i.position || {}, o = r.x ?? 0, s = r.y ?? -20, a = i.separator ?? " / ", l = i.style || {}, c = l.fontSize || "11px", h = l.color ||
|
|
14727
|
+
const i = this.config.breadcrumbs || {}, r = i.position || {}, o = r.x ?? 0, s = r.y ?? -20, a = i.separator ?? " / ", l = i.style || {}, c = l.fontSize || "11px", h = l.color || Ee, f = [];
|
|
14690
14728
|
let u = this.currentRoot;
|
|
14691
14729
|
for (; u; )
|
|
14692
14730
|
f.unshift(u), u = u.parent;
|
|
@@ -14722,7 +14760,7 @@ class fk extends Xt {
|
|
|
14722
14760
|
});
|
|
14723
14761
|
else {
|
|
14724
14762
|
const P = i.format || i.pointFormat;
|
|
14725
|
-
P ? k =
|
|
14763
|
+
P ? k = Jt(P, {
|
|
14726
14764
|
point: y.data,
|
|
14727
14765
|
series: { name: this.config.name },
|
|
14728
14766
|
x: y.data.x,
|
|
@@ -14739,7 +14777,7 @@ class fk extends Xt {
|
|
|
14739
14777
|
let I = _;
|
|
14740
14778
|
M.forEach((P, S) => {
|
|
14741
14779
|
if (P.length === 0) return;
|
|
14742
|
-
const w = P.map(($) =>
|
|
14780
|
+
const w = P.map(($) => Ae($.fontSize)), A = Math.max(...w) * 1.15;
|
|
14743
14781
|
I += A, P.forEach(($, R) => {
|
|
14744
14782
|
const F = T.append("tspan").attr("font-size", $.fontSize).attr("font-weight", $.fontWeight).text($.text);
|
|
14745
14783
|
R === 0 && F.attr("x", C).attr("y", I);
|
|
@@ -14774,7 +14812,7 @@ class dk extends Xt {
|
|
|
14774
14812
|
});
|
|
14775
14813
|
const C = this.getMaxDepth(M), L = this.config.levelIsConstant !== !1, _ = this.computeRingWidths(d, C, r);
|
|
14776
14814
|
this.applyCustomRadii(M, _, L), this.assignColors(M, e, r);
|
|
14777
|
-
const T = this.config.borderRadius !== void 0 ? this.resolveBorderRadius(this.config.borderRadius) : 0, I =
|
|
14815
|
+
const T = this.config.borderRadius !== void 0 ? this.resolveBorderRadius(this.config.borderRadius) : 0, I = Se().startAngle((U) => U.x0).endAngle((U) => U.x1).innerRadius((U) => U._y0).outerRadius((U) => U._y1).padAngle(5e-3).cornerRadius(T), E = this.group.append("g").attr("transform", `translate(${c},${h})`), P = M.descendants(), S = P[0], w = P.filter((U) => U.depth > 0), A = S._y1 || S.y1, $ = S.data.color || this.getColor() || "#ffffff", R = pi($), F = R && !isNaN(R.h) ? pi(R.h, R.s * 0.4, 0.88).toString() : $, D = E.append("circle").attr("r", A).attr("fill", F).attr("stroke", "none").style("cursor", o ? "pointer" : "default");
|
|
14778
14816
|
if (o && this.currentRoot && this.currentRoot !== b && (E.select("circle").on("click", () => {
|
|
14779
14817
|
var U;
|
|
14780
14818
|
this.currentRoot = ((U = this.currentRoot) == null ? void 0 : U.parent) || null, this.group.selectAll("*").remove(), this.render();
|
|
@@ -14816,7 +14854,7 @@ class dk extends Xt {
|
|
|
14816
14854
|
rt(this).attr("transform", `translate(${N},${Y})`);
|
|
14817
14855
|
}
|
|
14818
14856
|
}), i ? z.each(function(U, G) {
|
|
14819
|
-
const N = rt(this), Y = { x0: U.x0, x1: U.x0, _y0: U._y0, _y1: U._y1 }, O = { x0: U.x0, x1: U.x1, _y0: U._y0, _y1: U._y1 }, ct =
|
|
14857
|
+
const N = rt(this), Y = { x0: U.x0, x1: U.x0, _y0: U._y0, _y1: U._y1 }, O = { x0: U.x0, x1: U.x1, _y0: U._y0, _y1: U._y1 }, ct = se(Y, O);
|
|
14820
14858
|
N.transition().duration(bt).ease(pt).delay(Fd + G * Wt).attrTween("d", () => (it) => I(ct(it)));
|
|
14821
14859
|
}) : z.attr("d", I);
|
|
14822
14860
|
const B = /* @__PURE__ */ new Set();
|
|
@@ -14828,7 +14866,7 @@ class dk extends Xt {
|
|
|
14828
14866
|
const U = this;
|
|
14829
14867
|
z.on("mouseover", function(G, N) {
|
|
14830
14868
|
var ft, dt, at, ot;
|
|
14831
|
-
const Y = rt(this), O = ((dt = (ft =
|
|
14869
|
+
const Y = rt(this), O = ((dt = (ft = ae(N._color)) == null ? void 0 : ft.brighter(0.3)) == null ? void 0 : dt.toString()) || N._color;
|
|
14832
14870
|
Y.transition("fill").duration(K).ease(Z).attr("fill", O), Y.style("filter", "drop-shadow(0 1px 3px rgba(0,0,0,0.2))"), z.interrupt("highlight"), z.attr("opacity", 1), z.filter((q) => q !== N && !U.isAncestorOf(q, N)).transition("highlight").duration(K).ease(Z).attr("opacity", a);
|
|
14833
14871
|
const ct = w.indexOf(N), it = I.centroid(N);
|
|
14834
14872
|
U.context.events.emit("point:mouseover", {
|
|
@@ -14957,7 +14995,7 @@ class dk extends Xt {
|
|
|
14957
14995
|
else if (c.depth === s)
|
|
14958
14996
|
c._color = e[r++ % e.length];
|
|
14959
14997
|
else if (c.depth > s && c.parent) {
|
|
14960
|
-
const h = i.find((d) => d.level === c.depth), f = h == null ? void 0 : h.colorVariation, u =
|
|
14998
|
+
const h = i.find((d) => d.level === c.depth), f = h == null ? void 0 : h.colorVariation, u = ae(c.parent._color);
|
|
14961
14999
|
if (u && (f == null ? void 0 : f.key) === "brightness") {
|
|
14962
15000
|
const d = c.parent.children || [], p = d.indexOf(c), y = d.length, g = y > 1 ? p / (y - 1) * f.to : f.to * 0.5, m = pi(u.toString());
|
|
14963
15001
|
m.l = Math.max(0.1, Math.min(0.95, m.l + g * 0.3)), c._color = m.toString();
|
|
@@ -15086,14 +15124,14 @@ class pk extends Xt {
|
|
|
15086
15124
|
O > 0 && (m = u + ((p - u) % O + O) % O);
|
|
15087
15125
|
}
|
|
15088
15126
|
const x = g * Math.PI / 180;
|
|
15089
|
-
let b =
|
|
15127
|
+
let b = Ce().domain([u, d]).range([a, l]).clamp(!y && g <= 0)(m);
|
|
15090
15128
|
if (!y && g > 0) {
|
|
15091
15129
|
const O = a - x, ct = l + x;
|
|
15092
15130
|
b = Math.max(O, Math.min(ct, b));
|
|
15093
15131
|
}
|
|
15094
15132
|
const k = this.group.append("g").attr("transform", `translate(${i},${h})`);
|
|
15095
15133
|
this.renderPaneBackground(k, f, a, l, r);
|
|
15096
|
-
const M = f * 0.15, C =
|
|
15134
|
+
const M = f * 0.15, C = Se().innerRadius(f - M).outerRadius(f).startAngle(a).endAngle(l).cornerRadius(M / 2);
|
|
15097
15135
|
k.append("path").attr("d", C({})).attr("fill", "#ddd"), this.renderPlotBands(k, f, a, l, u, d, M), this.renderTickMarks(k, f, a, l, u, d, M);
|
|
15098
15136
|
const L = this.config.dial || {}, _ = this.config.pivot || {}, T = L.backgroundColor || "#333", I = L.borderColor || "none", E = L.borderWidth ?? 0, P = L.baseWidth ?? 8, S = L.topWidth ?? 1, w = this.resolvePercent(L.radius ?? "80%", f), A = this.resolvePercent(L.rearLength ?? "15%", f), $ = b - Math.PI / 2, R = w * Math.cos($), F = w * Math.sin($), D = -A * Math.cos($), z = -A * Math.sin($), B = $ + Math.PI / 2, H = P / 2, J = S / 2, X = [
|
|
15099
15137
|
`M${D + H * Math.cos(B)},${z + H * Math.sin(B)}`,
|
|
@@ -15105,7 +15143,7 @@ class pk extends Xt {
|
|
|
15105
15143
|
if (e) {
|
|
15106
15144
|
const O = this.buildNeedlePath(a, w, A, P, S);
|
|
15107
15145
|
j.attr("d", O).transition().duration(bt).ease(pt).attrTween("d", () => {
|
|
15108
|
-
const ct =
|
|
15146
|
+
const ct = se(a, b);
|
|
15109
15147
|
return (it) => this.buildNeedlePath(ct(it), w, A, P, S);
|
|
15110
15148
|
});
|
|
15111
15149
|
} else
|
|
@@ -15146,7 +15184,7 @@ class pk extends Xt {
|
|
|
15146
15184
|
renderPaneBackground(t, e, i, r, o) {
|
|
15147
15185
|
const s = o.background ? Array.isArray(o.background) ? o.background : [o.background] : [];
|
|
15148
15186
|
for (const a of s) {
|
|
15149
|
-
const l = this.resolvePercent(a.outerRadius ?? "100%", e), c = this.resolvePercent(a.innerRadius ?? "0%", e), h =
|
|
15187
|
+
const l = this.resolvePercent(a.outerRadius ?? "100%", e), c = this.resolvePercent(a.innerRadius ?? "0%", e), h = Se().innerRadius(c).outerRadius(l).startAngle(i).endAngle(r);
|
|
15150
15188
|
t.append("path").attr("d", h({})).attr("fill", a.backgroundColor || "#f2f2f2").attr("stroke", a.borderColor || "#cccccc").attr("stroke-width", a.borderWidth ?? 0);
|
|
15151
15189
|
}
|
|
15152
15190
|
}
|
|
@@ -15154,16 +15192,16 @@ class pk extends Xt {
|
|
|
15154
15192
|
var f;
|
|
15155
15193
|
const l = ((f = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : f.plotBands) || [];
|
|
15156
15194
|
if (l.length === 0) return;
|
|
15157
|
-
const c = a ?? e * 0.15, h =
|
|
15195
|
+
const c = a ?? e * 0.15, h = Ce().domain([o, s]).range([i, r]);
|
|
15158
15196
|
for (const u of l) {
|
|
15159
15197
|
if (u.from === void 0 || u.to === void 0) continue;
|
|
15160
|
-
const d =
|
|
15198
|
+
const d = Se().innerRadius(e - c).outerRadius(e).startAngle(h(u.from)).endAngle(h(u.to)).cornerRadius(0);
|
|
15161
15199
|
t.append("path").attr("d", d({})).attr("fill", u.color || "#e0e0e0").attr("stroke", u.borderColor || "none").attr("stroke-width", u.borderWidth ?? 0);
|
|
15162
15200
|
}
|
|
15163
15201
|
}
|
|
15164
15202
|
renderTickMarks(t, e, i, r, o, s, a) {
|
|
15165
15203
|
var v, b;
|
|
15166
|
-
const l = (this.config._yAxis ?? this.config.yAxis) || {}, c = l.tickPositions || this.generateTicks(o, s, 5), h = l.tickLength ?? 15, f = l.tickWidth ?? 2, u = ((v = l.labels) == null ? void 0 : v.enabled) !== !1, d = ((b = l.labels) == null ? void 0 : b.style) || {}, p = d.fontSize || Mt, y = d.color || this.autoLabelColor(), g = a ?? e * 0.15, m =
|
|
15204
|
+
const l = (this.config._yAxis ?? this.config.yAxis) || {}, c = l.tickPositions || this.generateTicks(o, s, 5), h = l.tickLength ?? 15, f = l.tickWidth ?? 2, u = ((v = l.labels) == null ? void 0 : v.enabled) !== !1, d = ((b = l.labels) == null ? void 0 : b.style) || {}, p = d.fontSize || Mt, y = d.color || this.autoLabelColor(), g = a ?? e * 0.15, m = Ce().domain([o, s]).range([i, r]), x = l.minorTickInterval ? Math.round((s - o) / l.minorTickInterval) : 0;
|
|
15167
15205
|
if (x > 0 && l.minorTickInterval)
|
|
15168
15206
|
for (let k = 0; k <= x; k++) {
|
|
15169
15207
|
const M = o + k * l.minorTickInterval;
|
|
@@ -15196,7 +15234,7 @@ class pk extends Xt {
|
|
|
15196
15234
|
series: { name: this.config.name },
|
|
15197
15235
|
x: (f = this.data[0]) == null ? void 0 : f.x,
|
|
15198
15236
|
y: i
|
|
15199
|
-
}) : r.format ? l =
|
|
15237
|
+
}) : r.format ? l = de(Jt(r.format, {
|
|
15200
15238
|
point: this.data[0],
|
|
15201
15239
|
series: { name: this.config.name },
|
|
15202
15240
|
x: (u = this.data[0]) == null ? void 0 : u.x,
|
|
@@ -15274,11 +15312,11 @@ class gk extends Xt {
|
|
|
15274
15312
|
const P = (v - h) / (h - c);
|
|
15275
15313
|
k = l + Math.min(u, (l - a) * P);
|
|
15276
15314
|
}
|
|
15277
|
-
const M = p === "round", C =
|
|
15315
|
+
const M = p === "round", C = Se().innerRadius(r).outerRadius(o).startAngle(a).endAngle(l).cornerRadius(M ? (o - r) / 2 : d);
|
|
15278
15316
|
t.append("path").attr("d", C({})).attr("fill", "#e0e0e0");
|
|
15279
|
-
const L = M ? (o - r) / 2 : d, _ =
|
|
15317
|
+
const L = M ? (o - r) / 2 : d, _ = Se().innerRadius(r).outerRadius(o).cornerRadius(L), T = Se().innerRadius(r).outerRadius(o + 5).cornerRadius(L), I = this.resolveArcColor(b, y, e), E = t.append("path").attr("fill", I).style("cursor", "pointer");
|
|
15280
15318
|
if (x) {
|
|
15281
|
-
const P =
|
|
15319
|
+
const P = se(a, k), S = this;
|
|
15282
15320
|
E.transition().duration(bt).ease(pt).attrTween("d", () => (w) => {
|
|
15283
15321
|
const A = P(w), $ = _.startAngle(a).endAngle(A)({});
|
|
15284
15322
|
if (y.length > 0) {
|
|
@@ -15316,7 +15354,7 @@ class gk extends Xt {
|
|
|
15316
15354
|
for (let i = 0; i < e.length - 1; i++)
|
|
15317
15355
|
if (t >= e[i][0] && t <= e[i + 1][0]) {
|
|
15318
15356
|
const r = (t - e[i][0]) / (e[i + 1][0] - e[i][0]), o = e[i][1], s = e[i + 1][1];
|
|
15319
|
-
return
|
|
15357
|
+
return se(o, s)(r);
|
|
15320
15358
|
}
|
|
15321
15359
|
return e[e.length - 1][1];
|
|
15322
15360
|
}
|
|
@@ -15326,7 +15364,7 @@ class gk extends Xt {
|
|
|
15326
15364
|
renderPaneBackground(t, e, i, r, o, s) {
|
|
15327
15365
|
const a = s.background ? Array.isArray(s.background) ? s.background : [s.background] : [];
|
|
15328
15366
|
for (const l of a) {
|
|
15329
|
-
const c = this.resolvePercent(l.outerRadius ?? "100%", e), h = this.resolvePercent(l.innerRadius ?? "0%", e), f =
|
|
15367
|
+
const c = this.resolvePercent(l.outerRadius ?? "100%", e), h = this.resolvePercent(l.innerRadius ?? "0%", e), f = Se().innerRadius(h).outerRadius(c).startAngle(r).endAngle(o);
|
|
15330
15368
|
t.append("path").attr("d", f({})).attr("fill", l.backgroundColor || "#f2f2f2").attr("stroke", l.borderColor || "#cccccc").attr("stroke-width", l.borderWidth ?? 0);
|
|
15331
15369
|
}
|
|
15332
15370
|
}
|
|
@@ -15334,16 +15372,16 @@ class gk extends Xt {
|
|
|
15334
15372
|
var h;
|
|
15335
15373
|
const l = ((h = this.config._yAxis ?? this.config.yAxis) == null ? void 0 : h.plotBands) || [];
|
|
15336
15374
|
if (l.length === 0) return;
|
|
15337
|
-
const c =
|
|
15375
|
+
const c = Ce().domain([s, a]).range([r, o]);
|
|
15338
15376
|
for (const f of l) {
|
|
15339
15377
|
if (f.from === void 0 || f.to === void 0) continue;
|
|
15340
|
-
const u =
|
|
15378
|
+
const u = Se().innerRadius(i).outerRadius(e).startAngle(c(f.from)).endAngle(c(f.to));
|
|
15341
15379
|
t.append("path").attr("d", u({})).attr("fill", f.color || "#e0e0e0").attr("stroke", f.borderColor || "none").attr("stroke-width", f.borderWidth ?? 0);
|
|
15342
15380
|
}
|
|
15343
15381
|
}
|
|
15344
15382
|
renderTickMarks(t, e, i, r, o, s) {
|
|
15345
15383
|
var p, y;
|
|
15346
|
-
const a = (this.config._yAxis ?? this.config.yAxis) || {}, l = a.tickPositions || this.generateTicks(o, s, 5), c = ((p = a.labels) == null ? void 0 : p.enabled) !== !1, h = ((y = a.labels) == null ? void 0 : y.style) || {}, f = h.fontSize || Mt, u = h.color || this.autoLabelColor(), d =
|
|
15384
|
+
const a = (this.config._yAxis ?? this.config.yAxis) || {}, l = a.tickPositions || this.generateTicks(o, s, 5), c = ((p = a.labels) == null ? void 0 : p.enabled) !== !1, h = ((y = a.labels) == null ? void 0 : y.style) || {}, f = h.fontSize || Mt, u = h.color || this.autoLabelColor(), d = Ce().domain([o, s]).range([i, r]);
|
|
15347
15385
|
for (const g of l) {
|
|
15348
15386
|
const m = d(g) - Math.PI / 2;
|
|
15349
15387
|
if (c) {
|
|
@@ -15369,7 +15407,7 @@ class gk extends Xt {
|
|
|
15369
15407
|
series: { name: this.config.name },
|
|
15370
15408
|
x: (h = this.data[0]) == null ? void 0 : h.x,
|
|
15371
15409
|
y: e
|
|
15372
|
-
}) : i.format ? a =
|
|
15410
|
+
}) : i.format ? a = de(Jt(i.format, {
|
|
15373
15411
|
point: this.data[0],
|
|
15374
15412
|
series: { name: this.config.name },
|
|
15375
15413
|
x: (f = this.data[0]) == null ? void 0 : f.x,
|
|
@@ -15419,7 +15457,7 @@ class mu extends Xt {
|
|
|
15419
15457
|
}
|
|
15420
15458
|
renderLineAreaPolar(t) {
|
|
15421
15459
|
var E, P, S, w, A, $, R, F, D, z;
|
|
15422
|
-
const { plotArea: e } = this.context, i = this.context.animate, r = this.data, o = this.getColor(), s = this.context.pane || this.config.pane, a = gu(e.width, e.height, s), l = e.width / 2, c = e.height / 2, h = Math.max(...r.map((B) => B.y ?? 0), 1), { ticks: f, gridMax: u } = pu(h), d =
|
|
15460
|
+
const { plotArea: e } = this.context, i = this.context.animate, r = this.data, o = this.getColor(), s = this.context.pane || this.config.pane, a = gu(e.width, e.height, s), l = e.width / 2, c = e.height / 2, h = Math.max(...r.map((B) => B.y ?? 0), 1), { ticks: f, gridMax: u } = pu(h), d = Ce().domain([0, u]).range([0, a]), p = ((E = this.config.marker) == null ? void 0 : E.radius) ?? 4, y = ((P = this.config.marker) == null ? void 0 : P.enabled) !== !1, g = this.config.pointPlacement, m = g === "on" ? 0 : g === "between" ? Math.PI / r.length : typeof g == "number" ? g * Math.PI / 180 : 0, x = 2 * Math.PI / r.length, v = this.config.connectEnds !== !1;
|
|
15423
15461
|
(w = (S = this.config.states) == null ? void 0 : S.inactive) == null || w.opacity;
|
|
15424
15462
|
const b = this.group.append("g").attr("transform", `translate(${l},${c})`);
|
|
15425
15463
|
let k = 0, M = 1 / 0;
|
|
@@ -15467,7 +15505,7 @@ class mu extends Xt {
|
|
|
15467
15505
|
}
|
|
15468
15506
|
renderColumnPolar() {
|
|
15469
15507
|
var E, P;
|
|
15470
|
-
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = this.getColor(), s = this.context.pane || this.config.pane, a = gu(t.width, t.height, s), l = t.width / 2, c = t.height / 2, h = Math.max(...r.map((S) => S.y ?? 0), 1), { ticks: f, gridMax: u } = pu(h), d =
|
|
15508
|
+
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.data, o = this.getColor(), s = this.context.pane || this.config.pane, a = gu(t.width, t.height, s), l = t.width / 2, c = t.height / 2, h = Math.max(...r.map((S) => S.y ?? 0), 1), { ticks: f, gridMax: u } = pu(h), d = Ce().domain([0, u]).range([0, a]), p = 2 * Math.PI / r.length, y = this.config.pointPlacement, g = y === "on" ? 0 : y === "between" ? Math.PI / r.length : typeof y == "number" ? y * Math.PI / 180 : 0, m = 0.02, x = ((P = (E = this.config.states) == null ? void 0 : E.inactive) == null ? void 0 : P.opacity) ?? 0.4, v = this.config.colorByPoint === !0, b = this.config.stacking, k = this.group.append("g").attr("transform", `translate(${l},${c})`);
|
|
15471
15509
|
let M = 0, C = 1 / 0;
|
|
15472
15510
|
for (let S = 0; S < r.length; S++) {
|
|
15473
15511
|
const w = r[S].y ?? 0;
|
|
@@ -15475,7 +15513,7 @@ class mu extends Xt {
|
|
|
15475
15513
|
}
|
|
15476
15514
|
const L = M * p - Math.PI / 2;
|
|
15477
15515
|
this.renderGrid(k, a, r.length, d, f, L);
|
|
15478
|
-
const _ =
|
|
15516
|
+
const _ = Se().cornerRadius(2), T = k.selectAll(".katucharts-polar-bar").data(r).join("path").attr("class", "katucharts-polar-bar").attr(
|
|
15479
15517
|
"fill",
|
|
15480
15518
|
(S, w) => S.color || (v ? e[w % e.length] : o)
|
|
15481
15519
|
).attr("stroke", this.config.borderColor || "none").attr("stroke-width", this.config.borderWidth ?? 0).style("cursor", this.config.cursor || "pointer"), I = this.context.stackOffsets;
|
|
@@ -15585,7 +15623,7 @@ class bk extends Xt {
|
|
|
15585
15623
|
}
|
|
15586
15624
|
render() {
|
|
15587
15625
|
var m, x, v, b;
|
|
15588
|
-
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.config, o = this.data, s = Math.min(40, t.height / Math.max(o.length, 1)), a = (t.height - o.length * s) / 2, l = ((m = this.config.marker) == null ? void 0 : m.radius) ?? 6, c = (x = this.config.marker) == null ? void 0 : x.lineColor, h = r.colorByPoint !== !1, f = r.connectorColor ?? "#ccc", u = r.connectorWidth ?? r.lineWidth ?? 4, d = this.config.dataLabels || {}, p = ((v = d.style) == null ? void 0 : v.fontSize) || Mt, y = d.color || ((b = d.style) == null ? void 0 : b.color) ||
|
|
15626
|
+
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.config, o = this.data, s = Math.min(40, t.height / Math.max(o.length, 1)), a = (t.height - o.length * s) / 2, l = ((m = this.config.marker) == null ? void 0 : m.radius) ?? 6, c = (x = this.config.marker) == null ? void 0 : x.lineColor, h = r.colorByPoint !== !1, f = r.connectorColor ?? "#ccc", u = r.connectorWidth ?? r.lineWidth ?? 4, d = this.config.dataLabels || {}, p = ((v = d.style) == null ? void 0 : v.fontSize) || Mt, y = d.color || ((b = d.style) == null ? void 0 : b.color) || Ee, g = [];
|
|
15589
15627
|
o.forEach((k, M) => {
|
|
15590
15628
|
const C = a + M * s, L = k.color || (h ? e[M % e.length] : r.color || e[0]), _ = this.group.append("circle").attr("cx", 20).attr("cy", C + s / 2).attr("fill", L).style("cursor", "pointer");
|
|
15591
15629
|
if (c && _.attr("stroke", c), i ? _.attr("r", 0).transition().duration(bt).ease(pt).delay(M * Wt).attr("r", l) : _.attr("r", l), M < o.length - 1) {
|
|
@@ -15657,14 +15695,14 @@ class vk extends Xt {
|
|
|
15657
15695
|
return { xMin: t, xMax: e, yMin: 0, yMax: 0 };
|
|
15658
15696
|
}
|
|
15659
15697
|
}
|
|
15660
|
-
var At = 1e-6, Xd = 1e-12, zt = Math.PI,
|
|
15698
|
+
var At = 1e-6, Xd = 1e-12, zt = Math.PI, ee = zt / 2, yu = zt / 4, qe = zt * 2, Ie = 180 / zt, te = zt / 180, Gt = Math.abs, tr = Math.atan, Wn = Math.atan2, Dt = Math.cos, uo = Math.ceil, Ud = Math.exp, Qo = Math.log, da = Math.pow, Pt = Math.sin, an = Math.sign || function(n) {
|
|
15661
15699
|
return n > 0 ? 1 : n < 0 ? -1 : 0;
|
|
15662
15700
|
}, He = Math.sqrt, sl = Math.tan;
|
|
15663
15701
|
function qd(n) {
|
|
15664
15702
|
return n > 1 ? 0 : n < -1 ? zt : Math.acos(n);
|
|
15665
15703
|
}
|
|
15666
15704
|
function ln(n) {
|
|
15667
|
-
return n > 1 ?
|
|
15705
|
+
return n > 1 ? ee : n < -1 ? -ee : Math.asin(n);
|
|
15668
15706
|
}
|
|
15669
15707
|
function cn() {
|
|
15670
15708
|
}
|
|
@@ -15782,12 +15820,12 @@ function Mu(n, t) {
|
|
|
15782
15820
|
}, s;
|
|
15783
15821
|
}
|
|
15784
15822
|
function wk(n) {
|
|
15785
|
-
n = jd(n[0] *
|
|
15823
|
+
n = jd(n[0] * te, n[1] * te, n.length > 2 ? n[2] * te : 0);
|
|
15786
15824
|
function t(e) {
|
|
15787
|
-
return e = n(e[0] *
|
|
15825
|
+
return e = n(e[0] * te, e[1] * te), e[0] *= Ie, e[1] *= Ie, e;
|
|
15788
15826
|
}
|
|
15789
15827
|
return t.invert = function(e) {
|
|
15790
|
-
return e = n.invert(e[0] *
|
|
15828
|
+
return e = n.invert(e[0] * te, e[1] * te), e[0] *= Ie, e[1] *= Ie, e;
|
|
15791
15829
|
}, t;
|
|
15792
15830
|
}
|
|
15793
15831
|
function kk(n, t, e, i, r, o) {
|
|
@@ -15881,7 +15919,7 @@ function ga(n) {
|
|
|
15881
15919
|
}
|
|
15882
15920
|
function Mk(n, t) {
|
|
15883
15921
|
var e = ga(t), i = t[1], r = Pt(i), o = [Pt(e), -Dt(e), 0], s = 0, a = 0, l = new yi();
|
|
15884
|
-
r === 1 ? i =
|
|
15922
|
+
r === 1 ? i = ee + At : r === -1 && (i = -ee - At);
|
|
15885
15923
|
for (var c = 0, h = n.length; c < h; ++c)
|
|
15886
15924
|
if (u = (f = n[c]).length)
|
|
15887
15925
|
for (var f, u, d = f[u - 1], p = ga(d), y = d[1] / 2 + yu, g = Pt(y), m = Dt(y), x = 0; x < u; ++x, p = b, g = M, m = C, d = v) {
|
|
@@ -15954,7 +15992,7 @@ function Ak(n) {
|
|
|
15954
15992
|
return n.length > 1;
|
|
15955
15993
|
}
|
|
15956
15994
|
function Sk(n, t) {
|
|
15957
|
-
return ((n = n.x)[0] < 0 ? n[1] -
|
|
15995
|
+
return ((n = n.x)[0] < 0 ? n[1] - ee - At : ee - n[1]) - ((t = t.x)[0] < 0 ? t[1] - ee - At : ee - t[1]);
|
|
15958
15996
|
}
|
|
15959
15997
|
const _u = Jd(
|
|
15960
15998
|
function() {
|
|
@@ -15962,7 +16000,7 @@ const _u = Jd(
|
|
|
15962
16000
|
},
|
|
15963
16001
|
_k,
|
|
15964
16002
|
Pk,
|
|
15965
|
-
[-zt, -
|
|
16003
|
+
[-zt, -ee]
|
|
15966
16004
|
);
|
|
15967
16005
|
function _k(n) {
|
|
15968
16006
|
var t = NaN, e = NaN, i = NaN, r;
|
|
@@ -15972,7 +16010,7 @@ function _k(n) {
|
|
|
15972
16010
|
},
|
|
15973
16011
|
point: function(o, s) {
|
|
15974
16012
|
var a = o > 0 ? zt : -zt, l = Gt(o - t);
|
|
15975
|
-
Gt(l - zt) < At ? (n.point(t, e = (e + s) / 2 > 0 ?
|
|
16013
|
+
Gt(l - zt) < At ? (n.point(t, e = (e + s) / 2 > 0 ? ee : -ee), n.point(i, e), n.lineEnd(), n.lineStart(), n.point(a, e), n.point(o, e), r = 0) : i !== a && l >= zt && (Gt(t - i) < At && (t -= i * At), Gt(o - a) < At && (o -= a * At), e = Ck(t, e, o, s), n.point(i, e), n.lineEnd(), n.lineStart(), n.point(a, e), r = 0), n.point(t = o, e = s), i = a;
|
|
15976
16014
|
},
|
|
15977
16015
|
lineEnd: function() {
|
|
15978
16016
|
n.lineEnd(), t = e = NaN;
|
|
@@ -15989,7 +16027,7 @@ function Ck(n, t, e, i) {
|
|
|
15989
16027
|
function Pk(n, t, e, i) {
|
|
15990
16028
|
var r;
|
|
15991
16029
|
if (n == null)
|
|
15992
|
-
r = e *
|
|
16030
|
+
r = e * ee, i.point(-zt, r), i.point(0, r), i.point(zt, r), i.point(zt, 0), i.point(zt, -r), i.point(0, -r), i.point(-zt, -r), i.point(-zt, 0), i.point(-zt, r);
|
|
15993
16031
|
else if (Gt(n[0] - t[0]) > At) {
|
|
15994
16032
|
var o = n[0] < t[0] ? zt : -zt;
|
|
15995
16033
|
r = e * o / 2, i.point(-o, r), i.point(0, r), i.point(o, r);
|
|
@@ -15997,7 +16035,7 @@ function Pk(n, t, e, i) {
|
|
|
15997
16035
|
i.point(t[0], t[1]);
|
|
15998
16036
|
}
|
|
15999
16037
|
function Ek(n) {
|
|
16000
|
-
var t = Dt(n), e = 2 *
|
|
16038
|
+
var t = Dt(n), e = 2 * te, i = t > 0, r = Gt(t) > At;
|
|
16001
16039
|
function o(h, f, u, d) {
|
|
16002
16040
|
kk(d, n, e, u, h, f);
|
|
16003
16041
|
}
|
|
@@ -16521,7 +16559,7 @@ function fp(n, t, e) {
|
|
|
16521
16559
|
n.scale(150 * o).translate([s, a]);
|
|
16522
16560
|
}, e);
|
|
16523
16561
|
}
|
|
16524
|
-
var Ru = 16, Yk = Dt(30 *
|
|
16562
|
+
var Ru = 16, Yk = Dt(30 * te);
|
|
16525
16563
|
function Du(n, t) {
|
|
16526
16564
|
return +t ? Uk(n, t) : Xk(n);
|
|
16527
16565
|
}
|
|
@@ -16579,7 +16617,7 @@ function Uk(n, t) {
|
|
|
16579
16617
|
}
|
|
16580
16618
|
var qk = al({
|
|
16581
16619
|
point: function(n, t) {
|
|
16582
|
-
this.stream.point(n *
|
|
16620
|
+
this.stream.point(n * te, t * te);
|
|
16583
16621
|
}
|
|
16584
16622
|
});
|
|
16585
16623
|
function jk(n) {
|
|
@@ -16616,10 +16654,10 @@ function Sn(n) {
|
|
|
16616
16654
|
function dp(n) {
|
|
16617
16655
|
var t, e = 150, i = 480, r = 250, o = 0, s = 0, a = 0, l = 0, c = 0, h, f = 0, u = 1, d = 1, p = null, y = _u, g = null, m, x, v, b = rc, k = 0.5, M, C, L, _, T;
|
|
16618
16656
|
function I(w) {
|
|
16619
|
-
return L(w[0] *
|
|
16657
|
+
return L(w[0] * te, w[1] * te);
|
|
16620
16658
|
}
|
|
16621
16659
|
function E(w) {
|
|
16622
|
-
return w = L.invert(w[0], w[1]), w && [w[0] *
|
|
16660
|
+
return w = L.invert(w[0], w[1]), w && [w[0] * Ie, w[1] * Ie];
|
|
16623
16661
|
}
|
|
16624
16662
|
I.stream = function(w) {
|
|
16625
16663
|
return _ && T === w ? _ : _ = qk(jk(h)(y(M(b(T = w)))));
|
|
@@ -16628,7 +16666,7 @@ function dp(n) {
|
|
|
16628
16666
|
}, I.postclip = function(w) {
|
|
16629
16667
|
return arguments.length ? (b = w, g = m = x = v = null, S()) : b;
|
|
16630
16668
|
}, I.clipAngle = function(w) {
|
|
16631
|
-
return arguments.length ? (y = +w ? Ek(p = w *
|
|
16669
|
+
return arguments.length ? (y = +w ? Ek(p = w * te) : (p = null, _u), S()) : p * Ie;
|
|
16632
16670
|
}, I.clipExtent = function(w) {
|
|
16633
16671
|
return arguments.length ? (b = w == null ? (g = m = x = v = null, rc) : $k(g = +w[0][0], m = +w[0][1], x = +w[1][0], v = +w[1][1]), S()) : g == null ? null : [[g, m], [x, v]];
|
|
16634
16672
|
}, I.scale = function(w) {
|
|
@@ -16636,11 +16674,11 @@ function dp(n) {
|
|
|
16636
16674
|
}, I.translate = function(w) {
|
|
16637
16675
|
return arguments.length ? (i = +w[0], r = +w[1], P()) : [i, r];
|
|
16638
16676
|
}, I.center = function(w) {
|
|
16639
|
-
return arguments.length ? (o = w[0] % 360 *
|
|
16677
|
+
return arguments.length ? (o = w[0] % 360 * te, s = w[1] % 360 * te, P()) : [o * Ie, s * Ie];
|
|
16640
16678
|
}, I.rotate = function(w) {
|
|
16641
|
-
return arguments.length ? (a = w[0] % 360 *
|
|
16679
|
+
return arguments.length ? (a = w[0] % 360 * te, l = w[1] % 360 * te, c = w.length > 2 ? w[2] % 360 * te : 0, P()) : [a * Ie, l * Ie, c * Ie];
|
|
16642
16680
|
}, I.angle = function(w) {
|
|
16643
|
-
return arguments.length ? (f = w % 360 *
|
|
16681
|
+
return arguments.length ? (f = w % 360 * te, P()) : f * Ie;
|
|
16644
16682
|
}, I.reflectX = function(w) {
|
|
16645
16683
|
return arguments.length ? (u = w ? -1 : 1, P()) : u < 0;
|
|
16646
16684
|
}, I.reflectY = function(w) {
|
|
@@ -16670,7 +16708,7 @@ function dp(n) {
|
|
|
16670
16708
|
function hl(n) {
|
|
16671
16709
|
var t = 0, e = zt / 3, i = dp(n), r = i(t, e);
|
|
16672
16710
|
return r.parallels = function(o) {
|
|
16673
|
-
return arguments.length ? i(t = o[0] *
|
|
16711
|
+
return arguments.length ? i(t = o[0] * te, e = o[1] * te) : [t * Ie, e * Ie];
|
|
16674
16712
|
}, r;
|
|
16675
16713
|
}
|
|
16676
16714
|
function Kk(n) {
|
|
@@ -16796,10 +16834,10 @@ function nM() {
|
|
|
16796
16834
|
return Sn(yp).scale(79.4188).clipAngle(180 - 1e-3);
|
|
16797
16835
|
}
|
|
16798
16836
|
function Es(n, t) {
|
|
16799
|
-
return [n, Qo(sl((
|
|
16837
|
+
return [n, Qo(sl((ee + t) / 2))];
|
|
16800
16838
|
}
|
|
16801
16839
|
Es.invert = function(n, t) {
|
|
16802
|
-
return [n, 2 * tr(Ud(t)) -
|
|
16840
|
+
return [n, 2 * tr(Ud(t)) - ee];
|
|
16803
16841
|
};
|
|
16804
16842
|
function Bu() {
|
|
16805
16843
|
return xp(Es).scale(961 / qe);
|
|
@@ -16822,19 +16860,19 @@ function xp(n) {
|
|
|
16822
16860
|
return h();
|
|
16823
16861
|
}
|
|
16824
16862
|
function yo(n) {
|
|
16825
|
-
return sl((
|
|
16863
|
+
return sl((ee + n) / 2);
|
|
16826
16864
|
}
|
|
16827
16865
|
function iM(n, t) {
|
|
16828
16866
|
var e = Dt(n), i = n === t ? Pt(n) : Qo(e / Dt(t)) / Qo(yo(t) / yo(n)), r = e * da(yo(n), i) / i;
|
|
16829
16867
|
if (!i) return Es;
|
|
16830
16868
|
function o(s, a) {
|
|
16831
|
-
r > 0 ? a < -
|
|
16869
|
+
r > 0 ? a < -ee + At && (a = -ee + At) : a > ee - At && (a = ee - At);
|
|
16832
16870
|
var l = r / da(yo(a), i);
|
|
16833
16871
|
return [l * Pt(i * s), r - l * Dt(i * s)];
|
|
16834
16872
|
}
|
|
16835
16873
|
return o.invert = function(s, a) {
|
|
16836
16874
|
var l = r - a, c = an(i) * He(s * s + l * l), h = Wn(s, Gt(l)) * an(l);
|
|
16837
|
-
return l * i < 0 && (h -= zt * an(s) * an(l)), [h / i, 2 * tr(da(r / c, 1 / i)) -
|
|
16875
|
+
return l * i < 0 && (h -= zt * an(s) * an(l)), [h / i, 2 * tr(da(r / c, 1 / i)) - ee];
|
|
16838
16876
|
}, o;
|
|
16839
16877
|
}
|
|
16840
16878
|
function rM() {
|
|
@@ -16928,10 +16966,10 @@ function hM() {
|
|
|
16928
16966
|
return Sn(Mp).scale(250).clipAngle(142);
|
|
16929
16967
|
}
|
|
16930
16968
|
function Ap(n, t) {
|
|
16931
|
-
return [Qo(sl((
|
|
16969
|
+
return [Qo(sl((ee + t) / 2)), -n];
|
|
16932
16970
|
}
|
|
16933
16971
|
Ap.invert = function(n, t) {
|
|
16934
|
-
return [-t, 2 * tr(Ud(n)) -
|
|
16972
|
+
return [-t, 2 * tr(Ud(n)) - ee];
|
|
16935
16973
|
};
|
|
16936
16974
|
function uM() {
|
|
16937
16975
|
var n = xp(Ap), t = n.center, e = n.rotate;
|
|
@@ -17105,7 +17143,7 @@ class wM extends Xt {
|
|
|
17105
17143
|
}
|
|
17106
17144
|
const u = e.colorAxis || {}, d = this.data.map((I) => I.y ?? I.value ?? 0).filter((I) => I != null), p = u.min ?? (d.length ? Math.min(...d) : 0), y = u.max ?? (d.length ? Math.max(...d) : 1);
|
|
17107
17145
|
if (Array.isArray(u.stops) && u.stops.length >= 2) {
|
|
17108
|
-
const I = y - p || 1, E = u.stops.map((w) => p + w[0] * I), P = u.stops.map((w) => w[1]), S =
|
|
17146
|
+
const I = y - p || 1, E = u.stops.map((w) => p + w[0] * I), P = u.stops.map((w) => w[1]), S = Ce().domain(E).range(P).clamp(!0);
|
|
17109
17147
|
this.colorScale = (w) => S(w);
|
|
17110
17148
|
} else if (u.minColor && u.maxColor) {
|
|
17111
17149
|
const I = xi(u.minColor, u.maxColor), E = this.makeAxisNorm(u, p, y);
|
|
@@ -17134,7 +17172,7 @@ class wM extends Xt {
|
|
|
17134
17172
|
const o = ps().domain([e, i]).clamp(!0);
|
|
17135
17173
|
return (s) => o(Math.max(s, e));
|
|
17136
17174
|
}
|
|
17137
|
-
const r =
|
|
17175
|
+
const r = Ce().domain([e, i]).clamp(!0);
|
|
17138
17176
|
return (o) => r(o);
|
|
17139
17177
|
}
|
|
17140
17178
|
getFeatureKey(t, e) {
|
|
@@ -17161,7 +17199,7 @@ class wM extends Xt {
|
|
|
17161
17199
|
if (s)
|
|
17162
17200
|
b.transition("hover").duration(K).ease(Z).attr("fill", s);
|
|
17163
17201
|
else {
|
|
17164
|
-
const S = ((E = (I =
|
|
17202
|
+
const S = ((E = (I = ae(C)) == null ? void 0 : I.brighter(c)) == null ? void 0 : E.toString()) || C;
|
|
17165
17203
|
b.transition("hover").duration(K).ease(Z).attr("fill", S);
|
|
17166
17204
|
}
|
|
17167
17205
|
b.attr("stroke", a).attr("stroke-width", l), b.raise(), this.featurePaths.interrupt("highlight"), this.featurePaths.filter((S) => S !== v).transition("highlight").duration(K).ease(Z).attr("opacity", 0.7);
|
|
@@ -17202,7 +17240,7 @@ class wM extends Xt {
|
|
|
17202
17240
|
series: { name: this.config.name },
|
|
17203
17241
|
x: (g = u.properties) == null ? void 0 : g.name,
|
|
17204
17242
|
y: (p == null ? void 0 : p.y) ?? (p == null ? void 0 : p.value)
|
|
17205
|
-
}) : r.format ?
|
|
17243
|
+
}) : r.format ? de(Jt(r.format, {
|
|
17206
17244
|
point: p || { name: (m = u.properties) == null ? void 0 : m.name },
|
|
17207
17245
|
series: { name: this.config.name },
|
|
17208
17246
|
x: (x = u.properties) == null ? void 0 : x.name,
|
|
@@ -17396,7 +17434,7 @@ class kM extends Xt {
|
|
|
17396
17434
|
x: t.id ?? t.name,
|
|
17397
17435
|
y: t.y ?? t.value
|
|
17398
17436
|
};
|
|
17399
|
-
return i != null && i.formatter ? i.formatter.call(r) : i != null && i.format ?
|
|
17437
|
+
return i != null && i.formatter ? i.formatter.call(r) : i != null && i.format ? de(Jt(i.format, r)) : t.id || t.name || "";
|
|
17400
17438
|
}
|
|
17401
17439
|
getDataExtents() {
|
|
17402
17440
|
return { xMin: 0, xMax: 0, yMin: 0, yMax: 0 };
|
|
@@ -17683,7 +17721,7 @@ class _M extends Xt {
|
|
|
17683
17721
|
}
|
|
17684
17722
|
renderLabels(t, e) {
|
|
17685
17723
|
var u, d, p, y;
|
|
17686
|
-
const i = this.config.dataLabels || {}, r = i.enabled !== !1, o = ((u = i.intersections) == null ? void 0 : u.enabled) !== !1, s = ((d = i.style) == null ? void 0 : d.fontSize) || Mt, a = i.color || ((p = i.style) == null ? void 0 : p.color) ||
|
|
17724
|
+
const i = this.config.dataLabels || {}, r = i.enabled !== !1, o = ((u = i.intersections) == null ? void 0 : u.enabled) !== !1, s = ((d = i.style) == null ? void 0 : d.fontSize) || Mt, a = i.color || ((p = i.style) == null ? void 0 : p.color) || Ee, l = ((y = i.style) == null ? void 0 : y.fontWeight) || "bold", c = t.filter((g) => g.sets.length === 1), h = t.filter((g) => g.sets.length >= 2);
|
|
17687
17725
|
if (r) {
|
|
17688
17726
|
const g = this.group.selectAll(".katucharts-venn-set-label").data(c, (m) => m.key).join("text").attr("class", "katucharts-venn-set-label").attr("x", (m) => m.labelX).attr("y", (m) => m.labelY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", s).attr("font-weight", l).attr("fill", a).style("pointer-events", "none").style("text-shadow", "0 0 4px #fff, 0 0 4px #fff");
|
|
17689
17727
|
g.each((m, x, v) => {
|
|
@@ -17696,7 +17734,7 @@ class _M extends Xt {
|
|
|
17696
17734
|
Gu(v[x], String(b ?? ""), m.labelX);
|
|
17697
17735
|
}), e && g.attr("opacity", 0).transition().duration(bt).ease(pt).attr("opacity", 1);
|
|
17698
17736
|
}
|
|
17699
|
-
const f = this.group.selectAll(".katucharts-venn-inter-label").data(h, (g) => g.key).join("text").attr("class", "katucharts-venn-inter-label").attr("x", (g) => g.labelX).attr("y", (g) => g.labelY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", Mt).attr("fill",
|
|
17737
|
+
const f = this.group.selectAll(".katucharts-venn-inter-label").data(h, (g) => g.key).join("text").attr("class", "katucharts-venn-inter-label").attr("x", (g) => g.labelX).attr("y", (g) => g.labelY).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", Mt).attr("fill", Ee).style("pointer-events", "none").style("text-shadow", "0 0 3px #fff, 0 0 3px #fff").attr("opacity", o ? 1 : 0);
|
|
17700
17738
|
if (f.each((g, m, x) => {
|
|
17701
17739
|
Gu(x[m], g.name, g.labelX);
|
|
17702
17740
|
}), o) {
|
|
@@ -17889,7 +17927,7 @@ class _M extends Xt {
|
|
|
17889
17927
|
blendColors(...t) {
|
|
17890
17928
|
let e = 0, i = 0, r = 0;
|
|
17891
17929
|
for (const s of t) {
|
|
17892
|
-
const a = Xe(
|
|
17930
|
+
const a = Xe(ae(s) || s);
|
|
17893
17931
|
e += a.r, i += a.g, r += a.b;
|
|
17894
17932
|
}
|
|
17895
17933
|
const o = t.length || 1;
|
|
@@ -17994,12 +18032,12 @@ class EM extends Xt {
|
|
|
17994
18032
|
renderFrame(t, e) {
|
|
17995
18033
|
if (t < 0 || t >= this.keyframes.length) return;
|
|
17996
18034
|
const { plotArea: i } = this.context, r = this.config, o = r.barsToShow ?? 12, s = r.barPadding ?? 0.1, a = CM(r.borderRadius, 3), l = r.frameDuration ?? 500, c = e ? r.transitionDuration ?? l : 0, u = i.height - 35 - 40 - 20, d = this.keyframes[t], y = [...d.values].sort((L, _) => _.value - L.value).slice(0, o), g = y.length > 0 ? y[0].value : 1;
|
|
17997
|
-
this.valueScale =
|
|
18035
|
+
this.valueScale = Ce().domain([0, g * 1.1]).range([0, i.width - 80]), this.renderAxis(c);
|
|
17998
18036
|
const m = u / o * (1 - s), x = u / o, v = (L) => L.name, b = this.barsGroup.selectAll(".katucharts-race-bar").data(y, v), k = b.enter().append("g").attr("class", "katucharts-race-bar").attr(
|
|
17999
18037
|
"transform",
|
|
18000
18038
|
(L, _) => `translate(0,${e ? u + m : _ * x})`
|
|
18001
18039
|
).style("opacity", e ? 0 : 1);
|
|
18002
|
-
k.append("rect").attr("height", m).attr("rx", a).attr("width", (L) => e ? 0 : Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), k.append("text").attr("class", "katucharts-race-label").attr("x", 6).attr("y", m / 2).attr("dy", "0.35em").attr("fill", "#fff").attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").text((L) => L.name), k.append("text").attr("class", "katucharts-race-value").attr("y", m / 2).attr("dy", "0.35em").attr("fill",
|
|
18040
|
+
k.append("rect").attr("height", m).attr("rx", a).attr("width", (L) => e ? 0 : Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), k.append("text").attr("class", "katucharts-race-label").attr("x", 6).attr("y", m / 2).attr("dy", "0.35em").attr("fill", "#fff").attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").text((L) => L.name), k.append("text").attr("class", "katucharts-race-value").attr("y", m / 2).attr("dy", "0.35em").attr("fill", Ee).attr("font-weight", "bold").attr("font-size", Mt).style("pointer-events", "none").attr("data-value", (L) => L.value).attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).text((L) => L.value.toLocaleString());
|
|
18003
18041
|
const M = k.merge(b);
|
|
18004
18042
|
c > 0 ? (M.transition().duration(c).ease(dr).attr("transform", (L, _) => `translate(0,${_ * x})`).style("opacity", 1), M.select("rect").transition().duration(c).ease(dr).attr("width", (L) => Math.max(0, this.valueScale(L.value))).attr("fill", (L) => this.colorMap.get(L.name) || "#999"), M.select(".katucharts-race-value").transition().duration(c).ease(dr).attr("x", (L) => Math.max(0, this.valueScale(L.value)) + 5).tween("text", function(L) {
|
|
18005
18043
|
const _ = this, T = parseFloat(_.getAttribute("data-value") || "0"), I = L.value;
|
|
@@ -18019,7 +18057,7 @@ class EM extends Xt {
|
|
|
18019
18057
|
const r = i;
|
|
18020
18058
|
return r >= 1e9 ? (r / 1e9).toFixed(1) + "B" : r >= 1e6 ? (r / 1e6).toFixed(1) + "M" : r >= 1e3 ? (r / 1e3).toFixed(1) + "K" : r.toString();
|
|
18021
18059
|
});
|
|
18022
|
-
t > 0 ? this.axisGroup.transition().duration(t).ease(dr).call(e) : this.axisGroup.call(e), this.axisGroup.select(".domain").remove(), this.axisGroup.selectAll(".tick line").attr("stroke", "#e0e0e0").attr("stroke-dasharray", "2,2"), this.axisGroup.selectAll(".tick text").attr("fill",
|
|
18060
|
+
t > 0 ? this.axisGroup.transition().duration(t).ease(dr).call(e) : this.axisGroup.call(e), this.axisGroup.select(".domain").remove(), this.axisGroup.selectAll(".tick line").attr("stroke", "#e0e0e0").attr("stroke-dasharray", "2,2"), this.axisGroup.selectAll(".tick text").attr("fill", Ee).attr("font-size", Mt);
|
|
18023
18061
|
}
|
|
18024
18062
|
attachBarHoverEffects(t, e) {
|
|
18025
18063
|
const i = this;
|
|
@@ -18090,7 +18128,7 @@ class TM extends Xt {
|
|
|
18090
18128
|
var _, T, I;
|
|
18091
18129
|
const { plotArea: t, colors: e } = this.context, i = this.data || [];
|
|
18092
18130
|
if (!i.length) return;
|
|
18093
|
-
const r = this.config.layout === "vertical" ? "vertical" : "horizontal", o = this.config.link || {}, s = ((_ = this.config.marker) == null ? void 0 : _.radius) ?? 6, a = o.color || "#cccccc", l = o.lineWidth ?? 1, c = this.config.layoutAlgorithm === "cluster", h = this.config.levels || [], f = this.config.dataLabels || {}, u = ((T = f.style) == null ? void 0 : T.fontSize) || Mt, d = f.color || ((I = f.style) == null ? void 0 : I.color) ||
|
|
18131
|
+
const r = this.config.layout === "vertical" ? "vertical" : "horizontal", o = this.config.link || {}, s = ((_ = this.config.marker) == null ? void 0 : _.radius) ?? 6, a = o.color || "#cccccc", l = o.lineWidth ?? 1, c = this.config.layoutAlgorithm === "cluster", h = this.config.levels || [], f = this.config.dataLabels || {}, u = ((T = f.style) == null ? void 0 : T.fontSize) || Mt, d = f.color || ((I = f.style) == null ? void 0 : I.color) || Ee, p = this.buildRoot(i);
|
|
18094
18132
|
if (!p) return;
|
|
18095
18133
|
const y = r === "horizontal" ? [t.height, t.width] : [t.width, t.height], g = c ? Tw() : ok();
|
|
18096
18134
|
g.size(y), g(p);
|
|
@@ -18137,7 +18175,7 @@ class $M extends Xt {
|
|
|
18137
18175
|
var b, k, M, C, L;
|
|
18138
18176
|
const { plotArea: t, colors: e } = this.context, i = this.data || [];
|
|
18139
18177
|
if (!i.length) return;
|
|
18140
|
-
const r = this.config.minFontSize ?? 8, o = this.config.maxFontSize ?? 50, s = this.config.rotation || {}, a = Array.isArray(s.orientations) ? s.orientations : s.from !== void 0 && s.to !== void 0 ? [s.from, s.to] : [0], l = ((k = (b = this.config.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.fontFamily) || "sans-serif", c = ((M = this.config.dataLabels) == null ? void 0 : M.color) || ((L = (C = this.config.dataLabels) == null ? void 0 : C.style) == null ? void 0 : L.color) ||
|
|
18178
|
+
const r = this.config.minFontSize ?? 8, o = this.config.maxFontSize ?? 50, s = this.config.rotation || {}, a = Array.isArray(s.orientations) ? s.orientations : s.from !== void 0 && s.to !== void 0 ? [s.from, s.to] : [0], l = ((k = (b = this.config.dataLabels) == null ? void 0 : b.style) == null ? void 0 : k.fontFamily) || "sans-serif", c = ((M = this.config.dataLabels) == null ? void 0 : M.color) || ((L = (C = this.config.dataLabels) == null ? void 0 : C.style) == null ? void 0 : L.color) || Ee, h = [...i].filter((_) => _ && _.name && typeof _.weight == "number" && _.weight > 0).sort((_, T) => T.weight - _.weight);
|
|
18141
18179
|
if (!h.length) return;
|
|
18142
18180
|
const f = h[h.length - 1].weight, u = h[0].weight, d = (_) => {
|
|
18143
18181
|
if (u === f) return (r + o) / 2;
|
|
@@ -18227,7 +18265,7 @@ class IM extends Xt {
|
|
|
18227
18265
|
C.push(W);
|
|
18228
18266
|
const U = W.append("line").attr("x1", B).attr("x2", B).attr("stroke", J.wick).attr("stroke-width", x), G = H ? z : R, N = H ? R : z, Y = e.getPixelForValue(G), O = Math.max(1, Math.abs(e.getPixelForValue(N) - e.getPixelForValue(G))), ct = W.append("rect").attr("x", B - d / 2).attr("width", d).attr("stroke", j).attr("stroke-width", x).attr("rx", 2);
|
|
18229
18267
|
if (r) {
|
|
18230
|
-
const it = e.getPixelForValue((F + D) / 2), ft =
|
|
18268
|
+
const it = e.getPixelForValue((F + D) / 2), ft = Pe(A, 0, Wt, s.length);
|
|
18231
18269
|
U.attr("y1", it).attr("y2", it).transition().duration(bt).ease(pt).delay(ft).attr("y1", e.getPixelForValue(F)).attr("y2", e.getPixelForValue(D)), ct.attr("y", it).attr("height", 0).attr("fill", X).transition().duration(bt).ease(pt).delay(ft).attr("y", Y).attr("height", O);
|
|
18232
18270
|
} else
|
|
18233
18271
|
U.attr("y1", e.getPixelForValue(F)).attr("y2", e.getPixelForValue(D)), ct.attr("y", Y).attr("height", O).attr("fill", X);
|
|
@@ -18263,7 +18301,7 @@ class IM extends Xt {
|
|
|
18263
18301
|
var a, l;
|
|
18264
18302
|
const r = this.config.dataLabels;
|
|
18265
18303
|
if (!(r != null && r.enabled)) return;
|
|
18266
|
-
const o = ((a = r.style) == null ? void 0 : a.fontSize) || Mt, s = r.color || ((l = r.style) == null ? void 0 : l.color) ||
|
|
18304
|
+
const o = ((a = r.style) == null ? void 0 : a.fontSize) || Mt, s = r.color || ((l = r.style) == null ? void 0 : l.color) || Ee;
|
|
18267
18305
|
t.forEach((c, h) => {
|
|
18268
18306
|
if (c.y === null && c.open === void 0) return;
|
|
18269
18307
|
const f = c.high ?? c.open ?? c.y ?? 0, u = e.getPixelForValue(c.x ?? h), d = i.getPixelForValue(f);
|
|
@@ -18273,7 +18311,7 @@ class IM extends Xt {
|
|
|
18273
18311
|
series: { name: this.config.name },
|
|
18274
18312
|
x: c.x,
|
|
18275
18313
|
y: c.y
|
|
18276
|
-
}) : r.format ? p =
|
|
18314
|
+
}) : r.format ? p = de(Jt(r.format, {
|
|
18277
18315
|
point: c,
|
|
18278
18316
|
series: { name: this.config.name },
|
|
18279
18317
|
x: c.x,
|
|
@@ -18332,7 +18370,7 @@ class FM extends Xt {
|
|
|
18332
18370
|
const p = o[d];
|
|
18333
18371
|
if (p.y === null && p.open === void 0) continue;
|
|
18334
18372
|
const y = p.open ?? p.y ?? 0, g = p.high ?? y, m = p.low ?? y, x = p.close ?? y, v = t.getPixelForValue(p.x ?? d), b = x >= y ? l : a, k = this.group.append("g").attr("class", "katucharts-ohlc").style("cursor", this.config.cursor || "pointer");
|
|
18335
|
-
h.push(k), r && k.attr("opacity", 0).transition().duration(bt).ease(pt).delay(
|
|
18373
|
+
h.push(k), r && k.attr("opacity", 0).transition().duration(bt).ease(pt).delay(Pe(d, 0, Wt, o.length)).attr("opacity", 1), k.append("line").attr("x1", v).attr("x2", v).attr("y1", e.getPixelForValue(g)).attr("y2", e.getPixelForValue(m)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v - s).attr("x2", v).attr("y1", e.getPixelForValue(y)).attr("y2", e.getPixelForValue(y)).attr("stroke", b).attr("stroke-width", 1.5), k.append("line").attr("x1", v).attr("x2", v + s).attr("y1", e.getPixelForValue(x)).attr("y2", e.getPixelForValue(x)).attr("stroke", b).attr("stroke-width", 1.5), this.config.enableMouseTracking !== !1 && k.on("mouseover", (M) => {
|
|
18336
18374
|
var C, L;
|
|
18337
18375
|
k.selectAll("line").interrupt("hover").transition("hover").duration(K).ease(Z).attr("stroke-width", 3), k.style("filter", "drop-shadow(0 2px 4px rgba(0,0,0,0.25))"), h.forEach((_) => _.interrupt("highlight")), h.forEach((_) => _.attr("opacity", 1)), h.forEach((_, T) => {
|
|
18338
18376
|
T !== d && _.transition("highlight").duration(K).ease(Z).attr("opacity", c);
|
|
@@ -18765,12 +18803,12 @@ class rA extends Xt {
|
|
|
18765
18803
|
super(t);
|
|
18766
18804
|
}
|
|
18767
18805
|
render() {
|
|
18768
|
-
var
|
|
18806
|
+
var ye, Je, hn, _n, rr;
|
|
18769
18807
|
const { plotArea: t, colors: e } = this.context, i = this.context.animate, r = this.config, o = this.getBaseFlowDuration();
|
|
18770
18808
|
this.group.selectAll("rect, path, text").interrupt("enter").interrupt("highlight");
|
|
18771
18809
|
const { nodes: s, links: a } = this.buildGraph();
|
|
18772
18810
|
if (s.length === 0) return;
|
|
18773
|
-
const l = t.width < tA, c = t.width < eA, h = t.width < nA, f = r.nodeWidth, u = f === "auto", d = s.map((V) => typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : null).filter((V) => V !== null), p = d.length > 0, y = p ? Math.max(...d) : 0, g = typeof r.nodePadding == "number" ? r.nodePadding : l ? Math.max(4, Math.min(10, t.height / 40)) : 10, m = r.linkOpacity ?? 0.4, x = r.colorByPoint !== !1, v = r.minLinkWidth ?? 1, b = r.borderWidth ?? 0, k = r.borderColor ?? "none", M = r.levels || [], C = this.config.dataLabels || {}, L = C.enabled !== !1, _ = ((
|
|
18811
|
+
const l = t.width < tA, c = t.width < eA, h = t.width < nA, f = r.nodeWidth, u = f === "auto", d = s.map((V) => typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : null).filter((V) => V !== null), p = d.length > 0, y = p ? Math.max(...d) : 0, g = typeof r.nodePadding == "number" ? r.nodePadding : l ? Math.max(4, Math.min(10, t.height / 40)) : 10, m = r.linkOpacity ?? 0.4, x = r.colorByPoint !== !1, v = r.minLinkWidth ?? 1, b = r.borderWidth ?? 0, k = r.borderColor ?? "none", M = r.levels || [], C = this.config.dataLabels || {}, L = C.enabled !== !1, _ = ((ye = C.style) == null ? void 0 : ye.fontSize) || Mt, T = iA(_), I = c ? Math.min(T, 10) : l ? Math.min(T, 12) : T, E = `${I}px`, P = C.color || ((Je = C.style) == null ? void 0 : Je.color) || this.autoLabelColor(), S = I * 0.62, w = (V) => C.formatter ? String(C.formatter.call({
|
|
18774
18812
|
point: { name: V.name || V.id, y: V.value },
|
|
18775
18813
|
series: { name: this.config.name },
|
|
18776
18814
|
x: V.name || V.id,
|
|
@@ -18781,13 +18819,13 @@ class rA extends Xt {
|
|
|
18781
18819
|
const Lt = Math.floor(tt / S) - 1;
|
|
18782
18820
|
return Lt < lt ? "" : Lt >= V.length ? V : V.slice(0, Lt) + "…";
|
|
18783
18821
|
}, R = r.nodeAlignment === "left" ? zM : _p, D = h ? 5 : c ? 8 : l ? 10 : 14, z = typeof f == "number" ? f : 20, B = (V, tt, lt, St) => {
|
|
18784
|
-
const Lt = Math.max(tt + St + 20, t.width - lt),
|
|
18785
|
-
for (const
|
|
18786
|
-
if (
|
|
18787
|
-
const yn =
|
|
18788
|
-
|
|
18822
|
+
const Lt = Math.max(tt + St + 20, t.width - lt), $e = WM().nodeId((ge) => ge.id).nodeAlign(R).nodeWidth(St).nodePadding(V).extent([[tt, 0], [Lt, t.height]]), xe = $e({ nodes: [...s], links: [...a] });
|
|
18823
|
+
for (const ge of xe.nodes)
|
|
18824
|
+
if (ge.x0 < tt) {
|
|
18825
|
+
const yn = ge.x1 - ge.x0;
|
|
18826
|
+
ge.x0 = tt, ge.x1 = tt + yn;
|
|
18789
18827
|
}
|
|
18790
|
-
return { gen:
|
|
18828
|
+
return { gen: $e, graph: xe };
|
|
18791
18829
|
};
|
|
18792
18830
|
let H = z;
|
|
18793
18831
|
const J = B(g, 0, 0, H), X = (V) => p && typeof V.column == "number" && Number.isFinite(V.column) ? Math.max(0, Math.floor(V.column)) : V.layer ?? V.depth ?? 0, j = p ? y : J.graph.nodes.reduce((V, tt) => Math.max(V, tt.depth ?? 0), 0), W = J.graph.nodes.reduce((V, tt) => Math.min(V, tt.x0 ?? 1 / 0), 1 / 0), U = p ? J.graph.nodes.filter((V) => X(V) === 0) : J.graph.nodes.filter((V) => (V.x0 ?? 1 / 0) <= W + 0.5), G = L ? Math.max(0, ...U.map((V) => A(w(V)))) : 0, N = L && l ? Math.min(Math.floor(t.width * 0.08), Math.max(0, G * 0.18)) : 0, Y = L && !h, O = 0, ct = Math.max(1, t.width - N - O), it = Math.max(j, 0);
|
|
@@ -18837,69 +18875,69 @@ class rA extends Xt {
|
|
|
18837
18875
|
const tt = X(V.source);
|
|
18838
18876
|
Vt.has(tt) || Vt.set(tt, []), Vt.get(tt).push(V);
|
|
18839
18877
|
}
|
|
18840
|
-
const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22),
|
|
18841
|
-
(
|
|
18878
|
+
const Nt = q.nodes.reduce((V, tt) => Math.max(V, X(tt)), 0), Ot = Math.round(o * 0.22), Zt = Ot, ne = Zt, Tt = Nt * ne + Ot + Zt, Kt = r.centerNodes === !0, le = r.spreadFactor ?? 1;
|
|
18879
|
+
(Kt || le !== 1) && this.centerAndSpreadNodes(q, ot, t.height, le, Ct);
|
|
18842
18880
|
const Ve = /* @__PURE__ */ new Map();
|
|
18843
18881
|
for (const V of M)
|
|
18844
18882
|
V.level !== void 0 && Ve.set(V.level, V);
|
|
18845
|
-
const
|
|
18883
|
+
const he = (V) => {
|
|
18846
18884
|
const tt = V.source ? X(V.source) : void 0, lt = tt !== void 0 ? Ve.get(tt) : void 0;
|
|
18847
18885
|
return (lt == null ? void 0 : lt.linkOpacity) ?? m;
|
|
18848
18886
|
}, mn = QM(), Vn = (V) => {
|
|
18849
18887
|
if (!c) return mn(V);
|
|
18850
|
-
const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1,
|
|
18851
|
-
if (!Number.isFinite(
|
|
18888
|
+
const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, $e = lt - tt;
|
|
18889
|
+
if (!Number.isFinite($e) || !Number.isFinite(St) || !Number.isFinite(Lt))
|
|
18852
18890
|
return mn(V);
|
|
18853
|
-
if (
|
|
18891
|
+
if ($e <= 14)
|
|
18854
18892
|
return `M${tt},${St}L${lt},${Lt}`;
|
|
18855
|
-
if (
|
|
18856
|
-
const
|
|
18857
|
-
return `M${tt},${St}C${tt +
|
|
18893
|
+
if ($e < 28) {
|
|
18894
|
+
const xe = Math.max(2, $e * 0.35);
|
|
18895
|
+
return `M${tt},${St}C${tt + xe},${St} ${lt - xe},${Lt} ${lt},${Lt}`;
|
|
18858
18896
|
}
|
|
18859
18897
|
return mn(V);
|
|
18860
|
-
},
|
|
18861
|
-
const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1,
|
|
18862
|
-
if (!Number.isFinite(
|
|
18898
|
+
}, ze = c, Ze = ze ? (V) => {
|
|
18899
|
+
const tt = V.source.x1, lt = V.target.x0, St = V.y0, Lt = V.y1, $e = lt - tt, xe = Math.max(v, V.width) / 2;
|
|
18900
|
+
if (!Number.isFinite($e) || !Number.isFinite(St) || !Number.isFinite(Lt))
|
|
18863
18901
|
return Vn(V);
|
|
18864
|
-
const
|
|
18865
|
-
return
|
|
18866
|
-
`M${tt},${
|
|
18902
|
+
const ge = St - xe, yn = St + xe, or = Lt - xe, Gn = Lt + xe, Cn = Math.max(1, $e * 0.42);
|
|
18903
|
+
return $e <= 2 ? [
|
|
18904
|
+
`M${tt},${ge}`,
|
|
18867
18905
|
`L${lt},${or}`,
|
|
18868
18906
|
`L${lt},${Gn}`,
|
|
18869
18907
|
`L${tt},${yn}`,
|
|
18870
18908
|
"Z"
|
|
18871
18909
|
].join("") : [
|
|
18872
|
-
`M${tt},${
|
|
18873
|
-
`C${tt + Cn},${
|
|
18910
|
+
`M${tt},${ge}`,
|
|
18911
|
+
`C${tt + Cn},${ge} ${lt - Cn},${or} ${lt},${or}`,
|
|
18874
18912
|
`L${lt},${Gn}`,
|
|
18875
18913
|
`C${lt - Cn},${Gn} ${tt + Cn},${yn} ${tt},${yn}`,
|
|
18876
18914
|
"Z"
|
|
18877
18915
|
].join("");
|
|
18878
|
-
} : Vn, Ge =
|
|
18916
|
+
} : Vn, Ge = ze ? "fill-opacity" : "stroke-opacity", Ye = r.linkColorMode ?? "from", er = (V) => V.source.color || e[q.nodes.indexOf(V.source) % e.length] || "#aaa", nr = (V) => V.target.color || e[q.nodes.indexOf(V.target) % e.length] || "#aaa", ir = this.group.append("defs"), et = `katucharts-sankey-clip-${this.config.index}-${Math.random().toString(36).slice(2, 8)}`;
|
|
18879
18917
|
ir.append("clipPath").attr("id", et).append("rect").attr("x", 0).attr("y", 0).attr("width", t.width).attr("height", t.height);
|
|
18880
18918
|
const nt = this.group.append("g").attr("class", "katucharts-sankey-clipped-layer").attr("clip-path", `url(#${et})`), ht = nt.append("g").attr("class", "katucharts-sankey-links"), vt = nt.append("g").attr("class", "katucharts-sankey-nodes"), mt = nt.append("g").attr("class", "katucharts-sankey-link-hitareas");
|
|
18881
18919
|
let gt = null;
|
|
18882
18920
|
Ye === "gradient" && (gt = ir);
|
|
18883
18921
|
let Q = null;
|
|
18884
|
-
const $t = 0.55, Ft = 0.25, yt = ht.selectAll(".katucharts-sankey-link").data(q.links).join("path").attr("class", "katucharts-sankey-link").attr("d", Ze).attr("fill",
|
|
18922
|
+
const $t = 0.55, Ft = 0.25, yt = ht.selectAll(".katucharts-sankey-link").data(q.links).join("path").attr("class", "katucharts-sankey-link").attr("d", Ze).attr("fill", ze ? "#aaa" : "none").attr("stroke", ze ? "none" : "#aaa").attr("stroke-width", (V) => ze ? null : Math.max(v, V.width)).attr("stroke-linecap", "butt").style("cursor", "pointer");
|
|
18885
18923
|
Ye === "gradient" && gt ? yt.each(function(V, tt) {
|
|
18886
18924
|
const lt = `katucharts-sankey-grad-${tt}-${Math.random().toString(36).slice(2, 6)}`;
|
|
18887
18925
|
gt.append("linearGradient").attr("id", lt).attr("gradientUnits", "userSpaceOnUse").attr("x1", V.source.x1).attr("x2", V.target.x0).selectAll("stop").data([
|
|
18888
18926
|
{ offset: "0%", color: er(V) },
|
|
18889
18927
|
{ offset: "100%", color: nr(V) }
|
|
18890
|
-
]).join("stop").attr("offset", (St) => St.offset).attr("stop-color", (St) => St.color), rt(this).attr(
|
|
18891
|
-
}) : Ye === "to" ? yt.attr(
|
|
18892
|
-
const tt = X(V.source), St = (Vt.get(tt) || []).indexOf(V), Lt = tt *
|
|
18893
|
-
rt(this).transition("enter").duration(
|
|
18894
|
-
}) : yt.attr(Ge, (V) =>
|
|
18928
|
+
]).join("stop").attr("offset", (St) => St.offset).attr("stop-color", (St) => St.color), rt(this).attr(ze ? "fill" : "stroke", `url(#${lt})`);
|
|
18929
|
+
}) : Ye === "to" ? yt.attr(ze ? "fill" : "stroke", (V) => nr(V)) : yt.attr(ze ? "fill" : "stroke", (V) => er(V)), i && !h ? l ? yt.attr(Ge, 0).each(function(V) {
|
|
18930
|
+
const tt = X(V.source), St = (Vt.get(tt) || []).indexOf(V), Lt = tt * ne + Ot - 60 + Math.min(St * 12, 60);
|
|
18931
|
+
rt(this).transition("enter").duration(Zt).delay(Lt).ease(pt).attr(Ge, he(V));
|
|
18932
|
+
}) : yt.attr(Ge, (V) => he(V)).each(function(V) {
|
|
18895
18933
|
var yn;
|
|
18896
18934
|
const tt = this, lt = ((yn = tt.getTotalLength) == null ? void 0 : yn.call(tt)) || 0;
|
|
18897
18935
|
if (lt === 0) return;
|
|
18898
|
-
const St = X(V.source),
|
|
18899
|
-
rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(
|
|
18936
|
+
const St = X(V.source), $e = (Vt.get(St) || []).indexOf(V), ge = St * ne + Ot - 60 + Math.min($e * 12, 60);
|
|
18937
|
+
rt(this).attr("stroke-dasharray", `${lt} ${lt}`).attr("stroke-dashoffset", lt).transition("enter").duration(Zt).delay(ge).ease(pt).attr("stroke-dashoffset", 0).on("end", function() {
|
|
18900
18938
|
rt(this).attr("stroke-dasharray", null).attr("stroke-dashoffset", null);
|
|
18901
18939
|
});
|
|
18902
|
-
}) : yt.attr(Ge, (V) =>
|
|
18940
|
+
}) : yt.attr(Ge, (V) => he(V));
|
|
18903
18941
|
const qt = (V, tt, lt) => {
|
|
18904
18942
|
const St = {
|
|
18905
18943
|
name: `${lt.source.name} → ${lt.target.name}`,
|
|
@@ -18937,21 +18975,21 @@ class rA extends Xt {
|
|
|
18937
18975
|
event: tt
|
|
18938
18976
|
});
|
|
18939
18977
|
}, Bt = (V, tt) => {
|
|
18940
|
-
const lt =
|
|
18941
|
-
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) :
|
|
18978
|
+
const lt = he(tt);
|
|
18979
|
+
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.attr(Ge, (St) => St === tt ? Math.min(lt + 0.3, 1) : he(St)), yt.filter((St) => St !== tt).transition("highlight").duration(K).ease(Z).attr(Ge, lt * 0.375), Ht.attr("opacity", 1), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (St) => St === tt.source || St === tt.target ? 1 : Ft), qt("mouseover", V, tt);
|
|
18942
18980
|
}, Ut = (V, tt) => {
|
|
18943
|
-
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) =>
|
|
18944
|
-
},
|
|
18981
|
+
yt.interrupt("highlight"), Ht.interrupt("highlight"), Q == null || Q.interrupt("highlight"), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), qt("mouseout", V, tt);
|
|
18982
|
+
}, Qt = (V, tt) => {
|
|
18945
18983
|
qt("click", V, tt);
|
|
18946
18984
|
};
|
|
18947
|
-
yt.on("mouseover", Bt).on("mouseout", Ut).on("click",
|
|
18985
|
+
yt.on("mouseover", Bt).on("mouseout", Ut).on("click", Qt);
|
|
18948
18986
|
const Ht = vt.selectAll(".katucharts-sankey-node").data(q.nodes).join("rect").attr("class", "katucharts-sankey-node").attr("x", (V) => V.x0).attr("y", (V) => V.y0).attr("width", (V) => V.x1 - V.x0).attr("height", (V) => Math.max(1, V.y1 - V.y0)).attr("fill", (V, tt) => {
|
|
18949
18987
|
if (V.color) return V.color;
|
|
18950
18988
|
const lt = Ve.get(X(V));
|
|
18951
18989
|
return lt != null && lt.color ? lt.color : x ? e[tt % e.length] : r.color || e[0];
|
|
18952
18990
|
}).attr("stroke", k).attr("stroke-width", b).attr("rx", 4).style("cursor", "pointer");
|
|
18953
18991
|
i && !h && Ht.attr("opacity", 0).attr("x", (V) => V.x0 - (c ? 4 : 10)).each(function(V) {
|
|
18954
|
-
const tt = X(V), St = (_t.get(tt) || []).indexOf(V), Lt = tt *
|
|
18992
|
+
const tt = X(V), St = (_t.get(tt) || []).indexOf(V), Lt = tt * ne + Math.min(St * 20, 80);
|
|
18955
18993
|
rt(this).transition("enter").duration(Ot).delay(Lt).ease(pt).attr("opacity", 1).attr("x", V.x0);
|
|
18956
18994
|
});
|
|
18957
18995
|
const Ke = (V, tt) => {
|
|
@@ -18961,7 +18999,7 @@ class rA extends Xt {
|
|
|
18961
18999
|
Lt.source === tt ? lt.add(Lt.target) : Lt.target === tt && lt.add(Lt.source);
|
|
18962
19000
|
Ht.attr("opacity", 1), Ht.filter((Lt) => !lt.has(Lt)).transition("highlight").duration(K).ease(Z).attr("opacity", $t), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", (Lt) => lt.has(Lt) ? 1 : Ft), yt.transition("highlight").duration(K).ease(Z).attr(
|
|
18963
19001
|
Ge,
|
|
18964
|
-
(Lt) => Lt.source === tt || Lt.target === tt ? Math.min(
|
|
19002
|
+
(Lt) => Lt.source === tt || Lt.target === tt ? Math.min(he(Lt) + 0.3, 1) : he(Lt) * 0.375
|
|
18965
19003
|
);
|
|
18966
19004
|
const St = { name: tt.name || tt.id, y: tt.value, sum: tt.value };
|
|
18967
19005
|
this.context.events.emit("point:mouseover", {
|
|
@@ -18972,14 +19010,14 @@ class rA extends Xt {
|
|
|
18972
19010
|
plotX: (tt.x0 + tt.x1) / 2,
|
|
18973
19011
|
plotY: (tt.y0 + tt.y1) / 2
|
|
18974
19012
|
});
|
|
18975
|
-
},
|
|
18976
|
-
Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) =>
|
|
19013
|
+
}, Te = (V, tt) => {
|
|
19014
|
+
Ht.filter((lt) => lt === tt).style("filter", ""), Ht.interrupt("highlight"), yt.interrupt("highlight"), Q == null || Q.interrupt("highlight"), Ht.transition("highlight").duration(K).ease(Z).attr("opacity", 1), Q == null || Q.transition("highlight").duration(K).ease(Z).attr("opacity", 1), yt.transition("highlight").duration(K).ease(Z).attr(Ge, (lt) => he(lt)), this.context.events.emit("point:mouseout", {
|
|
18977
19015
|
point: { name: tt.name || tt.id, y: tt.value, sum: tt.value },
|
|
18978
19016
|
index: q.nodes.indexOf(tt),
|
|
18979
19017
|
series: this,
|
|
18980
19018
|
event: V
|
|
18981
19019
|
});
|
|
18982
|
-
},
|
|
19020
|
+
}, Oe = (V, tt) => {
|
|
18983
19021
|
this.context.events.emit("point:click", {
|
|
18984
19022
|
point: { name: tt.name || tt.id, y: tt.value },
|
|
18985
19023
|
index: q.nodes.indexOf(tt),
|
|
@@ -18987,18 +19025,18 @@ class rA extends Xt {
|
|
|
18987
19025
|
event: V
|
|
18988
19026
|
});
|
|
18989
19027
|
};
|
|
18990
|
-
if (Ht.on("mouseover", Ke).on("mouseout",
|
|
18991
|
-
const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5,
|
|
19028
|
+
if (Ht.on("mouseover", Ke).on("mouseout", Te).on("click", Oe), mt.selectAll(".katucharts-sankey-link-hitarea").data(q.links).join("path").attr("class", "katucharts-sankey-link-hitarea").attr("d", Vn).attr("fill", "none").attr("stroke", "transparent").attr("stroke-linecap", "round").attr("stroke-width", (V) => Math.max(16, Math.max(v, V.width) + 10)).style("cursor", "pointer").on("mouseover", Bt).on("mouseout", Ut).on("click", Qt), L) {
|
|
19029
|
+
const V = this.group.append("g").attr("class", "katucharts-sankey-labels"), tt = Math.max(6, I * 0.6), lt = q.nodes.reduce((ut, Et) => Math.max(ut, Et.x0 ?? 0), 0), St = q.nodes.reduce((ut, Et) => Math.min(ut, Et.x0 ?? 1 / 0), 1 / 0), Lt = (ut) => p ? X(ut) === Nt : lt > 0 && (ut.x0 ?? 0) >= lt - 0.5, $e = (ut) => p ? X(ut) === 0 : Number.isFinite(St) && (ut.x0 ?? 0) <= St + 0.5, xe = (ut) => Y && Lt(ut) || $e(ut), ge = /* @__PURE__ */ new Map();
|
|
18992
19030
|
for (const ut of q.nodes) {
|
|
18993
19031
|
const Et = ut.y1 - ut.y0;
|
|
18994
|
-
if (!
|
|
18995
|
-
|
|
19032
|
+
if (!xe(ut) && Et < tt) {
|
|
19033
|
+
ge.set(ut, "");
|
|
18996
19034
|
continue;
|
|
18997
19035
|
}
|
|
18998
|
-
|
|
19036
|
+
ge.set(ut, w(ut));
|
|
18999
19037
|
}
|
|
19000
|
-
const yn = (ut) =>
|
|
19001
|
-
Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", or).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (rr = C.style) != null && rr.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout",
|
|
19038
|
+
const yn = (ut) => xe(ut) ? Lt(ut) ? "end" : "start" : "middle", or = (ut) => xe(ut) ? Lt(ut) ? ut.x0 - 4 + (C.x ?? 0) : ut.x1 + 4 + (C.x ?? 0) : (ut.x0 + ut.x1) / 2 + (C.x ?? 0);
|
|
19039
|
+
Q = V.selectAll(".katucharts-sankey-label").data(q.nodes).join("text").attr("class", "katucharts-sankey-label").attr("x", or).attr("y", (ut) => (ut.y0 + ut.y1) / 2 + (C.y ?? 0)).attr("dy", "0.35em").attr("text-anchor", yn).attr("font-size", E).attr("font-weight", ((hn = C.style) == null ? void 0 : hn.fontWeight) ?? 600).attr("fill", P).attr("paint-order", "stroke").attr("stroke", (_n = C.style) != null && _n.textOutline ? null : this.labelHaloColor()).attr("stroke-width", (rr = C.style) != null && rr.textOutline ? null : 2).attr("stroke-linejoin", "round").style("pointer-events", "auto").style("cursor", "pointer").on("mouseover", Ke).on("mouseout", Te).on("click", Oe).text((ut) => ge.get(ut) ?? "");
|
|
19002
19040
|
const Gn = /* @__PURE__ */ new Map(), Cn = /* @__PURE__ */ new Map();
|
|
19003
19041
|
for (const ut of q.nodes) {
|
|
19004
19042
|
const Et = X(ut);
|
|
@@ -19006,10 +19044,10 @@ class rA extends Xt {
|
|
|
19006
19044
|
}
|
|
19007
19045
|
Q.each(function(ut) {
|
|
19008
19046
|
const Et = this;
|
|
19009
|
-
let
|
|
19010
|
-
if (!
|
|
19011
|
-
const xn = A(
|
|
19012
|
-
if (
|
|
19047
|
+
let ie = Et.textContent;
|
|
19048
|
+
if (!ie) return;
|
|
19049
|
+
const xn = A(ie);
|
|
19050
|
+
if (xe(ut)) {
|
|
19013
19051
|
const bl = X(ut), vl = I * 0.75;
|
|
19014
19052
|
let ar;
|
|
19015
19053
|
if (Lt(ut)) {
|
|
@@ -19023,18 +19061,18 @@ class rA extends Xt {
|
|
|
19023
19061
|
Et.textContent = "";
|
|
19024
19062
|
return;
|
|
19025
19063
|
}
|
|
19026
|
-
xn > ar && (
|
|
19064
|
+
xn > ar && (ie = $(ie, ar, 1), Et.textContent = ie);
|
|
19027
19065
|
return;
|
|
19028
19066
|
}
|
|
19029
19067
|
const ei = (ut.x0 + ut.x1) / 2, Yn = ei - xn / 2, Si = ei + xn / 2;
|
|
19030
19068
|
if (Si <= t.width && Yn >= 0) return;
|
|
19031
19069
|
const sr = X(ut), $p = Gn.get(sr + 1) ?? t.width, Lp = Cn.get(sr - 1) ?? 0, Ts = $p - ut.x1 - 4, $s = ut.x0 - Lp - 4;
|
|
19032
19070
|
if (Yn < 0 && Ts > I * 1.5) {
|
|
19033
|
-
Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Ts && (Et.textContent = $(
|
|
19071
|
+
Et.setAttribute("text-anchor", "start"), Et.setAttribute("x", String(ut.x1 + 2)), xn > Ts && (Et.textContent = $(ie, Ts));
|
|
19034
19072
|
return;
|
|
19035
19073
|
}
|
|
19036
19074
|
if (Si > t.width && $s > I * 1.5) {
|
|
19037
|
-
Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > $s && (Et.textContent = $(
|
|
19075
|
+
Et.setAttribute("text-anchor", "end"), Et.setAttribute("x", String(ut.x0 - 2)), xn > $s && (Et.textContent = $(ie, $s));
|
|
19038
19076
|
return;
|
|
19039
19077
|
}
|
|
19040
19078
|
const xl = 2 * Math.min(ei, t.width - ei) - 4;
|
|
@@ -19042,7 +19080,7 @@ class rA extends Xt {
|
|
|
19042
19080
|
Et.textContent = "";
|
|
19043
19081
|
return;
|
|
19044
19082
|
}
|
|
19045
|
-
Et.textContent = $(
|
|
19083
|
+
Et.textContent = $(ie, xl);
|
|
19046
19084
|
});
|
|
19047
19085
|
const ml = [], Ep = [...q.nodes].sort((ut, Et) => (Et.value ?? 0) - (ut.value ?? 0)), yl = /* @__PURE__ */ new Map();
|
|
19048
19086
|
Q.each(function(ut) {
|
|
@@ -19053,24 +19091,24 @@ class rA extends Xt {
|
|
|
19053
19091
|
if (C.allowOverlap === !0) break;
|
|
19054
19092
|
const Et = yl.get(ut);
|
|
19055
19093
|
if (!Et || !Et.textContent) continue;
|
|
19056
|
-
let
|
|
19094
|
+
let ie;
|
|
19057
19095
|
try {
|
|
19058
|
-
|
|
19096
|
+
ie = Et.getBBox();
|
|
19059
19097
|
} catch {
|
|
19060
19098
|
const Yn = A(Et.textContent || ""), Si = Number(Et.getAttribute("x") || 0), sr = Et.getAttribute("text-anchor");
|
|
19061
|
-
|
|
19099
|
+
ie = {
|
|
19062
19100
|
x: sr === "end" ? Si - Yn : sr === "middle" ? Si - Yn / 2 : Si,
|
|
19063
19101
|
y: Number(Et.getAttribute("y") || 0) - I / 2,
|
|
19064
19102
|
width: Yn,
|
|
19065
19103
|
height: I
|
|
19066
19104
|
};
|
|
19067
19105
|
}
|
|
19068
|
-
if (
|
|
19106
|
+
if (ie.width === 0 && ie.height === 0) continue;
|
|
19069
19107
|
const xn = {
|
|
19070
|
-
left:
|
|
19071
|
-
right:
|
|
19072
|
-
top:
|
|
19073
|
-
bottom:
|
|
19108
|
+
left: ie.x,
|
|
19109
|
+
right: ie.x + ie.width,
|
|
19110
|
+
top: ie.y,
|
|
19111
|
+
bottom: ie.y + ie.height
|
|
19074
19112
|
};
|
|
19075
19113
|
if (ml.some((Yn) => Tp(Yn, xn)) && C.overflow !== "allow") {
|
|
19076
19114
|
Et.textContent = "";
|
|
@@ -19079,7 +19117,7 @@ class rA extends Xt {
|
|
|
19079
19117
|
ml.push(xn);
|
|
19080
19118
|
}
|
|
19081
19119
|
i && !h && Q.attr("opacity", 0).each(function(ut) {
|
|
19082
|
-
const Et = X(ut), xn = (_t.get(Et) || []).indexOf(ut), ei = Et *
|
|
19120
|
+
const Et = X(ut), xn = (_t.get(Et) || []).indexOf(ut), ei = Et * ne + Ot - 80 + Math.min(xn * 20, 80);
|
|
19083
19121
|
rt(this).transition("enter").duration(Ot).delay(ei).ease(pt).attr("opacity", 1);
|
|
19084
19122
|
});
|
|
19085
19123
|
}
|
|
@@ -19263,20 +19301,20 @@ function lA() {
|
|
|
19263
19301
|
function hA(n) {
|
|
19264
19302
|
return arguments.length ? this.cover(+n[0][0], +n[0][1]).cover(+n[1][0], +n[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
|
|
19265
19303
|
}
|
|
19266
|
-
function
|
|
19304
|
+
function Fe(n, t, e, i, r) {
|
|
19267
19305
|
this.node = n, this.x0 = t, this.y0 = e, this.x1 = i, this.y1 = r;
|
|
19268
19306
|
}
|
|
19269
19307
|
function uA(n, t, e) {
|
|
19270
19308
|
var i, r = this._x0, o = this._y0, s, a, l, c, h = this._x1, f = this._y1, u = [], d = this._root, p, y;
|
|
19271
|
-
for (d && u.push(new
|
|
19309
|
+
for (d && u.push(new Fe(d, r, o, h, f)), e == null ? e = 1 / 0 : (r = n - e, o = t - e, h = n + e, f = t + e, e *= e); p = u.pop(); )
|
|
19272
19310
|
if (!(!(d = p.node) || (s = p.x0) > h || (a = p.y0) > f || (l = p.x1) < r || (c = p.y1) < o))
|
|
19273
19311
|
if (d.length) {
|
|
19274
19312
|
var g = (s + l) / 2, m = (a + c) / 2;
|
|
19275
19313
|
u.push(
|
|
19276
|
-
new
|
|
19277
|
-
new
|
|
19278
|
-
new
|
|
19279
|
-
new
|
|
19314
|
+
new Fe(d[3], g, m, l, c),
|
|
19315
|
+
new Fe(d[2], s, m, g, c),
|
|
19316
|
+
new Fe(d[1], g, a, l, m),
|
|
19317
|
+
new Fe(d[0], s, a, g, m)
|
|
19280
19318
|
), (y = (t >= m) << 1 | n >= g) && (p = u[u.length - 1], u[u.length - 1] = u[u.length - 1 - y], u[u.length - 1 - y] = p);
|
|
19281
19319
|
} else {
|
|
19282
19320
|
var x = n - +this._x.call(null, d.data), v = t - +this._y.call(null, d.data), b = x * x + v * v;
|
|
@@ -19316,20 +19354,20 @@ function gA() {
|
|
|
19316
19354
|
}
|
|
19317
19355
|
function mA(n) {
|
|
19318
19356
|
var t = [], e, i = this._root, r, o, s, a, l;
|
|
19319
|
-
for (i && t.push(new
|
|
19357
|
+
for (i && t.push(new Fe(i, this._x0, this._y0, this._x1, this._y1)); e = t.pop(); )
|
|
19320
19358
|
if (!n(i = e.node, o = e.x0, s = e.y0, a = e.x1, l = e.y1) && i.length) {
|
|
19321
19359
|
var c = (o + a) / 2, h = (s + l) / 2;
|
|
19322
|
-
(r = i[3]) && t.push(new
|
|
19360
|
+
(r = i[3]) && t.push(new Fe(r, c, h, a, l)), (r = i[2]) && t.push(new Fe(r, o, h, c, l)), (r = i[1]) && t.push(new Fe(r, c, s, a, h)), (r = i[0]) && t.push(new Fe(r, o, s, c, h));
|
|
19323
19361
|
}
|
|
19324
19362
|
return this;
|
|
19325
19363
|
}
|
|
19326
19364
|
function yA(n) {
|
|
19327
19365
|
var t = [], e = [], i;
|
|
19328
|
-
for (this._root && t.push(new
|
|
19366
|
+
for (this._root && t.push(new Fe(this._root, this._x0, this._y0, this._x1, this._y1)); i = t.pop(); ) {
|
|
19329
19367
|
var r = i.node;
|
|
19330
19368
|
if (r.length) {
|
|
19331
19369
|
var o, s = i.x0, a = i.y0, l = i.x1, c = i.y1, h = (s + l) / 2, f = (a + c) / 2;
|
|
19332
|
-
(o = r[0]) && t.push(new
|
|
19370
|
+
(o = r[0]) && t.push(new Fe(o, s, a, h, f)), (o = r[1]) && t.push(new Fe(o, h, a, l, f)), (o = r[2]) && t.push(new Fe(o, s, f, h, c)), (o = r[3]) && t.push(new Fe(o, h, f, l, c));
|
|
19333
19371
|
}
|
|
19334
19372
|
e.push(i);
|
|
19335
19373
|
}
|
|
@@ -19360,8 +19398,8 @@ function Ku(n) {
|
|
|
19360
19398
|
for (var t = { data: n.data }, e = t; n = n.next; ) e = e.next = { data: n.data };
|
|
19361
19399
|
return t;
|
|
19362
19400
|
}
|
|
19363
|
-
var
|
|
19364
|
-
|
|
19401
|
+
var De = pl.prototype = gl.prototype;
|
|
19402
|
+
De.copy = function() {
|
|
19365
19403
|
var n = new gl(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, e, i;
|
|
19366
19404
|
if (!t) return n;
|
|
19367
19405
|
if (!t.length) return n._root = Ku(t), n;
|
|
@@ -19370,20 +19408,20 @@ Re.copy = function() {
|
|
|
19370
19408
|
(i = t.source[r]) && (i.length ? e.push({ source: i, target: t.target[r] = new Array(4) }) : t.target[r] = Ku(i));
|
|
19371
19409
|
return n;
|
|
19372
19410
|
};
|
|
19373
|
-
|
|
19374
|
-
|
|
19375
|
-
|
|
19376
|
-
|
|
19377
|
-
|
|
19378
|
-
|
|
19379
|
-
|
|
19380
|
-
|
|
19381
|
-
|
|
19382
|
-
|
|
19383
|
-
|
|
19384
|
-
|
|
19385
|
-
|
|
19386
|
-
|
|
19411
|
+
De.add = sA;
|
|
19412
|
+
De.addAll = aA;
|
|
19413
|
+
De.cover = cA;
|
|
19414
|
+
De.data = lA;
|
|
19415
|
+
De.extent = hA;
|
|
19416
|
+
De.find = uA;
|
|
19417
|
+
De.remove = fA;
|
|
19418
|
+
De.removeAll = dA;
|
|
19419
|
+
De.root = pA;
|
|
19420
|
+
De.size = gA;
|
|
19421
|
+
De.visit = mA;
|
|
19422
|
+
De.visitAfter = yA;
|
|
19423
|
+
De.x = bA;
|
|
19424
|
+
De.y = wA;
|
|
19387
19425
|
function mi(n) {
|
|
19388
19426
|
return function() {
|
|
19389
19427
|
return n;
|
|
@@ -19836,15 +19874,15 @@ class WA extends Xt {
|
|
|
19836
19874
|
if (E.length === 0) return;
|
|
19837
19875
|
const w = (r.nodePadding ?? 2) / (_ > 0 ? _ : 1), $ = OA().padAngle(w).sortSubgroups(null)(I);
|
|
19838
19876
|
this.normalizeChordWidths($), this.sortChordEndpoints($);
|
|
19839
|
-
const R =
|
|
19840
|
-
const nt = T, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt),
|
|
19841
|
-
let
|
|
19842
|
-
|
|
19843
|
-
const
|
|
19877
|
+
const R = Se().innerRadius(T).outerRadius(_).cornerRadius(3), F = Se().innerRadius(T).outerRadius(_ + 4).cornerRadius(3), D = r.curveFactor ?? 0.05, z = (et) => {
|
|
19878
|
+
const nt = T, ht = et.source.startAngle + p - Math.PI / 2, vt = et.source.endAngle + p - Math.PI / 2, mt = et.target.startAngle + p - Math.PI / 2, gt = et.target.endAngle + p - Math.PI / 2, Q = nt * Math.cos(ht), $t = nt * Math.sin(ht), Ft = nt * Math.cos(vt), yt = nt * Math.sin(vt), qt = nt * Math.cos(mt), Bt = nt * Math.sin(mt), Ut = nt * Math.cos(gt), Qt = nt * Math.sin(gt), Ht = Math.abs(vt - ht) > Math.PI ? 1 : 0, Ke = Math.abs(gt - mt) > Math.PI ? 1 : 0;
|
|
19879
|
+
let Te = Math.abs(mt - vt);
|
|
19880
|
+
Te > Math.PI && (Te = 2 * Math.PI - Te);
|
|
19881
|
+
const Oe = Te / Math.PI, ye = nt * Math.max(D, (1 - Oe) * (1 - Oe) * (1 - Oe));
|
|
19844
19882
|
let Je = Math.abs(ht - gt);
|
|
19845
19883
|
Je > Math.PI && (Je = 2 * Math.PI - Je);
|
|
19846
19884
|
const hn = Je / Math.PI, _n = nt * Math.max(D, (1 - hn) * (1 - hn) * (1 - hn));
|
|
19847
|
-
return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${
|
|
19885
|
+
return `M${Q},${$t}A${nt},${nt},0,${Ht},1,${Ft},${yt}C${ye * Math.cos(vt)},${ye * Math.sin(vt)},${ye * Math.cos(mt)},${ye * Math.sin(mt)},${qt},${Bt}A${nt},${nt},0,${Ke},1,${Ut},${Qt}C${_n * Math.cos(gt)},${_n * Math.sin(gt)},${_n * Math.cos(ht)},${_n * Math.sin(ht)},${Q},${$t}Z`;
|
|
19848
19886
|
}, B = this.group.append("g").attr("transform", `translate(${x},${v})`), H = (et) => P[et] || e[et % e.length], J = r.linkColorMode ?? "from", X = B.append("defs");
|
|
19849
19887
|
let j = null;
|
|
19850
19888
|
J === "gradient" && (j = X);
|
|
@@ -19880,7 +19918,7 @@ class WA extends Xt {
|
|
|
19880
19918
|
ht.attr("opacity", 0);
|
|
19881
19919
|
const vt = B.append("defs"), mt = Math.round(s * 0.62);
|
|
19882
19920
|
Y.each(function(Q, $t) {
|
|
19883
|
-
const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2,
|
|
19921
|
+
const Ft = f + $t * a, yt = `dw-clip-${$t}-${Math.random().toString(36).slice(2, 6)}`, qt = Q.source.startAngle + p - Math.PI / 2, Bt = Q.source.endAngle + p - Math.PI / 2, Ut = Q.target.startAngle + p - Math.PI / 2, Qt = Q.target.endAngle + p - Math.PI / 2, Ht = (qt + Bt) / 2, Ke = (Ut + Qt) / 2, Te = T * Math.cos(Ht), Oe = T * Math.sin(Ht), ye = T * Math.cos(Ke), Je = T * Math.sin(Ke), hn = Math.atan2(Je - Oe, ye - Te) * 180 / Math.PI, _n = Math.sqrt((ye - Te) ** 2 + (Je - Oe) ** 2) + _ * 2, rr = vt.append("clipPath").attr("id", yt).attr("clipPathUnits", "userSpaceOnUse"), V = rr.append("rect").attr("transform", `translate(${Te},${Oe}) rotate(${hn})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), tt = rt(this);
|
|
19884
19922
|
tt.attr("clip-path", `url(#${yt})`), V.transition("enter").duration(mt).delay(Ft).ease(pt).attr("width", _n).on("end", function() {
|
|
19885
19923
|
tt.attr("clip-path", null), rr.remove();
|
|
19886
19924
|
});
|
|
@@ -19898,9 +19936,9 @@ class WA extends Xt {
|
|
|
19898
19936
|
Y.attr("fill-opacity", d);
|
|
19899
19937
|
const et = B.append("defs"), nt = Math.round(s * 0.62);
|
|
19900
19938
|
Y.each(function(ht, vt) {
|
|
19901
|
-
const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + $t) / 2, Bt = (Ft + yt) / 2, Ut = T * Math.cos(qt),
|
|
19902
|
-
hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width",
|
|
19903
|
-
hn.attr("clip-path", null),
|
|
19939
|
+
const mt = f + vt * a, gt = `dw-clip-${vt}-${Math.random().toString(36).slice(2, 6)}`, Q = ht.source.startAngle + p - Math.PI / 2, $t = ht.source.endAngle + p - Math.PI / 2, Ft = ht.target.startAngle + p - Math.PI / 2, yt = ht.target.endAngle + p - Math.PI / 2, qt = (Q + $t) / 2, Bt = (Ft + yt) / 2, Ut = T * Math.cos(qt), Qt = T * Math.sin(qt), Ht = T * Math.cos(Bt), Ke = T * Math.sin(Bt), Te = Math.atan2(Ke - Qt, Ht - Ut) * 180 / Math.PI, Oe = Math.sqrt((Ht - Ut) ** 2 + (Ke - Qt) ** 2) + _ * 2, ye = et.append("clipPath").attr("id", gt).attr("clipPathUnits", "userSpaceOnUse"), Je = ye.append("rect").attr("transform", `translate(${Ut},${Qt}) rotate(${Te})`).attr("x", -_).attr("y", -_).attr("width", 0).attr("height", _ * 2), hn = rt(this);
|
|
19940
|
+
hn.attr("clip-path", `url(#${gt})`), Je.transition("enter").duration(nt).delay(mt).ease(pt).attr("width", Oe).on("end", function() {
|
|
19941
|
+
hn.attr("clip-path", null), ye.remove();
|
|
19904
19942
|
});
|
|
19905
19943
|
});
|
|
19906
19944
|
} else
|
|
@@ -19966,14 +20004,14 @@ class WA extends Xt {
|
|
|
19966
20004
|
);
|
|
19967
20005
|
if (gt.length === 0) return null;
|
|
19968
20006
|
const Q = (Bt) => Bt.source.index === nt.index ? Bt.source : Bt.target, $t = (Bt) => {
|
|
19969
|
-
const Ut = Q(Bt),
|
|
19970
|
-
return
|
|
20007
|
+
const Ut = Q(Bt), Qt = ot(Ut.startAngle + p), Ht = ot(Ut.endAngle + p);
|
|
20008
|
+
return Qt <= Ht ? mt >= Qt && mt <= Ht : mt >= Qt || mt <= Ht;
|
|
19971
20009
|
}, Ft = gt.find($t);
|
|
19972
20010
|
if (Ft) return Ft;
|
|
19973
20011
|
let yt = gt[0], qt = 1 / 0;
|
|
19974
20012
|
for (const Bt of gt) {
|
|
19975
|
-
const Ut = Q(Bt),
|
|
19976
|
-
let Ht = Math.abs(mt -
|
|
20013
|
+
const Ut = Q(Bt), Qt = ot((Ut.startAngle + Ut.endAngle) / 2 + p);
|
|
20014
|
+
let Ht = Math.abs(mt - Qt);
|
|
19977
20015
|
Ht > Math.PI && (Ht = Math.PI * 2 - Ht), Ht < qt && (qt = Ht, yt = Bt);
|
|
19978
20016
|
}
|
|
19979
20017
|
return yt;
|
|
@@ -19990,7 +20028,7 @@ class WA extends Xt {
|
|
|
19990
20028
|
};
|
|
19991
20029
|
}, wt = r.borderColor ?? this.autoBorderColor(), Ct = r.borderWidth ?? 1, kt = B.selectAll(".katucharts-chord-arc").data(at).join("path").attr("class", "katucharts-chord-arc").attr("fill", (et) => H(et.index)).attr("stroke", wt).attr("stroke-width", Ct).style("cursor", "pointer");
|
|
19992
20030
|
i ? kt.each(function(et, nt) {
|
|
19993
|
-
const ht = rt(this), vt = { startAngle: et.startAngle, endAngle: et.startAngle }, mt =
|
|
20031
|
+
const ht = rt(this), vt = { startAngle: et.startAngle, endAngle: et.startAngle }, mt = se(vt, et);
|
|
19994
20032
|
ht.transition("enter").duration(l).delay(nt * c).ease(pt).attrTween("d", () => (gt) => R(mt(gt)));
|
|
19995
20033
|
}) : kt.attr("d", R), kt.on("mouseover", (et, nt) => {
|
|
19996
20034
|
rt(et.currentTarget).transition("arc").duration(K).ease(Z).attr("d", F(nt)), Y.interrupt("highlight"), kt.interrupt("highlight"), O && O.interrupt("highlight").attr("opacity", 1), Y.transition("highlight").duration(K).ease(Z).attr(
|
|
@@ -20026,16 +20064,16 @@ class WA extends Xt {
|
|
|
20026
20064
|
event: et
|
|
20027
20065
|
});
|
|
20028
20066
|
}), B.append("g").attr("class", "katucharts-chord-hitareas").selectAll(".katucharts-chord-hitarea").data($).join("path").attr("class", "katucharts-chord-hitarea").attr("d", (et) => z(et)).attr("fill", "#ffffff").attr("fill-opacity", 0).attr("stroke", "#ffffff").attr("stroke-opacity", 0).attr("stroke-width", 12).attr("stroke-linejoin", "round").style("cursor", "pointer").style("pointer-events", "all").on("mouseover", it).on("mouseout", ft).on("click", dt);
|
|
20029
|
-
const _t = this.config.dataLabels || {}, Vt = _t.color || ((nr = _t.style) == null ? void 0 : nr.color) ||
|
|
20030
|
-
if (!et || nt <=
|
|
20067
|
+
const _t = this.config.dataLabels || {}, Vt = _t.color || ((nr = _t.style) == null ? void 0 : nr.color) || Ee, Nt = ((ir = _t.style) == null ? void 0 : ir.fontSize) || Mt, Ot = Ae(Nt), Zt = 22, ne = _ + Zt, Tt = Math.max(Ot * 1.6, 17), Kt = "…", le = tn(Kt, Ot, "bold"), Ve = (et, nt) => {
|
|
20068
|
+
if (!et || nt <= le) return "";
|
|
20031
20069
|
if (tn(et, Ot, "bold") <= nt) return et;
|
|
20032
20070
|
let ht = "";
|
|
20033
20071
|
for (const vt of et) {
|
|
20034
|
-
if (tn(ht + vt, Ot, "bold") +
|
|
20072
|
+
if (tn(ht + vt, Ot, "bold") + le > nt) break;
|
|
20035
20073
|
ht += vt;
|
|
20036
20074
|
}
|
|
20037
|
-
return ht = ht.trimEnd(), (ht || et[0]) +
|
|
20038
|
-
},
|
|
20075
|
+
return ht = ht.trimEnd(), (ht || et[0]) + Kt;
|
|
20076
|
+
}, he = t.width - x, mn = x, Vn = v, ze = t.height - v, Be = at.map((et) => {
|
|
20039
20077
|
const nt = (et.startAngle + et.endAngle) / 2, ht = Math.sin(nt) >= 0;
|
|
20040
20078
|
return {
|
|
20041
20079
|
index: et.index,
|
|
@@ -20044,8 +20082,8 @@ class WA extends Xt {
|
|
|
20044
20082
|
isRight: ht,
|
|
20045
20083
|
ax: _ * Math.sin(nt),
|
|
20046
20084
|
ay: -_ * Math.cos(nt),
|
|
20047
|
-
lx:
|
|
20048
|
-
ly: -
|
|
20085
|
+
lx: ne * Math.sin(nt),
|
|
20086
|
+
ly: -ne * Math.cos(nt),
|
|
20049
20087
|
rank: et.value || 0,
|
|
20050
20088
|
color: H(et.index),
|
|
20051
20089
|
visible: !!E[et.index]
|
|
@@ -20065,13 +20103,13 @@ class WA extends Xt {
|
|
|
20065
20103
|
}
|
|
20066
20104
|
return Ft;
|
|
20067
20105
|
}, mt = B.append("defs");
|
|
20068
|
-
if (Ye = Ge.selectAll(".katucharts-chord-label").data(
|
|
20106
|
+
if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be.filter((gt) => gt.visible)).join("text").attr("class", "katucharts-chord-label").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0), Ye.each((gt, Q, $t) => {
|
|
20069
20107
|
const Ft = rt($t[Q]);
|
|
20070
20108
|
Ft.text(null);
|
|
20071
20109
|
const yt = vt(E[gt.index] || "", gt.span);
|
|
20072
20110
|
if (!yt) return;
|
|
20073
|
-
const qt = (gt.mid % et + et) % et, Bt = qt > Math.PI / 2 && qt < Math.PI * 3 / 2, Ut = gt.span / 2, [
|
|
20074
|
-
mt.append("path").attr("id",
|
|
20111
|
+
const qt = (gt.mid % et + et) % et, Bt = qt > Math.PI / 2 && qt < Math.PI * 3 / 2, Ut = gt.span / 2, [Qt, Ht] = ht(Bt ? gt.mid + Ut : gt.mid - Ut), [Ke, Te] = ht(Bt ? gt.mid - Ut : gt.mid + Ut), Oe = Bt ? 0 : 1, ye = `katucharts-dw-label-${Q}-${Math.random().toString(36).slice(2, 6)}`;
|
|
20112
|
+
mt.append("path").attr("id", ye).attr("fill", "none").attr("d", `M${Qt},${Ht}A${nt},${nt},0,0,${Oe},${Ke},${Te}`), Ft.append("textPath").attr("href", `#${ye}`).attr("startOffset", "50%").attr("text-anchor", "middle").attr("dominant-baseline", "central").text(yt);
|
|
20075
20113
|
}), i) {
|
|
20076
20114
|
Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 1);
|
|
20077
20115
|
const gt = Math.round(s * 0.62), Q = $.length, $t = f + Q * a + gt;
|
|
@@ -20079,17 +20117,17 @@ class WA extends Xt {
|
|
|
20079
20117
|
} else
|
|
20080
20118
|
Ye.attr("opacity", 1);
|
|
20081
20119
|
} else {
|
|
20082
|
-
const et = Math.max(1, Vn - 5 + (
|
|
20120
|
+
const et = Math.max(1, Vn - 5 + (ze - 5));
|
|
20083
20121
|
if (o === "medium") {
|
|
20084
20122
|
const Q = Math.max(1, Math.min(10, Math.floor(et / (Tt * 1.2))));
|
|
20085
20123
|
for (const $t of [!0, !1]) {
|
|
20086
|
-
const Ft =
|
|
20124
|
+
const Ft = Be.filter((yt) => yt.visible && yt.isRight === $t);
|
|
20087
20125
|
Ft.length > Q && (Ft.sort((yt, qt) => qt.rank - yt.rank), Ft.slice(Q).forEach((yt) => {
|
|
20088
20126
|
yt.visible = !1;
|
|
20089
20127
|
}));
|
|
20090
20128
|
}
|
|
20091
20129
|
}
|
|
20092
|
-
this.distributeChordLabels(
|
|
20130
|
+
this.distributeChordLabels(Be.filter((Q) => Q.visible && Q.isRight), Tt, Vn, ze), this.distributeChordLabels(Be.filter((Q) => Q.visible && !Q.isRight), Tt, Vn, ze);
|
|
20093
20131
|
const nt = Math.max(Ot * 1.4, 16), ht = (Q) => {
|
|
20094
20132
|
const $t = Q.filter((Bt) => Bt.visible).sort((Bt, Ut) => Bt.ly - Ut.ly), Ft = $t.length * Tt / et;
|
|
20095
20133
|
let yt = 1;
|
|
@@ -20100,26 +20138,26 @@ class WA extends Xt {
|
|
|
20100
20138
|
Bt.col = 0;
|
|
20101
20139
|
return;
|
|
20102
20140
|
}
|
|
20103
|
-
const
|
|
20104
|
-
Bt.col =
|
|
20141
|
+
const Qt = Ut % qt;
|
|
20142
|
+
Bt.col = Qt < yt ? Qt : qt - Qt;
|
|
20105
20143
|
});
|
|
20106
20144
|
};
|
|
20107
20145
|
if (o === "medium")
|
|
20108
|
-
for (const Q of
|
|
20146
|
+
for (const Q of Be) Q.col = 0;
|
|
20109
20147
|
else
|
|
20110
|
-
ht(
|
|
20111
|
-
for (const Q of
|
|
20148
|
+
ht(Be.filter((Q) => Q.isRight)), ht(Be.filter((Q) => !Q.isRight));
|
|
20149
|
+
for (const Q of Be) {
|
|
20112
20150
|
if (!Q.visible) continue;
|
|
20113
|
-
const $t = (Q.col || 0) * nt, Ft =
|
|
20151
|
+
const $t = (Q.col || 0) * nt, Ft = ne + $t, yt = Math.max(-Ft, Math.min(Ft, Q.ly)), qt = Math.sqrt(Math.max(0, Ft * Ft - yt * yt)), Bt = _ * 0.4 + $t;
|
|
20114
20152
|
Q.lx = Q.isRight ? Math.max(qt, Bt) : -Math.max(qt, Bt);
|
|
20115
|
-
const Ut = (Q.isRight ?
|
|
20153
|
+
const Ut = (Q.isRight ? he : mn) - le - 4;
|
|
20116
20154
|
Q.lx = Q.isRight ? Math.min(Q.lx, Ut) : Math.max(Q.lx, -Ut);
|
|
20117
20155
|
}
|
|
20118
|
-
const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => Math.max(0, (Q.isRight ?
|
|
20119
|
-
const $t = _ +
|
|
20156
|
+
const vt = (Q) => Q.lx + (Q.isRight ? 4 : -4), mt = (Q) => Math.max(0, (Q.isRight ? he - vt(Q) : vt(Q) + mn) - 6), gt = Ge.selectAll(".katucharts-chord-connector").data(Be.filter((Q) => Q.visible)).join("path").attr("class", "katucharts-chord-connector").attr("fill", "none").attr("stroke", (Q) => Q.color).attr("stroke-width", 1).attr("opacity", 0).attr("d", (Q) => {
|
|
20157
|
+
const $t = _ + Zt * 0.55, Ft = $t * Math.sin(Q.mid), yt = -$t * Math.cos(Q.mid);
|
|
20120
20158
|
return `M${Q.ax},${Q.ay}L${Ft},${yt}L${Q.lx},${Q.ly}`;
|
|
20121
20159
|
});
|
|
20122
|
-
if (Ye = Ge.selectAll(".katucharts-chord-label").data(
|
|
20160
|
+
if (Ye = Ge.selectAll(".katucharts-chord-label").data(Be).join("text").attr("class", "katucharts-chord-label").attr("text-anchor", (Q) => Q.isRight ? "start" : "end").attr("dominant-baseline", "middle").attr("font-size", Nt).attr("font-weight", "bold").attr("fill", Vt).style("pointer-events", "none").attr("opacity", 0).attr("x", (Q) => vt(Q)).attr("y", (Q) => Q.ly).text((Q) => Q.visible && mt(Q) >= le ? Ve(E[Q.index] || "", mt(Q)) : ""), i) {
|
|
20123
20161
|
gt.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", 0.8), Ye.transition("enter").duration(300).delay(h).ease(pt).attr("opacity", (yt) => Ze(yt) ? 1 : 0);
|
|
20124
20162
|
const Q = Math.round(s * 0.62), $t = $.length, Ft = f + $t * a + Q;
|
|
20125
20163
|
this.emitAfterAnimate(Ft + 100);
|
|
@@ -20506,8 +20544,8 @@ const GA = {
|
|
|
20506
20544
|
},
|
|
20507
20545
|
dateFormat: Va,
|
|
20508
20546
|
numberFormat: As,
|
|
20509
|
-
templateFormat:
|
|
20510
|
-
stripHtmlTags:
|
|
20547
|
+
templateFormat: Jt,
|
|
20548
|
+
stripHtmlTags: de,
|
|
20511
20549
|
color(n) {
|
|
20512
20550
|
return va(n);
|
|
20513
20551
|
},
|
|
@@ -20550,7 +20588,7 @@ export {
|
|
|
20550
20588
|
Rv as Drilldown,
|
|
20551
20589
|
oy as EventBus,
|
|
20552
20590
|
Ev as ExportButton,
|
|
20553
|
-
|
|
20591
|
+
re as ExportModule,
|
|
20554
20592
|
GA as KatuCharts,
|
|
20555
20593
|
Uc as Legend,
|
|
20556
20594
|
fn as LicenseManager,
|