ods-component-lib 1.22.5 → 1.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/index2.js +5 -2
- package/dist/_virtual/index2.js.map +1 -1
- package/dist/_virtual/index3.js +4 -4
- package/dist/_virtual/index4.js +2 -5
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/components/devextreme/DataGrid/hooks/useBodyClasses.js +1 -1
- package/dist/components/devextreme/OdsBasicDataGrid/OdsBasicDataGrid.js +7 -7
- package/dist/components/devextreme/OdsDataGrid.Legacy.js +3 -3
- package/dist/components/devextreme/OdsRemoteDataGrid.js +1 -1
- package/dist/index.js +5 -5
- package/dist/node_modules/canvg/lib/index.es.js +86 -86
- package/dist/node_modules/canvg/lib/index.es.js.map +1 -1
- package/dist/node_modules/core-js/internals/shared-store.js +8 -8
- package/dist/node_modules/core-js/internals/shared-store.js.map +1 -1
- package/dist/node_modules/dompurify/dist/purify.es.js +217 -223
- package/dist/node_modules/dompurify/dist/purify.es.js.map +1 -1
- package/dist/node_modules/fflate/esm/browser.js +295 -335
- package/dist/node_modules/fflate/esm/browser.js.map +1 -1
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js +1771 -1781
- package/dist/node_modules/jspdf/dist/jspdf.es.min.js.map +1 -1
- package/dist/node_modules/lodash/lodash.js +278 -295
- package/dist/node_modules/lodash/lodash.js.map +1 -1
- package/dist/node_modules/ods-icon/react/24/outline/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +6 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/providers/OdsConfigProvider.js +7 -6
- package/package.json +3 -3
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import Wt from "../../vite-plugin-node-polyfills/shims/process/dist/index.js";
|
|
2
2
|
import "../../../_virtual/es.promise.js";
|
|
3
3
|
import L from "../../@babel/runtime/helpers/esm/asyncToGenerator.js";
|
|
4
4
|
import "../../../_virtual/es.string.match.js";
|
|
@@ -10,15 +10,15 @@ import ot from "../../@babel/runtime/helpers/esm/defineProperty.js";
|
|
|
10
10
|
import "../../../_virtual/es.array.reduce.js";
|
|
11
11
|
import "../../../_virtual/es.string.ends-with.js";
|
|
12
12
|
import "../../../_virtual/es.string.split.js";
|
|
13
|
-
import at from "../../../_virtual/
|
|
13
|
+
import at from "../../../_virtual/index2.js";
|
|
14
14
|
import "../../../_virtual/es.string.trim.js";
|
|
15
|
-
import nt from "../../../_virtual/
|
|
15
|
+
import nt from "../../../_virtual/index3.js";
|
|
16
16
|
import "../../../_virtual/es.array.index-of.js";
|
|
17
17
|
import "../../../_virtual/es.string.includes.js";
|
|
18
18
|
import "../../../_virtual/es.array.reverse.js";
|
|
19
19
|
import { SVGPathData as G } from "../../svg-pathdata/lib/SVGPathData.module.js";
|
|
20
20
|
import "../../../_virtual/es.regexp.to-string.js";
|
|
21
|
-
import { canvasRGBA as
|
|
21
|
+
import { canvasRGBA as jt } from "../../stackblur-canvas/dist/stackblur-es.js";
|
|
22
22
|
function Yt() {
|
|
23
23
|
var {
|
|
24
24
|
DOMParser: o
|
|
@@ -69,7 +69,7 @@ function $t(o) {
|
|
|
69
69
|
function Gt(o) {
|
|
70
70
|
return o.replace(/[\n \t]+$/, "");
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function O(o) {
|
|
73
73
|
var t = (o || "").match(/-?(\d+(?:\.\d*(?:[eE][+-]?\d+)?)?|\.\d+)(?=\D|$)/gm) || [];
|
|
74
74
|
return t.map(parseFloat);
|
|
75
75
|
}
|
|
@@ -88,13 +88,13 @@ function Zt(o) {
|
|
|
88
88
|
return e;
|
|
89
89
|
}
|
|
90
90
|
var Jt = /(\[[^\]]+\])/g, Kt = /(#[^\s+>~.[:]+)/g, te = /(\.[^\s+>~.[:]+)/g, ee = /(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi, re = /(:[\w-]+\([^)]*\))/gi, ie = /(:[^\s+>~.[:]+)/g, ae = /([^\s+>~.[:]+)/g;
|
|
91
|
-
function
|
|
91
|
+
function X(o, t) {
|
|
92
92
|
var e = t.exec(o);
|
|
93
93
|
return e ? [o.replace(t, " "), e.length] : [o, 0];
|
|
94
94
|
}
|
|
95
95
|
function se(o) {
|
|
96
96
|
var t = [0, 0, 0], e = o.replace(/:not\(([^)]*)\)/g, " $1 ").replace(/{[\s\S]*/gm, " "), r = 0;
|
|
97
|
-
return [e, r] =
|
|
97
|
+
return [e, r] = X(e, Jt), t[1] += r, [e, r] = X(e, Kt), t[0] += r, [e, r] = X(e, te), t[1] += r, [e, r] = X(e, ee), t[2] += r, [e, r] = X(e, re), t[1] += r, [e, r] = X(e, ie), t[1] += r, e = e.replace(/[*\s+>~]/g, " ").replace(/[#.]/g, " "), [e, r] = X(e, ae), t[2] += r, t.join("");
|
|
98
98
|
}
|
|
99
99
|
var Y = 1e-8;
|
|
100
100
|
function bt(o) {
|
|
@@ -344,15 +344,15 @@ class V {
|
|
|
344
344
|
this.x = t, this.y = e;
|
|
345
345
|
}
|
|
346
346
|
static parse(t) {
|
|
347
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, [r = e, i = e] =
|
|
347
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, [r = e, i = e] = O(t);
|
|
348
348
|
return new V(r, i);
|
|
349
349
|
}
|
|
350
350
|
static parseScale(t) {
|
|
351
|
-
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, [r = e, i = r] =
|
|
351
|
+
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 1, [r = e, i = r] = O(t);
|
|
352
352
|
return new V(r, i);
|
|
353
353
|
}
|
|
354
354
|
static parsePath(t) {
|
|
355
|
-
for (var e =
|
|
355
|
+
for (var e = O(t), r = e.length, i = [], a = 0; a < r; a += 2)
|
|
356
356
|
i.push(new V(e[a], e[a + 1]));
|
|
357
357
|
return i;
|
|
358
358
|
}
|
|
@@ -517,7 +517,7 @@ class tt {
|
|
|
517
517
|
clip: f = !1,
|
|
518
518
|
clipX: d = 0,
|
|
519
519
|
clipY: p = 0
|
|
520
|
-
} = t, c = H(i).replace(/^defer\s/, ""), [y, x] = c.split(" "), w = y || "xMidYMid", A = x || "meet", M = a / s,
|
|
520
|
+
} = t, c = H(i).replace(/^defer\s/, ""), [y, x] = c.split(" "), w = y || "xMidYMid", A = x || "meet", M = a / s, k = n / h, C = Math.min(M, k), N = Math.max(M, k), _ = s, D = h;
|
|
521
521
|
A === "meet" && (_ *= C, D *= C), A === "slice" && (_ *= N, D *= N);
|
|
522
522
|
var $ = new m(e, "refX", g), z = new m(e, "refY", v), ft = $.hasValue() && z.hasValue();
|
|
523
523
|
if (ft && r.translate(-C * $.getPixels("x"), -C * z.getPixels("y")), f) {
|
|
@@ -525,12 +525,12 @@ class tt {
|
|
|
525
525
|
r.beginPath(), r.moveTo(vt, dt), r.lineTo(a, dt), r.lineTo(a, n), r.lineTo(vt, n), r.closePath(), r.clip();
|
|
526
526
|
}
|
|
527
527
|
if (!ft) {
|
|
528
|
-
var ct = A === "meet" && C ===
|
|
528
|
+
var ct = A === "meet" && C === k, pt = A === "slice" && N === k, mt = A === "meet" && C === M, yt = A === "slice" && N === M;
|
|
529
529
|
w.startsWith("xMid") && (ct || pt) && r.translate(a / 2 - _ / 2, 0), w.endsWith("YMid") && (mt || yt) && r.translate(0, n / 2 - D / 2), w.startsWith("xMax") && (ct || pt) && r.translate(a - _, 0), w.endsWith("YMax") && (mt || yt) && r.translate(0, n - D);
|
|
530
530
|
}
|
|
531
531
|
switch (!0) {
|
|
532
532
|
case w === "none":
|
|
533
|
-
r.scale(M,
|
|
533
|
+
r.scale(M, k);
|
|
534
534
|
break;
|
|
535
535
|
case A === "meet":
|
|
536
536
|
r.scale(C, C);
|
|
@@ -592,14 +592,14 @@ class tt {
|
|
|
592
592
|
!e && (v || typeof i != "number" && typeof a != "number") && (d.hasValue() && (f.width = d.getPixels("x"), f.style && (f.style.width = "".concat(f.width, "px"))), p.hasValue() && (f.height = p.getPixels("y"), f.style && (f.style.height = "".concat(f.height, "px"))));
|
|
593
593
|
var c = f.clientWidth || f.width, y = f.clientHeight || f.height;
|
|
594
594
|
if (e && d.hasValue() && p.hasValue() && (c = d.getPixels("x"), y = p.getPixels("y")), l.setCurrent(c, y), typeof s == "number" && t.getAttribute("x", !0).setValue(s), typeof n == "number" && t.getAttribute("y", !0).setValue(n), typeof i == "number" || typeof a == "number") {
|
|
595
|
-
var x =
|
|
595
|
+
var x = O(t.getAttribute("viewBox").getString()), w = 0, A = 0;
|
|
596
596
|
if (typeof i == "number") {
|
|
597
597
|
var M = t.getStyle("width");
|
|
598
598
|
M.hasValue() ? w = M.getPixels("x") / i : isNaN(x[2]) || (w = x[2] / i);
|
|
599
599
|
}
|
|
600
600
|
if (typeof a == "number") {
|
|
601
|
-
var
|
|
602
|
-
|
|
601
|
+
var k = t.getStyle("height");
|
|
602
|
+
k.hasValue() ? A = k.getPixels("y") / a : isNaN(x[3]) || (A = x[3] / a);
|
|
603
603
|
}
|
|
604
604
|
w || (w = A), A || (A = w), t.getAttribute("width", !0).setValue(i), t.getAttribute("height", !0).setValue(a);
|
|
605
605
|
var C = t.getStyle("transform", !0, !0);
|
|
@@ -678,7 +678,7 @@ class le {
|
|
|
678
678
|
class ge {
|
|
679
679
|
constructor(t, e, r) {
|
|
680
680
|
this.type = "rotate", this.angle = null, this.originX = null, this.originY = null, this.cx = 0, this.cy = 0;
|
|
681
|
-
var i =
|
|
681
|
+
var i = O(e);
|
|
682
682
|
this.angle = new m(t, "angle", i[0]), this.originX = r[0], this.originY = r[1], this.cx = i[1] || 0, this.cy = i[2] || 0;
|
|
683
683
|
}
|
|
684
684
|
apply(t) {
|
|
@@ -764,7 +764,7 @@ class fe {
|
|
|
764
764
|
}
|
|
765
765
|
class zt {
|
|
766
766
|
constructor(t, e, r) {
|
|
767
|
-
this.type = "matrix", this.matrix = [], this.originX = null, this.originY = null, this.matrix =
|
|
767
|
+
this.type = "matrix", this.matrix = [], this.originX = null, this.originY = null, this.matrix = O(e), this.originX = r[0], this.originY = r[1];
|
|
768
768
|
}
|
|
769
769
|
apply(t) {
|
|
770
770
|
var {
|
|
@@ -808,20 +808,20 @@ function pe(o) {
|
|
|
808
808
|
var [t, e] = o.split("(");
|
|
809
809
|
return [t.trim(), e.trim().replace(")", "")];
|
|
810
810
|
}
|
|
811
|
-
class
|
|
811
|
+
class W {
|
|
812
812
|
constructor(t, e, r) {
|
|
813
813
|
this.document = t, this.transforms = [];
|
|
814
814
|
var i = ce(e);
|
|
815
815
|
i.forEach((a) => {
|
|
816
816
|
if (a !== "none") {
|
|
817
|
-
var [s, n] = pe(a), h =
|
|
817
|
+
var [s, n] = pe(a), h = W.transformTypes[s];
|
|
818
818
|
typeof h < "u" && this.transforms.push(new h(this.document, n, r));
|
|
819
819
|
}
|
|
820
820
|
});
|
|
821
821
|
}
|
|
822
822
|
static fromElement(t, e) {
|
|
823
823
|
var r = e.getStyle("transform", !1, !0), [i, a = i] = e.getStyle("transform-origin", !1, !0).split(), s = [i, a];
|
|
824
|
-
return r.hasValue() ? new
|
|
824
|
+
return r.hasValue() ? new W(t, r.getString(), s) : null;
|
|
825
825
|
}
|
|
826
826
|
apply(t) {
|
|
827
827
|
for (var {
|
|
@@ -843,7 +843,7 @@ class U {
|
|
|
843
843
|
e[i].applyToPoint(t);
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
|
|
846
|
+
W.transformTypes = {
|
|
847
847
|
translate: le,
|
|
848
848
|
rotate: ge,
|
|
849
849
|
scale: fe,
|
|
@@ -854,7 +854,7 @@ U.transformTypes = {
|
|
|
854
854
|
class P {
|
|
855
855
|
constructor(t, e) {
|
|
856
856
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
857
|
-
if (this.document = t, this.node = e, this.captureTextNodes = r, this.attributes =
|
|
857
|
+
if (this.document = t, this.node = e, this.captureTextNodes = r, this.attributes = {}, this.styles = {}, this.stylesSpecificity = {}, this.animationFrozen = !1, this.animationFrozenValue = "", this.parent = null, this.children = [], !(!e || e.nodeType !== 1)) {
|
|
858
858
|
if (Array.from(e.attributes).forEach((n) => {
|
|
859
859
|
var h = Qt(n.nodeName);
|
|
860
860
|
this.attributes[h] = new m(t, h, n.value);
|
|
@@ -933,7 +933,7 @@ class P {
|
|
|
933
933
|
setContext(t) {
|
|
934
934
|
}
|
|
935
935
|
applyEffects(t) {
|
|
936
|
-
var e =
|
|
936
|
+
var e = W.fromElement(this.document, this);
|
|
937
937
|
e && e.apply(t);
|
|
938
938
|
var r = this.getStyle("clip-path", !1, !0);
|
|
939
939
|
if (r.hasValue()) {
|
|
@@ -1008,7 +1008,7 @@ function ye(o) {
|
|
|
1008
1008
|
return /^('|")/.test(t) ? t : '"'.concat(t, '"');
|
|
1009
1009
|
}
|
|
1010
1010
|
function be(o) {
|
|
1011
|
-
return typeof
|
|
1011
|
+
return typeof Wt > "u" ? o : o.trim().split(",").map(ye).join(",");
|
|
1012
1012
|
}
|
|
1013
1013
|
function xe(o) {
|
|
1014
1014
|
if (!o)
|
|
@@ -1246,7 +1246,7 @@ class b extends G {
|
|
|
1246
1246
|
return t;
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
|
-
class
|
|
1249
|
+
class j extends P {
|
|
1250
1250
|
constructor() {
|
|
1251
1251
|
super(...arguments), this.modifiedEmSizeStack = !1;
|
|
1252
1252
|
}
|
|
@@ -1292,14 +1292,14 @@ class W extends P {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
var p = this.getStyle("stroke-linecap"), c = this.getStyle("stroke-linejoin"), y = this.getStyle("stroke-miterlimit"), x = this.getStyle("stroke-dasharray"), w = this.getStyle("stroke-dashoffset");
|
|
1294
1294
|
if (p.hasValue() && (t.lineCap = p.getString()), c.hasValue() && (t.lineJoin = c.getString()), y.hasValue() && (t.miterLimit = y.getNumber()), x.hasValue() && x.getString() !== "none") {
|
|
1295
|
-
var A =
|
|
1295
|
+
var A = O(x.getString());
|
|
1296
1296
|
typeof t.setLineDash < "u" ? t.setLineDash(A) : typeof t.webkitLineDash < "u" ? t.webkitLineDash = A : typeof t.mozDash < "u" && !(A.length === 1 && A[0] === 0) && (t.mozDash = A);
|
|
1297
1297
|
var M = w.getPixels();
|
|
1298
1298
|
typeof t.lineDashOffset < "u" ? t.lineDashOffset = M : typeof t.webkitLineDashOffset < "u" ? t.webkitLineDashOffset = M : typeof t.mozDashOffset < "u" && (t.mozDashOffset = M);
|
|
1299
1299
|
}
|
|
1300
1300
|
}
|
|
1301
1301
|
if (this.modifiedEmSizeStack = !1, typeof t.font < "u") {
|
|
1302
|
-
var
|
|
1302
|
+
var k = this.getStyle("font"), C = this.getStyle("font-style"), N = this.getStyle("font-variant"), _ = this.getStyle("font-weight"), D = this.getStyle("font-size"), $ = this.getStyle("font-family"), z = new E(C.getString(), N.getString(), _.getString(), D.hasValue() ? "".concat(D.getPixels(!0), "px") : "", $.getString(), E.parse(k.getString(), t.font));
|
|
1303
1303
|
C.setValue(z.fontStyle), N.setValue(z.fontVariant), _.setValue(z.fontWeight), D.setValue(z.fontSize), $.setValue(z.fontFamily), t.font = z.toString(), D.isPixels() && (this.document.emSize = D.getPixels(), this.modifiedEmSizeStack = !0);
|
|
1304
1304
|
}
|
|
1305
1305
|
e || (this.applyEffects(t), t.globalAlpha = this.calculateOpacity());
|
|
@@ -1308,7 +1308,7 @@ class W extends P {
|
|
|
1308
1308
|
super.clearContext(t), this.modifiedEmSizeStack && this.document.popEmSize();
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
class S extends
|
|
1311
|
+
class S extends j {
|
|
1312
1312
|
constructor(t, e, r) {
|
|
1313
1313
|
super(t, e, r), this.type = "path", this.pathParser = null, this.pathParser = new b(this.getAttribute("d").getString());
|
|
1314
1314
|
}
|
|
@@ -1606,7 +1606,7 @@ class Lt extends S {
|
|
|
1606
1606
|
super(t, e, r), this.type = "glyph", this.horizAdvX = this.getAttribute("horiz-adv-x").getNumber(), this.unicode = this.getAttribute("unicode").getString(), this.arabicForm = this.getAttribute("arabic-form").getString();
|
|
1607
1607
|
}
|
|
1608
1608
|
}
|
|
1609
|
-
class F extends
|
|
1609
|
+
class F extends j {
|
|
1610
1610
|
constructor(t, e, r) {
|
|
1611
1611
|
super(t, e, new.target === F ? !0 : r), this.type = "text", this.x = 0, this.y = 0, this.measureCache = -1;
|
|
1612
1612
|
}
|
|
@@ -1684,7 +1684,7 @@ class F extends W {
|
|
|
1684
1684
|
if (a) {
|
|
1685
1685
|
for (var {
|
|
1686
1686
|
unitsPerEm: s
|
|
1687
|
-
} = a.fontFace, n = E.parse(e.ctx.font), h = r.getStyle("font-size").getNumber(n.fontSize), u = r.getStyle("font-style").getString(n.fontStyle), l = h / s, g = a.isRTL ? i.split("").reverse().join("") : i, v =
|
|
1687
|
+
} = a.fontFace, n = E.parse(e.ctx.font), h = r.getStyle("font-size").getNumber(n.fontSize), u = r.getStyle("font-style").getString(n.fontStyle), l = h / s, g = a.isRTL ? i.split("").reverse().join("") : i, v = O(r.getAttribute("dx").getString()), f = g.length, d = 0; d < f; d++) {
|
|
1688
1688
|
var p = this.getGlyph(a, g, d);
|
|
1689
1689
|
t.translate(this.x, this.y), t.scale(l, -l);
|
|
1690
1690
|
var c = t.lineWidth;
|
|
@@ -1760,7 +1760,7 @@ class F extends W {
|
|
|
1760
1760
|
parent: r
|
|
1761
1761
|
} = this, i = r.getStyle("font-family").getDefinition();
|
|
1762
1762
|
if (i) {
|
|
1763
|
-
for (var a = this.getFontSize(), s = i.isRTL ? e.split("").reverse().join("") : e, n =
|
|
1763
|
+
for (var a = this.getFontSize(), s = i.isRTL ? e.split("").reverse().join("") : e, n = O(r.getAttribute("dx").getString()), h = s.length, u = 0, l = 0; l < h; l++) {
|
|
1764
1764
|
var g = this.getGlyph(i, s, l);
|
|
1765
1765
|
u += (g.horizAdvX || i.horizAdvX) * a / i.fontFace.unitsPerEm, typeof n[l] < "u" && !isNaN(n[l]) && (u += n[l]);
|
|
1766
1766
|
}
|
|
@@ -1803,7 +1803,7 @@ class Se extends et {
|
|
|
1803
1803
|
super(...arguments), this.type = "textNode";
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
|
-
class Q extends
|
|
1806
|
+
class Q extends j {
|
|
1807
1807
|
constructor() {
|
|
1808
1808
|
super(...arguments), this.type = "svg", this.root = !1;
|
|
1809
1809
|
}
|
|
@@ -1825,7 +1825,7 @@ class Q extends W {
|
|
|
1825
1825
|
height: u
|
|
1826
1826
|
} = i.viewPort;
|
|
1827
1827
|
this.getStyle("width").hasValue() || this.getStyle("width", !0).setValue("100%"), this.getStyle("height").hasValue() || this.getStyle("height", !0).setValue("100%"), this.getStyle("color").hasValue() || this.getStyle("color", !0).setValue("black");
|
|
1828
|
-
var l = this.getAttribute("refX"), g = this.getAttribute("refY"), v = this.getAttribute("viewBox"), f = v.hasValue() ?
|
|
1828
|
+
var l = this.getAttribute("refX"), g = this.getAttribute("refY"), v = this.getAttribute("viewBox"), f = v.hasValue() ? O(v.getString()) : null, d = !this.root && this.getStyle("overflow").getValue("hidden") !== "visible", p = 0, c = 0, y = 0, x = 0;
|
|
1829
1829
|
f && (p = f[0], c = f[1]), this.root || (h = this.getStyle("width").getPixels("x"), u = this.getStyle("height").getPixels("y"), this.type === "marker" && (y = p, x = c, p = 0, c = 0)), i.viewPort.setCurrent(h, u), this.node && (!this.parent || ((e = this.node.parentNode) === null || e === void 0 ? void 0 : e.nodeName) === "foreignObject") && this.getStyle("transform", !1, !0).hasValue() && !this.getStyle("transform-origin", !1, !0).hasValue() && this.getStyle("transform-origin", !0, !0).setValue("50% 50%"), super.setContext(t), t.translate(this.getAttribute("x").getPixels("x"), this.getAttribute("y").getPixels("y")), f && (h = f[2], u = f[3]), r.setViewBox({
|
|
1830
1830
|
ctx: t,
|
|
1831
1831
|
aspectRatio: this.getAttribute("preserveAspectRatio").getString(),
|
|
@@ -2007,7 +2007,7 @@ class Ee extends P {
|
|
|
2007
2007
|
render() {
|
|
2008
2008
|
}
|
|
2009
2009
|
}
|
|
2010
|
-
class lt extends
|
|
2010
|
+
class lt extends j {
|
|
2011
2011
|
constructor() {
|
|
2012
2012
|
super(...arguments), this.type = "g";
|
|
2013
2013
|
}
|
|
@@ -2072,7 +2072,7 @@ class _t extends P {
|
|
|
2072
2072
|
return e;
|
|
2073
2073
|
}
|
|
2074
2074
|
}
|
|
2075
|
-
class
|
|
2075
|
+
class ke extends _t {
|
|
2076
2076
|
constructor(t, e, r) {
|
|
2077
2077
|
super(t, e, r), this.type = "linearGradient", this.attributesToInherit.push("x1", "y1", "x2", "y2");
|
|
2078
2078
|
}
|
|
@@ -2085,7 +2085,7 @@ class Oe extends _t {
|
|
|
2085
2085
|
return a === n && s === h ? null : t.createLinearGradient(a, s, n, h);
|
|
2086
2086
|
}
|
|
2087
2087
|
}
|
|
2088
|
-
class
|
|
2088
|
+
class Oe extends _t {
|
|
2089
2089
|
constructor(t, e, r) {
|
|
2090
2090
|
super(t, e, r), this.type = "radialGradient", this.attributesToInherit.push("cx", "cy", "r", "fx", "fy", "fr");
|
|
2091
2091
|
}
|
|
@@ -2194,7 +2194,7 @@ class De extends gt {
|
|
|
2194
2194
|
progress: t,
|
|
2195
2195
|
from: e,
|
|
2196
2196
|
to: r
|
|
2197
|
-
} = this.getProgress(), i =
|
|
2197
|
+
} = this.getProgress(), i = O(e.getString()), a = O(r.getString()), s = i.map((n, h) => {
|
|
2198
2198
|
var u = a[h];
|
|
2199
2199
|
return n + (u - n) * t;
|
|
2200
2200
|
}).join(" ");
|
|
@@ -2203,7 +2203,7 @@ class De extends gt {
|
|
|
2203
2203
|
}
|
|
2204
2204
|
class ze extends P {
|
|
2205
2205
|
constructor(t, e, r) {
|
|
2206
|
-
super(t, e, r), this.type = "font", this.glyphs =
|
|
2206
|
+
super(t, e, r), this.type = "font", this.glyphs = {}, this.horizAdvX = this.getAttribute("horiz-adv-x").getNumber();
|
|
2207
2207
|
var {
|
|
2208
2208
|
definitions: i
|
|
2209
2209
|
} = t, {
|
|
@@ -2222,7 +2222,7 @@ class ze extends P {
|
|
|
2222
2222
|
break;
|
|
2223
2223
|
case "glyph": {
|
|
2224
2224
|
var h = s;
|
|
2225
|
-
h.arabicForm ? (this.isRTL = !0, this.isArabic = !0, typeof this.glyphs[h.unicode] > "u" && (this.glyphs[h.unicode] =
|
|
2225
|
+
h.arabicForm ? (this.isRTL = !0, this.isArabic = !0, typeof this.glyphs[h.unicode] > "u" && (this.glyphs[h.unicode] = {}), this.glyphs[h.unicode][h.arabicForm] = h) : this.glyphs[h.unicode] = h;
|
|
2226
2226
|
break;
|
|
2227
2227
|
}
|
|
2228
2228
|
}
|
|
@@ -2417,16 +2417,16 @@ class _e extends F {
|
|
|
2417
2417
|
this.letterSpacingCache = g;
|
|
2418
2418
|
for (var f = 0; f < v; f++)
|
|
2419
2419
|
g.push(typeof a[f] < "u" ? a[f] : l);
|
|
2420
|
-
var d = g.reduce((A, M,
|
|
2420
|
+
var d = g.reduce((A, M, k) => k === 0 ? 0 : A + M || 0, 0), p = this.measureText(t), c = Math.max(p + d, 0);
|
|
2421
2421
|
this.textWidth = p, this.textHeight = this.getFontSize(), this.glyphInfo = [];
|
|
2422
2422
|
var y = this.getPathLength(), x = this.getStyle("startOffset").getNumber(0) * y, w = 0;
|
|
2423
2423
|
(n === "middle" || n === "center") && (w = -c / 2), (n === "end" || n === "right") && (w = -c), w += x, r.forEach((A, M) => {
|
|
2424
2424
|
var {
|
|
2425
|
-
offset:
|
|
2425
|
+
offset: k,
|
|
2426
2426
|
segment: C,
|
|
2427
2427
|
rotation: N
|
|
2428
2428
|
} = this.findSegmentToFitChar(t, n, c, y, i, w, s, A, M);
|
|
2429
|
-
w =
|
|
2429
|
+
w = k, !(!C.p0 || !C.p1) && this.glyphInfo.push({
|
|
2430
2430
|
// transposeX: midpoint.x,
|
|
2431
2431
|
// transposeY: midpoint.y,
|
|
2432
2432
|
text: r[M],
|
|
@@ -2713,8 +2713,8 @@ class _e extends F {
|
|
|
2713
2713
|
return this.equidistantCache.points[i] || null;
|
|
2714
2714
|
}
|
|
2715
2715
|
}
|
|
2716
|
-
var
|
|
2717
|
-
class
|
|
2716
|
+
var Xe = /^\s*data:(([^/,;]+\/[^/,;]+)(?:;([^,;=]+=[^,;=]+))?)?(?:;(base64))?,(.*)$/i;
|
|
2717
|
+
class Ue extends j {
|
|
2718
2718
|
constructor(t, e, r) {
|
|
2719
2719
|
super(t, e, r), this.type = "image", this.loaded = !1;
|
|
2720
2720
|
var i = this.getHrefAttribute().getString();
|
|
@@ -2737,7 +2737,7 @@ class Xe extends W {
|
|
|
2737
2737
|
loadSvg(t) {
|
|
2738
2738
|
var e = this;
|
|
2739
2739
|
return L(function* () {
|
|
2740
|
-
var r =
|
|
2740
|
+
var r = Xe.exec(t);
|
|
2741
2741
|
if (r) {
|
|
2742
2742
|
var i = r[5];
|
|
2743
2743
|
r[4] === "base64" ? e.image = atob(i) : e.image = decodeURIComponent(i);
|
|
@@ -2788,14 +2788,14 @@ class Xe extends W {
|
|
|
2788
2788
|
return new B(t, e, t + r, e + i);
|
|
2789
2789
|
}
|
|
2790
2790
|
}
|
|
2791
|
-
class
|
|
2791
|
+
class We extends j {
|
|
2792
2792
|
constructor() {
|
|
2793
2793
|
super(...arguments), this.type = "symbol";
|
|
2794
2794
|
}
|
|
2795
2795
|
render(t) {
|
|
2796
2796
|
}
|
|
2797
2797
|
}
|
|
2798
|
-
class
|
|
2798
|
+
class je {
|
|
2799
2799
|
constructor(t) {
|
|
2800
2800
|
this.document = t, this.loaded = !1, t.fonts.push(this);
|
|
2801
2801
|
}
|
|
@@ -2816,7 +2816,7 @@ class We {
|
|
|
2816
2816
|
})();
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
|
-
class
|
|
2819
|
+
class Xt extends P {
|
|
2820
2820
|
constructor(t, e, r) {
|
|
2821
2821
|
super(t, e, r), this.type = "style";
|
|
2822
2822
|
var i = H(
|
|
@@ -2839,7 +2839,7 @@ class jt extends P {
|
|
|
2839
2839
|
p.forEach((c) => {
|
|
2840
2840
|
if (c.indexOf('format("svg")') > 0) {
|
|
2841
2841
|
var y = Nt(c);
|
|
2842
|
-
y && new
|
|
2842
|
+
y && new je(t).load(d, y);
|
|
2843
2843
|
}
|
|
2844
2844
|
});
|
|
2845
2845
|
}
|
|
@@ -2849,8 +2849,8 @@ class jt extends P {
|
|
|
2849
2849
|
});
|
|
2850
2850
|
}
|
|
2851
2851
|
}
|
|
2852
|
-
|
|
2853
|
-
class Ye extends
|
|
2852
|
+
Xt.parseExternalUrl = Nt;
|
|
2853
|
+
class Ye extends j {
|
|
2854
2854
|
constructor() {
|
|
2855
2855
|
super(...arguments), this.type = "use";
|
|
2856
2856
|
}
|
|
@@ -2891,7 +2891,7 @@ class Ye extends W {
|
|
|
2891
2891
|
document: t,
|
|
2892
2892
|
element: e
|
|
2893
2893
|
} = this;
|
|
2894
|
-
return
|
|
2894
|
+
return W.fromElement(t, e);
|
|
2895
2895
|
}
|
|
2896
2896
|
get element() {
|
|
2897
2897
|
return this.cachedElement || (this.cachedElement = this.getHrefAttribute().getDefinition()), this.cachedElement;
|
|
@@ -2910,10 +2910,10 @@ function T(o, t, e) {
|
|
|
2910
2910
|
function R(o, t, e, r) {
|
|
2911
2911
|
return t + Math.cos(o) * e + Math.sin(o) * r;
|
|
2912
2912
|
}
|
|
2913
|
-
class
|
|
2913
|
+
class Ut extends P {
|
|
2914
2914
|
constructor(t, e, r) {
|
|
2915
2915
|
super(t, e, r), this.type = "feColorMatrix";
|
|
2916
|
-
var i =
|
|
2916
|
+
var i = O(this.getAttribute("values").getString());
|
|
2917
2917
|
switch (this.getAttribute("type").getString("matrix")) {
|
|
2918
2918
|
// http://www.w3.org/TR/SVG/filters.html#feColorMatrixElement
|
|
2919
2919
|
case "saturate": {
|
|
@@ -2959,7 +2959,7 @@ class rt extends P {
|
|
|
2959
2959
|
}), i = Math.floor(h.x1), a = Math.floor(h.y1), s = Math.floor(h.width), n = Math.floor(h.height);
|
|
2960
2960
|
}
|
|
2961
2961
|
var u = this.removeStyles(e, rt.ignoreStyles), l = r.createCanvas(i + s, a + n), g = l.getContext("2d");
|
|
2962
|
-
r.screen.setDefaults(g), this.renderChildren(g), new
|
|
2962
|
+
r.screen.setDefaults(g), this.renderChildren(g), new Ut(r, {
|
|
2963
2963
|
nodeType: 1,
|
|
2964
2964
|
childNodes: [],
|
|
2965
2965
|
attributes: [{
|
|
@@ -2993,7 +2993,7 @@ class He extends P {
|
|
|
2993
2993
|
r && (r.beginPath = Et, r.closePath = Et), Reflect.apply(i, t, []), this.children.forEach((s) => {
|
|
2994
2994
|
if (!(typeof s.path > "u")) {
|
|
2995
2995
|
var n = typeof s.elementTransform < "u" ? s.elementTransform() : null;
|
|
2996
|
-
n || (n =
|
|
2996
|
+
n || (n = W.fromElement(e, s)), n && n.apply(t), s.path(t), r && (r.closePath = a), n && n.unapply(t);
|
|
2997
2997
|
}
|
|
2998
2998
|
}), Reflect.apply(a, t, []), t.clip(), r && (r.beginPath = i, r.closePath = a);
|
|
2999
2999
|
}
|
|
@@ -3058,7 +3058,7 @@ class Qe extends P {
|
|
|
3058
3058
|
document: s,
|
|
3059
3059
|
blurRadius: n
|
|
3060
3060
|
} = this, h = s.window ? s.window.document.body : null, u = t.canvas;
|
|
3061
|
-
u.id = s.getUniqueId(), h && (u.style.display = "none", h.appendChild(u)),
|
|
3061
|
+
u.id = s.getUniqueId(), h && (u.style.display = "none", h.appendChild(u)), jt(u, e, r, i, a, n), h && h.removeChild(u);
|
|
3062
3062
|
}
|
|
3063
3063
|
}
|
|
3064
3064
|
class Ze extends P {
|
|
@@ -3083,8 +3083,8 @@ var Ke = {
|
|
|
3083
3083
|
pattern: Te,
|
|
3084
3084
|
marker: Me,
|
|
3085
3085
|
defs: Ee,
|
|
3086
|
-
linearGradient:
|
|
3087
|
-
radialGradient:
|
|
3086
|
+
linearGradient: ke,
|
|
3087
|
+
radialGradient: Oe,
|
|
3088
3088
|
stop: Ne,
|
|
3089
3089
|
animate: gt,
|
|
3090
3090
|
animateColor: Be,
|
|
@@ -3098,10 +3098,10 @@ var Ke = {
|
|
|
3098
3098
|
tref: Ie,
|
|
3099
3099
|
a: Fe,
|
|
3100
3100
|
textPath: _e,
|
|
3101
|
-
image:
|
|
3101
|
+
image: Ue,
|
|
3102
3102
|
g: lt,
|
|
3103
|
-
symbol:
|
|
3104
|
-
style:
|
|
3103
|
+
symbol: We,
|
|
3104
|
+
style: Xt,
|
|
3105
3105
|
use: Ye,
|
|
3106
3106
|
mask: rt,
|
|
3107
3107
|
clipPath: He,
|
|
@@ -3109,12 +3109,12 @@ var Ke = {
|
|
|
3109
3109
|
feDropShadow: $e,
|
|
3110
3110
|
feMorphology: Ge,
|
|
3111
3111
|
feComposite: qe,
|
|
3112
|
-
feColorMatrix:
|
|
3112
|
+
feColorMatrix: Ut,
|
|
3113
3113
|
feGaussianBlur: Qe,
|
|
3114
3114
|
title: Ze,
|
|
3115
3115
|
desc: Je
|
|
3116
3116
|
};
|
|
3117
|
-
function
|
|
3117
|
+
function kt(o, t) {
|
|
3118
3118
|
var e = Object.keys(o);
|
|
3119
3119
|
if (Object.getOwnPropertySymbols) {
|
|
3120
3120
|
var r = Object.getOwnPropertySymbols(o);
|
|
@@ -3127,9 +3127,9 @@ function Ot(o, t) {
|
|
|
3127
3127
|
function tr(o) {
|
|
3128
3128
|
for (var t = 1; t < arguments.length; t++) {
|
|
3129
3129
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
3130
|
-
t % 2 ?
|
|
3130
|
+
t % 2 ? kt(Object(e), !0).forEach(function(r) {
|
|
3131
3131
|
ot(o, r, e[r]);
|
|
3132
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) :
|
|
3132
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : kt(Object(e)).forEach(function(r) {
|
|
3133
3133
|
Object.defineProperty(o, r, Object.getOwnPropertyDescriptor(e, r));
|
|
3134
3134
|
});
|
|
3135
3135
|
}
|
|
@@ -3163,7 +3163,7 @@ class I {
|
|
|
3163
3163
|
createImage: a = I.createImage,
|
|
3164
3164
|
anonymousCrossOrigin: s
|
|
3165
3165
|
} = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3166
|
-
this.canvg = t, this.definitions =
|
|
3166
|
+
this.canvg = t, this.definitions = {}, this.styles = {}, this.stylesSpecificity = {}, this.images = [], this.fonts = [], this.emSizeStack = [], this.uniqueId = 0, this.screen = t.screen, this.rootEmSize = e, this.emSize = r, this.createCanvas = i, this.createImage = this.bindCreateImage(a, s), this.screen.wait(this.isImagesLoaded.bind(this)), this.screen.wait(this.isFontsLoaded.bind(this));
|
|
3167
3167
|
}
|
|
3168
3168
|
bindCreateImage(t, e) {
|
|
3169
3169
|
return typeof e == "boolean" ? (r, i) => t(r, typeof i == "boolean" ? i : e) : t;
|
|
@@ -3224,7 +3224,7 @@ class I {
|
|
|
3224
3224
|
I.createCanvas = er;
|
|
3225
3225
|
I.createImage = rr;
|
|
3226
3226
|
I.elementTypes = Ke;
|
|
3227
|
-
function
|
|
3227
|
+
function Ot(o, t) {
|
|
3228
3228
|
var e = Object.keys(o);
|
|
3229
3229
|
if (Object.getOwnPropertySymbols) {
|
|
3230
3230
|
var r = Object.getOwnPropertySymbols(o);
|
|
@@ -3234,12 +3234,12 @@ function kt(o, t) {
|
|
|
3234
3234
|
}
|
|
3235
3235
|
return e;
|
|
3236
3236
|
}
|
|
3237
|
-
function
|
|
3237
|
+
function U(o) {
|
|
3238
3238
|
for (var t = 1; t < arguments.length; t++) {
|
|
3239
3239
|
var e = arguments[t] != null ? arguments[t] : {};
|
|
3240
|
-
t % 2 ?
|
|
3240
|
+
t % 2 ? Ot(Object(e), !0).forEach(function(r) {
|
|
3241
3241
|
ot(o, r, e[r]);
|
|
3242
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) :
|
|
3242
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(o, Object.getOwnPropertyDescriptors(e)) : Ot(Object(e)).forEach(function(r) {
|
|
3243
3243
|
Object.defineProperty(o, r, Object.getOwnPropertyDescriptor(e, r));
|
|
3244
3244
|
});
|
|
3245
3245
|
}
|
|
@@ -3292,7 +3292,7 @@ class q {
|
|
|
3292
3292
|
*/
|
|
3293
3293
|
fork(t, e) {
|
|
3294
3294
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3295
|
-
return q.from(t, e,
|
|
3295
|
+
return q.from(t, e, U(U({}, this.options), r));
|
|
3296
3296
|
}
|
|
3297
3297
|
/**
|
|
3298
3298
|
* Create new Canvg instance with inherited options.
|
|
@@ -3303,7 +3303,7 @@ class q {
|
|
|
3303
3303
|
*/
|
|
3304
3304
|
forkString(t, e) {
|
|
3305
3305
|
var r = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
3306
|
-
return q.fromString(t, e,
|
|
3306
|
+
return q.fromString(t, e, U(U({}, this.options), r));
|
|
3307
3307
|
}
|
|
3308
3308
|
/**
|
|
3309
3309
|
* Document is ready promise.
|
|
@@ -3327,7 +3327,7 @@ class q {
|
|
|
3327
3327
|
var t = arguments, e = this;
|
|
3328
3328
|
return L(function* () {
|
|
3329
3329
|
var r = t.length > 0 && t[0] !== void 0 ? t[0] : {};
|
|
3330
|
-
e.start(
|
|
3330
|
+
e.start(U({
|
|
3331
3331
|
enableRedraw: !0,
|
|
3332
3332
|
ignoreAnimation: !0,
|
|
3333
3333
|
ignoreMouse: !0
|
|
@@ -3344,7 +3344,7 @@ class q {
|
|
|
3344
3344
|
screen: r,
|
|
3345
3345
|
options: i
|
|
3346
3346
|
} = this;
|
|
3347
|
-
r.start(e,
|
|
3347
|
+
r.start(e, U(U({
|
|
3348
3348
|
enableRedraw: !0
|
|
3349
3349
|
}, i), t));
|
|
3350
3350
|
}
|
|
@@ -3383,7 +3383,7 @@ export {
|
|
|
3383
3383
|
I as Document,
|
|
3384
3384
|
P as Element,
|
|
3385
3385
|
Pe as EllipseElement,
|
|
3386
|
-
|
|
3386
|
+
Ut as FeColorMatrixElement,
|
|
3387
3387
|
qe as FeCompositeElement,
|
|
3388
3388
|
$e as FeDropShadowElement,
|
|
3389
3389
|
Qe as FeGaussianBlurElement,
|
|
@@ -3395,9 +3395,9 @@ export {
|
|
|
3395
3395
|
lt as GElement,
|
|
3396
3396
|
Lt as GlyphElement,
|
|
3397
3397
|
_t as GradientElement,
|
|
3398
|
-
|
|
3398
|
+
Ue as ImageElement,
|
|
3399
3399
|
Ce as LineElement,
|
|
3400
|
-
|
|
3400
|
+
ke as LinearGradientElement,
|
|
3401
3401
|
Me as MarkerElement,
|
|
3402
3402
|
rt as MaskElement,
|
|
3403
3403
|
zt as Matrix,
|
|
@@ -3415,26 +3415,26 @@ export {
|
|
|
3415
3415
|
Ct as QB1,
|
|
3416
3416
|
Vt as QB2,
|
|
3417
3417
|
Tt as QB3,
|
|
3418
|
-
|
|
3418
|
+
Oe as RadialGradientElement,
|
|
3419
3419
|
It as RectElement,
|
|
3420
|
-
|
|
3420
|
+
j as RenderedElement,
|
|
3421
3421
|
ge as Rotate,
|
|
3422
3422
|
Q as SVGElement,
|
|
3423
|
-
|
|
3423
|
+
je as SVGFontLoader,
|
|
3424
3424
|
fe as Scale,
|
|
3425
3425
|
tt as Screen,
|
|
3426
3426
|
Rt as Skew,
|
|
3427
3427
|
ve as SkewX,
|
|
3428
3428
|
de as SkewY,
|
|
3429
3429
|
Ne as StopElement,
|
|
3430
|
-
|
|
3431
|
-
|
|
3430
|
+
Xt as StyleElement,
|
|
3431
|
+
We as SymbolElement,
|
|
3432
3432
|
Ie as TRefElement,
|
|
3433
3433
|
et as TSpanElement,
|
|
3434
3434
|
F as TextElement,
|
|
3435
3435
|
_e as TextPathElement,
|
|
3436
3436
|
Ze as TitleElement,
|
|
3437
|
-
|
|
3437
|
+
W as Transform,
|
|
3438
3438
|
le as Translate,
|
|
3439
3439
|
me as UnknownElement,
|
|
3440
3440
|
Ye as UseElement,
|
|
@@ -3446,7 +3446,7 @@ export {
|
|
|
3446
3446
|
Zt as normalizeColor,
|
|
3447
3447
|
Nt as parseExternalUrl,
|
|
3448
3448
|
Pr as presets,
|
|
3449
|
-
|
|
3449
|
+
O as toNumbers,
|
|
3450
3450
|
$t as trimLeft,
|
|
3451
3451
|
Gt as trimRight,
|
|
3452
3452
|
bt as vectorMagnitude,
|