@component-hook/pdf-canvas 1.3.0-alpha.1 → 1.3.0-alpha.2
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/react/pdf-canvas.es.d.ts +9 -15
- package/dist/react/pdf-canvas.es.js +596 -600
- package/dist/react/pdf-canvas.umd.js +38 -38
- package/dist/vue/pdf-canvas.es.d.ts +9 -15
- package/dist/vue/pdf-canvas.es.js +505 -509
- package/dist/vue/pdf-canvas.umd.js +36 -36
- package/package.json +1 -1
|
@@ -11,8 +11,8 @@ var Eo = (a, t, e, s) => ({
|
|
|
11
11
|
return se(a, t, s);
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
-
import { onMounted as
|
|
15
|
-
const
|
|
14
|
+
import { onMounted as Bl, onBeforeUnmount as Ha, defineComponent as Hl, ref as zl, computed as ko, nextTick as Gl, watch as Wn, createElementBlock as Vl, openBlock as Xl, withModifiers as Un, normalizeStyle as Wl, createElementVNode as Ul, normalizeClass as Yl } from "vue";
|
|
15
|
+
const $l = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2040%2040'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='20'%20cy='20'%20r='10.75'%20stroke='currentColor'%20stroke-width='2.5'/%3e%3cpath%20d='M16%2024L23.7782%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3cpath%20d='M24%2024L16.2218%2016.2218'%20stroke='currentColor'%20stroke-width='2.5'%20stroke-linecap='round'/%3e%3c/svg%3e", ql = {
|
|
16
16
|
top: 100,
|
|
17
17
|
left: 50,
|
|
18
18
|
scaleX: 0.5,
|
|
@@ -21,7 +21,7 @@ const ql = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
|
|
|
21
21
|
cornerStrokeColor: "black",
|
|
22
22
|
cornerSize: 6,
|
|
23
23
|
selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
|
|
24
|
-
},
|
|
24
|
+
}, Kl = {
|
|
25
25
|
top: 100,
|
|
26
26
|
left: 50,
|
|
27
27
|
fontFamily: "helvetica",
|
|
@@ -31,16 +31,16 @@ const ql = "data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%20
|
|
|
31
31
|
scaleY: 0.7,
|
|
32
32
|
cornerSize: 6,
|
|
33
33
|
selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
|
|
34
|
-
},
|
|
34
|
+
}, Jl = {
|
|
35
35
|
borderColor: "black",
|
|
36
36
|
cornerStrokeColor: "black",
|
|
37
37
|
cornerSize: 8,
|
|
38
38
|
selectionBackgroundColor: "rgba(245, 245, 245, 0.8)"
|
|
39
|
-
},
|
|
39
|
+
}, Zl = {
|
|
40
40
|
stroke: "#000",
|
|
41
41
|
hoverStroke: "#B7EC5D",
|
|
42
|
-
src:
|
|
43
|
-
},
|
|
42
|
+
src: $l
|
|
43
|
+
}, Ql = [
|
|
44
44
|
"borderColor",
|
|
45
45
|
"cornerStrokeColor",
|
|
46
46
|
"cornerSize",
|
|
@@ -146,9 +146,9 @@ class Br extends _e {
|
|
|
146
146
|
super("".concat(t, " 'options.signal' is in 'aborted' state"));
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
|
-
class
|
|
149
|
+
class tc {
|
|
150
150
|
}
|
|
151
|
-
class
|
|
151
|
+
class ec extends tc {
|
|
152
152
|
testPrecision(t, e) {
|
|
153
153
|
const s = "precision ".concat(e, ` float;
|
|
154
154
|
void main(){}`), i = t.createShader(t.FRAGMENT_SHADER);
|
|
@@ -162,10 +162,10 @@ void main(){}`), i = t.createShader(t.FRAGMENT_SHADER);
|
|
|
162
162
|
return !!this.maxTextureSize && this.maxTextureSize >= t;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
const
|
|
165
|
+
const sc = {};
|
|
166
166
|
let Oo;
|
|
167
|
-
const xe = () => Oo || (Oo = { document, window, isTouchSupported: "ontouchstart" in window || "ontouchstart" in document || window && window.navigator && window.navigator.maxTouchPoints > 0, WebGLProbe: new
|
|
168
|
-
}, copyPasteData:
|
|
167
|
+
const xe = () => Oo || (Oo = { document, window, isTouchSupported: "ontouchstart" in window || "ontouchstart" in document || window && window.navigator && window.navigator.maxTouchPoints > 0, WebGLProbe: new ec(), dispose() {
|
|
168
|
+
}, copyPasteData: sc }), Fs = () => xe().document, di = () => xe().window, za = () => {
|
|
169
169
|
var a;
|
|
170
170
|
return Math.max((a = q.devicePixelRatio) !== null && a !== void 0 ? a : di().devicePixelRatio, 1);
|
|
171
171
|
}, Zs = new class {
|
|
@@ -190,7 +190,7 @@ const xe = () => Oo || (Oo = { document, window, isTouchSupported: "ontouchstart
|
|
|
190
190
|
}(), mr = "6.9.0";
|
|
191
191
|
function rs() {
|
|
192
192
|
}
|
|
193
|
-
const Ve = Math.PI / 2, Fe = 2 * Math.PI, Hr = Math.PI / 180, Bt = Object.freeze([1, 0, 0, 1, 0, 0]), zr = 16, Be = 0.4477152502, X = "center", J = "left", Wt = "top", br = "bottom", ut = "right", It = "none", Gr = /\r?\n/, Ga = "moving", wn = "scaling", Va = "rotating", Vr = "rotate", Xa = "skewing", oi = "resizing",
|
|
193
|
+
const Ve = Math.PI / 2, Fe = 2 * Math.PI, Hr = Math.PI / 180, Bt = Object.freeze([1, 0, 0, 1, 0, 0]), zr = 16, Be = 0.4477152502, X = "center", J = "left", Wt = "top", br = "bottom", ut = "right", It = "none", Gr = /\r?\n/, Ga = "moving", wn = "scaling", Va = "rotating", Vr = "rotate", Xa = "skewing", oi = "resizing", ic = "modifyPoly", nc = "modifyPath", en = "changed", xn = "scale", Ht = "scaleX", Kt = "scaleY", Is = "skewX", Ns = "skewY", vt = "fill", Nt = "stroke", sn = "modified", vs = "json", Yn = "svg", F = new class {
|
|
194
194
|
constructor() {
|
|
195
195
|
this[vs] = /* @__PURE__ */ new Map(), this[Yn] = /* @__PURE__ */ new Map();
|
|
196
196
|
}
|
|
@@ -234,7 +234,7 @@ const Ve = Math.PI / 2, Fe = 2 * Math.PI, Hr = Math.PI / 180, Bt = Object.freeze
|
|
|
234
234
|
return t.forEach(((e) => e.abort())), t;
|
|
235
235
|
}
|
|
236
236
|
}();
|
|
237
|
-
class
|
|
237
|
+
class rc {
|
|
238
238
|
constructor() {
|
|
239
239
|
x(this, "__eventListeners", {});
|
|
240
240
|
}
|
|
@@ -535,7 +535,7 @@ function Wa(a) {
|
|
|
535
535
|
}
|
|
536
536
|
return t;
|
|
537
537
|
}
|
|
538
|
-
class Ua extends
|
|
538
|
+
class Ua extends rc {
|
|
539
539
|
_setOptions() {
|
|
540
540
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
541
541
|
for (const e in t) this.set(e, t[e]);
|
|
@@ -563,8 +563,8 @@ function Qs(a) {
|
|
|
563
563
|
function Ya(a) {
|
|
564
564
|
return di().cancelAnimationFrame(a);
|
|
565
565
|
}
|
|
566
|
-
let
|
|
567
|
-
const Xe = () =>
|
|
566
|
+
let oc = 0;
|
|
567
|
+
const Xe = () => oc++, Se = () => {
|
|
568
568
|
const a = Fs().createElement("canvas");
|
|
569
569
|
if (!a || a.getContext === void 0) throw new _e("Failed to create `canvas` element");
|
|
570
570
|
return a;
|
|
@@ -713,7 +713,7 @@ class sh {
|
|
|
713
713
|
xe().dispose(this.lower.el), delete this.lower;
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
const
|
|
716
|
+
const ac = { backgroundVpt: !0, backgroundColor: "", overlayVpt: !0, overlayColor: "", includeDefaultValues: !0, svgViewportTransformation: !0, renderOnAddRemove: !0, skipOffscreen: !0, enableRetinaScaling: !0, imageSmoothingEnabled: !0, controlsAboveOverlay: !1, allowTouchScrolling: !1, viewportTransform: [...Bt] }, hc = ["objects"];
|
|
717
717
|
class pi extends Wa(Ua) {
|
|
718
718
|
get lowerCanvasEl() {
|
|
719
719
|
var t;
|
|
@@ -1019,7 +1019,7 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
1019
1019
|
loadFromJSON(t, e) {
|
|
1020
1020
|
let { signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
1021
1021
|
if (!t) return Promise.reject(new _e("`json` is undefined"));
|
|
1022
|
-
const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [] } = i, r = st(i,
|
|
1022
|
+
const i = typeof t == "string" ? JSON.parse(t) : t, { objects: n = [] } = i, r = st(i, hc), { backgroundImage: o, background: h, overlayImage: l, overlay: c, clipPath: u } = r, d = this.renderOnAddRemove;
|
|
1023
1023
|
return this.renderOnAddRemove = !1, Promise.all([Os(n, { reviver: e, signal: s }), gi({ backgroundImage: o, backgroundColor: h, overlayImage: l, overlayColor: c, clipPath: u }, { signal: s })]).then(((f) => {
|
|
1024
1024
|
let [g, p] = f;
|
|
1025
1025
|
return this.clear(), this.add(...g), this.set(r), this.set(p), this.renderOnAddRemove = d, this;
|
|
@@ -1063,14 +1063,14 @@ Resulting to default behavior: removing object from previous canvas and adding t
|
|
|
1063
1063
|
return "#<Canvas (".concat(this.complexity(), "): { objects: ").concat(this._objects.length, " }>");
|
|
1064
1064
|
}
|
|
1065
1065
|
}
|
|
1066
|
-
x(pi, "ownDefaults",
|
|
1067
|
-
const
|
|
1066
|
+
x(pi, "ownDefaults", ac);
|
|
1067
|
+
const lc = ["touchstart", "touchmove", "touchend"], ih = (a) => {
|
|
1068
1068
|
const t = Qa(a.target), e = (function(s) {
|
|
1069
1069
|
const i = s.changedTouches;
|
|
1070
1070
|
return i && i[0] ? i[0] : s;
|
|
1071
1071
|
})(a);
|
|
1072
1072
|
return new C(e.clientX + t.left, e.clientY + t.top);
|
|
1073
|
-
}, rn = (a) =>
|
|
1073
|
+
}, rn = (a) => lc.includes(a.type) || a.pointerType === "touch", Fo = (a) => {
|
|
1074
1074
|
a.preventDefault(), a.stopPropagation();
|
|
1075
1075
|
}, we = (a) => {
|
|
1076
1076
|
let t = 0, e = 0, s = 0, i = 0;
|
|
@@ -1079,8 +1079,8 @@ const cc = ["touchstart", "touchmove", "touchend"], ih = (a) => {
|
|
|
1079
1079
|
(o > s || !n) && (s = o), (o < t || !n) && (t = o), (h > i || !n) && (i = h), (h < e || !n) && (e = h);
|
|
1080
1080
|
}
|
|
1081
1081
|
return { left: t, top: e, width: s - t, height: i - e };
|
|
1082
|
-
},
|
|
1083
|
-
const e = as(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o = st(e,
|
|
1082
|
+
}, cc = ["translateX", "translateY", "scaleX", "scaleY"], nh = (a, t) => Rs(a, dt(t, a.calcOwnMatrix())), Rs = (a, t) => {
|
|
1083
|
+
const e = as(t), { translateX: s, translateY: i, scaleX: n, scaleY: r } = e, o = st(e, cc), h = new C(s, i);
|
|
1084
1084
|
a.flipX = !1, a.flipY = !1, Object.assign(a, o), a.set({ scaleX: n, scaleY: r }), a.setPositionByOrigin(h, X, X);
|
|
1085
1085
|
}, rh = (a) => {
|
|
1086
1086
|
a.scaleX = 1, a.scaleY = 1, a.skewX = 0, a.skewY = 0, a.flipX = !1, a.flipY = !1, a.rotate(0);
|
|
@@ -1103,7 +1103,7 @@ const cc = ["touchstart", "touchmove", "touchend"], ih = (a) => {
|
|
|
1103
1103
|
var e;
|
|
1104
1104
|
const { transform: { target: s } } = t;
|
|
1105
1105
|
(e = s.canvas) === null || e === void 0 || e.fire("object:".concat(a), w(w({}, t), {}, { target: s })), s.fire(a, t);
|
|
1106
|
-
},
|
|
1106
|
+
}, uc = { left: -0.5, top: -0.5, center: 0, bottom: 0.5, right: 0.5 }, mt = (a) => typeof a == "string" ? uc[a] : a - 0.5, on = "not-allowed";
|
|
1107
1107
|
function hh(a) {
|
|
1108
1108
|
return mt(a.originX) === mt(X) && mt(a.originY) === mt(X);
|
|
1109
1109
|
}
|
|
@@ -1124,7 +1124,7 @@ function Jr(a, t, e, s, i) {
|
|
|
1124
1124
|
})(r, new C(s, i), t, e);
|
|
1125
1125
|
return u.x >= c && (u.x -= c), u.x <= -c && (u.x += c), u.y >= c && (u.y -= c), u.y <= c && (u.y += c), u.x -= h.offsetX, u.y -= h.offsetY, u;
|
|
1126
1126
|
}
|
|
1127
|
-
const
|
|
1127
|
+
const dc = (a, t, e, s) => {
|
|
1128
1128
|
const { target: i, offsetX: n, offsetY: r } = t, o = e - n, h = s - r, l = !le(i, "lockMovementX") && i.left !== o, c = !le(i, "lockMovementY") && i.top !== h;
|
|
1129
1129
|
return l && i.set(J, o), c && i.set(Wt, h), (l || c) && ah(Ga, lh(a, t, e, s)), l || c;
|
|
1130
1130
|
}, an = (a) => a.replace(/\s+/g, " "), No = { aliceblue: "#F0F8FF", antiquewhite: "#FAEBD7", aqua: "#0FF", aquamarine: "#7FFFD4", azure: "#F0FFFF", beige: "#F5F5DC", bisque: "#FFE4C4", black: "#000", blanchedalmond: "#FFEBCD", blue: "#00F", blueviolet: "#8A2BE2", brown: "#A52A2A", burlywood: "#DEB887", cadetblue: "#5F9EA0", chartreuse: "#7FFF00", chocolate: "#D2691E", coral: "#FF7F50", cornflowerblue: "#6495ED", cornsilk: "#FFF8DC", crimson: "#DC143C", cyan: "#0FF", darkblue: "#00008B", darkcyan: "#008B8B", darkgoldenrod: "#B8860B", darkgray: "#A9A9A9", darkgrey: "#A9A9A9", darkgreen: "#006400", darkkhaki: "#BDB76B", darkmagenta: "#8B008B", darkolivegreen: "#556B2F", darkorange: "#FF8C00", darkorchid: "#9932CC", darkred: "#8B0000", darksalmon: "#E9967A", darkseagreen: "#8FBC8F", darkslateblue: "#483D8B", darkslategray: "#2F4F4F", darkslategrey: "#2F4F4F", darkturquoise: "#00CED1", darkviolet: "#9400D3", deeppink: "#FF1493", deepskyblue: "#00BFFF", dimgray: "#696969", dimgrey: "#696969", dodgerblue: "#1E90FF", firebrick: "#B22222", floralwhite: "#FFFAF0", forestgreen: "#228B22", fuchsia: "#F0F", gainsboro: "#DCDCDC", ghostwhite: "#F8F8FF", gold: "#FFD700", goldenrod: "#DAA520", gray: "#808080", grey: "#808080", green: "#008000", greenyellow: "#ADFF2F", honeydew: "#F0FFF0", hotpink: "#FF69B4", indianred: "#CD5C5C", indigo: "#4B0082", ivory: "#FFFFF0", khaki: "#F0E68C", lavender: "#E6E6FA", lavenderblush: "#FFF0F5", lawngreen: "#7CFC00", lemonchiffon: "#FFFACD", lightblue: "#ADD8E6", lightcoral: "#F08080", lightcyan: "#E0FFFF", lightgoldenrodyellow: "#FAFAD2", lightgray: "#D3D3D3", lightgrey: "#D3D3D3", lightgreen: "#90EE90", lightpink: "#FFB6C1", lightsalmon: "#FFA07A", lightseagreen: "#20B2AA", lightskyblue: "#87CEFA", lightslategray: "#789", lightslategrey: "#789", lightsteelblue: "#B0C4DE", lightyellow: "#FFFFE0", lime: "#0F0", limegreen: "#32CD32", linen: "#FAF0E6", magenta: "#F0F", maroon: "#800000", mediumaquamarine: "#66CDAA", mediumblue: "#0000CD", mediumorchid: "#BA55D3", mediumpurple: "#9370DB", mediumseagreen: "#3CB371", mediumslateblue: "#7B68EE", mediumspringgreen: "#00FA9A", mediumturquoise: "#48D1CC", mediumvioletred: "#C71585", midnightblue: "#191970", mintcream: "#F5FFFA", mistyrose: "#FFE4E1", moccasin: "#FFE4B5", navajowhite: "#FFDEAD", navy: "#000080", oldlace: "#FDF5E6", olive: "#808000", olivedrab: "#6B8E23", orange: "#FFA500", orangered: "#FF4500", orchid: "#DA70D6", palegoldenrod: "#EEE8AA", palegreen: "#98FB98", paleturquoise: "#AFEEEE", palevioletred: "#DB7093", papayawhip: "#FFEFD5", peachpuff: "#FFDAB9", peru: "#CD853F", pink: "#FFC0CB", plum: "#DDA0DD", powderblue: "#B0E0E6", purple: "#800080", rebeccapurple: "#639", red: "#F00", rosybrown: "#BC8F8F", royalblue: "#4169E1", saddlebrown: "#8B4513", salmon: "#FA8072", sandybrown: "#F4A460", seagreen: "#2E8B57", seashell: "#FFF5EE", sienna: "#A0522D", silver: "#C0C0C0", skyblue: "#87CEEB", slateblue: "#6A5ACD", slategray: "#708090", slategrey: "#708090", snow: "#FFFAFA", springgreen: "#00FF7F", steelblue: "#4682B4", tan: "#D2B48C", teal: "#008080", thistle: "#D8BFD8", tomato: "#FF6347", turquoise: "#40E0D0", violet: "#EE82EE", wheat: "#F5DEB3", white: "#FFF", whitesmoke: "#F5F5F5", yellow: "#FF0", yellowgreen: "#9ACD32" }, $n = (a, t, e) => (e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? a + 6 * (t - a) * e : e < 0.5 ? t : e < 2 / 3 ? a + (t - a) * (2 / 3 - e) * 6 : a), jo = (a, t, e, s) => {
|
|
@@ -1349,9 +1349,9 @@ class uh {
|
|
|
1349
1349
|
function Tn(a) {
|
|
1350
1350
|
return new RegExp("^(" + a.join("|") + ")\\b", "i");
|
|
1351
1351
|
}
|
|
1352
|
-
const hs = "textDecorationThickness", dh = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], fh = ["underline", "overline", "linethrough"], gh = [...dh, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], ph = [...gh, ...fh, "textBackgroundColor", "direction", hs],
|
|
1352
|
+
const hs = "textDecorationThickness", dh = ["fontSize", "fontWeight", "fontFamily", "fontStyle"], fh = ["underline", "overline", "linethrough"], gh = [...dh, "lineHeight", "text", "charSpacing", "textAlign", "styles", "path", "pathStartOffset", "pathSide", "pathAlign"], ph = [...gh, ...fh, "textBackgroundColor", "direction", hs], fc = [...dh, ...fh, Nt, "strokeWidth", vt, "deltaY", "textBackgroundColor", hs], gc = { _reNewline: Gr, _reSpacesAndTabs: /[ \t\r]/g, _reSpaceAndTab: /[ \t\r]/, _reWords: /\S+/g, fontSize: 40, fontWeight: "normal", fontFamily: "Times New Roman", underline: !1, overline: !1, linethrough: !1, textAlign: J, fontStyle: "normal", lineHeight: 1.16, textBackgroundColor: "", stroke: null, shadow: null, path: void 0, pathStartOffset: 0, pathSide: J, pathAlign: "baseline", charSpacing: 0, deltaY: 0, direction: "ltr", CACHE_FONT_SIZE: 400, MIN_TEXT_WIDTH: 2, superscript: { size: 0.6, baseline: -0.35 }, subscript: { size: 0.6, baseline: 0.11 }, _fontSizeFraction: 0.222, offsets: { underline: 0.1, linethrough: -0.28167, overline: -0.81333 }, _fontSizeMult: 1.13, [hs]: 66.667 }, ye = "justify", hn = "justify-left", ei = "justify-right", si = "justify-center";
|
|
1353
1353
|
var zo, Go, Vo;
|
|
1354
|
-
const he = String.raw(zo || (zo = Ae(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), qn = String.raw(Go || (Go = Ae(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), _r = "http://www.w3.org/2000/svg",
|
|
1354
|
+
const he = String.raw(zo || (zo = Ae(["[-+]?(?:d*.d+|d+.?)(?:[eE][-+]?d+)?"], ["[-+]?(?:\\d*\\.\\d+|\\d+\\.?)(?:[eE][-+]?\\d+)?"]))), qn = String.raw(Go || (Go = Ae(["(?:s*,?s+|s*,s*)"], ["(?:\\s*,?\\s+|\\s*,\\s*)"]))), _r = "http://www.w3.org/2000/svg", pc = new RegExp("(normal|italic)?\\s*(normal|small-caps)?\\s*(normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900)?\\s*(" + he + "(?:px|cm|mm|em|pt|pc|in)*)(?:\\/(normal|" + he + "))?\\s+(.*)"), mc = { cx: J, x: J, r: "radius", cy: Wt, y: Wt, display: "visible", visibility: "visible", transform: "transformMatrix", "fill-opacity": "fillOpacity", "fill-rule": "fillRule", "font-family": "fontFamily", "font-size": "fontSize", "font-style": "fontStyle", "font-weight": "fontWeight", "letter-spacing": "charSpacing", "paint-order": "paintFirst", "stroke-dasharray": "strokeDashArray", "stroke-dashoffset": "strokeDashOffset", "stroke-linecap": "strokeLineCap", "stroke-linejoin": "strokeLineJoin", "stroke-miterlimit": "strokeMiterLimit", "stroke-opacity": "strokeOpacity", "stroke-width": "strokeWidth", "text-decoration": "textDecoration", "text-anchor": "textAnchor", opacity: "opacity", "clip-path": "clipPath", "clip-rule": "clipRule", "vector-effect": "strokeUniform", "image-rendering": "imageSmoothing", "text-decoration-thickness": hs }, Kn = "font-size", Jn = "clip-path", bc = Tn(["path", "circle", "polygon", "polyline", "ellipse", "rect", "line", "image", "text"]), vc = Tn(["symbol", "image", "marker", "pattern", "view", "svg"]), Xo = Tn(["symbol", "g", "a", "svg", "clipPath", "defs"]), Wo = new RegExp(String.raw(Vo || (Vo = Ae(["^s*(", ")", "(", ")", "(", ")", "(", ")s*$"], ["^\\s*(", ")", "(", ")", "(", ")", "(", ")\\s*$"])), he, qn, he, qn, he, qn, he)), yc = new C(1, 0), mh = new C(), Qr = (a, t) => a.rotate(t), ln = (a, t) => new C(t).subtract(a), cn = (a) => a.distanceFrom(mh), un = (a, t) => Math.atan2(As(a, t), vh(a, t)), bh = (a) => un(yc, a), En = (a) => a.eq(mh) ? a : a.scalarDivide(cn(a)), to = function(a) {
|
|
1355
1355
|
let t = !(arguments.length > 1 && arguments[1] !== void 0) || arguments[1];
|
|
1356
1356
|
return En(new C(-a.y, a.x).scalarMultiply(t ? 1 : -1));
|
|
1357
1357
|
}, As = (a, t) => a.x * t.y - a.y * t.x, vh = (a, t) => a.x * t.x + a.y * t.y, wr = (a, t, e) => {
|
|
@@ -1395,8 +1395,8 @@ class Re {
|
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
1397
|
x(Re, "ownDefaults", { color: "rgb(0,0,0)", blur: 0, offsetX: 0, offsetY: 0, affectStroke: !1, includeDefaultValues: !0, nonScaling: !1 }), x(Re, "type", "shadow"), F.setClass(Re, "shadow");
|
|
1398
|
-
const ls = (a, t, e) => Math.max(a, Math.min(t, e)),
|
|
1399
|
-
var
|
|
1398
|
+
const ls = (a, t, e) => Math.max(a, Math.min(t, e)), _c = [Wt, J, Ht, Kt, "flipX", "flipY", "originX", "originY", "angle", "opacity", "globalCompositeOperation", "shadow", "visible", Is, Ns], Ie = [vt, Nt, "strokeWidth", "strokeDashArray", "width", "height", "paintFirst", "strokeUniform", "strokeLineCap", "strokeDashOffset", "strokeLineJoin", "strokeMiterLimit", "backgroundColor", "clipPath"], wc = { top: 0, left: 0, width: 0, height: 0, angle: 0, flipX: !1, flipY: !1, scaleX: 1, scaleY: 1, minScaleLimit: 0, skewX: 0, skewY: 0, originX: J, originY: Wt, strokeWidth: 1, strokeUniform: !1, padding: 0, opacity: 1, paintFirst: vt, fill: "rgb(0,0,0)", fillRule: "nonzero", stroke: null, strokeDashArray: null, strokeDashOffset: 0, strokeLineCap: "butt", strokeLineJoin: "miter", strokeMiterLimit: 4, globalCompositeOperation: "source-over", backgroundColor: "", shadow: null, visible: !0, includeDefaultValues: !0, excludeFromExport: !1, objectCaching: !0, clipPath: void 0, inverted: !1, absolutePositioned: !1, centeredRotation: !0, centeredScaling: !1, dirty: !0 }, Zn = (a, t, e, s) => (a < Math.abs(t) ? (a = t, s = e / 4) : s = t === 0 && a === 0 ? e / Fe * Math.asin(1) : e / Fe * Math.asin(t / a), { a, c: t, p: e, s }), $o = (a, t, e, s, i) => a * Math.pow(2, 10 * (s -= 1)) * Math.sin((s * i - t) * Fe / e), yh = (a, t, e, s) => -e * Math.cos(a / s * Ve) + e + t, xr = (a, t, e, s) => (a /= s) < 1 / 2.75 ? e * (7.5625 * a * a) + t : a < 2 / 2.75 ? e * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + t : a < 2.5 / 2.75 ? e * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + t : e * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + t, qo = (a, t, e, s) => e - xr(s - a, 0, e, s) + t;
|
|
1399
|
+
var xc = Object.freeze({ __proto__: null, defaultEasing: yh, easeInBack: function(a, t, e, s) {
|
|
1400
1400
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : 1.70158;
|
|
1401
1401
|
return e * (a /= s) * a * ((i + 1) * a - i) + t;
|
|
1402
1402
|
}, easeInBounce: qo, easeInCirc: (a, t, e, s) => -e * (Math.sqrt(1 - (a /= s) * a) - 1) + t, easeInCubic: (a, t, e, s) => e * (a / s) ** 3 + t, easeInElastic: (a, t, e, s) => {
|
|
@@ -1430,10 +1430,10 @@ var Sc = Object.freeze({ __proto__: null, defaultEasing: yh, easeInBack: functio
|
|
|
1430
1430
|
const { a: r, s: o, p: h, c: l } = Zn(i, e, n, 1.70158);
|
|
1431
1431
|
return r * 2 ** (-10 * a) * Math.sin((a * s - o) * Fe / h) + l + t;
|
|
1432
1432
|
}, easeOutExpo: (a, t, e, s) => a === s ? t + e : e * -(2 ** (-10 * a / s) + 1) + t, easeOutQuad: (a, t, e, s) => -e * (a /= s) * (a - 2) + t, easeOutQuart: (a, t, e, s) => -e * ((a = a / s - 1) * a ** 3 - 1) + t, easeOutQuint: (a, t, e, s) => e * ((a / s - 1) ** 5 + 1) + t, easeOutSine: (a, t, e, s) => e * Math.sin(a / s * Ve) + t });
|
|
1433
|
-
const
|
|
1433
|
+
const Sc = () => !1;
|
|
1434
1434
|
class eo {
|
|
1435
1435
|
constructor(t) {
|
|
1436
|
-
let { startValue: e, byValue: s, duration: i = 500, delay: n = 0, easing: r = yh, onStart: o = rs, onChange: h = rs, onComplete: l = rs, abort: c =
|
|
1436
|
+
let { startValue: e, byValue: s, duration: i = 500, delay: n = 0, easing: r = yh, onStart: o = rs, onChange: h = rs, onComplete: l = rs, abort: c = Sc, target: u } = t;
|
|
1437
1437
|
x(this, "_state", "pending"), x(this, "durationProgress", 0), x(this, "valueProgress", 0), this.tick = this.tick.bind(this), this.duration = i, this.delay = n, this.easing = r, this._onStart = o, this._onChange = h, this._onComplete = l, this._abort = c, this.target = u, this.startValue = e, this.byValue = s, this.value = this.startValue, this.endValue = Object.freeze(this.calculate(this.duration).value);
|
|
1438
1438
|
}
|
|
1439
1439
|
get state() {
|
|
@@ -1464,32 +1464,32 @@ class eo {
|
|
|
1464
1464
|
this._state = "aborted", this.unregister();
|
|
1465
1465
|
}
|
|
1466
1466
|
}
|
|
1467
|
-
const
|
|
1468
|
-
class
|
|
1467
|
+
const Cc = ["startValue", "endValue"];
|
|
1468
|
+
class Ac extends eo {
|
|
1469
1469
|
constructor(t) {
|
|
1470
1470
|
let { startValue: e = 0, endValue: s = 100 } = t;
|
|
1471
|
-
super(w(w({}, st(t,
|
|
1471
|
+
super(w(w({}, st(t, Cc)), {}, { startValue: e, byValue: s - e }));
|
|
1472
1472
|
}
|
|
1473
1473
|
calculate(t) {
|
|
1474
1474
|
const e = this.easing(t, this.startValue, this.byValue, this.duration);
|
|
1475
1475
|
return { value: e, valueProgress: Math.abs((e - this.startValue) / this.byValue) };
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
const
|
|
1479
|
-
class
|
|
1478
|
+
const Tc = ["startValue", "endValue"];
|
|
1479
|
+
class Ec extends eo {
|
|
1480
1480
|
constructor(t) {
|
|
1481
1481
|
let { startValue: e = [0], endValue: s = [100] } = t;
|
|
1482
|
-
super(w(w({}, st(t,
|
|
1482
|
+
super(w(w({}, st(t, Tc)), {}, { startValue: e, byValue: s.map(((i, n) => i - e[n])) }));
|
|
1483
1483
|
}
|
|
1484
1484
|
calculate(t) {
|
|
1485
1485
|
const e = this.startValue.map(((s, i) => this.easing(t, s, this.byValue[i], this.duration, i)));
|
|
1486
1486
|
return { value: e, valueProgress: Math.abs((e[0] - this.startValue[0]) / this.byValue[0]) };
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
|
-
const
|
|
1490
|
-
class
|
|
1489
|
+
const kc = ["startValue", "endValue", "easing", "onChange", "onComplete", "abort"], Mc = (a, t, e, s) => t + e * (1 - Math.cos(a / s * Ve)), Qn = (a) => a && ((t, e, s) => a(new Z(t).toRgba(), e, s));
|
|
1490
|
+
class Pc extends eo {
|
|
1491
1491
|
constructor(t) {
|
|
1492
|
-
let { startValue: e, endValue: s, easing: i =
|
|
1492
|
+
let { startValue: e, endValue: s, easing: i = Mc, onChange: n, onComplete: r, abort: o } = t, h = st(t, kc);
|
|
1493
1493
|
const l = new Z(e).getSource(), c = new Z(s).getSource();
|
|
1494
1494
|
super(w(w({}, h), {}, { startValue: l, byValue: c.map(((u, d) => u - l[d])), easing: i, onChange: Qn(n), onComplete: Qn(r), abort: Qn(o) }));
|
|
1495
1495
|
}
|
|
@@ -1499,11 +1499,11 @@ class Oc extends eo {
|
|
|
1499
1499
|
}
|
|
1500
1500
|
}
|
|
1501
1501
|
function so(a) {
|
|
1502
|
-
const t = ((e) => Array.isArray(e.startValue) || Array.isArray(e.endValue))(a) ? new
|
|
1502
|
+
const t = ((e) => Array.isArray(e.startValue) || Array.isArray(e.endValue))(a) ? new Ec(a) : new Ac(a);
|
|
1503
1503
|
return t.start(), t;
|
|
1504
1504
|
}
|
|
1505
1505
|
function _h(a) {
|
|
1506
|
-
const t = new
|
|
1506
|
+
const t = new Pc(a);
|
|
1507
1507
|
return t.start(), t;
|
|
1508
1508
|
}
|
|
1509
1509
|
class ot {
|
|
@@ -1581,7 +1581,7 @@ class ot {
|
|
|
1581
1581
|
return ot.intersectPolygonPolygon(t, [i, r, n, o]);
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
class
|
|
1584
|
+
class Oc extends Ua {
|
|
1585
1585
|
getX() {
|
|
1586
1586
|
return this.getXY().x;
|
|
1587
1587
|
}
|
|
@@ -1766,8 +1766,8 @@ class Dc extends Ua {
|
|
|
1766
1766
|
return this.translateToOriginPoint(this.getRelativeCenterPoint(), J, Wt);
|
|
1767
1767
|
}
|
|
1768
1768
|
}
|
|
1769
|
-
const
|
|
1770
|
-
let Te = class Ki extends
|
|
1769
|
+
const Dc = ["type"], Rc = ["extraParam"];
|
|
1770
|
+
let Te = class Ki extends Oc {
|
|
1771
1771
|
static getDefaults() {
|
|
1772
1772
|
return Ki.ownDefaults;
|
|
1773
1773
|
}
|
|
@@ -2101,14 +2101,14 @@ let Te = class Ki extends Dc {
|
|
|
2101
2101
|
return "#<".concat(this.constructor.type, ">");
|
|
2102
2102
|
}
|
|
2103
2103
|
static _fromObject(t) {
|
|
2104
|
-
let e = st(t,
|
|
2104
|
+
let e = st(t, Dc), s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { extraParam: i } = s, n = st(s, Rc);
|
|
2105
2105
|
return gi(e, n).then(((r) => i ? (delete r[i], new this(e[i], r)) : new this(r)));
|
|
2106
2106
|
}
|
|
2107
2107
|
static fromObject(t, e) {
|
|
2108
2108
|
return this._fromObject(t, e);
|
|
2109
2109
|
}
|
|
2110
2110
|
};
|
|
2111
|
-
x(Te, "stateProperties",
|
|
2111
|
+
x(Te, "stateProperties", _c), x(Te, "cacheProperties", Ie), x(Te, "ownDefaults", wc), x(Te, "type", "FabricObject"), x(Te, "colorProperties", [vt, Nt, "backgroundColor"]), x(Te, "customProperties", []), F.setClass(Te), F.setClass(Te, "object");
|
|
2112
2112
|
const Bs = (a, t, e) => (s, i, n, r) => {
|
|
2113
2113
|
const o = t(s, i, n, r);
|
|
2114
2114
|
return o && ah(a, w(w({}, lh(s, i, n, r)), e)), o;
|
|
@@ -2127,13 +2127,13 @@ const Ko = Bs(oi, Hs(((a, t, e, s) => {
|
|
|
2127
2127
|
}
|
|
2128
2128
|
return !1;
|
|
2129
2129
|
})));
|
|
2130
|
-
function
|
|
2130
|
+
function Lc(a, t, e, s, i) {
|
|
2131
2131
|
s = s || {};
|
|
2132
2132
|
const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, o = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = o ? Nt : vt, l = !o && (s.cornerStrokeColor || i.cornerStrokeColor);
|
|
2133
2133
|
let c, u = t, d = e;
|
|
2134
2134
|
a.save(), a.fillStyle = s.cornerColor || i.cornerColor || "", a.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", n > r ? (c = n, a.scale(1, r / n), d = e * n / r) : r > n ? (c = r, a.scale(n / r, 1), u = t * r / n) : c = n, a.beginPath(), a.arc(u, d, c / 2, 0, Fe, !1), a[h](), l && a.stroke(), a.restore();
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2136
|
+
function Fc(a, t, e, s, i) {
|
|
2137
2137
|
s = s || {};
|
|
2138
2138
|
const n = this.sizeX || s.cornerSize || i.cornerSize, r = this.sizeY || s.cornerSize || i.cornerSize, o = s.transparentCorners !== void 0 ? s.transparentCorners : i.transparentCorners, h = o ? Nt : vt, l = !o && (s.cornerStrokeColor || i.cornerStrokeColor), c = n / 2, u = r / 2;
|
|
2139
2139
|
a.save(), a.fillStyle = s.cornerColor || i.cornerColor || "", a.strokeStyle = s.cornerStrokeColor || i.cornerStrokeColor || "", a.translate(t, e);
|
|
@@ -2179,10 +2179,10 @@ class ne {
|
|
|
2179
2179
|
return { tl: new C(-0.5, -0.5).transform(o), tr: new C(0.5, -0.5).transform(o), br: new C(0.5, 0.5).transform(o), bl: new C(-0.5, 0.5).transform(o) };
|
|
2180
2180
|
}
|
|
2181
2181
|
render(t, e, s, i, n) {
|
|
2182
|
-
((i = i || {}).cornerStyle || n.cornerStyle) === "circle" ?
|
|
2182
|
+
((i = i || {}).cornerStyle || n.cornerStyle) === "circle" ? Lc.call(this, t, e, s, i, n) : Fc.call(this, t, e, s, i, n);
|
|
2183
2183
|
}
|
|
2184
2184
|
}
|
|
2185
|
-
const
|
|
2185
|
+
const Ic = (a, t, e) => e.lockRotation ? on : t.cursorStyle, Nc = Bs(Va, Hs(((a, t, e, s) => {
|
|
2186
2186
|
let { target: i, ex: n, ey: r, theta: o, originX: h, originY: l } = t;
|
|
2187
2187
|
const c = i.translateToOriginPoint(i.getRelativeCenterPoint(), h, l);
|
|
2188
2188
|
if (le(i, "lockRotation")) return !1;
|
|
@@ -2206,11 +2206,11 @@ function xh(a, t, e) {
|
|
|
2206
2206
|
const { width: n, height: r, strokeWidth: o } = a;
|
|
2207
2207
|
return n === 0 && o === 0 && t !== "y" || r === 0 && o === 0 && t !== "x";
|
|
2208
2208
|
}
|
|
2209
|
-
const
|
|
2209
|
+
const jc = ["e", "se", "s", "sw", "w", "nw", "n", "ne", "e"], $s = (a, t, e) => {
|
|
2210
2210
|
const s = wh(a, e);
|
|
2211
2211
|
if (xh(e, t.x !== 0 && t.y === 0 ? "x" : t.x === 0 && t.y !== 0 ? "y" : "", s)) return on;
|
|
2212
2212
|
const i = ch(e, t);
|
|
2213
|
-
return "".concat(
|
|
2213
|
+
return "".concat(jc[i], "-resize");
|
|
2214
2214
|
};
|
|
2215
2215
|
function io(a, t, e, s) {
|
|
2216
2216
|
let i = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : {};
|
|
@@ -2229,17 +2229,17 @@ function io(a, t, e, s) {
|
|
|
2229
2229
|
const g = n.scaleX, p = n.scaleY;
|
|
2230
2230
|
return r ? (r === "x" && n.set(Ht, l), r === "y" && n.set(Kt, c)) : (!le(n, "lockScalingX") && n.set(Ht, l), !le(n, "lockScalingY") && n.set(Kt, c)), g !== n.scaleX || p !== n.scaleY;
|
|
2231
2231
|
}
|
|
2232
|
-
const xi = Bs(wn, Hs(((a, t, e, s) => io(a, t, e, s)))),
|
|
2232
|
+
const xi = Bs(wn, Hs(((a, t, e, s) => io(a, t, e, s)))), Bc = Bs(wn, Hs(((a, t, e, s) => io(a, t, e, s, { by: "x" })))), Hc = Bs(wn, Hs(((a, t, e, s) => io(a, t, e, s, { by: "y" })))), zc = ["target", "ex", "ey", "skewingSide"], tr = { x: { counterAxis: "y", scale: Ht, skew: Is, lockSkewing: "lockSkewingX", origin: "originX", flip: "flipX" }, y: { counterAxis: "x", scale: Kt, skew: Ns, lockSkewing: "lockSkewingY", origin: "originY", flip: "flipY" } }, Gc = ["ns", "nesw", "ew", "nwse"], Vc = (a, t, e) => {
|
|
2233
2233
|
if (t.x !== 0 && le(e, "lockSkewingY") || t.y !== 0 && le(e, "lockSkewingX")) return on;
|
|
2234
2234
|
const s = ch(e, t) % 4;
|
|
2235
|
-
return "".concat(
|
|
2235
|
+
return "".concat(Gc[s], "-resize");
|
|
2236
2236
|
};
|
|
2237
2237
|
function Sh(a, t, e, s, i) {
|
|
2238
2238
|
const { target: n } = e, { counterAxis: r, origin: o, lockSkewing: h, skew: l, flip: c } = tr[a];
|
|
2239
2239
|
if (le(n, h)) return !1;
|
|
2240
2240
|
const { origin: u, flip: d } = tr[r], f = mt(e[u]) * (n[d] ? -1 : 1), g = -Math.sign(f) * (n[c] ? -1 : 1), p = 0.5 * -((n[l] === 0 && Jr(e, X, X, s, i)[a] > 0 || n[l] > 0 ? 1 : -1) * g) + 0.5;
|
|
2241
2241
|
return Bs(Xa, Hs(((m, v, y, _) => (function(S, A, T) {
|
|
2242
|
-
let { target: E, ex: P, ey: N, skewingSide: D } = A, L = st(A,
|
|
2242
|
+
let { target: E, ex: P, ey: N, skewingSide: D } = A, L = st(A, zc);
|
|
2243
2243
|
const { skew: k } = tr[S], O = T.subtract(new C(P, N)).divide(new C(E.scaleX, E.scaleY))[S], j = E[k], M = L[k], R = Math.tan(lt(M)), G = S === "y" ? E._getTransformedDimensions({ scaleX: 1, scaleY: 1, skewX: 0 }).x : E._getTransformedDimensions({ scaleX: 1, scaleY: 1 }).y, it = 2 * O * D / Math.max(G, 1) + R, at = Ce(Math.atan(it));
|
|
2244
2244
|
E.set(k, at);
|
|
2245
2245
|
const xt = j !== E[k];
|
|
@@ -2250,14 +2250,14 @@ function Sh(a, t, e, s, i) {
|
|
|
2250
2250
|
return xt;
|
|
2251
2251
|
})(a, v, new C(y, _)))))(t, w(w({}, e), {}, { [o]: p, skewingSide: g }), s, i);
|
|
2252
2252
|
}
|
|
2253
|
-
const
|
|
2253
|
+
const Xc = (a, t, e, s) => Sh("x", a, t, e, s), Wc = (a, t, e, s) => Sh("y", a, t, e, s);
|
|
2254
2254
|
function kn(a, t) {
|
|
2255
2255
|
return a[t.canvas.altActionKey];
|
|
2256
2256
|
}
|
|
2257
2257
|
const Si = (a, t, e) => {
|
|
2258
2258
|
const s = kn(a, e);
|
|
2259
2259
|
return t.x === 0 ? s ? Is : Kt : t.y === 0 ? s ? Ns : Ht : "";
|
|
2260
|
-
}, ws = (a, t, e) => kn(a, e) ?
|
|
2260
|
+
}, ws = (a, t, e) => kn(a, e) ? Vc(0, t, e) : $s(a, t, e), Jo = (a, t, e, s) => kn(a, t.target) ? Wc(a, t, e, s) : Bc(a, t, e, s), Zo = (a, t, e, s) => kn(a, t.target) ? Xc(a, t, e, s) : Hc(a, t, e, s), Ch = () => ({ ml: new ne({ x: -0.5, y: 0, cursorStyleHandler: ws, actionHandler: Jo, getActionName: Si }), mr: new ne({ x: 0.5, y: 0, cursorStyleHandler: ws, actionHandler: Jo, getActionName: Si }), mb: new ne({ x: 0, y: 0.5, cursorStyleHandler: ws, actionHandler: Zo, getActionName: Si }), mt: new ne({ x: 0, y: -0.5, cursorStyleHandler: ws, actionHandler: Zo, getActionName: Si }), tl: new ne({ x: -0.5, y: -0.5, cursorStyleHandler: $s, actionHandler: xi }), tr: new ne({ x: 0.5, y: -0.5, cursorStyleHandler: $s, actionHandler: xi }), bl: new ne({ x: -0.5, y: 0.5, cursorStyleHandler: $s, actionHandler: xi }), br: new ne({ x: 0.5, y: 0.5, cursorStyleHandler: $s, actionHandler: xi }), mtr: new ne({ x: 0, y: -0.5, actionHandler: Nc, cursorStyleHandler: Ic, offsetY: -40, withConnection: !0, actionName: Vr }) }), Uc = () => ({ mr: new ne({ x: 0.5, y: 0, actionHandler: Ko, cursorStyleHandler: ws, actionName: oi }), ml: new ne({ x: -0.5, y: 0, actionHandler: Ko, cursorStyleHandler: ws, actionName: oi }) }), Yc = () => w(w({}, Ch()), Uc());
|
|
2261
2261
|
class hi extends Te {
|
|
2262
2262
|
static getDefaults() {
|
|
2263
2263
|
return w(w({}, super.getDefaults()), hi.ownDefaults);
|
|
@@ -2434,14 +2434,14 @@ class Eh {
|
|
|
2434
2434
|
return t.multiply(this.strokeUniformScalar).scalarMultiply(e);
|
|
2435
2435
|
}
|
|
2436
2436
|
}
|
|
2437
|
-
const
|
|
2437
|
+
const $c = new C();
|
|
2438
2438
|
class Ts extends Eh {
|
|
2439
2439
|
static getOrthogonalRotationFactor(t, e) {
|
|
2440
2440
|
const s = e ? un(t, e) : bh(t);
|
|
2441
2441
|
return Math.abs(s) < Ve ? -1 : 1;
|
|
2442
2442
|
}
|
|
2443
2443
|
constructor(t, e, s, i) {
|
|
2444
|
-
super(i), x(this, "AB", void 0), x(this, "AC", void 0), x(this, "alpha", void 0), x(this, "bisector", void 0), this.A = new C(t), this.B = new C(e), this.C = new C(s), this.AB = this.createSideVector(this.A, this.B), this.AC = this.createSideVector(this.A, this.C), this.alpha = un(this.AB, this.AC), this.bisector = En(Qr(this.AB.eq(
|
|
2444
|
+
super(i), x(this, "AB", void 0), x(this, "AC", void 0), x(this, "alpha", void 0), x(this, "bisector", void 0), this.A = new C(t), this.B = new C(e), this.C = new C(s), this.AB = this.createSideVector(this.A, this.B), this.AC = this.createSideVector(this.A, this.C), this.alpha = un(this.AB, this.AC), this.bisector = En(Qr(this.AB.eq($c) ? this.AC : this.AB, this.alpha / 2));
|
|
2445
2445
|
}
|
|
2446
2446
|
calcOrthogonalProjection(t, e) {
|
|
2447
2447
|
let s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.strokeProjectionMagnitude;
|
|
@@ -2569,12 +2569,12 @@ const Mn = (a) => {
|
|
|
2569
2569
|
return s;
|
|
2570
2570
|
}));
|
|
2571
2571
|
}
|
|
2572
|
-
return
|
|
2573
|
-
},
|
|
2572
|
+
return qc(a);
|
|
2573
|
+
}, qc = (a) => {
|
|
2574
2574
|
const t = [];
|
|
2575
|
-
for (let e, s = 0; s < a.length; s++) (e =
|
|
2575
|
+
for (let e, s = 0; s < a.length; s++) (e = Kc(a, s)) !== !1 && t.push(e);
|
|
2576
2576
|
return t;
|
|
2577
|
-
},
|
|
2577
|
+
}, Kc = (a, t) => {
|
|
2578
2578
|
const e = a.charCodeAt(t);
|
|
2579
2579
|
if (isNaN(e)) return "";
|
|
2580
2580
|
if (e < 55296 || e > 57343) return a.charAt(t);
|
|
@@ -2589,7 +2589,7 @@ const Mn = (a) => {
|
|
|
2589
2589
|
if (55296 > s || s > 56319) throw "Low surrogate without preceding high surrogate";
|
|
2590
2590
|
return !1;
|
|
2591
2591
|
};
|
|
2592
|
-
var
|
|
2592
|
+
var Jc = Object.freeze({ __proto__: null, capitalize: function(a) {
|
|
2593
2593
|
let t = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
2594
2594
|
return "".concat(a.charAt(0).toUpperCase()).concat(t ? a.slice(1) : a.slice(1).toLowerCase());
|
|
2595
2595
|
}, escapeXml: Mh, graphemeSplit: Mn });
|
|
@@ -2630,7 +2630,7 @@ function ta(a, t) {
|
|
|
2630
2630
|
}
|
|
2631
2631
|
return t.length === 0;
|
|
2632
2632
|
}
|
|
2633
|
-
function
|
|
2633
|
+
function Zc(a, t) {
|
|
2634
2634
|
let e = !0;
|
|
2635
2635
|
const s = ta(a, t.pop());
|
|
2636
2636
|
return s && t.length && (e = (function(i, n) {
|
|
@@ -2639,17 +2639,17 @@ function Qc(a, t) {
|
|
|
2639
2639
|
return n.length === 0;
|
|
2640
2640
|
})(a, t)), s && e && t.length === 0;
|
|
2641
2641
|
}
|
|
2642
|
-
const
|
|
2642
|
+
const Qc = (a) => {
|
|
2643
2643
|
var t;
|
|
2644
|
-
return (t =
|
|
2645
|
-
},
|
|
2644
|
+
return (t = mc[a]) !== null && t !== void 0 ? t : a;
|
|
2645
|
+
}, tu = new RegExp("(".concat(he, ")"), "gi"), eu = (a) => an(a.replace(tu, " $1 ").replace(/,/gi, " "));
|
|
2646
2646
|
var ea, sa, ia, na, ra, oa, aa;
|
|
2647
|
-
const Lt = "(".concat(he, ")"),
|
|
2647
|
+
const Lt = "(".concat(he, ")"), su = String.raw(ea || (ea = Ae(["(skewX)(", ")"], ["(skewX)\\(", "\\)"])), Lt), iu = String.raw(sa || (sa = Ae(["(skewY)(", ")"], ["(skewY)\\(", "\\)"])), Lt), nu = String.raw(ia || (ia = Ae(["(rotate)(", "(?: ", " ", ")?)"], ["(rotate)\\(", "(?: ", " ", ")?\\)"])), Lt, Lt, Lt), ru = String.raw(na || (na = Ae(["(scale)(", "(?: ", ")?)"], ["(scale)\\(", "(?: ", ")?\\)"])), Lt, Lt), ou = String.raw(ra || (ra = Ae(["(translate)(", "(?: ", ")?)"], ["(translate)\\(", "(?: ", ")?\\)"])), Lt, Lt), au = String.raw(oa || (oa = Ae(["(matrix)(", " ", " ", " ", " ", " ", ")"], ["(matrix)\\(", " ", " ", " ", " ", " ", "\\)"])), Lt, Lt, Lt, Lt, Lt, Lt), ro = "(?:".concat(au, "|").concat(ou, "|").concat(nu, "|").concat(ru, "|").concat(su, "|").concat(iu, ")"), hu = "(?:".concat(ro, "*)"), lu = String.raw(aa || (aa = Ae(["^s*(?:", "?)s*$"], ["^\\s*(?:", "?)\\s*$"])), hu), cu = new RegExp(lu), uu = new RegExp(ro), du = new RegExp(ro, "g");
|
|
2648
2648
|
function dn(a) {
|
|
2649
2649
|
const t = [];
|
|
2650
|
-
if (!(a =
|
|
2651
|
-
for (const e of a.matchAll(
|
|
2652
|
-
const s =
|
|
2650
|
+
if (!(a = eu(a).replace(/\s*([()])\s*/gi, "$1")) || a && !cu.test(a)) return [...Bt];
|
|
2651
|
+
for (const e of a.matchAll(du)) {
|
|
2652
|
+
const s = uu.exec(e[0]);
|
|
2653
2653
|
if (!s) continue;
|
|
2654
2654
|
let i = Bt;
|
|
2655
2655
|
const n = s.filter(((g) => !!g)), [, r, ...o] = n, [h, l, c, u, d, f] = o.map(((g) => parseFloat(g)));
|
|
@@ -2676,7 +2676,7 @@ function dn(a) {
|
|
|
2676
2676
|
}
|
|
2677
2677
|
return Sn(t);
|
|
2678
2678
|
}
|
|
2679
|
-
function
|
|
2679
|
+
function fu(a, t, e, s) {
|
|
2680
2680
|
const i = Array.isArray(t);
|
|
2681
2681
|
let n, r = t;
|
|
2682
2682
|
if (a !== vt && a !== Nt || t !== It) {
|
|
@@ -2698,8 +2698,8 @@ function gu(a, t, e, s) {
|
|
|
2698
2698
|
} else r = "";
|
|
2699
2699
|
return !i && isNaN(n) ? r : n;
|
|
2700
2700
|
}
|
|
2701
|
-
function
|
|
2702
|
-
const e = a.match(
|
|
2701
|
+
function gu(a, t) {
|
|
2702
|
+
const e = a.match(pc);
|
|
2703
2703
|
if (!e) return;
|
|
2704
2704
|
const s = e[1], i = e[3], n = e[4], r = e[5], o = e[6];
|
|
2705
2705
|
s && (t.fontStyle = s), i && (t.fontWeight = isNaN(parseFloat(i)) ? i : parseFloat(i)), n && (t.fontSize = Rt(n)), o && (t.fontFamily = o), r && (t.lineHeight = r === "normal" ? 1 : r);
|
|
@@ -2711,7 +2711,7 @@ function Sr(a, t) {
|
|
|
2711
2711
|
t[s.trim().toLowerCase()] = i.trim();
|
|
2712
2712
|
}));
|
|
2713
2713
|
}
|
|
2714
|
-
function
|
|
2714
|
+
function pu(a) {
|
|
2715
2715
|
const t = {}, e = a.getAttribute("style");
|
|
2716
2716
|
return e && (typeof e == "string" ? Sr(e, t) : (function(s, i) {
|
|
2717
2717
|
Object.entries(s).forEach(((n) => {
|
|
@@ -2720,7 +2720,7 @@ function mu(a) {
|
|
|
2720
2720
|
}));
|
|
2721
2721
|
})(e, t)), t;
|
|
2722
2722
|
}
|
|
2723
|
-
const
|
|
2723
|
+
const mu = { stroke: "strokeOpacity", fill: "fillOpacity" };
|
|
2724
2724
|
function Ne(a, t, e) {
|
|
2725
2725
|
if (!a) return {};
|
|
2726
2726
|
let s, i = {}, n = zr;
|
|
@@ -2730,20 +2730,20 @@ function Ne(a, t, e) {
|
|
|
2730
2730
|
return u && (l[c] = u), l;
|
|
2731
2731
|
}), {})), (function(l) {
|
|
2732
2732
|
let c = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, u = {};
|
|
2733
|
-
for (const d in c)
|
|
2733
|
+
for (const d in c) Zc(l, d.split(" ")) && (u = w(w({}, u), c[d]));
|
|
2734
2734
|
return u;
|
|
2735
|
-
})(a, e)),
|
|
2735
|
+
})(a, e)), pu(a));
|
|
2736
2736
|
r[Jn] && a.setAttribute(Jn, r[Jn]), r[Kn] && (s = Rt(r[Kn], n), r[Kn] = "".concat(s));
|
|
2737
2737
|
const o = {};
|
|
2738
2738
|
for (const l in r) {
|
|
2739
|
-
const c =
|
|
2739
|
+
const c = Qc(l), u = fu(c, r[l], i, s);
|
|
2740
2740
|
o[c] = u;
|
|
2741
2741
|
}
|
|
2742
|
-
o && o.font &&
|
|
2742
|
+
o && o.font && gu(o.font, o);
|
|
2743
2743
|
const h = w(w({}, i), o);
|
|
2744
2744
|
return Xo.test(a.nodeName) ? h : (function(l) {
|
|
2745
2745
|
const c = Mt.getDefaults();
|
|
2746
|
-
return Object.entries(
|
|
2746
|
+
return Object.entries(mu).forEach(((u) => {
|
|
2747
2747
|
let [d, f] = u;
|
|
2748
2748
|
if (l[f] === void 0 || l[d] === "") return;
|
|
2749
2749
|
if (l[d] === void 0) {
|
|
@@ -2756,7 +2756,7 @@ function Ne(a, t, e) {
|
|
|
2756
2756
|
})), l;
|
|
2757
2757
|
})(h);
|
|
2758
2758
|
}
|
|
2759
|
-
const
|
|
2759
|
+
const bu = ["left", "top", "width", "height", "visible"], Dh = ["rx", "ry"];
|
|
2760
2760
|
class ve extends Mt {
|
|
2761
2761
|
static getDefaults() {
|
|
2762
2762
|
return w(w({}, super.getDefaults()), ve.ownDefaults);
|
|
@@ -2782,7 +2782,7 @@ class ve extends Mt {
|
|
|
2782
2782
|
`)];
|
|
2783
2783
|
}
|
|
2784
2784
|
static async fromElement(t, e, s) {
|
|
2785
|
-
const i = Ne(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, width: o = 0, height: h = 0, visible: l = !0 } = i, c = st(i,
|
|
2785
|
+
const i = Ne(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, width: o = 0, height: h = 0, visible: l = !0 } = i, c = st(i, bu);
|
|
2786
2786
|
return new this(w(w(w({}, e), c), {}, { left: n, top: r, width: o, height: h, visible: !!(l && o && h) }));
|
|
2787
2787
|
}
|
|
2788
2788
|
}
|
|
@@ -2825,7 +2825,7 @@ class Cr extends On {
|
|
|
2825
2825
|
}
|
|
2826
2826
|
}
|
|
2827
2827
|
x(Cr, "type", "fit-content"), F.setClass(Cr);
|
|
2828
|
-
const
|
|
2828
|
+
const vu = ["strategy"], yu = ["target", "strategy", "bubbles", "prevStrategy"], Lh = "layoutManager";
|
|
2829
2829
|
class li {
|
|
2830
2830
|
constructor() {
|
|
2831
2831
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : new Cr();
|
|
@@ -2841,7 +2841,7 @@ class li {
|
|
|
2841
2841
|
}
|
|
2842
2842
|
attachHandlers(t, e) {
|
|
2843
2843
|
const { target: s } = e;
|
|
2844
|
-
return [sn, Ga, oi, Va, wn, Xa, en,
|
|
2844
|
+
return [sn, Ga, oi, Va, wn, Xa, en, ic, nc].map(((i) => t.on(i, ((n) => this.performLayout(i === sn ? { type: "object_modified", trigger: i, e: n, target: s } : { type: "object_modifying", trigger: i, e: n, target: s })))));
|
|
2845
2845
|
}
|
|
2846
2846
|
subscribe(t, e) {
|
|
2847
2847
|
this.unsubscribe(t, e);
|
|
@@ -2860,7 +2860,7 @@ class li {
|
|
|
2860
2860
|
onBeforeLayout(t) {
|
|
2861
2861
|
const { target: e, type: s } = t, { canvas: i } = e;
|
|
2862
2862
|
if (s === Oe || s === fn ? this.subscribeTargets(t) : s === oo && this.unsubscribeTargets(t), e.fire("layout:before", { context: t }), i && i.fire("object:layout:before", { target: e, context: t }), s === gn && t.deep) {
|
|
2863
|
-
const n = st(t,
|
|
2863
|
+
const n = st(t, vu);
|
|
2864
2864
|
e.forEachObject(((r) => r.layoutManager && r.layoutManager.performLayout(w(w({}, n), {}, { bubbles: !1, target: r }))));
|
|
2865
2865
|
}
|
|
2866
2866
|
}
|
|
@@ -2886,7 +2886,7 @@ class li {
|
|
|
2886
2886
|
s.set({ left: s.left + i.x, top: s.top + i.y });
|
|
2887
2887
|
}
|
|
2888
2888
|
onAfterLayout(t, e) {
|
|
2889
|
-
const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o = st(t,
|
|
2889
|
+
const { target: s, strategy: i, bubbles: n, prevStrategy: r } = t, o = st(t, yu), { canvas: h } = s;
|
|
2890
2890
|
s.fire("layout:after", { context: t, result: e }), h && h.fire("object:layout:after", { context: t, result: e, target: s });
|
|
2891
2891
|
const l = s.parent;
|
|
2892
2892
|
n && l != null && l.layoutManager && ((o.path || (o.path = [])).push(s), l.layoutManager.performLayout(w(w({}, o), {}, { target: l }))), s.set("dirty", !0);
|
|
@@ -2903,8 +2903,8 @@ class li {
|
|
|
2903
2903
|
}
|
|
2904
2904
|
}
|
|
2905
2905
|
F.setClass(li, Lh);
|
|
2906
|
-
const
|
|
2907
|
-
class
|
|
2906
|
+
const _u = ["type", "objects", "layoutManager"];
|
|
2907
|
+
class wu extends li {
|
|
2908
2908
|
performLayout() {
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
@@ -3078,10 +3078,10 @@ class qt extends Wa(Mt) {
|
|
|
3078
3078
|
return this._createBaseClipPathSVGMarkup(e, { reviver: t });
|
|
3079
3079
|
}
|
|
3080
3080
|
static fromObject(t, e) {
|
|
3081
|
-
let { type: s, objects: i = [], layoutManager: n } = t, r = st(t,
|
|
3081
|
+
let { type: s, objects: i = [], layoutManager: n } = t, r = st(t, _u);
|
|
3082
3082
|
return Promise.all([Os(i, e), gi(r, e)]).then(((o) => {
|
|
3083
3083
|
let [h, l] = o;
|
|
3084
|
-
const c = new this(h, w(w(w({}, r), l), {}, { layoutManager: new
|
|
3084
|
+
const c = new this(h, w(w(w({}, r), l), {}, { layoutManager: new wu() }));
|
|
3085
3085
|
if (n) {
|
|
3086
3086
|
const u = F.getClass(n.type), d = F.getClass(n.strategy);
|
|
3087
3087
|
c.layoutManager = new u(new d());
|
|
@@ -3091,7 +3091,7 @@ class qt extends Wa(Mt) {
|
|
|
3091
3091
|
}
|
|
3092
3092
|
}
|
|
3093
3093
|
x(qt, "type", "Group"), x(qt, "ownDefaults", { strokeWidth: 0, subTargetCheck: !1, interactive: !1 }), F.setClass(qt);
|
|
3094
|
-
const Fh = (a, t) => Math.min(t.width / a.width, t.height / a.height), Ih = (a, t) => Math.max(t.width / a.width, t.height / a.height), Ar = "\\s*,?\\s*", Vs = "".concat(Ar, "(").concat(he, ")"),
|
|
3094
|
+
const Fh = (a, t) => Math.min(t.width / a.width, t.height / a.height), Ih = (a, t) => Math.max(t.width / a.width, t.height / a.height), Ar = "\\s*,?\\s*", Vs = "".concat(Ar, "(").concat(he, ")"), xu = "".concat(Vs).concat(Vs).concat(Vs).concat(Ar, "([01])").concat(Ar, "([01])").concat(Vs).concat(Vs), Su = { m: "l", M: "L" }, Cu = (a, t, e, s, i, n, r, o, h, l, c) => {
|
|
3095
3095
|
const u = ce(a), d = ue(a), f = ce(t), g = ue(t), p = e * i * f - s * n * g + r, b = s * i * f + e * n * g + o;
|
|
3096
3096
|
return ["C", l + h * (-e * i * d - s * n * u), c + h * (-s * i * d + e * n * u), p + h * (e * i * g + s * n * f), b + h * (s * i * g - e * n * f), p, b];
|
|
3097
3097
|
}, ha = (a, t, e, s) => {
|
|
@@ -3127,7 +3127,7 @@ function Tr(a, t, e, s, i, n, r, o) {
|
|
|
3127
3127
|
const y = [new C(Math.min(...d[0]), Math.min(...d[1])), new C(Math.max(...d[0]), Math.max(...d[1]))];
|
|
3128
3128
|
return q.cachesBoundsOfCurve && (Zs.boundsOfCurveCache[h] = y), y;
|
|
3129
3129
|
}
|
|
3130
|
-
const
|
|
3130
|
+
const Au = (a, t, e) => {
|
|
3131
3131
|
let [s, i, n, r, o, h, l, c] = e;
|
|
3132
3132
|
const u = ((d, f, g, p, b, m, v) => {
|
|
3133
3133
|
if (g === 0 || p === 0) return [];
|
|
@@ -3143,7 +3143,7 @@ const Tu = (a, t, e) => {
|
|
|
3143
3143
|
m === 0 && Pt > 0 ? Pt -= 2 * A : m === 1 && Pt < 0 && (Pt += 2 * A);
|
|
3144
3144
|
const fe = Math.ceil(Math.abs(Pt / A * 2)), ht = [], K = Pt / fe, je = 8 / 3 * Math.sin(K / 4) * Math.sin(K / 4) / Math.sin(K / 2);
|
|
3145
3145
|
let ms = et + K;
|
|
3146
|
-
for (let ge = 0; ge < fe; ge++) ht[ge] =
|
|
3146
|
+
for (let ge = 0; ge < fe; ge++) ht[ge] = Cu(et, ms, P, E, R, G, xt, gt, je, y, _), y = ht[ge][5], _ = ht[ge][6], et = ms, ms += K;
|
|
3147
3147
|
return ht;
|
|
3148
3148
|
})(l - a, c - t, i, n, o, h, r);
|
|
3149
3149
|
for (let d = 0, f = u.length; d < f; d++) u[d][1] += a, u[d][2] += t, u[d][3] += a, u[d][4] += t, u[d][5] += a, u[d][6] += t;
|
|
@@ -3199,7 +3199,7 @@ const Tu = (a, t, e) => {
|
|
|
3199
3199
|
case "a":
|
|
3200
3200
|
c[6] += t, c[7] += e;
|
|
3201
3201
|
case "A":
|
|
3202
|
-
|
|
3202
|
+
Au(t, e, c).forEach(((d) => n.push(d))), t = c[6], e = c[7];
|
|
3203
3203
|
break;
|
|
3204
3204
|
case "z":
|
|
3205
3205
|
case "Z":
|
|
@@ -3211,13 +3211,13 @@ const Tu = (a, t, e) => {
|
|
|
3211
3211
|
}, pn = (a, t, e, s) => Math.sqrt((e - a) ** 2 + (s - t) ** 2), jh = (a, t, e, s, i, n, r, o) => (h) => {
|
|
3212
3212
|
const l = h ** 3, c = ((f) => 3 * f ** 2 * (1 - f))(h), u = ((f) => 3 * f * (1 - f) ** 2)(h), d = ((f) => (1 - f) ** 3)(h);
|
|
3213
3213
|
return new C(r * l + i * c + e * u + a * d, o * l + n * c + s * u + t * d);
|
|
3214
|
-
}, Bh = (a) => a ** 2, Hh = (a) => 2 * a * (1 - a), zh = (a) => (1 - a) ** 2,
|
|
3214
|
+
}, Bh = (a) => a ** 2, Hh = (a) => 2 * a * (1 - a), zh = (a) => (1 - a) ** 2, Tu = (a, t, e, s, i, n, r, o) => (h) => {
|
|
3215
3215
|
const l = Bh(h), c = Hh(h), u = zh(h), d = 3 * (u * (e - a) + c * (i - e) + l * (r - i)), f = 3 * (u * (s - t) + c * (n - s) + l * (o - n));
|
|
3216
3216
|
return Math.atan2(f, d);
|
|
3217
|
-
},
|
|
3217
|
+
}, Eu = (a, t, e, s, i, n) => (r) => {
|
|
3218
3218
|
const o = Bh(r), h = Hh(r), l = zh(r);
|
|
3219
3219
|
return new C(i * o + e * h + a * l, n * o + s * h + t * l);
|
|
3220
|
-
},
|
|
3220
|
+
}, ku = (a, t, e, s, i, n) => (r) => {
|
|
3221
3221
|
const o = 1 - r, h = 2 * (o * (e - a) + r * (i - e)), l = 2 * (o * (s - t) + r * (n - s));
|
|
3222
3222
|
return Math.atan2(l, h);
|
|
3223
3223
|
}, la = (a, t, e) => {
|
|
@@ -3227,7 +3227,7 @@ const Tu = (a, t, e) => {
|
|
|
3227
3227
|
i += pn(s.x, s.y, r.x, r.y), s = r;
|
|
3228
3228
|
}
|
|
3229
3229
|
return i;
|
|
3230
|
-
},
|
|
3230
|
+
}, Mu = (a, t) => {
|
|
3231
3231
|
let e, s = 0, i = 0, n = { x: a.x, y: a.y }, r = w({}, n), o = 0.01, h = 0;
|
|
3232
3232
|
const l = a.iterator, c = a.angleFinder;
|
|
3233
3233
|
for (; i < t && o > 1e-4; ) r = l(s), h = s, e = pn(n.x, n.y, r.x, r.y), e + i > t ? (s -= o, o /= 2) : (n = r, s += o, i += e);
|
|
@@ -3245,10 +3245,10 @@ const Tu = (a, t, e) => {
|
|
|
3245
3245
|
e = c, e.length = pn(i, n, l[1], l[2]), i = l[1], n = l[2];
|
|
3246
3246
|
break;
|
|
3247
3247
|
case "C":
|
|
3248
|
-
t = jh(i, n, l[1], l[2], l[3], l[4], l[5], l[6]), e = c, e.iterator = t, e.angleFinder =
|
|
3248
|
+
t = jh(i, n, l[1], l[2], l[3], l[4], l[5], l[6]), e = c, e.iterator = t, e.angleFinder = Tu(i, n, l[1], l[2], l[3], l[4], l[5], l[6]), e.length = la(t, i, n), i = l[5], n = l[6];
|
|
3249
3249
|
break;
|
|
3250
3250
|
case "Q":
|
|
3251
|
-
t =
|
|
3251
|
+
t = Eu(i, n, l[1], l[2], l[3], l[4]), e = c, e.iterator = t, e.angleFinder = ku(i, n, l[1], l[2], l[3], l[4]), e.length = la(t, i, n), i = l[3], n = l[4];
|
|
3252
3252
|
break;
|
|
3253
3253
|
case "Z":
|
|
3254
3254
|
e = c, e.destX = r, e.destY = o, e.length = pn(i, n, r, o), i = r, n = o;
|
|
@@ -3269,32 +3269,32 @@ const Tu = (a, t, e) => {
|
|
|
3269
3269
|
return w(w({}, new C(i.x, i.y).lerp(new C(r[1], r[2]), n)), {}, { angle: Math.atan2(r[2] - i.y, r[1] - i.x) });
|
|
3270
3270
|
case "C":
|
|
3271
3271
|
case "Q":
|
|
3272
|
-
return
|
|
3272
|
+
return Mu(i, t);
|
|
3273
3273
|
}
|
|
3274
|
-
},
|
|
3274
|
+
}, Pu = new RegExp("[mzlhvcsqta][^mzlhvcsqta]*", "gi"), ca = new RegExp(xu, "g"), Ou = new RegExp(he, "gi"), Du = { m: 2, l: 2, h: 1, v: 1, c: 6, s: 4, q: 4, t: 2, a: 7 }, Vh = (a) => {
|
|
3275
3275
|
var t;
|
|
3276
|
-
const e = [], s = (t = a.match(
|
|
3276
|
+
const e = [], s = (t = a.match(Pu)) !== null && t !== void 0 ? t : [];
|
|
3277
3277
|
for (const i of s) {
|
|
3278
3278
|
const n = i[0];
|
|
3279
3279
|
if (n === "z" || n === "Z") {
|
|
3280
3280
|
e.push([n]);
|
|
3281
3281
|
continue;
|
|
3282
3282
|
}
|
|
3283
|
-
const r =
|
|
3283
|
+
const r = Du[n.toLowerCase()];
|
|
3284
3284
|
let o = [];
|
|
3285
3285
|
if (n === "a" || n === "A") {
|
|
3286
3286
|
ca.lastIndex = 0;
|
|
3287
3287
|
for (let h = null; h = ca.exec(i); ) o.push(...h.slice(1));
|
|
3288
|
-
} else o = i.match(
|
|
3288
|
+
} else o = i.match(Ou) || [];
|
|
3289
3289
|
for (let h = 0; h < o.length; h += r) {
|
|
3290
|
-
const l = new Array(r), c =
|
|
3290
|
+
const l = new Array(r), c = Su[n];
|
|
3291
3291
|
l[0] = h > 0 && c ? c : n;
|
|
3292
3292
|
for (let u = 0; u < r; u++) l[u + 1] = parseFloat(o[h + u]);
|
|
3293
3293
|
e.push(l);
|
|
3294
3294
|
}
|
|
3295
3295
|
}
|
|
3296
3296
|
return e;
|
|
3297
|
-
},
|
|
3297
|
+
}, Ru = function(a) {
|
|
3298
3298
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0, e = new C(a[0]), s = new C(a[1]), i = 1, n = 0;
|
|
3299
3299
|
const r = [], o = a.length, h = o > 2;
|
|
3300
3300
|
let l;
|
|
@@ -3314,7 +3314,7 @@ function mn(a, t) {
|
|
|
3314
3314
|
return e.setProperty(i, n);
|
|
3315
3315
|
})));
|
|
3316
3316
|
}
|
|
3317
|
-
const
|
|
3317
|
+
const Lu = (a, t) => Math.floor(Math.random() * (t - a + 1)) + a;
|
|
3318
3318
|
function Wh(a) {
|
|
3319
3319
|
let t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3320
3320
|
const e = t.onComplete || rs, s = new (di()).XMLHttpRequest(), i = t.signal, n = function() {
|
|
@@ -3336,11 +3336,11 @@ const Ji = (a, t) => {
|
|
|
3336
3336
|
}
|
|
3337
3337
|
})(a), e = e.transform(a.transformMatrix)), delete a.transformMatrix, t && (a.scaleX *= t.scaleX, a.scaleY *= t.scaleY, a.cropX = t.cropX, a.cropY = t.cropY, e.x += t.offsetLeft, e.y += t.offsetTop, a.width = t.width, a.height = t.height), a.setPositionByOrigin(e, X, X);
|
|
3338
3338
|
};
|
|
3339
|
-
var
|
|
3339
|
+
var Fu = Object.freeze({ __proto__: null, addTransformToObject: nh, animate: so, animateColor: _h, applyTransformToObject: Rs, calcAngleBetweenVectors: un, calcDimensionsMatrix: fi, calcPlaneChangeMatrix: mi, calcVectorRotation: bh, cancelAnimFrame: Ya, capValue: ls, composeMatrix: Za, copyCanvasElement: (a) => {
|
|
3340
3340
|
var t;
|
|
3341
3341
|
const e = Jt(a);
|
|
3342
3342
|
return (t = e.getContext("2d")) === null || t === void 0 || t.drawImage(a, 0, 0), e;
|
|
3343
|
-
}, cos: ce, createCanvasElement: Se, createImage: $a, createRotateMatrix: ds, createScaleMatrix: Cn, createSkewXMatrix: Yr, createSkewYMatrix: $r, createTranslateMatrix: js, createVector: ln, crossProduct: As, degreesToRadians: lt, dotProduct: vh, ease:
|
|
3343
|
+
}, cos: ce, createCanvasElement: Se, createImage: $a, createRotateMatrix: ds, createScaleMatrix: Cn, createSkewXMatrix: Yr, createSkewYMatrix: $r, createTranslateMatrix: js, createVector: ln, crossProduct: As, degreesToRadians: lt, dotProduct: vh, ease: xc, enlivenObjectEnlivables: gi, enlivenObjects: Os, findScaleToCover: Ih, findScaleToFit: Fh, getBoundsOfCurve: Tr, getOrthonormalVector: to, getPathSegmentsInfo: ao, getPointOnPath: Gh, getPointer: ih, getRandomInt: Lu, getRegularPolygonPath: (a, t) => {
|
|
3344
3344
|
const e = 2 * Math.PI / a;
|
|
3345
3345
|
let s = -Ve;
|
|
3346
3346
|
a % 2 == 0 && (s += e / 2);
|
|
@@ -3350,7 +3350,7 @@ var Iu = Object.freeze({ __proto__: null, addTransformToObject: nh, animate: so,
|
|
|
3350
3350
|
i[n] = [n === 0 ? "M" : "L", o, h];
|
|
3351
3351
|
}
|
|
3352
3352
|
return i[a] = ["Z"], i;
|
|
3353
|
-
}, getSmoothPathFromPoints:
|
|
3353
|
+
}, getSmoothPathFromPoints: Ru, getSvgAttributes: (a) => {
|
|
3354
3354
|
const t = ["instantiated_by_use", "style", "id", "class"];
|
|
3355
3355
|
switch (a) {
|
|
3356
3356
|
case "linearGradient":
|
|
@@ -3370,7 +3370,7 @@ var Iu = Object.freeze({ __proto__: null, addTransformToObject: nh, animate: so,
|
|
|
3370
3370
|
}, multiplyTransformMatrices: dt, multiplyTransformMatrixArray: Sn, parsePath: Vh, parsePreserveAspectRatioAttribute: Zr, parseUnit: Rt, pick: fs, projectStrokeOnPoints: kh, qrDecompose: as, radiansToDegrees: Ce, removeFromArray: qe, removeTransformFromObject: (a, t) => {
|
|
3371
3371
|
const e = Xt(t), s = dt(e, a.calcOwnMatrix());
|
|
3372
3372
|
Rs(a, s);
|
|
3373
|
-
}, removeTransformMatrixForSvgParsing: Ji, request: Wh, requestAnimFrame: Qs, resetObjectTransform: rh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: Qr, saveObjectTransform: Kr, sendObjectToPlane: yr, sendPointToPlane: os, sendVectorToPlane: oh, setStyle: mn, sin: ue, sizeAfterTransform: An, string:
|
|
3373
|
+
}, removeTransformMatrixForSvgParsing: Ji, request: Wh, requestAnimFrame: Qs, resetObjectTransform: rh, rotatePoint: (a, t, e) => a.rotate(e, t), rotateVector: Qr, saveObjectTransform: Kr, sendObjectToPlane: yr, sendPointToPlane: os, sendVectorToPlane: oh, setStyle: mn, sin: ue, sizeAfterTransform: An, string: Jc, stylesFromArray: Oh, stylesToArray: Ph, toBlob: Ur, toDataURL: Wr, toFixed: Q, transformPath: (a, t, e) => (e && (t = dt(t, [1, 0, 0, 1, -e.x, -e.y])), a.map(((s) => {
|
|
3374
3374
|
const i = [...s];
|
|
3375
3375
|
for (let n = 1; n < s.length - 1; n += 2) {
|
|
3376
3376
|
const { x: r, y: o } = At({ x: s[n], y: s[n + 1] }, t);
|
|
@@ -3378,7 +3378,7 @@ var Iu = Object.freeze({ __proto__: null, addTransformToObject: nh, animate: so,
|
|
|
3378
3378
|
}
|
|
3379
3379
|
return i;
|
|
3380
3380
|
}))), transformPoint: At });
|
|
3381
|
-
class
|
|
3381
|
+
class Iu extends sh {
|
|
3382
3382
|
constructor(t) {
|
|
3383
3383
|
let { allowTouchScrolling: e = !1, containerClass: s = "" } = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
3384
3384
|
super(t), x(this, "upper", void 0), x(this, "container", void 0);
|
|
@@ -3434,7 +3434,7 @@ class Dn extends pi {
|
|
|
3434
3434
|
return this.elements.container;
|
|
3435
3435
|
}
|
|
3436
3436
|
initElements(t) {
|
|
3437
|
-
this.elements = new
|
|
3437
|
+
this.elements = new Iu(t, { allowTouchScrolling: this.allowTouchScrolling, containerClass: this.containerClass }), this._createCacheCanvas();
|
|
3438
3438
|
}
|
|
3439
3439
|
_onObjectAdded(t) {
|
|
3440
3440
|
this._objectsToRender = void 0, super._onObjectAdded(t);
|
|
@@ -3491,7 +3491,7 @@ class Dn extends pi {
|
|
|
3491
3491
|
}
|
|
3492
3492
|
_setupCurrentTransform(t, e, s) {
|
|
3493
3493
|
var i;
|
|
3494
|
-
const n = e.group ? os(this.getScenePoint(t), void 0, e.group.calcTransformMatrix()) : this.getScenePoint(t), { key: r = "", control: o } = e.getActiveControl() || {}, h = s && o ? (i = o.getActionHandler(t, e, o)) === null || i === void 0 ? void 0 : i.bind(o) :
|
|
3494
|
+
const n = e.group ? os(this.getScenePoint(t), void 0, e.group.calcTransformMatrix()) : this.getScenePoint(t), { key: r = "", control: o } = e.getActiveControl() || {}, h = s && o ? (i = o.getActionHandler(t, e, o)) === null || i === void 0 ? void 0 : i.bind(o) : dc, l = ((f, g, p, b) => {
|
|
3495
3495
|
if (!g || !f) return "drag";
|
|
3496
3496
|
const m = b.controls[g];
|
|
3497
3497
|
return m.getActionName(p, m, b);
|
|
@@ -3667,7 +3667,7 @@ class Dn extends pi {
|
|
|
3667
3667
|
}
|
|
3668
3668
|
}
|
|
3669
3669
|
x(Dn, "ownDefaults", { uniformScaling: !0, uniScaleKey: "shiftKey", centeredScaling: !1, centeredRotation: !1, centeredKey: "altKey", altActionKey: "shiftKey", selection: !0, selectionKey: "shiftKey", selectionColor: "rgba(100, 100, 255, 0.3)", selectionDashArray: [], selectionBorderColor: "rgba(255, 255, 255, 0.3)", selectionLineWidth: 1, selectionFullyContained: !1, hoverCursor: "move", moveCursor: "move", defaultCursor: "default", freeDrawingCursor: "crosshair", notAllowedCursor: "not-allowed", perPixelTargetFind: !1, targetFindTolerance: 0, skipTargetFind: !1, stopContextMenu: !1, fireRightClick: !1, fireMiddleClick: !1, enablePointerEvents: !1, containerClass: "canvas-container", preserveObjectStacking: !1 });
|
|
3670
|
-
class
|
|
3670
|
+
class Nu {
|
|
3671
3671
|
constructor(t) {
|
|
3672
3672
|
x(this, "targets", []), x(this, "__disposer", void 0);
|
|
3673
3673
|
const e = () => {
|
|
@@ -3704,7 +3704,7 @@ class ju {
|
|
|
3704
3704
|
this.clear(), this.__disposer(), delete this.__disposer;
|
|
3705
3705
|
}
|
|
3706
3706
|
}
|
|
3707
|
-
const
|
|
3707
|
+
const ju = ["target", "oldTarget", "fireCanvas", "e"], Ut = { passive: !1 }, ys = (a, t) => {
|
|
3708
3708
|
const e = a.getViewportPoint(t), s = a.getScenePoint(t);
|
|
3709
3709
|
return { viewportPoint: e, scenePoint: s, pointer: e, absolutePointer: s };
|
|
3710
3710
|
}, He = function(a) {
|
|
@@ -3713,10 +3713,10 @@ const Bu = ["target", "oldTarget", "fireCanvas", "e"], Ut = { passive: !1 }, ys
|
|
|
3713
3713
|
}, Zt = function(a) {
|
|
3714
3714
|
for (var t = arguments.length, e = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++) e[s - 1] = arguments[s];
|
|
3715
3715
|
return a.removeEventListener(...e);
|
|
3716
|
-
},
|
|
3716
|
+
}, Bu = { mouse: { in: "over", out: "out", targetIn: "mouseover", targetOut: "mouseout", canvasIn: "mouse:over", canvasOut: "mouse:out" }, drag: { in: "enter", out: "leave", targetIn: "dragenter", targetOut: "dragleave", canvasIn: "drag:enter", canvasOut: "drag:leave" } };
|
|
3717
3717
|
class Er extends Dn {
|
|
3718
3718
|
constructor(t) {
|
|
3719
|
-
super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), x(this, "_isClick", void 0), x(this, "textEditingManager", new
|
|
3719
|
+
super(t, arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}), x(this, "_isClick", void 0), x(this, "textEditingManager", new Nu(this)), ["_onMouseDown", "_onTouchStart", "_onMouseMove", "_onMouseUp", "_onTouchEnd", "_onResize", "_onMouseWheel", "_onMouseOut", "_onMouseEnter", "_onContextMenu", "_onClick", "_onDragStart", "_onDragEnd", "_onDragProgress", "_onDragOver", "_onDragEnter", "_onDragLeave", "_onDrop"].forEach(((e) => {
|
|
3720
3720
|
this[e] = this[e].bind(this);
|
|
3721
3721
|
})), this.addOrRemove(He, "add");
|
|
3722
3722
|
}
|
|
@@ -3960,8 +3960,8 @@ class Er extends Dn {
|
|
|
3960
3960
|
this._draggedoverTarget = t;
|
|
3961
3961
|
}
|
|
3962
3962
|
fireSyntheticInOutEvents(t, e) {
|
|
3963
|
-
let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o = st(e,
|
|
3964
|
-
const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } =
|
|
3963
|
+
let { target: s, oldTarget: i, fireCanvas: n, e: r } = e, o = st(e, ju);
|
|
3964
|
+
const { targetIn: h, targetOut: l, canvasIn: c, canvasOut: u } = Bu[t], d = i !== s;
|
|
3965
3965
|
if (i && d) {
|
|
3966
3966
|
const f = w(w({}, o), {}, { e: r, target: i, nextTarget: s }, ys(this, r));
|
|
3967
3967
|
n && this.fire(u, f), i.fire(l, f);
|
|
@@ -4029,7 +4029,7 @@ class Er extends Dn {
|
|
|
4029
4029
|
this.removeListeners(), this.textEditingManager.dispose(), super.destroy();
|
|
4030
4030
|
}
|
|
4031
4031
|
}
|
|
4032
|
-
const Uh = { x1: 0, y1: 0, x2: 0, y2: 0 },
|
|
4032
|
+
const Uh = { x1: 0, y1: 0, x2: 0, y2: 0 }, Hu = w(w({}, Uh), {}, { r1: 0, r2: 0 }), xs = (a, t) => isNaN(a) && typeof t == "number" ? t : a;
|
|
4033
4033
|
function Yh(a) {
|
|
4034
4034
|
return a && /%$/.test(a) && Number.isFinite(parseFloat(a));
|
|
4035
4035
|
}
|
|
@@ -4037,24 +4037,24 @@ function $h(a, t) {
|
|
|
4037
4037
|
const e = typeof a == "number" ? a : typeof a == "string" ? parseFloat(a) / (Yh(a) ? 100 : 1) : NaN;
|
|
4038
4038
|
return ls(0, xs(e, t), 1);
|
|
4039
4039
|
}
|
|
4040
|
-
const
|
|
4041
|
-
function
|
|
4040
|
+
const zu = /\s*;\s*/, Gu = /\s*:\s*/;
|
|
4041
|
+
function Vu(a, t) {
|
|
4042
4042
|
let e, s;
|
|
4043
4043
|
const i = a.getAttribute("style");
|
|
4044
4044
|
if (i) {
|
|
4045
|
-
const r = i.split(
|
|
4045
|
+
const r = i.split(zu);
|
|
4046
4046
|
r[r.length - 1] === "" && r.pop();
|
|
4047
4047
|
for (let o = r.length; o--; ) {
|
|
4048
|
-
const [h, l] = r[o].split(
|
|
4048
|
+
const [h, l] = r[o].split(Gu).map(((c) => c.trim()));
|
|
4049
4049
|
h === "stop-color" ? e = l : h === "stop-opacity" && (s = l);
|
|
4050
4050
|
}
|
|
4051
4051
|
}
|
|
4052
4052
|
const n = new Z(e || a.getAttribute("stop-color") || "rgb(0,0,0)");
|
|
4053
4053
|
return { offset: $h(a.getAttribute("offset"), 0), color: n.toRgb(), opacity: xs(parseFloat(s || a.getAttribute("stop-opacity") || ""), 1) * n.getAlpha() * t };
|
|
4054
4054
|
}
|
|
4055
|
-
function
|
|
4055
|
+
function Xu(a, t) {
|
|
4056
4056
|
const e = [], s = a.getElementsByTagName("stop"), i = $h(t, 1);
|
|
4057
|
-
for (let n = s.length; n--; ) e.push(
|
|
4057
|
+
for (let n = s.length; n--; ) e.push(Vu(s[n], i));
|
|
4058
4058
|
return e;
|
|
4059
4059
|
}
|
|
4060
4060
|
function qh(a) {
|
|
@@ -4066,7 +4066,7 @@ function Kh(a) {
|
|
|
4066
4066
|
function ie(a, t) {
|
|
4067
4067
|
return a.getAttribute(t);
|
|
4068
4068
|
}
|
|
4069
|
-
function
|
|
4069
|
+
function Wu(a, t) {
|
|
4070
4070
|
return (function(e, s) {
|
|
4071
4071
|
let i, { width: n, height: r, gradientUnits: o } = s;
|
|
4072
4072
|
return Object.entries(e).reduce(((h, l) => {
|
|
@@ -4088,7 +4088,7 @@ function Uu(a, t) {
|
|
|
4088
4088
|
class qs {
|
|
4089
4089
|
constructor(t) {
|
|
4090
4090
|
const { type: e = "linear", gradientUnits: s = "pixels", coords: i = {}, colorStops: n = [], offsetX: r = 0, offsetY: o = 0, gradientTransform: h, id: l } = t || {};
|
|
4091
|
-
Object.assign(this, { type: e, gradientUnits: s, coords: w(w({}, e === "radial" ?
|
|
4091
|
+
Object.assign(this, { type: e, gradientUnits: s, coords: w(w({}, e === "radial" ? Hu : Uh), i), colorStops: n, offsetX: r, offsetY: o, gradientTransform: h, id: l ? "".concat(l, "_").concat(Xe()) : Xe() });
|
|
4092
4092
|
}
|
|
4093
4093
|
addColorStop(t) {
|
|
4094
4094
|
for (const e in t) {
|
|
@@ -4145,11 +4145,11 @@ class qs {
|
|
|
4145
4145
|
}
|
|
4146
4146
|
static fromElement(t, e, s) {
|
|
4147
4147
|
const i = Kh(t), n = e._findCenterFromElement();
|
|
4148
|
-
return new this(w({ id: t.getAttribute("id") || void 0, type: qh(t), coords:
|
|
4148
|
+
return new this(w({ id: t.getAttribute("id") || void 0, type: qh(t), coords: Wu(t, { width: s.viewBoxWidth || s.width, height: s.viewBoxHeight || s.height }), colorStops: Xu(t, s.opacity), gradientUnits: i, gradientTransform: dn(t.getAttribute("gradientTransform") || "") }, i === "pixels" ? { offsetX: e.width / 2 - n.x, offsetY: e.height / 2 - n.y } : { offsetX: 0, offsetY: 0 }));
|
|
4149
4149
|
}
|
|
4150
4150
|
}
|
|
4151
4151
|
x(qs, "type", "Gradient"), F.setClass(qs, "gradient"), F.setClass(qs, "linear"), F.setClass(qs, "radial");
|
|
4152
|
-
const
|
|
4152
|
+
const Uu = ["type", "source", "patternTransform"];
|
|
4153
4153
|
class er {
|
|
4154
4154
|
get type() {
|
|
4155
4155
|
return "pattern";
|
|
@@ -4184,16 +4184,16 @@ class er {
|
|
|
4184
4184
|
`);
|
|
4185
4185
|
}
|
|
4186
4186
|
static async fromObject(t, e) {
|
|
4187
|
-
let { type: s, source: i, patternTransform: n } = t, r = st(t,
|
|
4187
|
+
let { type: s, source: i, patternTransform: n } = t, r = st(t, Uu);
|
|
4188
4188
|
const o = await ti(i, w(w({}, e), {}, { crossOrigin: r.crossOrigin }));
|
|
4189
4189
|
return new this(w(w({}, r), {}, { patternTransform: n && n.slice(0), source: o }));
|
|
4190
4190
|
}
|
|
4191
4191
|
}
|
|
4192
4192
|
x(er, "type", "Pattern"), F.setClass(er), F.setClass(er, "pattern");
|
|
4193
|
-
const
|
|
4193
|
+
const Yu = ["path", "left", "top"], $u = ["d"];
|
|
4194
4194
|
class Je extends Mt {
|
|
4195
4195
|
constructor(t) {
|
|
4196
|
-
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = st(e,
|
|
4196
|
+
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, { path: s, left: i, top: n } = e, r = st(e, Yu);
|
|
4197
4197
|
super(), Object.assign(this, Je.ownDefaults), this.setOptions(r), this._setPath(t || [], !0), typeof i == "number" && this.set(J, i), typeof n == "number" && this.set(Wt, n);
|
|
4198
4198
|
}
|
|
4199
4199
|
_setPath(t, e) {
|
|
@@ -4295,11 +4295,11 @@ class Je extends Mt {
|
|
|
4295
4295
|
}
|
|
4296
4296
|
static async fromElement(t, e, s) {
|
|
4297
4297
|
const i = Ne(t, this.ATTRIBUTE_NAMES, s), { d: n } = i;
|
|
4298
|
-
return new this(n, w(w(w({}, st(i,
|
|
4298
|
+
return new this(n, w(w(w({}, st(i, $u)), e), {}, { left: void 0, top: void 0 }));
|
|
4299
4299
|
}
|
|
4300
4300
|
}
|
|
4301
4301
|
x(Je, "type", "Path"), x(Je, "cacheProperties", [...Ie, "path", "fillRule"]), x(Je, "ATTRIBUTE_NAMES", [...Ye, "d"]), F.setClass(Je), F.setSVGClass(Je);
|
|
4302
|
-
const
|
|
4302
|
+
const qu = ["left", "top", "radius"], Jh = ["radius", "startAngle", "endAngle", "counterClockwise"];
|
|
4303
4303
|
class Me extends Mt {
|
|
4304
4304
|
static getDefaults() {
|
|
4305
4305
|
return w(w({}, super.getDefaults()), Me.ownDefaults);
|
|
@@ -4338,14 +4338,14 @@ class Me extends Mt {
|
|
|
4338
4338
|
}
|
|
4339
4339
|
static async fromElement(t, e, s) {
|
|
4340
4340
|
const i = Ne(t, this.ATTRIBUTE_NAMES, s), { left: n = 0, top: r = 0, radius: o = 0 } = i;
|
|
4341
|
-
return new this(w(w({}, st(i,
|
|
4341
|
+
return new this(w(w({}, st(i, qu)), {}, { radius: o, left: n - o, top: r - o }));
|
|
4342
4342
|
}
|
|
4343
4343
|
static fromObject(t) {
|
|
4344
4344
|
return super._fromObject(t);
|
|
4345
4345
|
}
|
|
4346
4346
|
}
|
|
4347
4347
|
x(Me, "type", "Circle"), x(Me, "cacheProperties", [...Ie, ...Jh]), x(Me, "ownDefaults", { radius: 0, startAngle: 0, endAngle: 360, counterClockwise: !1 }), x(Me, "ATTRIBUTE_NAMES", ["cx", "cy", "r", ...Ye]), F.setClass(Me), F.setSVGClass(Me);
|
|
4348
|
-
const
|
|
4348
|
+
const Ku = ["x1", "y1", "x2", "y2"], Ju = ["x1", "y1", "x2", "y2"], kr = ["x1", "x2", "y1", "y2"];
|
|
4349
4349
|
class Ze extends Mt {
|
|
4350
4350
|
constructor() {
|
|
4351
4351
|
let [t, e, s, i] = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [0, 0, 0, 0], n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -4392,10 +4392,10 @@ class Ze extends Mt {
|
|
|
4392
4392
|
}
|
|
4393
4393
|
static async fromElement(t, e, s) {
|
|
4394
4394
|
const i = Ne(t, this.ATTRIBUTE_NAMES, s), { x1: n = 0, y1: r = 0, x2: o = 0, y2: h = 0 } = i;
|
|
4395
|
-
return new this([n, r, o, h], st(i,
|
|
4395
|
+
return new this([n, r, o, h], st(i, Ku));
|
|
4396
4396
|
}
|
|
4397
4397
|
static fromObject(t) {
|
|
4398
|
-
let { x1: e, y1: s, x2: i, y2: n } = t, r = st(t,
|
|
4398
|
+
let { x1: e, y1: s, x2: i, y2: n } = t, r = st(t, Ju);
|
|
4399
4399
|
return this._fromObject(w(w({}, r), {}, { points: [e, s, i, n] }), { extraParam: "points" });
|
|
4400
4400
|
}
|
|
4401
4401
|
}
|
|
@@ -4457,14 +4457,14 @@ class Pe extends Mt {
|
|
|
4457
4457
|
return i.left = (i.left || 0) - i.rx, i.top = (i.top || 0) - i.ry, new this(i);
|
|
4458
4458
|
}
|
|
4459
4459
|
}
|
|
4460
|
-
function
|
|
4460
|
+
function Zu(a) {
|
|
4461
4461
|
if (!a) return [];
|
|
4462
4462
|
const t = a.replace(/,/g, " ").trim().split(/\s+/), e = [];
|
|
4463
4463
|
for (let s = 0; s < t.length; s += 2) e.push({ x: parseFloat(t[s]), y: parseFloat(t[s + 1]) });
|
|
4464
4464
|
return e;
|
|
4465
4465
|
}
|
|
4466
4466
|
x(Pe, "type", "Ellipse"), x(Pe, "cacheProperties", [...Ie, ...Zh]), x(Pe, "ownDefaults", { rx: 0, ry: 0 }), x(Pe, "ATTRIBUTE_NAMES", [...Ye, "cx", "cy", "rx", "ry"]), F.setClass(Pe), F.setSVGClass(Pe);
|
|
4467
|
-
const
|
|
4467
|
+
const Qu = ["left", "top"], Qh = { exactBoundingBox: !1 };
|
|
4468
4468
|
class oe extends Mt {
|
|
4469
4469
|
static getDefaults() {
|
|
4470
4470
|
return w(w({}, super.getDefaults()), oe.ownDefaults);
|
|
@@ -4554,7 +4554,7 @@ class oe extends Mt {
|
|
|
4554
4554
|
return this.points.length;
|
|
4555
4555
|
}
|
|
4556
4556
|
static async fromElement(t, e, s) {
|
|
4557
|
-
return new this(
|
|
4557
|
+
return new this(Zu(t.getAttribute("points")), w(w({}, st(Ne(t, this.ATTRIBUTE_NAMES, s), Qu)), e));
|
|
4558
4558
|
}
|
|
4559
4559
|
static fromObject(t) {
|
|
4560
4560
|
return this._fromObject(t, { extraParam: "points" });
|
|
@@ -4647,8 +4647,8 @@ class tl extends Mt {
|
|
|
4647
4647
|
delete this.styles[t];
|
|
4648
4648
|
}
|
|
4649
4649
|
}
|
|
4650
|
-
x(tl, "_styleProperties",
|
|
4651
|
-
const
|
|
4650
|
+
x(tl, "_styleProperties", fc);
|
|
4651
|
+
const td = / +/g, ed = /"/g;
|
|
4652
4652
|
function sr(a, t, e, s, i) {
|
|
4653
4653
|
return " ".concat((function(n, r) {
|
|
4654
4654
|
let { left: o, top: h, width: l, height: c } = r, u = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : q.NUM_FRACTION_DIGITS;
|
|
@@ -4657,7 +4657,7 @@ function sr(a, t, e, s, i) {
|
|
|
4657
4657
|
})(a, { left: t, top: e, width: s, height: i }), `
|
|
4658
4658
|
`);
|
|
4659
4659
|
}
|
|
4660
|
-
const
|
|
4660
|
+
const sd = ["textAnchor", "textDecoration", "dx", "dy", "top", "left", "fontSize", "strokeWidth"];
|
|
4661
4661
|
let ir;
|
|
4662
4662
|
class Ct extends tl {
|
|
4663
4663
|
static getDefaults() {
|
|
@@ -4986,7 +4986,7 @@ class Ct extends tl {
|
|
|
4986
4986
|
return 1;
|
|
4987
4987
|
}
|
|
4988
4988
|
static async fromElement(t, e, s) {
|
|
4989
|
-
const i = Ne(t, Ct.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = J, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = zr, strokeWidth: f = 1 } = n, g = st(n,
|
|
4989
|
+
const i = Ne(t, Ct.ATTRIBUTE_NAMES, s), n = w(w({}, e), i), { textAnchor: r = J, textDecoration: o = "", dx: h = 0, dy: l = 0, top: c = 0, left: u = 0, fontSize: d = zr, strokeWidth: f = 1 } = n, g = st(n, sd), p = new this(an(t.textContent || "").trim(), w({ left: u + h, top: c + l, underline: o.includes("underline"), overline: o.includes("overline"), linethrough: o.includes("line-through"), strokeWidth: 0, fontSize: d }, g)), b = p.getScaledHeight() / p.height, m = ((p.height + p.strokeWidth) * p.lineHeight - p.height) * b, v = p.getScaledHeight() + m;
|
|
4990
4990
|
let y = 0;
|
|
4991
4991
|
return r === X && (y = p.getScaledWidth() / 2), r === ut && (y = p.getScaledWidth()), p.set({ left: p.left - y, top: p.top - (v - p.fontSize * (0.07 + p._fontSizeFraction)) / p.lineHeight, strokeWidth: f }), p;
|
|
4992
4992
|
}
|
|
@@ -4994,7 +4994,7 @@ class Ct extends tl {
|
|
|
4994
4994
|
return this._fromObject(w(w({}, t), {}, { styles: Oh(t.styles || {}, t.text) }), { extraParam: "text" });
|
|
4995
4995
|
}
|
|
4996
4996
|
}
|
|
4997
|
-
x(Ct, "textLayoutProperties", gh), x(Ct, "cacheProperties", [...Ie, ...ph]), x(Ct, "ownDefaults",
|
|
4997
|
+
x(Ct, "textLayoutProperties", gh), x(Ct, "cacheProperties", [...Ie, ...ph]), x(Ct, "ownDefaults", gc), x(Ct, "type", "Text"), x(Ct, "genericFonts", ["serif", "sans-serif", "monospace", "cursive", "fantasy", "system-ui", "ui-serif", "ui-sans-serif", "ui-monospace", "ui-rounded", "math", "emoji", "fangsong"]), x(Ct, "ATTRIBUTE_NAMES", Ye.concat("x", "y", "dx", "dy", "font-family", "font-style", "font-weight", "font-size", "letter-spacing", "text-decoration", "text-anchor")), Ah(Ct, [class extends uh {
|
|
4998
4998
|
_toSVG() {
|
|
4999
4999
|
const a = this._getSVGLeftTopOffsets(), t = this._getSVGTextAndBg(a.textTop, a.textLeft);
|
|
5000
5000
|
return this._wrapSVGTextAndBg(t);
|
|
@@ -5009,7 +5009,7 @@ x(Ct, "textLayoutProperties", gh), x(Ct, "cacheProperties", [...Ie, ...ph]), x(C
|
|
|
5009
5009
|
_wrapSVGTextAndBg(a) {
|
|
5010
5010
|
let { textBgRects: t, textSpans: e } = a;
|
|
5011
5011
|
const s = this.getSvgTextDecoration(this);
|
|
5012
|
-
return [t.join(""), ' <text xml:space="preserve" ', 'font-family="'.concat(this.fontFamily.replace(
|
|
5012
|
+
return [t.join(""), ' <text xml:space="preserve" ', 'font-family="'.concat(this.fontFamily.replace(ed, "'"), '" '), 'font-size="'.concat(this.fontSize, '" '), this.fontStyle ? 'font-style="'.concat(this.fontStyle, '" ') : "", this.fontWeight ? 'font-weight="'.concat(this.fontWeight, '" ') : "", s ? 'text-decoration="'.concat(s, '" ') : "", this.direction === "rtl" ? 'direction="'.concat(this.direction, '" ') : "", 'style="', this.getSvgStyles(!0), '"', this.addPaintOrder(), " >", e.join(""), `</text>
|
|
5013
5013
|
`];
|
|
5014
5014
|
}
|
|
5015
5015
|
_getSVGTextAndBg(a, t) {
|
|
@@ -5020,7 +5020,7 @@ x(Ct, "textLayoutProperties", gh), x(Ct, "cacheProperties", [...Ie, ...ph]), x(C
|
|
|
5020
5020
|
return { textSpans: e, textBgRects: s };
|
|
5021
5021
|
}
|
|
5022
5022
|
_createTextCharSpan(a, t, e, s, i) {
|
|
5023
|
-
const n = q.NUM_FRACTION_DIGITS, r = this.getSvgSpanStyles(t, a !== a.trim() || !!a.match(
|
|
5023
|
+
const n = q.NUM_FRACTION_DIGITS, r = this.getSvgSpanStyles(t, a !== a.trim() || !!a.match(td)), o = r ? 'style="'.concat(r, '"') : "", h = t.deltaY, l = h ? ' dy="'.concat(Q(h, n), '" ') : "", { angle: c, renderLeft: u, renderTop: d, width: f } = i;
|
|
5024
5024
|
let g = "";
|
|
5025
5025
|
if (u !== void 0) {
|
|
5026
5026
|
const p = f / 2;
|
|
@@ -5064,7 +5064,7 @@ x(Ct, "textLayoutProperties", gh), x(Ct, "cacheProperties", [...Ie, ...ph]), x(C
|
|
|
5064
5064
|
return ["overline", "underline", "line-through"].filter(((t) => a[t.replace("-", "")])).join(" ");
|
|
5065
5065
|
}
|
|
5066
5066
|
}]), F.setClass(Ct), F.setSVGClass(Ct);
|
|
5067
|
-
class
|
|
5067
|
+
class id {
|
|
5068
5068
|
constructor(t) {
|
|
5069
5069
|
x(this, "target", void 0), x(this, "__mouseDownInPlace", !1), x(this, "__dragStartFired", !1), x(this, "__isDraggingOver", !1), x(this, "__dragStartSelection", void 0), x(this, "__dragImageDisposer", void 0), x(this, "_dispose", void 0), this.target = t;
|
|
5070
5070
|
const e = [this.target.on("dragenter", this.dragEnterHandler.bind(this)), this.target.on("dragover", this.dragOverHandler.bind(this)), this.target.on("dragleave", this.dragLeaveHandler.bind(this)), this.target.on("dragend", this.dragEndHandler.bind(this)), this.target.on("drop", this.dropHandler.bind(this))];
|
|
@@ -5165,7 +5165,7 @@ class nd {
|
|
|
5165
5165
|
}
|
|
5166
5166
|
}
|
|
5167
5167
|
const ua = /[ \n\.,;!\?\-]/;
|
|
5168
|
-
class
|
|
5168
|
+
class nd extends Ct {
|
|
5169
5169
|
constructor() {
|
|
5170
5170
|
super(...arguments), x(this, "_currentCursorOpacity", 1);
|
|
5171
5171
|
}
|
|
@@ -5400,7 +5400,7 @@ class rd extends Ct {
|
|
|
5400
5400
|
s <= t ? (e === t ? this._selectionDirection = J : this._selectionDirection === ut && (this._selectionDirection = J, this.selectionEnd = t), this.selectionStart = s) : s > t && s < e ? this._selectionDirection === ut ? this.selectionEnd = s : this.selectionStart = s : (e === t ? this._selectionDirection = ut : this._selectionDirection === J && (this._selectionDirection = ut, this.selectionStart = e), this.selectionEnd = s);
|
|
5401
5401
|
}
|
|
5402
5402
|
}
|
|
5403
|
-
class
|
|
5403
|
+
class rd extends nd {
|
|
5404
5404
|
initHiddenTextarea() {
|
|
5405
5405
|
const t = this.canvas && ae(this.canvas.getElement()) || Fs(), e = t.createElement("textarea");
|
|
5406
5406
|
Object.entries({ autocapitalize: "off", autocorrect: "off", autocomplete: "off", spellcheck: "false", "data-fabric": "textarea", wrap: "off", name: "fabricTextarea" }).map(((r) => {
|
|
@@ -5557,12 +5557,12 @@ class od extends rd {
|
|
|
5557
5557
|
}
|
|
5558
5558
|
}
|
|
5559
5559
|
const da = (a) => !!a.button;
|
|
5560
|
-
class
|
|
5560
|
+
class od extends rd {
|
|
5561
5561
|
constructor() {
|
|
5562
5562
|
super(...arguments), x(this, "draggableTextDelegate", void 0);
|
|
5563
5563
|
}
|
|
5564
5564
|
initBehavior() {
|
|
5565
|
-
this.on("mousedown", this._mouseDownHandler), this.on("mouseup", this.mouseUpHandler), this.on("mousedblclick", this.doubleClickHandler), this.on("mousetripleclick", this.tripleClickHandler), this.draggableTextDelegate = new
|
|
5565
|
+
this.on("mousedown", this._mouseDownHandler), this.on("mouseup", this.mouseUpHandler), this.on("mousedblclick", this.doubleClickHandler), this.on("mousetripleclick", this.tripleClickHandler), this.draggableTextDelegate = new id(this), super.initBehavior();
|
|
5566
5566
|
}
|
|
5567
5567
|
shouldStartDragging() {
|
|
5568
5568
|
return this.draggableTextDelegate.isActive();
|
|
@@ -5619,8 +5619,8 @@ const Ai = "moveCursorUp", Ti = "moveCursorDown", Ei = "moveCursorLeft", ki = "m
|
|
|
5619
5619
|
a.setTransform(e, 0, 0, e, 0, 0);
|
|
5620
5620
|
const s = t.viewportTransform;
|
|
5621
5621
|
a.transform(s[0], s[1], s[2], s[3], s[4], s[5]);
|
|
5622
|
-
},
|
|
5623
|
-
class De extends
|
|
5622
|
+
}, ad = w({ selectionStart: 0, selectionEnd: 0, selectionColor: "rgba(17,119,255,0.3)", isEditing: !1, editable: !0, editingBorderColor: "rgba(102,153,255,0.25)", cursorWidth: 2, cursorColor: "", cursorDelay: 1e3, cursorDuration: 600, caching: !0, hiddenTextareaContainer: null, keysMap: { 9: Mi, 27: Mi, 33: Ai, 34: Ti, 35: ki, 36: Ei, 37: Ei, 38: Ai, 39: ki, 40: Ti }, keysMapRtl: { 9: Mi, 27: Mi, 33: Ai, 34: Ti, 35: Ei, 36: ki, 37: ki, 38: Ai, 39: Ei, 40: Ti }, ctrlKeysMapDown: { 65: "cmdAll" }, ctrlKeysMapUp: { 67: "copy", 88: "cut" } }, { _selectionDirection: null, _reSpace: /\s|\r?\n/, inCompositionMode: !1 });
|
|
5623
|
+
class De extends od {
|
|
5624
5624
|
static getDefaults() {
|
|
5625
5625
|
return w(w({}, super.getDefaults()), De.ownDefaults);
|
|
5626
5626
|
}
|
|
@@ -5774,7 +5774,7 @@ class De extends ad {
|
|
|
5774
5774
|
this.exitEditingImpl(), this.draggableTextDelegate.dispose(), super.dispose();
|
|
5775
5775
|
}
|
|
5776
5776
|
}
|
|
5777
|
-
x(De, "ownDefaults",
|
|
5777
|
+
x(De, "ownDefaults", ad), x(De, "type", "IText"), F.setClass(De), F.setClass(De, "i-text");
|
|
5778
5778
|
class ts extends De {
|
|
5779
5779
|
static getDefaults() {
|
|
5780
5780
|
return w(w({}, super.getDefaults()), ts.ownDefaults);
|
|
@@ -5783,7 +5783,7 @@ class ts extends De {
|
|
|
5783
5783
|
super(t, w(w({}, ts.ownDefaults), e));
|
|
5784
5784
|
}
|
|
5785
5785
|
static createControls() {
|
|
5786
|
-
return { controls:
|
|
5786
|
+
return { controls: Yc() };
|
|
5787
5787
|
}
|
|
5788
5788
|
initDimensions() {
|
|
5789
5789
|
this.initialized && (this.isEditing && this.initDelayedCursor(), this._clearCache(), this.dynamicMinWidth = 0, this._styleMap = this._generateStyleMap(this._splitText()), this.dynamicMinWidth > this.width && this._set("width", this.dynamicMinWidth), this.textAlign.includes(ye) && this.enlargeSpaces(), this.height = this.calcTextHeight());
|
|
@@ -5940,7 +5940,7 @@ class pa extends On {
|
|
|
5940
5940
|
}
|
|
5941
5941
|
}
|
|
5942
5942
|
x(pa, "type", "fixed"), F.setClass(pa);
|
|
5943
|
-
class
|
|
5943
|
+
class hd extends li {
|
|
5944
5944
|
subscribeTargets(t) {
|
|
5945
5945
|
const e = t.target;
|
|
5946
5946
|
t.targets.reduce(((s, i) => (i.parent && s.add(i.parent), s)), /* @__PURE__ */ new Set()).forEach(((s) => {
|
|
@@ -5962,7 +5962,7 @@ class es extends qt {
|
|
|
5962
5962
|
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
5963
5963
|
super(), Object.assign(this, es.ownDefaults), this.setOptions(e);
|
|
5964
5964
|
const { left: s, top: i, layoutManager: n } = e;
|
|
5965
|
-
this.groupInit(t, { left: s, top: i, layoutManager: n ?? new
|
|
5965
|
+
this.groupInit(t, { left: s, top: i, layoutManager: n ?? new hd() });
|
|
5966
5966
|
}
|
|
5967
5967
|
_shouldSetNestedCoords() {
|
|
5968
5968
|
return !0;
|
|
@@ -6017,7 +6017,7 @@ class es extends qt {
|
|
|
6017
6017
|
}
|
|
6018
6018
|
}
|
|
6019
6019
|
x(es, "type", "ActiveSelection"), x(es, "ownDefaults", { multiSelectionStacking: "canvas-stacking" }), F.setClass(es), F.setClass(es, "activeSelection");
|
|
6020
|
-
class
|
|
6020
|
+
class ld {
|
|
6021
6021
|
constructor() {
|
|
6022
6022
|
x(this, "resources", {});
|
|
6023
6023
|
}
|
|
@@ -6107,14 +6107,14 @@ class el {
|
|
|
6107
6107
|
}
|
|
6108
6108
|
}
|
|
6109
6109
|
let nr;
|
|
6110
|
-
function
|
|
6110
|
+
function cd() {
|
|
6111
6111
|
const { WebGLProbe: a } = xe();
|
|
6112
|
-
return a.queryWebGL(Se()), q.enableGLFiltering && a.isSupported(q.textureSize) ? new el({ tileSize: q.textureSize }) : new
|
|
6112
|
+
return a.queryWebGL(Se()), q.enableGLFiltering && a.isSupported(q.textureSize) ? new el({ tileSize: q.textureSize }) : new ld();
|
|
6113
6113
|
}
|
|
6114
6114
|
function rr() {
|
|
6115
|
-
return !nr && (!(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]) && (nr =
|
|
6115
|
+
return !nr && (!(arguments.length > 0 && arguments[0] !== void 0) || arguments[0]) && (nr = cd()), nr;
|
|
6116
6116
|
}
|
|
6117
|
-
const
|
|
6117
|
+
const ud = ["filters", "resizeFilter", "src", "crossOrigin", "type"], sl = ["cropX", "cropY"];
|
|
6118
6118
|
class Tt extends Mt {
|
|
6119
6119
|
static getDefaults() {
|
|
6120
6120
|
return w(w({}, super.getDefaults()), Tt.ownDefaults);
|
|
@@ -6246,7 +6246,7 @@ class Tt extends Mt {
|
|
|
6246
6246
|
return !t || t.alignX === It && t.alignY === It ? (h = e / r, l = s / o) : (t.meetOrSlice === "meet" && (h = l = Fh(this._element, i), n = (e - r * h) / 2, t.alignX === "Min" && (c = -n), t.alignX === "Max" && (c = n), n = (s - o * l) / 2, t.alignY === "Min" && (u = -n), t.alignY === "Max" && (u = n)), t.meetOrSlice === "slice" && (h = l = Ih(this._element, i), n = r - e / h, t.alignX === "Mid" && (d = n / 2), t.alignX === "Max" && (d = n), n = o - s / l, t.alignY === "Mid" && (f = n / 2), t.alignY === "Max" && (f = n), r = e / h, o = s / l)), { width: r, height: o, scaleX: h, scaleY: l, offsetLeft: c, offsetTop: u, cropX: d, cropY: f };
|
|
6247
6247
|
}
|
|
6248
6248
|
static fromObject(t, e) {
|
|
6249
|
-
let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = st(t,
|
|
6249
|
+
let { filters: s, resizeFilter: i, src: n, crossOrigin: r, type: o } = t, h = st(t, ud);
|
|
6250
6250
|
return Promise.all([ti(n, w(w({}, e), {}, { crossOrigin: r })), s && Os(s, e), i && Os([i], e), gi(h, e)]).then(((l) => {
|
|
6251
6251
|
let [c, u = [], [d] = [], f = {}] = l;
|
|
6252
6252
|
return new this(c, w(w({}, h), {}, { src: n, filters: u, resizeFilter: d }, f));
|
|
@@ -6263,7 +6263,7 @@ class Tt extends Mt {
|
|
|
6263
6263
|
}
|
|
6264
6264
|
}
|
|
6265
6265
|
function or(a) {
|
|
6266
|
-
if (!
|
|
6266
|
+
if (!vc.test(a.nodeName)) return {};
|
|
6267
6267
|
const t = a.getAttribute("viewBox");
|
|
6268
6268
|
let e, s, i = 1, n = 1, r = 0, o = 0;
|
|
6269
6269
|
const h = a.getAttribute("width"), l = a.getAttribute("height"), c = a.getAttribute("x") || 0, u = a.getAttribute("y") || 0, d = !(t && Wo.test(t)), f = !h || !l || h === "100%" || l === "100%";
|
|
@@ -6284,17 +6284,17 @@ function or(a) {
|
|
|
6284
6284
|
return s.setAttribute("transform", e), m;
|
|
6285
6285
|
}
|
|
6286
6286
|
x(Tt, "type", "Image"), x(Tt, "cacheProperties", [...Ie, ...sl]), x(Tt, "ownDefaults", { strokeWidth: 0, srcFromAttribute: !1, minimumScaleTrigger: 0.5, cropX: 0, cropY: 0, imageSmoothing: !0 }), x(Tt, "CSS_CANVAS", "canvas-img"), x(Tt, "ATTRIBUTE_NAMES", [...Ye, "x", "y", "width", "height", "preserveAspectRatio", "xlink:href", "href", "crossOrigin", "image-rendering"]), F.setClass(Tt), F.setSVGClass(Tt);
|
|
6287
|
-
const bn = (a) => a.tagName.replace("svg:", ""),
|
|
6287
|
+
const bn = (a) => a.tagName.replace("svg:", ""), dd = Tn(["pattern", "defs", "symbol", "metadata", "clipPath", "mask", "desc"]);
|
|
6288
6288
|
function il(a, t) {
|
|
6289
6289
|
let e, s, i, n, r = [];
|
|
6290
6290
|
for (i = 0, n = t.length; i < n; i++) e = t[i], s = a.getElementsByTagNameNS("http://www.w3.org/2000/svg", e), r = r.concat(Array.from(s));
|
|
6291
6291
|
return r;
|
|
6292
6292
|
}
|
|
6293
|
-
const
|
|
6293
|
+
const fd = ["gradientTransform", "x1", "x2", "y1", "y2", "gradientUnits", "cx", "cy", "r", "fx", "fy"], ar = "xlink:href";
|
|
6294
6294
|
function nl(a, t) {
|
|
6295
6295
|
var e;
|
|
6296
6296
|
const s = ((e = t.getAttribute(ar)) === null || e === void 0 ? void 0 : e.slice(1)) || "", i = a.getElementById(s);
|
|
6297
|
-
if (i && i.getAttribute(ar) && nl(a, i), i && (
|
|
6297
|
+
if (i && i.getAttribute(ar) && nl(a, i), i && (fd.forEach(((n) => {
|
|
6298
6298
|
const r = i.getAttribute(n);
|
|
6299
6299
|
!t.hasAttribute(n) && r && t.setAttribute(n, r);
|
|
6300
6300
|
})), !t.children.length)) {
|
|
@@ -6303,8 +6303,8 @@ function nl(a, t) {
|
|
|
6303
6303
|
}
|
|
6304
6304
|
t.removeAttribute(ar);
|
|
6305
6305
|
}
|
|
6306
|
-
const
|
|
6307
|
-
function
|
|
6306
|
+
const gd = ["linearGradient", "radialGradient", "svg:linearGradient", "svg:radialGradient"];
|
|
6307
|
+
function pd(a) {
|
|
6308
6308
|
const t = a.getElementsByTagName("style"), e = {};
|
|
6309
6309
|
for (let s = 0; s < t.length; s++) {
|
|
6310
6310
|
const i = (t[s].textContent || "").replace(/\/\*[\s\S]*?\*\//g, "");
|
|
@@ -6325,10 +6325,10 @@ function md(a) {
|
|
|
6325
6325
|
return e;
|
|
6326
6326
|
}
|
|
6327
6327
|
const ma = (a) => F.getSVGClass(bn(a).toLowerCase());
|
|
6328
|
-
class
|
|
6328
|
+
class md {
|
|
6329
6329
|
constructor(t, e, s, i, n) {
|
|
6330
6330
|
this.elements = t, this.options = e, this.reviver = s, this.regexUrl = /^url\(['"]?#([^'"]+)['"]?\)/g, this.doc = i, this.clipPaths = n, this.gradientDefs = (function(r) {
|
|
6331
|
-
const o = il(r,
|
|
6331
|
+
const o = il(r, gd), h = {};
|
|
6332
6332
|
let l = o.length;
|
|
6333
6333
|
for (; l--; ) {
|
|
6334
6334
|
const c = o[l];
|
|
@@ -6337,7 +6337,7 @@ class bd {
|
|
|
6337
6337
|
u && (h[u] = c);
|
|
6338
6338
|
}
|
|
6339
6339
|
return h;
|
|
6340
|
-
})(i), this.cssRules =
|
|
6340
|
+
})(i), this.cssRules = pd(i);
|
|
6341
6341
|
}
|
|
6342
6342
|
parse() {
|
|
6343
6343
|
return Promise.all(this.elements.map(((t) => this.createObject(t))));
|
|
@@ -6380,8 +6380,8 @@ class bd {
|
|
|
6380
6380
|
} else delete t.clipPath;
|
|
6381
6381
|
}
|
|
6382
6382
|
}
|
|
6383
|
-
const ba = (a) =>
|
|
6384
|
-
async function
|
|
6383
|
+
const ba = (a) => bc.test(bn(a)), Mr = () => ({ objects: [], elements: [], options: {}, allElements: [] });
|
|
6384
|
+
async function bd(a, t) {
|
|
6385
6385
|
let { crossOrigin: e, signal: s } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6386
6386
|
if (s && s.aborted) return Le("log", new Br("parseSVGDocument")), Mr();
|
|
6387
6387
|
const i = a.documentElement;
|
|
@@ -6423,7 +6423,7 @@ async function vd(a, t) {
|
|
|
6423
6423
|
})(a);
|
|
6424
6424
|
const n = Array.from(i.getElementsByTagName("*")), r = w(w({}, or(i)), {}, { crossOrigin: e, signal: s }), o = n.filter(((c) => (or(c), ba(c) && !(function(u) {
|
|
6425
6425
|
let d = u;
|
|
6426
|
-
for (; d && (d = d.parentElement); ) if (d && d.nodeName &&
|
|
6426
|
+
for (; d && (d = d.parentElement); ) if (d && d.nodeName && dd.test(bn(d)) && !d.getAttribute("instantiated_by_use")) return !0;
|
|
6427
6427
|
return !1;
|
|
6428
6428
|
})(c))));
|
|
6429
6429
|
if (!o || o && !o.length) return w(w({}, Mr()), {}, { options: r, allElements: n });
|
|
@@ -6432,34 +6432,34 @@ async function vd(a, t) {
|
|
|
6432
6432
|
c.setAttribute("originalTransform", c.getAttribute("transform") || "");
|
|
6433
6433
|
const u = c.getAttribute("id");
|
|
6434
6434
|
h[u] = Array.from(c.getElementsByTagName("*")).filter(((d) => ba(d)));
|
|
6435
|
-
})), { objects: await new
|
|
6435
|
+
})), { objects: await new md(o, r, t, a, h).parse(), elements: o, options: r, allElements: n };
|
|
6436
6436
|
}
|
|
6437
|
-
function
|
|
6437
|
+
function vd(a, t) {
|
|
6438
6438
|
let e = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6439
6439
|
return new Promise(((s, i) => {
|
|
6440
6440
|
Wh(a.replace(/^\n\s*/, "").trim(), { onComplete: (n) => {
|
|
6441
6441
|
const r = n.responseXML;
|
|
6442
6442
|
r && s(r), i();
|
|
6443
6443
|
}, signal: e.signal });
|
|
6444
|
-
})).then(((s) =>
|
|
6444
|
+
})).then(((s) => bd(s, t, e))).catch((() => Mr()));
|
|
6445
6445
|
}
|
|
6446
|
-
const Rn = (a) => a.webgl !== void 0, ho = "precision highp float",
|
|
6446
|
+
const Rn = (a) => a.webgl !== void 0, ho = "precision highp float", yd = `
|
|
6447
6447
|
`.concat(ho, `;
|
|
6448
6448
|
varying vec2 vTexCoord;
|
|
6449
6449
|
uniform sampler2D uTexture;
|
|
6450
6450
|
void main() {
|
|
6451
6451
|
gl_FragColor = texture2D(uTexture, vTexCoord);
|
|
6452
|
-
}`),
|
|
6452
|
+
}`), _d = ["type"], wd = ["type"], xd = new RegExp(ho, "g");
|
|
6453
6453
|
class wt {
|
|
6454
6454
|
get type() {
|
|
6455
6455
|
return this.constructor.type;
|
|
6456
6456
|
}
|
|
6457
6457
|
constructor() {
|
|
6458
|
-
let t = st(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
6458
|
+
let t = st(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _d);
|
|
6459
6459
|
Object.assign(this, this.constructor.defaults, t);
|
|
6460
6460
|
}
|
|
6461
6461
|
getFragmentSource() {
|
|
6462
|
-
return
|
|
6462
|
+
return yd;
|
|
6463
6463
|
}
|
|
6464
6464
|
getVertexSource() {
|
|
6465
6465
|
return `
|
|
@@ -6473,7 +6473,7 @@ class wt {
|
|
|
6473
6473
|
createProgram(t) {
|
|
6474
6474
|
let e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : this.getFragmentSource(), s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : this.getVertexSource();
|
|
6475
6475
|
const { WebGLProbe: { GLPrecision: i = "highp" } } = xe();
|
|
6476
|
-
i !== "highp" && (e = e.replace(
|
|
6476
|
+
i !== "highp" && (e = e.replace(xd, ho.replace("highp", i)));
|
|
6477
6477
|
const n = t.createShader(t.VERTEX_SHADER), r = t.createShader(t.FRAGMENT_SHADER), o = t.createProgram();
|
|
6478
6478
|
if (!n || !r || !o) throw new _e("Vertex, fragment shader or program creation error");
|
|
6479
6479
|
if (t.shaderSource(n, s), t.compileShader(n), !t.getShaderParameter(n, t.COMPILE_STATUS)) throw new _e("Vertex shader compile error for ".concat(this.type, ": ").concat(t.getShaderInfoLog(n)));
|
|
@@ -6547,11 +6547,11 @@ class wt {
|
|
|
6547
6547
|
return this.toObject();
|
|
6548
6548
|
}
|
|
6549
6549
|
static async fromObject(t, e) {
|
|
6550
|
-
return new this(st(t,
|
|
6550
|
+
return new this(st(t, wd));
|
|
6551
6551
|
}
|
|
6552
6552
|
}
|
|
6553
6553
|
x(wt, "type", "BaseFilter"), x(wt, "uniformLocations", []);
|
|
6554
|
-
const
|
|
6554
|
+
const Sd = { multiply: `gl_FragColor.rgb *= uColor.rgb;
|
|
6555
6555
|
`, screen: `gl_FragColor.rgb = 1.0 - (1.0 - gl_FragColor.rgb) * (1.0 - uColor.rgb);
|
|
6556
6556
|
`, add: `gl_FragColor.rgb += uColor.rgb;
|
|
6557
6557
|
`, difference: `gl_FragColor.rgb = abs(gl_FragColor.rgb - uColor.rgb);
|
|
@@ -6593,7 +6593,7 @@ class Pi extends wt {
|
|
|
6593
6593
|
vec4 color = texture2D(uTexture, vTexCoord);
|
|
6594
6594
|
gl_FragColor = color;
|
|
6595
6595
|
if (color.a > 0.0) {
|
|
6596
|
-
`.concat(
|
|
6596
|
+
`.concat(Sd[this.mode], `
|
|
6597
6597
|
}
|
|
6598
6598
|
}
|
|
6599
6599
|
`);
|
|
@@ -6644,7 +6644,7 @@ class Pi extends wt {
|
|
|
6644
6644
|
}
|
|
6645
6645
|
}
|
|
6646
6646
|
x(Pi, "defaults", { color: "#F95C63", mode: "multiply", alpha: 1 }), x(Pi, "type", "BlendColor"), x(Pi, "uniformLocations", ["uColor"]), F.setClass(Pi);
|
|
6647
|
-
const
|
|
6647
|
+
const Cd = { multiply: `
|
|
6648
6648
|
precision highp float;
|
|
6649
6649
|
uniform sampler2D uTexture;
|
|
6650
6650
|
uniform sampler2D uImage;
|
|
@@ -6670,13 +6670,13 @@ const Ad = { multiply: `
|
|
|
6670
6670
|
color.a = color2.a;
|
|
6671
6671
|
gl_FragColor = color;
|
|
6672
6672
|
}
|
|
6673
|
-
` },
|
|
6673
|
+
` }, Ad = ["type", "image"];
|
|
6674
6674
|
class Oi extends wt {
|
|
6675
6675
|
getCacheKey() {
|
|
6676
6676
|
return "".concat(this.type, "_").concat(this.mode);
|
|
6677
6677
|
}
|
|
6678
6678
|
getFragmentSource() {
|
|
6679
|
-
return
|
|
6679
|
+
return Cd[this.mode];
|
|
6680
6680
|
}
|
|
6681
6681
|
getVertexSource() {
|
|
6682
6682
|
return `
|
|
@@ -6728,7 +6728,7 @@ class Oi extends wt {
|
|
|
6728
6728
|
return w(w({}, super.toObject()), {}, { image: this.image && this.image.toObject() });
|
|
6729
6729
|
}
|
|
6730
6730
|
static async fromObject(t, e) {
|
|
6731
|
-
let { type: s, image: i } = t, n = st(t,
|
|
6731
|
+
let { type: s, image: i } = t, n = st(t, Ad);
|
|
6732
6732
|
return Tt.fromObject(i, e).then(((r) => new this(w(w({}, n), {}, { image: r }))));
|
|
6733
6733
|
}
|
|
6734
6734
|
}
|
|
@@ -6944,7 +6944,7 @@ class Li extends wt {
|
|
|
6944
6944
|
}
|
|
6945
6945
|
}
|
|
6946
6946
|
x(Li, "type", "Contrast"), x(Li, "defaults", { contrast: 0 }), x(Li, "uniformLocations", ["uContrast"]), F.setClass(Li);
|
|
6947
|
-
const
|
|
6947
|
+
const Td = { Convolute_3_1: `
|
|
6948
6948
|
precision highp float;
|
|
6949
6949
|
uniform sampler2D uTexture;
|
|
6950
6950
|
uniform float uMatrix[9];
|
|
@@ -7094,7 +7094,7 @@ class Fi extends wt {
|
|
|
7094
7094
|
return "".concat(this.type, "_").concat(Math.sqrt(this.matrix.length), "_").concat(this.opaque ? 1 : 0);
|
|
7095
7095
|
}
|
|
7096
7096
|
getFragmentSource() {
|
|
7097
|
-
return
|
|
7097
|
+
return Td[this.getCacheKey()];
|
|
7098
7098
|
}
|
|
7099
7099
|
applyTo2d(t) {
|
|
7100
7100
|
const e = t.imageData, s = e.data, i = this.matrix, n = Math.round(Math.sqrt(i.length)), r = Math.floor(n / 2), o = e.width, h = e.height, l = t.ctx.createImageData(o, h), c = l.data, u = this.opaque ? 1 : 0;
|
|
@@ -7156,7 +7156,7 @@ class Ii extends wt {
|
|
|
7156
7156
|
}
|
|
7157
7157
|
}
|
|
7158
7158
|
x(Ii, "type", ol), x(Ii, "defaults", { gamma: [1, 1, 1] }), x(Ii, "uniformLocations", ["uGamma"]), F.setClass(Ii);
|
|
7159
|
-
const
|
|
7159
|
+
const Ed = { average: `
|
|
7160
7160
|
precision highp float;
|
|
7161
7161
|
uniform sampler2D uTexture;
|
|
7162
7162
|
varying vec2 vTexCoord;
|
|
@@ -7208,7 +7208,7 @@ class Ni extends wt {
|
|
|
7208
7208
|
return "".concat(this.type, "_").concat(this.mode);
|
|
7209
7209
|
}
|
|
7210
7210
|
getFragmentSource() {
|
|
7211
|
-
return
|
|
7211
|
+
return Ed[this.mode];
|
|
7212
7212
|
}
|
|
7213
7213
|
sendUniformData(t, e) {
|
|
7214
7214
|
t.uniform1i(e.uMode, 1);
|
|
@@ -7218,7 +7218,7 @@ class Ni extends wt {
|
|
|
7218
7218
|
}
|
|
7219
7219
|
}
|
|
7220
7220
|
x(Ni, "type", "Grayscale"), x(Ni, "defaults", { mode: "average" }), x(Ni, "uniformLocations", ["uMode"]), F.setClass(Ni);
|
|
7221
|
-
const
|
|
7221
|
+
const kd = w(w({}, rl), {}, { rotation: 0 });
|
|
7222
7222
|
class hr extends Ss {
|
|
7223
7223
|
calculateMatrix() {
|
|
7224
7224
|
const t = this.rotation * Math.PI, e = ce(t), s = ue(t), i = 1 / 3, n = Math.sqrt(i) * s, r = 1 - e;
|
|
@@ -7234,7 +7234,7 @@ class hr extends Ss {
|
|
|
7234
7234
|
return { type: this.type, rotation: this.rotation };
|
|
7235
7235
|
}
|
|
7236
7236
|
}
|
|
7237
|
-
x(hr, "type", "HueRotation"), x(hr, "defaults",
|
|
7237
|
+
x(hr, "type", "HueRotation"), x(hr, "defaults", kd), F.setClass(hr);
|
|
7238
7238
|
class ji extends wt {
|
|
7239
7239
|
applyTo2d(t) {
|
|
7240
7240
|
let { imageData: { data: e } } = t;
|
|
@@ -7593,7 +7593,7 @@ ii.d(V, {
|
|
|
7593
7593
|
),
|
|
7594
7594
|
AnnotationLayer: () => (
|
|
7595
7595
|
/* reexport */
|
|
7596
|
-
|
|
7596
|
+
Cg
|
|
7597
7597
|
),
|
|
7598
7598
|
AnnotationMode: () => (
|
|
7599
7599
|
/* reexport */
|
|
@@ -7653,11 +7653,11 @@ ii.d(V, {
|
|
|
7653
7653
|
),
|
|
7654
7654
|
PasswordResponses: () => (
|
|
7655
7655
|
/* reexport */
|
|
7656
|
-
|
|
7656
|
+
Dd
|
|
7657
7657
|
),
|
|
7658
7658
|
PermissionFlag: () => (
|
|
7659
7659
|
/* reexport */
|
|
7660
|
-
|
|
7660
|
+
Od
|
|
7661
7661
|
),
|
|
7662
7662
|
PixelsPerInch: () => (
|
|
7663
7663
|
/* reexport */
|
|
@@ -7693,11 +7693,11 @@ ii.d(V, {
|
|
|
7693
7693
|
),
|
|
7694
7694
|
build: () => (
|
|
7695
7695
|
/* reexport */
|
|
7696
|
-
|
|
7696
|
+
ng
|
|
7697
7697
|
),
|
|
7698
7698
|
createValidAbsoluteUrl: () => (
|
|
7699
7699
|
/* reexport */
|
|
7700
|
-
|
|
7700
|
+
Id
|
|
7701
7701
|
),
|
|
7702
7702
|
fetchData: () => (
|
|
7703
7703
|
/* reexport */
|
|
@@ -7705,19 +7705,19 @@ ii.d(V, {
|
|
|
7705
7705
|
),
|
|
7706
7706
|
getDocument: () => (
|
|
7707
7707
|
/* reexport */
|
|
7708
|
-
|
|
7708
|
+
qf
|
|
7709
7709
|
),
|
|
7710
7710
|
getFilenameFromUrl: () => (
|
|
7711
7711
|
/* reexport */
|
|
7712
|
-
|
|
7712
|
+
Wd
|
|
7713
7713
|
),
|
|
7714
7714
|
getPdfFilenameFromUrl: () => (
|
|
7715
7715
|
/* reexport */
|
|
7716
|
-
|
|
7716
|
+
Ud
|
|
7717
7717
|
),
|
|
7718
7718
|
getXfaPageViewport: () => (
|
|
7719
7719
|
/* reexport */
|
|
7720
|
-
|
|
7720
|
+
Yd
|
|
7721
7721
|
),
|
|
7722
7722
|
isDataScheme: () => (
|
|
7723
7723
|
/* reexport */
|
|
@@ -7733,7 +7733,7 @@ ii.d(V, {
|
|
|
7733
7733
|
),
|
|
7734
7734
|
normalizeUnicode: () => (
|
|
7735
7735
|
/* reexport */
|
|
7736
|
-
|
|
7736
|
+
Gd
|
|
7737
7737
|
),
|
|
7738
7738
|
setLayerDimensions: () => (
|
|
7739
7739
|
/* reexport */
|
|
@@ -7749,10 +7749,10 @@ ii.d(V, {
|
|
|
7749
7749
|
),
|
|
7750
7750
|
version: () => (
|
|
7751
7751
|
/* reexport */
|
|
7752
|
-
|
|
7752
|
+
ig
|
|
7753
7753
|
)
|
|
7754
7754
|
});
|
|
7755
|
-
const kt = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), al = [1, 0, 0, 1, 0, 0], Pr = [1e-3, 0, 0, 1e-3, 0, 0],
|
|
7755
|
+
const kt = typeof process == "object" && process + "" == "[object process]" && !process.versions.nw && !(process.versions.electron && process.type && process.type !== "browser"), al = [1, 0, 0, 1, 0, 0], Pr = [1e-3, 0, 0, 1e-3, 0, 0], Md = 1e7, lr = 1.35, Yt = {
|
|
7756
7756
|
ANY: 1,
|
|
7757
7757
|
DISPLAY: 2,
|
|
7758
7758
|
PRINT: 4,
|
|
@@ -7766,7 +7766,7 @@ const kt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
7766
7766
|
ENABLE: 1,
|
|
7767
7767
|
ENABLE_FORMS: 2,
|
|
7768
7768
|
ENABLE_STORAGE: 3
|
|
7769
|
-
},
|
|
7769
|
+
}, Pd = "pdfjs_internal_editor_", W = {
|
|
7770
7770
|
DISABLE: -1,
|
|
7771
7771
|
NONE: 0,
|
|
7772
7772
|
FREETEXT: 3,
|
|
@@ -7788,7 +7788,7 @@ const kt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
7788
7788
|
HIGHLIGHT_FREE: 34,
|
|
7789
7789
|
HIGHLIGHT_SHOW_ALL: 35,
|
|
7790
7790
|
DRAW_STEP: 41
|
|
7791
|
-
},
|
|
7791
|
+
}, Od = {
|
|
7792
7792
|
PRINT: 4,
|
|
7793
7793
|
MODIFY_CONTENTS: 8,
|
|
7794
7794
|
COPY: 16,
|
|
@@ -7928,15 +7928,15 @@ const kt = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
7928
7928
|
constructPath: 91,
|
|
7929
7929
|
setStrokeTransparent: 92,
|
|
7930
7930
|
setFillTransparent: 93
|
|
7931
|
-
},
|
|
7931
|
+
}, Dd = {
|
|
7932
7932
|
NEED_PASSWORD: 1,
|
|
7933
7933
|
INCORRECT_PASSWORD: 2
|
|
7934
7934
|
};
|
|
7935
7935
|
let Fn = Ln.WARNINGS;
|
|
7936
|
-
function
|
|
7936
|
+
function Rd(a) {
|
|
7937
7937
|
Number.isInteger(a) && (Fn = a);
|
|
7938
7938
|
}
|
|
7939
|
-
function
|
|
7939
|
+
function Ld() {
|
|
7940
7940
|
return Fn;
|
|
7941
7941
|
}
|
|
7942
7942
|
function In(a) {
|
|
@@ -7951,7 +7951,7 @@ function tt(a) {
|
|
|
7951
7951
|
function bt(a, t) {
|
|
7952
7952
|
a || tt(t);
|
|
7953
7953
|
}
|
|
7954
|
-
function
|
|
7954
|
+
function Fd(a) {
|
|
7955
7955
|
switch (a?.protocol) {
|
|
7956
7956
|
case "http:":
|
|
7957
7957
|
case "https:":
|
|
@@ -7963,17 +7963,17 @@ function Id(a) {
|
|
|
7963
7963
|
return !1;
|
|
7964
7964
|
}
|
|
7965
7965
|
}
|
|
7966
|
-
function
|
|
7966
|
+
function Id(a, t = null, e = null) {
|
|
7967
7967
|
if (!a)
|
|
7968
7968
|
return null;
|
|
7969
7969
|
try {
|
|
7970
7970
|
if (e && typeof a == "string" && (e.addDefaultProtocol && a.startsWith("www.") && a.match(/\./g)?.length >= 2 && (a = `http://${a}`), e.tryConvertEncoding))
|
|
7971
7971
|
try {
|
|
7972
|
-
a =
|
|
7972
|
+
a = zd(a);
|
|
7973
7973
|
} catch {
|
|
7974
7974
|
}
|
|
7975
7975
|
const s = t ? new URL(a, t) : new URL(a);
|
|
7976
|
-
if (
|
|
7976
|
+
if (Fd(s))
|
|
7977
7977
|
return s;
|
|
7978
7978
|
} catch {
|
|
7979
7979
|
}
|
|
@@ -8018,7 +8018,7 @@ class vn extends $e {
|
|
|
8018
8018
|
super(t, "UnexpectedResponseException"), this.status = e;
|
|
8019
8019
|
}
|
|
8020
8020
|
}
|
|
8021
|
-
class
|
|
8021
|
+
class Nd extends $e {
|
|
8022
8022
|
constructor(t) {
|
|
8023
8023
|
super(t, "FormatError");
|
|
8024
8024
|
}
|
|
@@ -8047,7 +8047,7 @@ function Nn(a) {
|
|
|
8047
8047
|
e[s] = a.charCodeAt(s) & 255;
|
|
8048
8048
|
return e;
|
|
8049
8049
|
}
|
|
8050
|
-
function
|
|
8050
|
+
function jd(a) {
|
|
8051
8051
|
return String.fromCharCode(a >> 24 & 255, a >> 16 & 255, a >> 8 & 255, a & 255);
|
|
8052
8052
|
}
|
|
8053
8053
|
function lo(a) {
|
|
@@ -8056,11 +8056,11 @@ function lo(a) {
|
|
|
8056
8056
|
t[e] = s;
|
|
8057
8057
|
return t;
|
|
8058
8058
|
}
|
|
8059
|
-
function
|
|
8059
|
+
function Bd() {
|
|
8060
8060
|
const a = new Uint8Array(4);
|
|
8061
8061
|
return a[0] = 1, new Uint32Array(a.buffer, 0, 1)[0] === 1;
|
|
8062
8062
|
}
|
|
8063
|
-
function
|
|
8063
|
+
function Hd() {
|
|
8064
8064
|
try {
|
|
8065
8065
|
return new Function(""), !0;
|
|
8066
8066
|
} catch {
|
|
@@ -8069,10 +8069,10 @@ function zd() {
|
|
|
8069
8069
|
}
|
|
8070
8070
|
class jt {
|
|
8071
8071
|
static get isLittleEndian() {
|
|
8072
|
-
return Y(this, "isLittleEndian",
|
|
8072
|
+
return Y(this, "isLittleEndian", Bd());
|
|
8073
8073
|
}
|
|
8074
8074
|
static get isEvalSupported() {
|
|
8075
|
-
return Y(this, "isEvalSupported",
|
|
8075
|
+
return Y(this, "isEvalSupported", Hd());
|
|
8076
8076
|
}
|
|
8077
8077
|
static get isOffscreenCanvasSupported() {
|
|
8078
8078
|
return Y(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas < "u");
|
|
@@ -8159,21 +8159,21 @@ class B {
|
|
|
8159
8159
|
return l ? (l[0] = Math.min(l[0], t, o), l[1] = Math.min(l[1], e, h), l[2] = Math.max(l[2], t, o), l[3] = Math.max(l[3], e, h)) : l = [Math.min(t, o), Math.min(e, h), Math.max(t, o), Math.max(e, h)], this.#e(t, s, n, o, e, i, r, h, 3 * (-t + 3 * (s - n) + o), 6 * (t - 2 * s + n), 3 * (s - t), l), this.#e(t, s, n, o, e, i, r, h, 3 * (-e + 3 * (i - r) + h), 6 * (e - 2 * i + r), 3 * (i - e), l), l;
|
|
8160
8160
|
}
|
|
8161
8161
|
}
|
|
8162
|
-
function
|
|
8162
|
+
function zd(a) {
|
|
8163
8163
|
return decodeURIComponent(escape(a));
|
|
8164
8164
|
}
|
|
8165
8165
|
let dr = null, _a = null;
|
|
8166
|
-
function
|
|
8166
|
+
function Gd(a) {
|
|
8167
8167
|
return dr || (dr = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, _a = /* @__PURE__ */ new Map([["ſt", "ſt"]])), a.replaceAll(dr, (t, e, s) => e ? e.normalize("NFKC") : _a.get(s));
|
|
8168
8168
|
}
|
|
8169
|
-
function
|
|
8169
|
+
function Vd() {
|
|
8170
8170
|
if (typeof crypto.randomUUID == "function")
|
|
8171
8171
|
return crypto.randomUUID();
|
|
8172
8172
|
const a = new Uint8Array(32);
|
|
8173
8173
|
return crypto.getRandomValues(a), hl(a);
|
|
8174
8174
|
}
|
|
8175
8175
|
const co = "pdfjs_internal_id_";
|
|
8176
|
-
function
|
|
8176
|
+
function Xd(a) {
|
|
8177
8177
|
return Uint8Array.prototype.toBase64 ? a.toBase64() : btoa(hl(a));
|
|
8178
8178
|
}
|
|
8179
8179
|
typeof Promise.try != "function" && (Promise.try = function(a, ...t) {
|
|
@@ -8310,10 +8310,10 @@ function Bn(a) {
|
|
|
8310
8310
|
function fo(a) {
|
|
8311
8311
|
return typeof a == "string" && /\.pdf$/i.test(a);
|
|
8312
8312
|
}
|
|
8313
|
-
function
|
|
8313
|
+
function Wd(a) {
|
|
8314
8314
|
return [a] = a.split(/[#?]/, 1), a.substring(a.lastIndexOf("/") + 1);
|
|
8315
8315
|
}
|
|
8316
|
-
function
|
|
8316
|
+
function Ud(a, t = "document.pdf") {
|
|
8317
8317
|
if (typeof a != "string")
|
|
8318
8318
|
return t;
|
|
8319
8319
|
if (Bn(a))
|
|
@@ -8400,7 +8400,7 @@ class ll {
|
|
|
8400
8400
|
return u = u >= 0 && u <= 59 ? u : 0, l === "-" ? (r += c, o += u) : l === "+" && (r -= c, o -= u), new Date(Date.UTC(s, i, n, r, o, h));
|
|
8401
8401
|
}
|
|
8402
8402
|
}
|
|
8403
|
-
function
|
|
8403
|
+
function Yd(a, {
|
|
8404
8404
|
scale: t = 1,
|
|
8405
8405
|
rotation: e = 0
|
|
8406
8406
|
}) {
|
|
@@ -8422,7 +8422,7 @@ function go(a) {
|
|
|
8422
8422
|
}
|
|
8423
8423
|
return a.startsWith("rgb(") ? a.slice(4, -1).split(",").map((t) => parseInt(t)) : a.startsWith("rgba(") ? a.slice(5, -1).split(",").map((t) => parseInt(t)).slice(0, 3) : (U(`Not a valid color format: "${a}"`), [0, 0, 0]);
|
|
8424
8424
|
}
|
|
8425
|
-
function
|
|
8425
|
+
function $d(a) {
|
|
8426
8426
|
const t = document.createElement("span");
|
|
8427
8427
|
t.style.visibility = "hidden", document.body.append(t);
|
|
8428
8428
|
for (const e of a.keys()) {
|
|
@@ -8571,7 +8571,7 @@ class ni {
|
|
|
8571
8571
|
this.#t.remove(), this.#e?.destroy(), this.#e = null;
|
|
8572
8572
|
}
|
|
8573
8573
|
}
|
|
8574
|
-
class
|
|
8574
|
+
class qd {
|
|
8575
8575
|
#t = null;
|
|
8576
8576
|
#e = null;
|
|
8577
8577
|
#s;
|
|
@@ -8629,14 +8629,14 @@ function yn(a, t, e) {
|
|
|
8629
8629
|
for (const s of e)
|
|
8630
8630
|
t.addEventListener(s, a[s].bind(a));
|
|
8631
8631
|
}
|
|
8632
|
-
class
|
|
8632
|
+
class Kd {
|
|
8633
8633
|
#t = 0;
|
|
8634
8634
|
get id() {
|
|
8635
|
-
return `${
|
|
8635
|
+
return `${Pd}${this.#t++}`;
|
|
8636
8636
|
}
|
|
8637
8637
|
}
|
|
8638
8638
|
class po {
|
|
8639
|
-
#t =
|
|
8639
|
+
#t = Vd();
|
|
8640
8640
|
#e = 0;
|
|
8641
8641
|
#s = null;
|
|
8642
8642
|
static get _isSVGFittingCanvas() {
|
|
@@ -8748,7 +8748,7 @@ class po {
|
|
|
8748
8748
|
return t.startsWith(`image_${this.#t}_`);
|
|
8749
8749
|
}
|
|
8750
8750
|
}
|
|
8751
|
-
class
|
|
8751
|
+
class Jd {
|
|
8752
8752
|
#t = [];
|
|
8753
8753
|
#e = !1;
|
|
8754
8754
|
#s;
|
|
@@ -8868,7 +8868,7 @@ class mo {
|
|
|
8868
8868
|
static _colorsMapping = /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]);
|
|
8869
8869
|
get _colors() {
|
|
8870
8870
|
const t = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
|
|
8871
|
-
return
|
|
8871
|
+
return $d(t), Y(this, "_colors", t);
|
|
8872
8872
|
}
|
|
8873
8873
|
convert(t) {
|
|
8874
8874
|
const e = go(t);
|
|
@@ -8892,7 +8892,7 @@ class Ue {
|
|
|
8892
8892
|
#r = null;
|
|
8893
8893
|
#n = null;
|
|
8894
8894
|
#h = null;
|
|
8895
|
-
#a = new
|
|
8895
|
+
#a = new Jd();
|
|
8896
8896
|
#c = null;
|
|
8897
8897
|
#l = null;
|
|
8898
8898
|
#d = 0;
|
|
@@ -8910,7 +8910,7 @@ class Ue {
|
|
|
8910
8910
|
#S = null;
|
|
8911
8911
|
#A = !1;
|
|
8912
8912
|
#E = null;
|
|
8913
|
-
#M = new
|
|
8913
|
+
#M = new Kd();
|
|
8914
8914
|
#x = !1;
|
|
8915
8915
|
#k = !1;
|
|
8916
8916
|
#T = null;
|
|
@@ -9172,7 +9172,7 @@ class Ue {
|
|
|
9172
9172
|
if (!t || t.isCollapsed)
|
|
9173
9173
|
return;
|
|
9174
9174
|
const s = this.#B(t).closest(".textLayer"), i = this.getSelectionBoxes(s);
|
|
9175
|
-
i && (this.#E ||= new
|
|
9175
|
+
i && (this.#E ||= new qd(this), this.#E.show(s, i, this.direction === "ltr"));
|
|
9176
9176
|
}
|
|
9177
9177
|
addToAnnotationStorage(t) {
|
|
9178
9178
|
!t.isEmpty() && this.#n && !this.#n.has(t.id) && this.#n.setValue(t.id, t);
|
|
@@ -10218,7 +10218,7 @@ class z {
|
|
|
10218
10218
|
return Y(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
|
|
10219
10219
|
}
|
|
10220
10220
|
static deleteAnnotationElement(t) {
|
|
10221
|
-
const e = new
|
|
10221
|
+
const e = new Zd({
|
|
10222
10222
|
id: t.parent.getNextId(),
|
|
10223
10223
|
parent: t.parent,
|
|
10224
10224
|
uiManager: t._uiManager
|
|
@@ -11068,7 +11068,7 @@ class z {
|
|
|
11068
11068
|
e?.nodeName === "DIV" && e.classList.contains("annotationContent") && e.remove();
|
|
11069
11069
|
}
|
|
11070
11070
|
}
|
|
11071
|
-
class
|
|
11071
|
+
class Zd extends z {
|
|
11072
11072
|
constructor(t) {
|
|
11073
11073
|
super(t), this.annotationElementId = t.annotationElementId, this.deleted = !0;
|
|
11074
11074
|
}
|
|
@@ -11262,7 +11262,7 @@ class ul extends bo {
|
|
|
11262
11262
|
});
|
|
11263
11263
|
}
|
|
11264
11264
|
}
|
|
11265
|
-
class
|
|
11265
|
+
class Qd {
|
|
11266
11266
|
#t = /* @__PURE__ */ new Set();
|
|
11267
11267
|
constructor({
|
|
11268
11268
|
ownerDocument: t = globalThis.document,
|
|
@@ -11396,7 +11396,7 @@ class tf {
|
|
|
11396
11396
|
let b = s(d, g);
|
|
11397
11397
|
for (n = 0, r = u.length - 3; n < r; n += 4)
|
|
11398
11398
|
b = b - p + s(u, n) | 0;
|
|
11399
|
-
n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4,
|
|
11399
|
+
n < u.length && (b = b - p + s(u + "XXX", n) | 0), d = i(d, g, 4, jd(b));
|
|
11400
11400
|
const m = `url(data:font/opentype;base64,${btoa(d)});`, v = `@font-face {font-family:"${u}";src:${m}}`;
|
|
11401
11401
|
this.insertRule(v);
|
|
11402
11402
|
const y = this._document.createElement("div");
|
|
@@ -11410,7 +11410,7 @@ class tf {
|
|
|
11410
11410
|
});
|
|
11411
11411
|
}
|
|
11412
11412
|
}
|
|
11413
|
-
class
|
|
11413
|
+
class tf {
|
|
11414
11414
|
constructor(t, {
|
|
11415
11415
|
disableFontFace: e = !1,
|
|
11416
11416
|
fontExtraProperties: s = !1,
|
|
@@ -11438,7 +11438,7 @@ class ef {
|
|
|
11438
11438
|
createFontFaceRule() {
|
|
11439
11439
|
if (!this.data || this.disableFontFace)
|
|
11440
11440
|
return null;
|
|
11441
|
-
const t = `url(data:${this.mimetype};base64,${
|
|
11441
|
+
const t = `url(data:${this.mimetype};base64,${Xd(this.data)});`;
|
|
11442
11442
|
let e;
|
|
11443
11443
|
if (!this.cssFontInfo)
|
|
11444
11444
|
e = `@font-face {font-family:"${this.loadedName}";src:${t}}`;
|
|
@@ -11804,7 +11804,7 @@ class dl {
|
|
|
11804
11804
|
tt("Abstract method `_createCanvas` called.");
|
|
11805
11805
|
}
|
|
11806
11806
|
}
|
|
11807
|
-
class
|
|
11807
|
+
class ef extends dl {
|
|
11808
11808
|
constructor({
|
|
11809
11809
|
ownerDocument: t = globalThis.document,
|
|
11810
11810
|
enableHWA: e = !1
|
|
@@ -11869,7 +11869,7 @@ class pl {
|
|
|
11869
11869
|
destroy(t = !1) {
|
|
11870
11870
|
}
|
|
11871
11871
|
}
|
|
11872
|
-
class
|
|
11872
|
+
class sf extends pl {
|
|
11873
11873
|
#t;
|
|
11874
11874
|
#e;
|
|
11875
11875
|
#s;
|
|
@@ -12079,19 +12079,19 @@ async function vl(a) {
|
|
|
12079
12079
|
const e = await process.getBuiltinModule("fs").promises.readFile(a);
|
|
12080
12080
|
return new Uint8Array(e);
|
|
12081
12081
|
}
|
|
12082
|
-
class
|
|
12082
|
+
class nf extends pl {
|
|
12083
12083
|
}
|
|
12084
|
-
class
|
|
12084
|
+
class rf extends dl {
|
|
12085
12085
|
_createCanvas(t, e) {
|
|
12086
12086
|
return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(t, e);
|
|
12087
12087
|
}
|
|
12088
12088
|
}
|
|
12089
|
-
class
|
|
12089
|
+
class of extends fl {
|
|
12090
12090
|
async _fetch(t) {
|
|
12091
12091
|
return vl(t);
|
|
12092
12092
|
}
|
|
12093
12093
|
}
|
|
12094
|
-
class
|
|
12094
|
+
class af extends ml {
|
|
12095
12095
|
async _fetch(t) {
|
|
12096
12096
|
return vl(t);
|
|
12097
12097
|
}
|
|
@@ -12112,7 +12112,7 @@ class vo {
|
|
|
12112
12112
|
tt("Abstract method `getPattern` called.");
|
|
12113
12113
|
}
|
|
12114
12114
|
}
|
|
12115
|
-
class
|
|
12115
|
+
class hf extends vo {
|
|
12116
12116
|
constructor(t) {
|
|
12117
12117
|
super(), this._type = t[1], this._bbox = t[2], this._colorStops = t[3], this._p0 = t[4], this._p1 = t[5], this._r0 = t[6], this._r1 = t[7], this.matrix = null;
|
|
12118
12118
|
}
|
|
@@ -12160,7 +12160,7 @@ function fr(a, t, e, s, i, n, r, o) {
|
|
|
12160
12160
|
et = (O - K) / (O - G), et < 0 ? et = 0 : et > 1 && (et = 1), c[ht++] = j - (j - it) * et | 0, c[ht++] = M - (M - at) * et | 0, c[ht++] = R - (R - xt) * et | 0, c[ht++] = 255;
|
|
12161
12161
|
}
|
|
12162
12162
|
}
|
|
12163
|
-
function
|
|
12163
|
+
function lf(a, t, e) {
|
|
12164
12164
|
const s = t.coords, i = t.colors;
|
|
12165
12165
|
let n, r;
|
|
12166
12166
|
switch (t.type) {
|
|
@@ -12180,7 +12180,7 @@ function cf(a, t, e) {
|
|
|
12180
12180
|
throw new Error("illegal figure");
|
|
12181
12181
|
}
|
|
12182
12182
|
}
|
|
12183
|
-
class
|
|
12183
|
+
class cf extends vo {
|
|
12184
12184
|
constructor(t) {
|
|
12185
12185
|
super(), this._coords = t[2], this._colors = t[3], this._figures = t[4], this._bounds = t[5], this._bbox = t[7], this._background = t[8], this.matrix = null;
|
|
12186
12186
|
}
|
|
@@ -12199,7 +12199,7 @@ class uf extends vo {
|
|
|
12199
12199
|
A[T] = e[0], A[T + 1] = e[1], A[T + 2] = e[2], A[T + 3] = 255;
|
|
12200
12200
|
}
|
|
12201
12201
|
for (const A of this._figures)
|
|
12202
|
-
|
|
12202
|
+
lf(_, A, p);
|
|
12203
12203
|
return y.putImageData(_, 2, 2), {
|
|
12204
12204
|
canvas: v.canvas,
|
|
12205
12205
|
offsetX: o - 2 * f,
|
|
@@ -12221,19 +12221,19 @@ class uf extends vo {
|
|
|
12221
12221
|
return i !== Et.SHADING && (t.setTransform(...e.baseTransform), this.matrix && t.transform(...this.matrix)), t.translate(r.offsetX, r.offsetY), t.scale(r.scaleX, r.scaleY), t.createPattern(r.canvas, "no-repeat");
|
|
12222
12222
|
}
|
|
12223
12223
|
}
|
|
12224
|
-
class
|
|
12224
|
+
class uf extends vo {
|
|
12225
12225
|
getPattern() {
|
|
12226
12226
|
return "hotpink";
|
|
12227
12227
|
}
|
|
12228
12228
|
}
|
|
12229
|
-
function
|
|
12229
|
+
function df(a) {
|
|
12230
12230
|
switch (a[0]) {
|
|
12231
12231
|
case "RadialAxial":
|
|
12232
|
-
return new
|
|
12232
|
+
return new hf(a);
|
|
12233
12233
|
case "Mesh":
|
|
12234
|
-
return new
|
|
12234
|
+
return new cf(a);
|
|
12235
12235
|
case "Dummy":
|
|
12236
|
-
return new
|
|
12236
|
+
return new uf();
|
|
12237
12237
|
}
|
|
12238
12238
|
throw new Error(`Unknown IR type: ${a[0]}`);
|
|
12239
12239
|
}
|
|
@@ -12312,7 +12312,7 @@ class yo {
|
|
|
12312
12312
|
i.fillStyle = o, i.strokeStyle = o, n.fillColor = o, n.strokeColor = o;
|
|
12313
12313
|
break;
|
|
12314
12314
|
default:
|
|
12315
|
-
throw new
|
|
12315
|
+
throw new Nd(`Unsupported paint type: ${e}`);
|
|
12316
12316
|
}
|
|
12317
12317
|
}
|
|
12318
12318
|
getPattern(t, e, s, i) {
|
|
@@ -12325,7 +12325,7 @@ class yo {
|
|
|
12325
12325
|
return h.setTransform(o), h;
|
|
12326
12326
|
}
|
|
12327
12327
|
}
|
|
12328
|
-
function
|
|
12328
|
+
function ff({
|
|
12329
12329
|
src: a,
|
|
12330
12330
|
srcPos: t = 0,
|
|
12331
12331
|
dest: e,
|
|
@@ -12353,8 +12353,8 @@ function gf({
|
|
|
12353
12353
|
destPos: f
|
|
12354
12354
|
};
|
|
12355
12355
|
}
|
|
12356
|
-
const Aa = 16, Ta = 100,
|
|
12357
|
-
function
|
|
12356
|
+
const Aa = 16, Ta = 100, gf = 15, Ea = 10, ka = 1e3, Vt = 16;
|
|
12357
|
+
function pf(a, t) {
|
|
12358
12358
|
if (a._removeMirroring)
|
|
12359
12359
|
throw new Error("Context is already forwarding operations.");
|
|
12360
12360
|
a.__originalSave = a.save, a.__originalRestore = a.restore, a.__originalRotate = a.rotate, a.__originalScale = a.scale, a.__originalTranslate = a.translate, a.__originalTransform = a.transform, a.__originalSetTransform = a.setTransform, a.__originalResetTransform = a.resetTransform, a.__originalClip = a.clip, a.__originalMoveTo = a.moveTo, a.__originalLineTo = a.lineTo, a.__originalBezierCurveTo = a.bezierCurveTo, a.__originalRect = a.rect, a.__originalClosePath = a.closePath, a.__originalBeginPath = a.beginPath, a._removeMirroring = () => {
|
|
@@ -12391,7 +12391,7 @@ function mf(a, t) {
|
|
|
12391
12391
|
t.beginPath(), this.__originalBeginPath();
|
|
12392
12392
|
};
|
|
12393
12393
|
}
|
|
12394
|
-
class
|
|
12394
|
+
class mf {
|
|
12395
12395
|
constructor(t) {
|
|
12396
12396
|
this.canvasFactory = t, this.cache = /* @__PURE__ */ Object.create(null);
|
|
12397
12397
|
}
|
|
@@ -12423,7 +12423,7 @@ function Ui(a, t, e, s, i, n, r, o, h, l) {
|
|
|
12423
12423
|
const b = Math.hypot(c, u), m = Math.hypot(d, f);
|
|
12424
12424
|
return [b * h, m * l];
|
|
12425
12425
|
}
|
|
12426
|
-
function
|
|
12426
|
+
function bf(a) {
|
|
12427
12427
|
const {
|
|
12428
12428
|
width: t,
|
|
12429
12429
|
height: e
|
|
@@ -12578,7 +12578,7 @@ function Oa(a, t) {
|
|
|
12578
12578
|
const d = u < n ? Vt : i;
|
|
12579
12579
|
({
|
|
12580
12580
|
srcPos: h
|
|
12581
|
-
} =
|
|
12581
|
+
} = ff({
|
|
12582
12582
|
src: l,
|
|
12583
12583
|
srcPos: h,
|
|
12584
12584
|
dest: c,
|
|
@@ -12610,13 +12610,13 @@ function Da(a, t) {
|
|
|
12610
12610
|
const s = Math.fround((globalThis.devicePixelRatio || 1) * Ls.PDF_TO_CSS_UNITS);
|
|
12611
12611
|
return e[0] <= s && e[1] <= s;
|
|
12612
12612
|
}
|
|
12613
|
-
const
|
|
12613
|
+
const vf = ["butt", "round", "square"], yf = ["miter", "round", "bevel"], _f = {}, Ra = {};
|
|
12614
12614
|
class Es {
|
|
12615
12615
|
constructor(t, e, s, i, n, {
|
|
12616
12616
|
optionalContentConfig: r,
|
|
12617
12617
|
markedContentStack: o = null
|
|
12618
12618
|
}, h, l) {
|
|
12619
|
-
this.ctx = t, this.current = new Ma(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = o || [], this.optionalContentConfig = r, this.cachedCanvases = new
|
|
12619
|
+
this.ctx = t, this.current = new Ma(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = e, this.objs = s, this.canvasFactory = i, this.filterFactory = n, this.groupStack = [], this.processingType3 = null, this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = o || [], this.optionalContentConfig = r, this.cachedCanvases = new mf(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = h, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = l, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map();
|
|
12620
12620
|
}
|
|
12621
12621
|
getObject(t, e = null) {
|
|
12622
12622
|
return typeof t == "string" ? t.startsWith("g_") ? this.commonObjs.get(t) : this.objs.get(t) : e;
|
|
@@ -12640,7 +12640,7 @@ class Es {
|
|
|
12640
12640
|
const h = n.length;
|
|
12641
12641
|
if (h === o)
|
|
12642
12642
|
return o;
|
|
12643
|
-
const l = h - o > Ea && typeof s == "function", c = l ? Date.now() +
|
|
12643
|
+
const l = h - o > Ea && typeof s == "function", c = l ? Date.now() + gf : 0;
|
|
12644
12644
|
let u = 0;
|
|
12645
12645
|
const d = this.commonObjs, f = this.objs;
|
|
12646
12646
|
let g;
|
|
@@ -12736,10 +12736,10 @@ class Es {
|
|
|
12736
12736
|
t !== this.current.lineWidth && (this._cachedScaleForStroking[0] = -1), this.current.lineWidth = t, this.ctx.lineWidth = t;
|
|
12737
12737
|
}
|
|
12738
12738
|
setLineCap(t) {
|
|
12739
|
-
this.ctx.lineCap =
|
|
12739
|
+
this.ctx.lineCap = vf[t];
|
|
12740
12740
|
}
|
|
12741
12741
|
setLineJoin(t) {
|
|
12742
|
-
this.ctx.lineJoin =
|
|
12742
|
+
this.ctx.lineJoin = yf[t];
|
|
12743
12743
|
}
|
|
12744
12744
|
setMiterLimit(t) {
|
|
12745
12745
|
this.ctx.miterLimit = t;
|
|
@@ -12809,7 +12809,7 @@ class Es {
|
|
|
12809
12809
|
const t = this.ctx.canvas.width, e = this.ctx.canvas.height, s = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(s, t, e);
|
|
12810
12810
|
this.suspendedCtx = this.ctx, this.ctx = i.context;
|
|
12811
12811
|
const n = this.ctx;
|
|
12812
|
-
n.setTransform(...rt(this.suspendedCtx)), Ws(this.suspendedCtx, n),
|
|
12812
|
+
n.setTransform(...rt(this.suspendedCtx)), Ws(this.suspendedCtx, n), pf(n, this.suspendedCtx), this.setGState([["BM", "source-over"], ["ca", 1], ["CA", 1]]);
|
|
12813
12813
|
}
|
|
12814
12814
|
endSMaskMode() {
|
|
12815
12815
|
if (!this.inSMaskMode)
|
|
@@ -12923,7 +12923,7 @@ class Es {
|
|
|
12923
12923
|
this.consumePath();
|
|
12924
12924
|
}
|
|
12925
12925
|
clip() {
|
|
12926
|
-
this.pendingClip =
|
|
12926
|
+
this.pendingClip = _f;
|
|
12927
12927
|
}
|
|
12928
12928
|
eoClip() {
|
|
12929
12929
|
this.pendingClip = Ra;
|
|
@@ -13164,7 +13164,7 @@ class Es {
|
|
|
13164
13164
|
}
|
|
13165
13165
|
_getPattern(t, e = null) {
|
|
13166
13166
|
let s;
|
|
13167
|
-
return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s =
|
|
13167
|
+
return this.cachedPatterns.has(t) ? s = this.cachedPatterns.get(t) : (s = df(this.getObject(t)), this.cachedPatterns.set(t, s)), e && (s.matrix = e), s;
|
|
13168
13168
|
}
|
|
13169
13169
|
shadingFill(t) {
|
|
13170
13170
|
if (!this.contentVisible)
|
|
@@ -13270,7 +13270,7 @@ class Es {
|
|
|
13270
13270
|
const e = t.count;
|
|
13271
13271
|
t = this.getObject(t.data, t), t.count = e;
|
|
13272
13272
|
const s = this.ctx, i = this.processingType3;
|
|
13273
|
-
if (i && (i.compiled === void 0 && (i.compiled =
|
|
13273
|
+
if (i && (i.compiled === void 0 && (i.compiled = bf(t)), i.compiled)) {
|
|
13274
13274
|
i.compiled(s);
|
|
13275
13275
|
return;
|
|
13276
13276
|
}
|
|
@@ -13519,7 +13519,7 @@ class ri {
|
|
|
13519
13519
|
this.#e = t;
|
|
13520
13520
|
}
|
|
13521
13521
|
}
|
|
13522
|
-
class
|
|
13522
|
+
class wf {
|
|
13523
13523
|
#t;
|
|
13524
13524
|
#e;
|
|
13525
13525
|
constructor({
|
|
@@ -13542,7 +13542,7 @@ class xf {
|
|
|
13542
13542
|
}
|
|
13543
13543
|
}
|
|
13544
13544
|
const _s = Symbol("INTERNAL");
|
|
13545
|
-
class
|
|
13545
|
+
class xf {
|
|
13546
13546
|
#t = !1;
|
|
13547
13547
|
#e = !1;
|
|
13548
13548
|
#s = !1;
|
|
@@ -13570,7 +13570,7 @@ class Sf {
|
|
|
13570
13570
|
t !== _s && tt("Internal method `_setVisible` called."), this.#s = s, this.#i = e;
|
|
13571
13571
|
}
|
|
13572
13572
|
}
|
|
13573
|
-
class
|
|
13573
|
+
class Sf {
|
|
13574
13574
|
#t = null;
|
|
13575
13575
|
#e = /* @__PURE__ */ new Map();
|
|
13576
13576
|
#s = null;
|
|
@@ -13579,7 +13579,7 @@ class Cf {
|
|
|
13579
13579
|
if (this.renderingIntent = e, this.name = null, this.creator = null, t !== null) {
|
|
13580
13580
|
this.name = t.name, this.creator = t.creator, this.#i = t.order;
|
|
13581
13581
|
for (const s of t.groups)
|
|
13582
|
-
this.#e.set(s.id, new
|
|
13582
|
+
this.#e.set(s.id, new xf(e, s));
|
|
13583
13583
|
if (t.baseState === "OFF")
|
|
13584
13584
|
for (const s of this.#e.values())
|
|
13585
13585
|
s._setVisible(_s, !1);
|
|
@@ -13730,7 +13730,7 @@ class Cf {
|
|
|
13730
13730
|
return this.#t = t.hexdigest();
|
|
13731
13731
|
}
|
|
13732
13732
|
}
|
|
13733
|
-
class
|
|
13733
|
+
class Cf {
|
|
13734
13734
|
constructor(t, {
|
|
13735
13735
|
disableRange: e = !1,
|
|
13736
13736
|
disableStream: s = !1
|
|
@@ -13799,12 +13799,12 @@ class Af {
|
|
|
13799
13799
|
getFullReader() {
|
|
13800
13800
|
bt(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once.");
|
|
13801
13801
|
const t = this._queuedChunks;
|
|
13802
|
-
return this._queuedChunks = null, new
|
|
13802
|
+
return this._queuedChunks = null, new Af(this, t, this._progressiveDone, this._contentDispositionFilename);
|
|
13803
13803
|
}
|
|
13804
13804
|
getRangeReader(t, e) {
|
|
13805
13805
|
if (e <= this._progressiveDataLength)
|
|
13806
13806
|
return null;
|
|
13807
|
-
const s = new
|
|
13807
|
+
const s = new Tf(this, t, e);
|
|
13808
13808
|
return this._pdfDataRangeTransport.requestDataRange(t, e), this._rangeReaders.push(s), s;
|
|
13809
13809
|
}
|
|
13810
13810
|
cancelAllRequests(t) {
|
|
@@ -13814,7 +13814,7 @@ class Af {
|
|
|
13814
13814
|
this._pdfDataRangeTransport.abort();
|
|
13815
13815
|
}
|
|
13816
13816
|
}
|
|
13817
|
-
class
|
|
13817
|
+
class Af {
|
|
13818
13818
|
constructor(t, e, s = !1, i = null) {
|
|
13819
13819
|
this._stream = t, this._done = s || !1, this._filename = fo(i) ? i : null, this._queuedChunks = e || [], this._loaded = 0;
|
|
13820
13820
|
for (const n of this._queuedChunks)
|
|
@@ -13869,7 +13869,7 @@ class Tf {
|
|
|
13869
13869
|
this._done || (this._done = !0);
|
|
13870
13870
|
}
|
|
13871
13871
|
}
|
|
13872
|
-
class
|
|
13872
|
+
class Tf {
|
|
13873
13873
|
constructor(t, e, s) {
|
|
13874
13874
|
this._stream = t, this._begin = e, this._end = s, this._queuedChunk = null, this._requests = [], this._done = !1, this.onProgress = null;
|
|
13875
13875
|
}
|
|
@@ -13921,7 +13921,7 @@ class Ef {
|
|
|
13921
13921
|
this._requests.length = 0, this._stream._removeRangeReader(this);
|
|
13922
13922
|
}
|
|
13923
13923
|
}
|
|
13924
|
-
function
|
|
13924
|
+
function Ef(a) {
|
|
13925
13925
|
let t = !0, e = s("filename\\*", "i").exec(a);
|
|
13926
13926
|
if (e) {
|
|
13927
13927
|
e = e[1];
|
|
@@ -14042,7 +14042,7 @@ function _l({
|
|
|
14042
14042
|
function wl(a) {
|
|
14043
14043
|
const t = a.get("Content-Disposition");
|
|
14044
14044
|
if (t) {
|
|
14045
|
-
let e =
|
|
14045
|
+
let e = Ef(t);
|
|
14046
14046
|
if (e.includes("%"))
|
|
14047
14047
|
try {
|
|
14048
14048
|
e = decodeURIComponent(e);
|
|
@@ -14081,12 +14081,12 @@ class La {
|
|
|
14081
14081
|
return this._fullRequestReader?._loaded ?? 0;
|
|
14082
14082
|
}
|
|
14083
14083
|
getFullReader() {
|
|
14084
|
-
return bt(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14084
|
+
return bt(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new kf(this), this._fullRequestReader;
|
|
14085
14085
|
}
|
|
14086
14086
|
getRangeReader(t, e) {
|
|
14087
14087
|
if (e <= this._progressiveDataLength)
|
|
14088
14088
|
return null;
|
|
14089
|
-
const s = new
|
|
14089
|
+
const s = new Mf(this, t, e);
|
|
14090
14090
|
return this._rangeRequestReaders.push(s), s;
|
|
14091
14091
|
}
|
|
14092
14092
|
cancelAllRequests(t) {
|
|
@@ -14095,7 +14095,7 @@ class La {
|
|
|
14095
14095
|
e.cancel(t);
|
|
14096
14096
|
}
|
|
14097
14097
|
}
|
|
14098
|
-
class
|
|
14098
|
+
class kf {
|
|
14099
14099
|
constructor(t) {
|
|
14100
14100
|
this._stream = t, this._reader = null, this._loaded = 0, this._filename = null;
|
|
14101
14101
|
const e = t.source;
|
|
@@ -14153,7 +14153,7 @@ class Mf {
|
|
|
14153
14153
|
this._reader?.cancel(t), this._abortController.abort();
|
|
14154
14154
|
}
|
|
14155
14155
|
}
|
|
14156
|
-
class
|
|
14156
|
+
class Mf {
|
|
14157
14157
|
constructor(t, e, s) {
|
|
14158
14158
|
this._stream = t, this._reader = null, this._loaded = 0;
|
|
14159
14159
|
const i = t.source;
|
|
@@ -14194,11 +14194,11 @@ class Pf {
|
|
|
14194
14194
|
}
|
|
14195
14195
|
}
|
|
14196
14196
|
const gr = 200, pr = 206;
|
|
14197
|
-
function
|
|
14197
|
+
function Pf(a) {
|
|
14198
14198
|
const t = a.response;
|
|
14199
14199
|
return typeof t != "string" ? t : Nn(t).buffer;
|
|
14200
14200
|
}
|
|
14201
|
-
class
|
|
14201
|
+
class Of {
|
|
14202
14202
|
_responseOrigin = null;
|
|
14203
14203
|
constructor({
|
|
14204
14204
|
url: t,
|
|
@@ -14238,7 +14238,7 @@ class Df {
|
|
|
14238
14238
|
s.onError(i.status);
|
|
14239
14239
|
return;
|
|
14240
14240
|
}
|
|
14241
|
-
const o =
|
|
14241
|
+
const o = Pf(i);
|
|
14242
14242
|
if (n === pr) {
|
|
14243
14243
|
const h = i.getResponseHeader("Content-Range"), l = /bytes (\d+)-(\d+)\/(\d+)/.exec(h);
|
|
14244
14244
|
l ? s.onDone({
|
|
@@ -14261,19 +14261,19 @@ class Df {
|
|
|
14261
14261
|
delete this.pendingRequests[t], e.abort();
|
|
14262
14262
|
}
|
|
14263
14263
|
}
|
|
14264
|
-
class
|
|
14264
|
+
class Df {
|
|
14265
14265
|
constructor(t) {
|
|
14266
|
-
this._source = t, this._manager = new
|
|
14266
|
+
this._source = t, this._manager = new Of(t), this._rangeChunkSize = t.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
14267
14267
|
}
|
|
14268
14268
|
_onRangeRequestReaderClosed(t) {
|
|
14269
14269
|
const e = this._rangeRequestReaders.indexOf(t);
|
|
14270
14270
|
e >= 0 && this._rangeRequestReaders.splice(e, 1);
|
|
14271
14271
|
}
|
|
14272
14272
|
getFullReader() {
|
|
14273
|
-
return bt(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14273
|
+
return bt(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new Rf(this._manager, this._source), this._fullRequestReader;
|
|
14274
14274
|
}
|
|
14275
14275
|
getRangeReader(t, e) {
|
|
14276
|
-
const s = new
|
|
14276
|
+
const s = new Lf(this._manager, t, e);
|
|
14277
14277
|
return s.onClosed = this._onRangeRequestReaderClosed.bind(this), this._rangeRequestReaders.push(s), s;
|
|
14278
14278
|
}
|
|
14279
14279
|
cancelAllRequests(t) {
|
|
@@ -14282,7 +14282,7 @@ class Rf {
|
|
|
14282
14282
|
e.cancel(t);
|
|
14283
14283
|
}
|
|
14284
14284
|
}
|
|
14285
|
-
class
|
|
14285
|
+
class Rf {
|
|
14286
14286
|
constructor(t, e) {
|
|
14287
14287
|
this._manager = t, this._url = e.url, this._fullRequestId = t.request({
|
|
14288
14288
|
onHeadersReceived: this._onHeadersReceived.bind(this),
|
|
@@ -14374,7 +14374,7 @@ class Lf {
|
|
|
14374
14374
|
this._requests.length = 0, this._manager.isPendingRequest(this._fullRequestId) && this._manager.abortRequest(this._fullRequestId), this._fullRequestReader = null;
|
|
14375
14375
|
}
|
|
14376
14376
|
}
|
|
14377
|
-
class
|
|
14377
|
+
class Lf {
|
|
14378
14378
|
constructor(t, e, s) {
|
|
14379
14379
|
this._manager = t, this._url = t.url, this._requestId = t.request({
|
|
14380
14380
|
begin: e,
|
|
@@ -14447,27 +14447,27 @@ class Ff {
|
|
|
14447
14447
|
this._requests.length = 0, this._manager.isPendingRequest(this._requestId) && this._manager.abortRequest(this._requestId), this._close();
|
|
14448
14448
|
}
|
|
14449
14449
|
}
|
|
14450
|
-
const
|
|
14451
|
-
function
|
|
14452
|
-
if (
|
|
14450
|
+
const Ff = /^[a-z][a-z0-9\-+.]+:/i;
|
|
14451
|
+
function If(a) {
|
|
14452
|
+
if (Ff.test(a))
|
|
14453
14453
|
return new URL(a);
|
|
14454
14454
|
const t = process.getBuiltinModule("url");
|
|
14455
14455
|
return new URL(t.pathToFileURL(a));
|
|
14456
14456
|
}
|
|
14457
|
-
class
|
|
14457
|
+
class Nf {
|
|
14458
14458
|
constructor(t) {
|
|
14459
|
-
this.source = t, this.url =
|
|
14459
|
+
this.source = t, this.url = If(t.url), bt(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
14460
14460
|
}
|
|
14461
14461
|
get _progressiveDataLength() {
|
|
14462
14462
|
return this._fullRequestReader?._loaded ?? 0;
|
|
14463
14463
|
}
|
|
14464
14464
|
getFullReader() {
|
|
14465
|
-
return bt(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
14465
|
+
return bt(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new jf(this), this._fullRequestReader;
|
|
14466
14466
|
}
|
|
14467
14467
|
getRangeReader(t, e) {
|
|
14468
14468
|
if (e <= this._progressiveDataLength)
|
|
14469
14469
|
return null;
|
|
14470
|
-
const s = new
|
|
14470
|
+
const s = new Bf(this, t, e);
|
|
14471
14471
|
return this._rangeRequestReaders.push(s), s;
|
|
14472
14472
|
}
|
|
14473
14473
|
cancelAllRequests(t) {
|
|
@@ -14476,7 +14476,7 @@ class jf {
|
|
|
14476
14476
|
e.cancel(t);
|
|
14477
14477
|
}
|
|
14478
14478
|
}
|
|
14479
|
-
class
|
|
14479
|
+
class jf {
|
|
14480
14480
|
constructor(t) {
|
|
14481
14481
|
this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null;
|
|
14482
14482
|
const e = t.source;
|
|
@@ -14540,7 +14540,7 @@ class Bf {
|
|
|
14540
14540
|
}), !this._isStreamingSupported && this._isRangeSupported && this._error(new We("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
|
|
14541
14541
|
}
|
|
14542
14542
|
}
|
|
14543
|
-
class
|
|
14543
|
+
class Bf {
|
|
14544
14544
|
constructor(t, e, s) {
|
|
14545
14545
|
this._url = t.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
|
|
14546
14546
|
const i = t.source;
|
|
@@ -14590,7 +14590,7 @@ class Hf {
|
|
|
14590
14590
|
}), this._storedError && this._readableStream.destroy(this._storedError);
|
|
14591
14591
|
}
|
|
14592
14592
|
}
|
|
14593
|
-
const
|
|
14593
|
+
const Hf = 1e5, zt = 30, zf = 0.8;
|
|
14594
14594
|
class Dt {
|
|
14595
14595
|
#t = Promise.withResolvers();
|
|
14596
14596
|
#e = null;
|
|
@@ -14703,7 +14703,7 @@ class Dt {
|
|
|
14703
14703
|
this.#n.ctx ??= Dt.#k(this.#r);
|
|
14704
14704
|
const e = this.#m, s = this.#o;
|
|
14705
14705
|
for (const i of t) {
|
|
14706
|
-
if (e.length >
|
|
14706
|
+
if (e.length > Hf) {
|
|
14707
14707
|
U("Ignoring additional textDivs for performance reasons."), this.#s = !0;
|
|
14708
14708
|
return;
|
|
14709
14709
|
}
|
|
@@ -14834,7 +14834,7 @@ class Dt {
|
|
|
14834
14834
|
break;
|
|
14835
14835
|
}
|
|
14836
14836
|
i.canvas.width = i.canvas.height = 0;
|
|
14837
|
-
const l = r ? r / (r + o) :
|
|
14837
|
+
const l = r ? r / (r + o) : zf;
|
|
14838
14838
|
return this.#_.set(t, l), l;
|
|
14839
14839
|
}
|
|
14840
14840
|
}
|
|
@@ -14866,8 +14866,8 @@ class ui {
|
|
|
14866
14866
|
return !(t === "textarea" || t === "input" || t === "option" || t === "select");
|
|
14867
14867
|
}
|
|
14868
14868
|
}
|
|
14869
|
-
const
|
|
14870
|
-
function
|
|
14869
|
+
const Gf = 65536, Vf = 100, Xf = 5e3, Wf = kt ? rf : ef, Uf = kt ? of : gl, Yf = kt ? nf : sf, $f = kt ? af : bl;
|
|
14870
|
+
function qf(a = {}) {
|
|
14871
14871
|
typeof a == "string" || a instanceof URL ? a = {
|
|
14872
14872
|
url: a
|
|
14873
14873
|
} : (a instanceof ArrayBuffer || ArrayBuffer.isView(a)) && (a = {
|
|
@@ -14875,10 +14875,10 @@ function Kf(a = {}) {
|
|
|
14875
14875
|
});
|
|
14876
14876
|
const t = new _o(), {
|
|
14877
14877
|
docId: e
|
|
14878
|
-
} = t, s = a.url ?
|
|
14878
|
+
} = t, s = a.url ? Kf(a.url) : null, i = a.data ? Jf(a.data) : null, n = a.httpHeaders || null, r = a.withCredentials === !0, o = a.password ?? null, h = a.range instanceof Al ? a.range : null, l = Number.isInteger(a.rangeChunkSize) && a.rangeChunkSize > 0 ? a.rangeChunkSize : Gf;
|
|
14879
14879
|
let c = a.worker instanceof ks ? a.worker : null;
|
|
14880
|
-
const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Bn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory ||
|
|
14881
|
-
|
|
14880
|
+
const u = a.verbosity, d = typeof a.docBaseUrl == "string" && !Bn(a.docBaseUrl) ? a.docBaseUrl : null, f = typeof a.cMapUrl == "string" ? a.cMapUrl : null, g = a.cMapPacked !== !1, p = a.CMapReaderFactory || Uf, b = typeof a.standardFontDataUrl == "string" ? a.standardFontDataUrl : null, m = a.StandardFontDataFactory || $f, v = a.stopAtErrors !== !0, y = Number.isInteger(a.maxImageSize) && a.maxImageSize > -1 ? a.maxImageSize : -1, _ = a.isEvalSupported !== !1, S = typeof a.isOffscreenCanvasSupported == "boolean" ? a.isOffscreenCanvasSupported : !kt, A = typeof a.isImageDecoderSupported == "boolean" ? a.isImageDecoderSupported : !kt && (jt.platform.isFirefox || !globalThis.chrome), T = Number.isInteger(a.canvasMaxAreaInBytes) ? a.canvasMaxAreaInBytes : -1, E = typeof a.disableFontFace == "boolean" ? a.disableFontFace : kt, P = a.fontExtraProperties === !0, N = a.enableXfa === !0, D = a.ownerDocument || globalThis.document, L = a.disableRange === !0, k = a.disableStream === !0, O = a.disableAutoFetch === !0, j = a.pdfBug === !0, M = a.CanvasFactory || Wf, R = a.FilterFactory || Yf, G = a.enableHWA === !0, it = h ? h.length : a.length ?? NaN, at = typeof a.useSystemFonts == "boolean" ? a.useSystemFonts : !kt && !E, xt = typeof a.useWorkerFetch == "boolean" ? a.useWorkerFetch : p === gl && m === bl && f && b && Ks(f, document.baseURI) && Ks(b, document.baseURI), gt = null;
|
|
14881
|
+
Rd(u);
|
|
14882
14882
|
const et = {
|
|
14883
14883
|
canvasFactory: new M({
|
|
14884
14884
|
ownerDocument: D,
|
|
@@ -14945,7 +14945,7 @@ function Kf(a = {}) {
|
|
|
14945
14945
|
const ht = c.messageHandler.sendWithPromise("GetDocRequest", Pt, i ? [i.buffer] : null);
|
|
14946
14946
|
let K;
|
|
14947
14947
|
if (h)
|
|
14948
|
-
K = new
|
|
14948
|
+
K = new Cf(h, {
|
|
14949
14949
|
disableRange: L,
|
|
14950
14950
|
disableStream: k
|
|
14951
14951
|
});
|
|
@@ -14959,9 +14959,9 @@ function Kf(a = {}) {
|
|
|
14959
14959
|
throw new Error("getDocument - the Fetch API was disabled in Node.js, see `--no-experimental-fetch`.");
|
|
14960
14960
|
je = La;
|
|
14961
14961
|
} else
|
|
14962
|
-
je =
|
|
14962
|
+
je = Nf;
|
|
14963
14963
|
else
|
|
14964
|
-
je = Ks(s) ? La :
|
|
14964
|
+
je = Ks(s) ? La : Df;
|
|
14965
14965
|
K = new je({
|
|
14966
14966
|
url: s,
|
|
14967
14967
|
length: it,
|
|
@@ -14977,12 +14977,12 @@ function Kf(a = {}) {
|
|
|
14977
14977
|
throw new Error("Loading aborted");
|
|
14978
14978
|
if (c.destroyed)
|
|
14979
14979
|
throw new Error("Worker was destroyed");
|
|
14980
|
-
const ms = new Js(e, je, c.port), ge = new
|
|
14980
|
+
const ms = new Js(e, je, c.port), ge = new eg(ms, t, K, fe, et);
|
|
14981
14981
|
t._transport = ge, ms.send("Ready", null);
|
|
14982
14982
|
});
|
|
14983
14983
|
}).catch(t._capability.reject), t;
|
|
14984
14984
|
}
|
|
14985
|
-
function
|
|
14985
|
+
function Kf(a) {
|
|
14986
14986
|
if (a instanceof URL)
|
|
14987
14987
|
return a.href;
|
|
14988
14988
|
try {
|
|
@@ -14993,7 +14993,7 @@ function Jf(a) {
|
|
|
14993
14993
|
}
|
|
14994
14994
|
throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
|
|
14995
14995
|
}
|
|
14996
|
-
function
|
|
14996
|
+
function Jf(a) {
|
|
14997
14997
|
if (kt && typeof Buffer < "u" && a instanceof Buffer)
|
|
14998
14998
|
throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
|
|
14999
14999
|
if (a instanceof Uint8Array && a.byteLength === a.buffer.byteLength)
|
|
@@ -15072,7 +15072,7 @@ class Al {
|
|
|
15072
15072
|
abort() {
|
|
15073
15073
|
}
|
|
15074
15074
|
}
|
|
15075
|
-
class
|
|
15075
|
+
class Zf {
|
|
15076
15076
|
constructor(t, e) {
|
|
15077
15077
|
this._pdfInfo = t, this._transport = e;
|
|
15078
15078
|
}
|
|
@@ -15184,7 +15184,7 @@ class Qf {
|
|
|
15184
15184
|
return this._transport.getCalculationOrderIds();
|
|
15185
15185
|
}
|
|
15186
15186
|
}
|
|
15187
|
-
class
|
|
15187
|
+
class Qf {
|
|
15188
15188
|
#t = null;
|
|
15189
15189
|
#e = !1;
|
|
15190
15190
|
constructor(t, e, s, i = !1) {
|
|
@@ -15396,7 +15396,7 @@ class tg {
|
|
|
15396
15396
|
if (t)
|
|
15397
15397
|
return this.#t = setTimeout(() => {
|
|
15398
15398
|
this.#t = null, this.#s(!1);
|
|
15399
|
-
},
|
|
15399
|
+
}, Xf), !1;
|
|
15400
15400
|
for (const {
|
|
15401
15401
|
renderTasks: e,
|
|
15402
15402
|
operatorList: s
|
|
@@ -15476,7 +15476,7 @@ class tg {
|
|
|
15476
15476
|
if (t.renderTasks.size > 0)
|
|
15477
15477
|
return;
|
|
15478
15478
|
if (e instanceof uo) {
|
|
15479
|
-
let i =
|
|
15479
|
+
let i = Vf;
|
|
15480
15480
|
e.extraDelay > 0 && e.extraDelay < 1e3 && (i += e.extraDelay), t.streamReaderCancelTimeout = setTimeout(() => {
|
|
15481
15481
|
t.streamReaderCancelTimeout = null, this._abortOperatorList({
|
|
15482
15482
|
intentState: t,
|
|
@@ -15502,7 +15502,7 @@ class tg {
|
|
|
15502
15502
|
return this._stats;
|
|
15503
15503
|
}
|
|
15504
15504
|
}
|
|
15505
|
-
class
|
|
15505
|
+
class tg {
|
|
15506
15506
|
#t = /* @__PURE__ */ new Map();
|
|
15507
15507
|
#e = Promise.resolve();
|
|
15508
15508
|
postMessage(t, e) {
|
|
@@ -15545,7 +15545,7 @@ const nt = class nt {
|
|
|
15545
15545
|
constructor({
|
|
15546
15546
|
name: t = null,
|
|
15547
15547
|
port: e = null,
|
|
15548
|
-
verbosity: s =
|
|
15548
|
+
verbosity: s = Ld()
|
|
15549
15549
|
} = {}) {
|
|
15550
15550
|
bs(this, Ms);
|
|
15551
15551
|
if (this.name = t, this.destroyed = !1, this.verbosity = s, this._readyCapability = Promise.withResolvers(), this._port = null, this._webWorker = null, this._messageHandler = null, e) {
|
|
@@ -15622,7 +15622,7 @@ const nt = class nt {
|
|
|
15622
15622
|
this._readyCapability.reject(new Error("Worker was destroyed"));
|
|
15623
15623
|
return;
|
|
15624
15624
|
}
|
|
15625
|
-
const e = new
|
|
15625
|
+
const e = new tg();
|
|
15626
15626
|
this._port = e;
|
|
15627
15627
|
const s = `fake${Eo(nt, _n)._++}`, i = new Js(s + "_worker", s, e);
|
|
15628
15628
|
t.setup(i, e), this._messageHandler = new Js(s, s + "_worker", e), _i(this, Ms, Qi).call(this);
|
|
@@ -15683,14 +15683,14 @@ _n = new WeakMap(), is = new WeakMap(), ns = new WeakMap(), Ms = new WeakSet(),
|
|
|
15683
15683
|
}));
|
|
15684
15684
|
};
|
|
15685
15685
|
let ks = nt;
|
|
15686
|
-
class
|
|
15686
|
+
class eg {
|
|
15687
15687
|
#t = /* @__PURE__ */ new Map();
|
|
15688
15688
|
#e = /* @__PURE__ */ new Map();
|
|
15689
15689
|
#s = /* @__PURE__ */ new Map();
|
|
15690
15690
|
#i = /* @__PURE__ */ new Map();
|
|
15691
15691
|
#r = null;
|
|
15692
15692
|
constructor(t, e, s, i, n) {
|
|
15693
|
-
this.messageHandler = t, this.loadingTask = e, this.commonObjs = new Tl(), this.fontLoader = new
|
|
15693
|
+
this.messageHandler = t, this.loadingTask = e, this.commonObjs = new Tl(), this.fontLoader = new Qd({
|
|
15694
15694
|
ownerDocument: i.ownerDocument,
|
|
15695
15695
|
styleElement: i.styleElement
|
|
15696
15696
|
}), this.loadingParams = i.loadingParams, this._params = i, this.canvasFactory = n.canvasFactory, this.filterFactory = n.filterFactory, this.cMapReaderFactory = n.cMapReaderFactory, this.standardFontDataFactory = n.standardFontDataFactory, this.destroyed = !1, this.destroyCapability = null, this._networkStream = s, this._fullReader = null, this._lastProgress = null, this.downloadInfoCapability = Promise.withResolvers(), this.setupMessageHandler();
|
|
@@ -15836,7 +15836,7 @@ class sg {
|
|
|
15836
15836
|
}), t.on("GetDoc", ({
|
|
15837
15837
|
pdfInfo: s
|
|
15838
15838
|
}) => {
|
|
15839
|
-
this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new
|
|
15839
|
+
this._numPages = s.numPages, this._htmlForXfa = s.htmlForXfa, delete s.htmlForXfa, e._capability.resolve(new Zf(s, this));
|
|
15840
15840
|
}), t.on("DocException", (s) => {
|
|
15841
15841
|
e._capability.reject(Gt(s));
|
|
15842
15842
|
}), t.on("PasswordRequest", (s) => {
|
|
@@ -15878,7 +15878,7 @@ class sg {
|
|
|
15878
15878
|
U(`Error during font loading: ${d}`), this.commonObjs.resolve(s, d);
|
|
15879
15879
|
break;
|
|
15880
15880
|
}
|
|
15881
|
-
const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new
|
|
15881
|
+
const l = h && globalThis.FontInspector?.enabled ? (d, f) => globalThis.FontInspector.fontAdded(d, f) : null, c = new tf(n, {
|
|
15882
15882
|
disableFontFace: r,
|
|
15883
15883
|
fontExtraProperties: o,
|
|
15884
15884
|
inspectFont: l
|
|
@@ -15919,7 +15919,7 @@ class sg {
|
|
|
15919
15919
|
}
|
|
15920
15920
|
switch (n) {
|
|
15921
15921
|
case "Image":
|
|
15922
|
-
o.objs.resolve(s, r), r?.dataLen >
|
|
15922
|
+
o.objs.resolve(s, r), r?.dataLen > Md && (o._maybeCleanupAfterRender = !0);
|
|
15923
15923
|
break;
|
|
15924
15924
|
case "Pattern":
|
|
15925
15925
|
o.objs.resolve(s, r);
|
|
@@ -15977,7 +15977,7 @@ class sg {
|
|
|
15977
15977
|
if (this.destroyed)
|
|
15978
15978
|
throw new Error("Transport destroyed");
|
|
15979
15979
|
n.refStr && this.#i.set(n.refStr, t);
|
|
15980
|
-
const r = new
|
|
15980
|
+
const r = new Qf(e, n, this, this._params.pdfBug);
|
|
15981
15981
|
return this.#e.set(e, r), r;
|
|
15982
15982
|
});
|
|
15983
15983
|
return this.#s.set(e, i), i;
|
|
@@ -16046,7 +16046,7 @@ class sg {
|
|
|
16046
16046
|
return this.messageHandler.sendWithPromise("GetOutline", null);
|
|
16047
16047
|
}
|
|
16048
16048
|
getOptionalContentConfig(t) {
|
|
16049
|
-
return this.#n("GetOptionalContentConfig").then((e) => new
|
|
16049
|
+
return this.#n("GetOptionalContentConfig").then((e) => new Sf(e, t));
|
|
16050
16050
|
}
|
|
16051
16051
|
getPermissions() {
|
|
16052
16052
|
return this.messageHandler.sendWithPromise("GetPermissions", null);
|
|
@@ -16057,7 +16057,7 @@ class sg {
|
|
|
16057
16057
|
return e;
|
|
16058
16058
|
const s = this.messageHandler.sendWithPromise(t, null).then((i) => ({
|
|
16059
16059
|
info: i[0],
|
|
16060
|
-
metadata: i[1] ? new
|
|
16060
|
+
metadata: i[1] ? new wf(i[1]) : null,
|
|
16061
16061
|
contentDispositionFilename: this._fullReader?.filename ?? null,
|
|
16062
16062
|
contentLength: this._fullReader?.contentLength ?? null
|
|
16063
16063
|
}));
|
|
@@ -16131,7 +16131,7 @@ class Tl {
|
|
|
16131
16131
|
}
|
|
16132
16132
|
}
|
|
16133
16133
|
}
|
|
16134
|
-
class
|
|
16134
|
+
class sg {
|
|
16135
16135
|
#t = null;
|
|
16136
16136
|
constructor(t) {
|
|
16137
16137
|
this.#t = t, this.onContinue = null;
|
|
@@ -16171,7 +16171,7 @@ class Cs {
|
|
|
16171
16171
|
pdfBug: u = !1,
|
|
16172
16172
|
pageColors: d = null
|
|
16173
16173
|
}) {
|
|
16174
|
-
this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = o, this.canvasFactory = h, this.filterFactory = l, this._pdfBug = u, this.pageColors = d, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = c === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new
|
|
16174
|
+
this.callback = t, this.params = e, this.objs = s, this.commonObjs = i, this.annotationCanvasMap = n, this.operatorListIdx = null, this.operatorList = r, this._pageIndex = o, this.canvasFactory = h, this.filterFactory = l, this._pdfBug = u, this.pageColors = d, this.running = !1, this.graphicsReadyCallback = null, this.graphicsReady = !1, this._useRequestAnimationFrame = c === !0 && typeof window < "u", this.cancelled = !1, this.capability = Promise.withResolvers(), this.task = new sg(this), this._cancelBound = this.cancel.bind(this), this._continueBound = this._continue.bind(this), this._scheduleNextBound = this._scheduleNext.bind(this), this._nextBound = this._next.bind(this), this._canvas = e.canvasContext.canvas;
|
|
16175
16175
|
}
|
|
16176
16176
|
get completed() {
|
|
16177
16177
|
return this.capability.promise.catch(function() {
|
|
@@ -16226,7 +16226,7 @@ class Cs {
|
|
|
16226
16226
|
this.cancelled || (this.operatorListIdx = this.gfx.executeOperatorList(this.operatorList, this.operatorListIdx, this._continueBound, this.stepper), this.operatorListIdx === this.operatorList.argsArray.length && (this.running = !1, this.operatorList.lastChunk && (this.gfx.endDrawing(), Cs.#e.delete(this._canvas), this.callback())));
|
|
16227
16227
|
}
|
|
16228
16228
|
}
|
|
16229
|
-
const
|
|
16229
|
+
const ig = "4.10.38", ng = "f9bea397f";
|
|
16230
16230
|
function Ia(a) {
|
|
16231
16231
|
return Math.floor(Math.max(0, Math.min(1, a)) * 255).toString(16).padStart(2, "0");
|
|
16232
16232
|
}
|
|
@@ -16280,7 +16280,7 @@ class Na {
|
|
|
16280
16280
|
return ["CMYK", i, n, r, o];
|
|
16281
16281
|
}
|
|
16282
16282
|
}
|
|
16283
|
-
class
|
|
16283
|
+
class rg {
|
|
16284
16284
|
create(t, e, s = !1) {
|
|
16285
16285
|
if (t <= 0 || e <= 0)
|
|
16286
16286
|
throw new Error("Invalid SVG dimensions");
|
|
@@ -16296,7 +16296,7 @@ class og {
|
|
|
16296
16296
|
tt("Abstract method `_createSVG` called.");
|
|
16297
16297
|
}
|
|
16298
16298
|
}
|
|
16299
|
-
class wo extends
|
|
16299
|
+
class wo extends rg {
|
|
16300
16300
|
_createSVG(t) {
|
|
16301
16301
|
return document.createElementNS(Ee, t);
|
|
16302
16302
|
}
|
|
@@ -16450,30 +16450,30 @@ class El {
|
|
|
16450
16450
|
t.div.style.transform = e, t.div.hidden = !1;
|
|
16451
16451
|
}
|
|
16452
16452
|
}
|
|
16453
|
-
const yi = 1e3,
|
|
16453
|
+
const yi = 1e3, og = 9, us = /* @__PURE__ */ new WeakSet();
|
|
16454
16454
|
function Ge(a) {
|
|
16455
16455
|
return {
|
|
16456
16456
|
width: a[2] - a[0],
|
|
16457
16457
|
height: a[3] - a[1]
|
|
16458
16458
|
};
|
|
16459
16459
|
}
|
|
16460
|
-
class
|
|
16460
|
+
class ag {
|
|
16461
16461
|
static create(t) {
|
|
16462
16462
|
switch (t.data.annotationType) {
|
|
16463
16463
|
case yt.LINK:
|
|
16464
16464
|
return new kl(t);
|
|
16465
16465
|
case yt.TEXT:
|
|
16466
|
-
return new
|
|
16466
|
+
return new hg(t);
|
|
16467
16467
|
case yt.WIDGET:
|
|
16468
16468
|
switch (t.data.fieldType) {
|
|
16469
16469
|
case "Tx":
|
|
16470
|
-
return new
|
|
16470
|
+
return new lg(t);
|
|
16471
16471
|
case "Btn":
|
|
16472
|
-
return t.data.radioButton ? new Ml(t) : t.data.checkBox ? new
|
|
16472
|
+
return t.data.radioButton ? new Ml(t) : t.data.checkBox ? new ug(t) : new dg(t);
|
|
16473
16473
|
case "Ch":
|
|
16474
|
-
return new
|
|
16474
|
+
return new fg(t);
|
|
16475
16475
|
case "Sig":
|
|
16476
|
-
return new
|
|
16476
|
+
return new cg(t);
|
|
16477
16477
|
}
|
|
16478
16478
|
return new ps(t);
|
|
16479
16479
|
case yt.POPUP:
|
|
@@ -16481,31 +16481,31 @@ class hg {
|
|
|
16481
16481
|
case yt.FREETEXT:
|
|
16482
16482
|
return new Pl(t);
|
|
16483
16483
|
case yt.LINE:
|
|
16484
|
-
return new
|
|
16484
|
+
return new pg(t);
|
|
16485
16485
|
case yt.SQUARE:
|
|
16486
|
-
return new
|
|
16486
|
+
return new mg(t);
|
|
16487
16487
|
case yt.CIRCLE:
|
|
16488
|
-
return new
|
|
16488
|
+
return new bg(t);
|
|
16489
16489
|
case yt.POLYLINE:
|
|
16490
16490
|
return new Ol(t);
|
|
16491
16491
|
case yt.CARET:
|
|
16492
|
-
return new
|
|
16492
|
+
return new yg(t);
|
|
16493
16493
|
case yt.INK:
|
|
16494
16494
|
return new xo(t);
|
|
16495
16495
|
case yt.POLYGON:
|
|
16496
|
-
return new
|
|
16496
|
+
return new vg(t);
|
|
16497
16497
|
case yt.HIGHLIGHT:
|
|
16498
16498
|
return new Dl(t);
|
|
16499
16499
|
case yt.UNDERLINE:
|
|
16500
|
-
return new
|
|
16500
|
+
return new _g(t);
|
|
16501
16501
|
case yt.SQUIGGLY:
|
|
16502
|
-
return new
|
|
16502
|
+
return new wg(t);
|
|
16503
16503
|
case yt.STRIKEOUT:
|
|
16504
|
-
return new
|
|
16504
|
+
return new xg(t);
|
|
16505
16505
|
case yt.STAMP:
|
|
16506
16506
|
return new Rl(t);
|
|
16507
16507
|
case yt.FILEATTACHMENT:
|
|
16508
|
-
return new
|
|
16508
|
+
return new Sg(t);
|
|
16509
16509
|
default:
|
|
16510
16510
|
return new ft(t);
|
|
16511
16511
|
}
|
|
@@ -17010,7 +17010,7 @@ class kl extends ft {
|
|
|
17010
17010
|
};
|
|
17011
17011
|
}
|
|
17012
17012
|
}
|
|
17013
|
-
class
|
|
17013
|
+
class hg extends ft {
|
|
17014
17014
|
constructor(t) {
|
|
17015
17015
|
super(t, {
|
|
17016
17016
|
isRenderable: !0
|
|
@@ -17079,7 +17079,7 @@ class ps extends ft {
|
|
|
17079
17079
|
_setTextStyle(t) {
|
|
17080
17080
|
const e = ["left", "center", "right"], {
|
|
17081
17081
|
fontColor: s
|
|
17082
|
-
} = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize ||
|
|
17082
|
+
} = this.data.defaultAppearanceData, i = this.data.defaultAppearanceData.fontSize || og, n = t.style;
|
|
17083
17083
|
let r;
|
|
17084
17084
|
const o = 2, h = (l) => Math.round(10 * l) / 10;
|
|
17085
17085
|
if (this.data.multiLine) {
|
|
@@ -17095,7 +17095,7 @@ class ps extends ft {
|
|
|
17095
17095
|
e ? t.setAttribute("required", !0) : t.removeAttribute("required"), t.setAttribute("aria-required", e);
|
|
17096
17096
|
}
|
|
17097
17097
|
}
|
|
17098
|
-
class
|
|
17098
|
+
class lg extends ps {
|
|
17099
17099
|
constructor(t) {
|
|
17100
17100
|
const e = t.renderForms || t.data.hasOwnCanvas || !t.data.hasAppearance && !!t.data.fieldValue;
|
|
17101
17101
|
super(t, {
|
|
@@ -17295,14 +17295,14 @@ class cg extends ps {
|
|
|
17295
17295
|
return this._setTextStyle(s), this._setBackgroundColor(s), this._setDefaultPropertiesFromJS(s), this.container.append(s), this.container;
|
|
17296
17296
|
}
|
|
17297
17297
|
}
|
|
17298
|
-
class
|
|
17298
|
+
class cg extends ps {
|
|
17299
17299
|
constructor(t) {
|
|
17300
17300
|
super(t, {
|
|
17301
17301
|
isRenderable: !!t.data.hasOwnCanvas
|
|
17302
17302
|
});
|
|
17303
17303
|
}
|
|
17304
17304
|
}
|
|
17305
|
-
class
|
|
17305
|
+
class ug extends ps {
|
|
17306
17306
|
constructor(t) {
|
|
17307
17307
|
super(t, {
|
|
17308
17308
|
isRenderable: t.renderForms
|
|
@@ -17401,7 +17401,7 @@ class Ml extends ps {
|
|
|
17401
17401
|
return this._setBackgroundColor(n), this._setDefaultPropertiesFromJS(n), this.container.append(n), this.container;
|
|
17402
17402
|
}
|
|
17403
17403
|
}
|
|
17404
|
-
class
|
|
17404
|
+
class dg extends kl {
|
|
17405
17405
|
constructor(t) {
|
|
17406
17406
|
super(t, {
|
|
17407
17407
|
ignoreBorder: t.data.hasAppearance
|
|
@@ -17416,7 +17416,7 @@ class fg extends kl {
|
|
|
17416
17416
|
})), t;
|
|
17417
17417
|
}
|
|
17418
17418
|
}
|
|
17419
|
-
class
|
|
17419
|
+
class fg extends ps {
|
|
17420
17420
|
constructor(t) {
|
|
17421
17421
|
super(t, {
|
|
17422
17422
|
isRenderable: t.renderForms
|
|
@@ -17567,7 +17567,7 @@ class Fr extends ft {
|
|
|
17567
17567
|
}
|
|
17568
17568
|
render() {
|
|
17569
17569
|
this.container.classList.add("popupAnnotation");
|
|
17570
|
-
const t = this.popup = new
|
|
17570
|
+
const t = this.popup = new gg({
|
|
17571
17571
|
container: this.container,
|
|
17572
17572
|
color: this.data.color,
|
|
17573
17573
|
titleObj: this.data.titleObj,
|
|
@@ -17585,7 +17585,7 @@ class Fr extends ft {
|
|
|
17585
17585
|
return this.container.setAttribute("aria-controls", e.map((s) => `${co}${s}`).join(",")), this.container;
|
|
17586
17586
|
}
|
|
17587
17587
|
}
|
|
17588
|
-
class
|
|
17588
|
+
class gg {
|
|
17589
17589
|
#t = this.#E.bind(this);
|
|
17590
17590
|
#e = this.#T.bind(this);
|
|
17591
17591
|
#s = this.#k.bind(this);
|
|
@@ -17795,7 +17795,7 @@ class Pl extends ft {
|
|
|
17795
17795
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
|
|
17796
17796
|
}
|
|
17797
17797
|
}
|
|
17798
|
-
class
|
|
17798
|
+
class pg extends ft {
|
|
17799
17799
|
#t = null;
|
|
17800
17800
|
constructor(t) {
|
|
17801
17801
|
super(t, {
|
|
@@ -17818,7 +17818,7 @@ class mg extends ft {
|
|
|
17818
17818
|
this.container.classList.add("highlightArea");
|
|
17819
17819
|
}
|
|
17820
17820
|
}
|
|
17821
|
-
class
|
|
17821
|
+
class mg extends ft {
|
|
17822
17822
|
#t = null;
|
|
17823
17823
|
constructor(t) {
|
|
17824
17824
|
super(t, {
|
|
@@ -17841,7 +17841,7 @@ class bg extends ft {
|
|
|
17841
17841
|
this.container.classList.add("highlightArea");
|
|
17842
17842
|
}
|
|
17843
17843
|
}
|
|
17844
|
-
class
|
|
17844
|
+
class bg extends ft {
|
|
17845
17845
|
#t = null;
|
|
17846
17846
|
constructor(t) {
|
|
17847
17847
|
super(t, {
|
|
@@ -17904,12 +17904,12 @@ class Ol extends ft {
|
|
|
17904
17904
|
this.container.classList.add("highlightArea");
|
|
17905
17905
|
}
|
|
17906
17906
|
}
|
|
17907
|
-
class
|
|
17907
|
+
class vg extends Ol {
|
|
17908
17908
|
constructor(t) {
|
|
17909
17909
|
super(t), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
17910
17910
|
}
|
|
17911
17911
|
}
|
|
17912
|
-
class
|
|
17912
|
+
class yg extends ft {
|
|
17913
17913
|
constructor(t) {
|
|
17914
17914
|
super(t, {
|
|
17915
17915
|
isRenderable: !0,
|
|
@@ -18017,7 +18017,7 @@ class Dl extends ft {
|
|
|
18017
18017
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("highlightAnnotation"), this._editOnDoubleClick(), this.container;
|
|
18018
18018
|
}
|
|
18019
18019
|
}
|
|
18020
|
-
class
|
|
18020
|
+
class _g extends ft {
|
|
18021
18021
|
constructor(t) {
|
|
18022
18022
|
super(t, {
|
|
18023
18023
|
isRenderable: !0,
|
|
@@ -18029,7 +18029,7 @@ class wg extends ft {
|
|
|
18029
18029
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("underlineAnnotation"), this.container;
|
|
18030
18030
|
}
|
|
18031
18031
|
}
|
|
18032
|
-
class
|
|
18032
|
+
class wg extends ft {
|
|
18033
18033
|
constructor(t) {
|
|
18034
18034
|
super(t, {
|
|
18035
18035
|
isRenderable: !0,
|
|
@@ -18041,7 +18041,7 @@ class xg extends ft {
|
|
|
18041
18041
|
return !this.data.popupRef && this.hasPopupData && this._createPopup(), this.container.classList.add("squigglyAnnotation"), this.container;
|
|
18042
18042
|
}
|
|
18043
18043
|
}
|
|
18044
|
-
class
|
|
18044
|
+
class xg extends ft {
|
|
18045
18045
|
constructor(t) {
|
|
18046
18046
|
super(t, {
|
|
18047
18047
|
isRenderable: !0,
|
|
@@ -18064,7 +18064,7 @@ class Rl extends ft {
|
|
|
18064
18064
|
return this.container.classList.add("stampAnnotation"), this.container.setAttribute("role", "img"), !this.data.popupRef && this.hasPopupData && this._createPopup(), this._editOnDoubleClick(), this.container;
|
|
18065
18065
|
}
|
|
18066
18066
|
}
|
|
18067
|
-
class
|
|
18067
|
+
class Sg extends ft {
|
|
18068
18068
|
#t = null;
|
|
18069
18069
|
constructor(t) {
|
|
18070
18070
|
super(t, {
|
|
@@ -18103,7 +18103,7 @@ class Cg extends ft {
|
|
|
18103
18103
|
this.downloadManager?.openOrDownloadData(this.content, this.filename);
|
|
18104
18104
|
}
|
|
18105
18105
|
}
|
|
18106
|
-
class
|
|
18106
|
+
class Cg {
|
|
18107
18107
|
#t = null;
|
|
18108
18108
|
#e = null;
|
|
18109
18109
|
#s = /* @__PURE__ */ new Map();
|
|
@@ -18167,7 +18167,7 @@ class Ag {
|
|
|
18167
18167
|
continue;
|
|
18168
18168
|
}
|
|
18169
18169
|
n.data = r;
|
|
18170
|
-
const h =
|
|
18170
|
+
const h = ag.create(n);
|
|
18171
18171
|
if (!h.isRenderable)
|
|
18172
18172
|
continue;
|
|
18173
18173
|
if (!o && r.popupRef) {
|
|
@@ -18971,7 +18971,7 @@ class Ir {
|
|
|
18971
18971
|
}
|
|
18972
18972
|
n.push(d, f);
|
|
18973
18973
|
}
|
|
18974
|
-
return new
|
|
18974
|
+
return new Ag(i, this.#t, this.#e);
|
|
18975
18975
|
}
|
|
18976
18976
|
#n(t) {
|
|
18977
18977
|
const e = this.#i;
|
|
@@ -19033,7 +19033,7 @@ class Ir {
|
|
|
19033
19033
|
return n;
|
|
19034
19034
|
}
|
|
19035
19035
|
}
|
|
19036
|
-
class
|
|
19036
|
+
class Ag extends I {
|
|
19037
19037
|
#t;
|
|
19038
19038
|
#e;
|
|
19039
19039
|
constructor(t, e, s) {
|
|
@@ -19071,10 +19071,10 @@ class Tg extends I {
|
|
|
19071
19071
|
}
|
|
19072
19072
|
class Nr extends ss {
|
|
19073
19073
|
newFreeDrawOutline(t, e, s, i, n, r) {
|
|
19074
|
-
return new
|
|
19074
|
+
return new Tg(t, e, s, i, n, r);
|
|
19075
19075
|
}
|
|
19076
19076
|
}
|
|
19077
|
-
class
|
|
19077
|
+
class Tg extends Ll {
|
|
19078
19078
|
newOutliner(t, e, s, i, n, r = 0) {
|
|
19079
19079
|
return new Nr(t, e, s, i, n, r);
|
|
19080
19080
|
}
|
|
@@ -19861,7 +19861,7 @@ class ct extends z {
|
|
|
19861
19861
|
return !1;
|
|
19862
19862
|
}
|
|
19863
19863
|
}
|
|
19864
|
-
class
|
|
19864
|
+
class Eg {
|
|
19865
19865
|
#t = /* @__PURE__ */ Object.create(null);
|
|
19866
19866
|
updateProperty(t, e) {
|
|
19867
19867
|
this[t] = e, this.updateSVGProperty(t, e);
|
|
@@ -20301,7 +20301,7 @@ class H extends z {
|
|
|
20301
20301
|
return !1;
|
|
20302
20302
|
}
|
|
20303
20303
|
}
|
|
20304
|
-
class
|
|
20304
|
+
class kg {
|
|
20305
20305
|
#t = new Float64Array(6);
|
|
20306
20306
|
#e;
|
|
20307
20307
|
#s;
|
|
@@ -20745,7 +20745,7 @@ class Vn extends I {
|
|
|
20745
20745
|
};
|
|
20746
20746
|
}
|
|
20747
20747
|
}
|
|
20748
|
-
class So extends
|
|
20748
|
+
class So extends Eg {
|
|
20749
20749
|
#t;
|
|
20750
20750
|
constructor(t) {
|
|
20751
20751
|
super(), this.#t = t, super.updateProperties({
|
|
@@ -20790,7 +20790,7 @@ class Co extends H {
|
|
|
20790
20790
|
return Y(this, "typesMap", /* @__PURE__ */ new Map([[$.INK_THICKNESS, "stroke-width"], [$.INK_COLOR, "stroke"], [$.INK_OPACITY, "stroke-opacity"]]));
|
|
20791
20791
|
}
|
|
20792
20792
|
static createDrawerInstance(t, e, s, i, n) {
|
|
20793
|
-
return new
|
|
20793
|
+
return new kg(t, e, s, i, n, this._defaultDrawingOptions["stroke-width"]);
|
|
20794
20794
|
}
|
|
20795
20795
|
static deserializeDraw(t, e, s, i, n, r) {
|
|
20796
20796
|
return Vn.deserialize(t, e, s, i, n, r);
|
|
@@ -21920,7 +21920,7 @@ V.ColorPicker;
|
|
|
21920
21920
|
V.DOMSVGFactory;
|
|
21921
21921
|
V.DrawLayer;
|
|
21922
21922
|
V.FeatureTest;
|
|
21923
|
-
var
|
|
21923
|
+
var Mg = V.GlobalWorkerOptions;
|
|
21924
21924
|
V.ImageKind;
|
|
21925
21925
|
V.InvalidPDFException;
|
|
21926
21926
|
V.MissingPDFException;
|
|
@@ -21942,7 +21942,7 @@ V.XfaLayer;
|
|
|
21942
21942
|
V.build;
|
|
21943
21943
|
V.createValidAbsoluteUrl;
|
|
21944
21944
|
V.fetchData;
|
|
21945
|
-
var
|
|
21945
|
+
var Pg = V.getDocument;
|
|
21946
21946
|
V.getFilenameFromUrl;
|
|
21947
21947
|
V.getPdfFilenameFromUrl;
|
|
21948
21948
|
V.getXfaPageViewport;
|
|
@@ -21953,19 +21953,19 @@ V.normalizeUnicode;
|
|
|
21953
21953
|
V.setLayerDimensions;
|
|
21954
21954
|
V.shadow;
|
|
21955
21955
|
V.stopEvent;
|
|
21956
|
-
var
|
|
21956
|
+
var Og = V.version;
|
|
21957
21957
|
let ja = null;
|
|
21958
|
-
function
|
|
21958
|
+
function Dg() {
|
|
21959
21959
|
const a = document.createElement("div");
|
|
21960
21960
|
a.style.width = "1in", document.body.append(a);
|
|
21961
21961
|
const t = a.offsetWidth;
|
|
21962
21962
|
return a.remove(), t;
|
|
21963
21963
|
}
|
|
21964
|
-
function
|
|
21965
|
-
const a = ja ??
|
|
21964
|
+
function Rg() {
|
|
21965
|
+
const a = ja ?? Dg();
|
|
21966
21966
|
return ja = a, a / 72;
|
|
21967
21967
|
}
|
|
21968
|
-
function
|
|
21968
|
+
function Lg(a, t = 500) {
|
|
21969
21969
|
if (typeof a != "function") throw new TypeError("The first argument is not a function.");
|
|
21970
21970
|
let e = null;
|
|
21971
21971
|
return function(...s) {
|
|
@@ -21974,126 +21974,124 @@ function Fg(a, t = 500) {
|
|
|
21974
21974
|
}, t);
|
|
21975
21975
|
};
|
|
21976
21976
|
}
|
|
21977
|
-
function
|
|
21978
|
-
return new Promise((t, e) => {
|
|
21977
|
+
function Fg(a) {
|
|
21978
|
+
return a.arrayBuffer ? a.arrayBuffer() : new Promise((t, e) => {
|
|
21979
21979
|
const s = new FileReader();
|
|
21980
|
-
s.addEventListener("load", () =>
|
|
21980
|
+
s.addEventListener("load", () => {
|
|
21981
|
+
const i = s.result;
|
|
21982
|
+
if (!(i instanceof ArrayBuffer)) {
|
|
21983
|
+
e(new Error("Failed to read file as ArrayBuffer."));
|
|
21984
|
+
return;
|
|
21985
|
+
}
|
|
21986
|
+
t(i);
|
|
21987
|
+
}), s.addEventListener("error", e), s.readAsArrayBuffer(a);
|
|
21981
21988
|
});
|
|
21982
21989
|
}
|
|
21983
|
-
|
|
21984
|
-
|
|
21985
|
-
const t = await Ig(a);
|
|
21986
|
-
if (t instanceof ArrayBuffer)
|
|
21987
|
-
return t;
|
|
21988
|
-
}
|
|
21989
|
-
function Il() {
|
|
21990
|
+
Fl() || (Mg.workerSrc = `https://cdnjs.cloudflare.com/ajax/libs/pdf.js/${Og}/pdf.worker.min.mjs`);
|
|
21991
|
+
function Fl() {
|
|
21990
21992
|
try {
|
|
21991
21993
|
return typeof OffscreenCanvas < "u" && typeof HTMLCanvasElement < "u" && typeof HTMLCanvasElement.prototype.transferControlToOffscreen == "function";
|
|
21992
21994
|
} catch {
|
|
21993
21995
|
return !1;
|
|
21994
21996
|
}
|
|
21995
21997
|
}
|
|
21996
|
-
async function
|
|
21997
|
-
const n =
|
|
21998
|
-
if (
|
|
21999
|
-
const
|
|
21998
|
+
async function Ig({ page: a, data: t, scale: e, password: s }, i) {
|
|
21999
|
+
const n = Rg() / window.devicePixelRatio, r = await Fg(t);
|
|
22000
|
+
if (Fl()) {
|
|
22001
|
+
const o = new Worker(new URL(
|
|
22000
22002
|
/* @vite-ignore */
|
|
22001
22003
|
"" + new URL("assets/pdfjs.worker-DawqtvLM.js", import.meta.url).href,
|
|
22002
22004
|
import.meta.url
|
|
22003
22005
|
), { type: "module" });
|
|
22004
|
-
return
|
|
22005
|
-
|
|
22006
|
-
if (
|
|
22007
|
-
if (
|
|
22008
|
-
const
|
|
22009
|
-
|
|
22006
|
+
return o.postMessage({ data: r, password: s, id: i, page: a, units: n, scale: e }), await new Promise((l) => {
|
|
22007
|
+
o.addEventListener("message", ({ data: c }) => {
|
|
22008
|
+
if (c.status === "success")
|
|
22009
|
+
if (c.bitmap) {
|
|
22010
|
+
const u = document.createElement("canvas"), d = u.getContext("bitmaprenderer");
|
|
22011
|
+
u.width = c.width, u.height = c.height, d?.transferFromImageBitmap(c.bitmap), l({ pages: c.pages, canvas: u });
|
|
22010
22012
|
} else
|
|
22011
|
-
|
|
22013
|
+
l({ pages: c.pages, canvas: null });
|
|
22012
22014
|
});
|
|
22013
22015
|
});
|
|
22014
22016
|
} else {
|
|
22015
|
-
const
|
|
22016
|
-
if (!i) return { canvas: null, pages:
|
|
22017
|
-
const
|
|
22018
|
-
canvasContext:
|
|
22019
|
-
viewport:
|
|
22017
|
+
const o = await Pg({ data: r, password: s }).promise, h = o.numPages;
|
|
22018
|
+
if (!i) return { canvas: null, pages: h };
|
|
22019
|
+
const l = await o.getPage(a), c = l.getViewport({ scale: e }), u = document.createElement("canvas"), f = {
|
|
22020
|
+
canvasContext: u.getContext("2d"),
|
|
22021
|
+
viewport: c,
|
|
22020
22022
|
transform: [n, 0, 0, n, 0, 0]
|
|
22021
22023
|
};
|
|
22022
|
-
return
|
|
22024
|
+
return u.width = Math.floor(c.width * n), u.height = Math.floor(c.height * n), l.render(f).promise.then(() => ({ canvas: u, pages: h }));
|
|
22023
22025
|
}
|
|
22024
22026
|
}
|
|
22025
22027
|
const Ft = /* @__PURE__ */ new Map();
|
|
22026
|
-
function
|
|
22028
|
+
function Ng(a) {
|
|
22027
22029
|
const t = new Er(a);
|
|
22028
22030
|
return Ft.set(a, t), t;
|
|
22029
22031
|
}
|
|
22030
|
-
function
|
|
22031
|
-
const
|
|
22032
|
+
function jg(a) {
|
|
22033
|
+
const t = Date.now();
|
|
22032
22034
|
return {
|
|
22033
|
-
PDFId: `${a.name}-${
|
|
22035
|
+
PDFId: `${a.name}-${t}`,
|
|
22034
22036
|
name: a.name.replace(/.pdf/, ""),
|
|
22035
|
-
updateDate:
|
|
22036
|
-
data:
|
|
22037
|
-
type: a.type
|
|
22037
|
+
updateDate: t,
|
|
22038
|
+
data: a
|
|
22038
22039
|
};
|
|
22039
22040
|
}
|
|
22040
|
-
async function
|
|
22041
|
+
async function Bg({ src: a }, t, e) {
|
|
22041
22042
|
if (!a || !e) return null;
|
|
22042
|
-
const { objects: s, options: i } = await
|
|
22043
|
+
const { objects: s, options: i } = await vd(a), n = s.filter((o) => o !== null), r = Fu.groupSVGElements(n, i);
|
|
22043
22044
|
return n.forEach((o) => {
|
|
22044
22045
|
o.stroke = e;
|
|
22045
22046
|
}), r.hoverCursor = "pointer", r.stroke = `${e}-${t}`, r;
|
|
22046
22047
|
}
|
|
22047
|
-
function
|
|
22048
|
+
function Hg(a, t) {
|
|
22048
22049
|
if (!Ft.get(a)) return;
|
|
22049
|
-
const s = 1 / 3, i =
|
|
22050
|
-
|
|
22050
|
+
const s = 1 / 3, i = Yg(t, s);
|
|
22051
|
+
Nl(a, i, s);
|
|
22051
22052
|
}
|
|
22052
|
-
async function
|
|
22053
|
-
const e =
|
|
22054
|
-
|
|
22055
|
-
const s = Date.now(), n = {
|
|
22056
|
-
PDFId: `${a.name}-${s}`,
|
|
22053
|
+
async function zg(a, t) {
|
|
22054
|
+
const e = Date.now(), i = {
|
|
22055
|
+
PDFId: `${a.name}-${e}`,
|
|
22057
22056
|
name: a.name.replace(/.png|.jpg|.jpeg/, ""),
|
|
22058
|
-
updateDate:
|
|
22059
|
-
data:
|
|
22060
|
-
type: a.type
|
|
22057
|
+
updateDate: e,
|
|
22058
|
+
data: a
|
|
22061
22059
|
};
|
|
22062
|
-
return t &&
|
|
22060
|
+
return t && Il(t, { data: a }), { ...i, pages: 1 };
|
|
22063
22061
|
}
|
|
22064
|
-
async function
|
|
22062
|
+
async function Il(a, { data: t, scale: e = 0.5 }) {
|
|
22065
22063
|
if (!Ft.get(a)) return;
|
|
22066
|
-
const
|
|
22067
|
-
|
|
22064
|
+
const i = URL.createObjectURL(t), n = await Tt.fromURL(i);
|
|
22065
|
+
n.scale(e), Nl(a, n, e), URL.revokeObjectURL(i);
|
|
22068
22066
|
}
|
|
22069
|
-
function
|
|
22067
|
+
function Nl(a, t, e) {
|
|
22070
22068
|
const s = Ft.get(a);
|
|
22071
22069
|
s && (s.setWidth(t.width * e), s.setHeight(t.height * e), s.backgroundImage = t, s.renderAll());
|
|
22072
22070
|
}
|
|
22073
|
-
function
|
|
22071
|
+
function Gg(a, t) {
|
|
22074
22072
|
if (!t) return;
|
|
22075
22073
|
const { oCoords: e } = a;
|
|
22076
22074
|
if (!e) return;
|
|
22077
22075
|
const { x: s, y: i } = e.tl.touchCorner.tl, { height: n, width: r, scaleY: o, scaleX: h } = t;
|
|
22078
22076
|
t.top = i - n * o / 2, t.left = s - r * h / 2, t.setCoords();
|
|
22079
22077
|
}
|
|
22080
|
-
function
|
|
22081
|
-
!e || !a || (e.scale(1 / t),
|
|
22078
|
+
function Vg(a, t, e) {
|
|
22079
|
+
!e || !a || (e.scale(1 / t), Gg(a, e));
|
|
22082
22080
|
}
|
|
22083
|
-
function
|
|
22081
|
+
function Xg(a, t) {
|
|
22084
22082
|
if (!a) return;
|
|
22085
22083
|
const e = a._cornerSize || 6;
|
|
22086
22084
|
a.borderScaleFactor = 1 / t, a.cornerSize = e * (1 / t), a.touchCornerSize = e * 4 * (1 / t), a.setCoords();
|
|
22087
22085
|
}
|
|
22088
|
-
function
|
|
22086
|
+
function Wg(a) {
|
|
22089
22087
|
const t = Ft.get(a);
|
|
22090
22088
|
t && (t.discardActiveObject(), t.renderAll());
|
|
22091
22089
|
}
|
|
22092
|
-
function
|
|
22090
|
+
function Ug(a) {
|
|
22093
22091
|
const t = Ft.get(a);
|
|
22094
22092
|
t && (t.clear(), Ft.delete(a));
|
|
22095
22093
|
}
|
|
22096
|
-
function
|
|
22094
|
+
function Yg(a, t) {
|
|
22097
22095
|
return new Tt(a, { scaleX: t, scaleY: t });
|
|
22098
22096
|
}
|
|
22099
22097
|
function jr(a, t) {
|
|
@@ -22101,27 +22099,25 @@ function jr(a, t) {
|
|
|
22101
22099
|
const { left: e, top: s, scaleX: i, scaleY: n, width: r, height: o } = a, h = t.x * r * i, l = t.y * o * n;
|
|
22102
22100
|
a.set({ left: e - h, top: s - l });
|
|
22103
22101
|
}
|
|
22104
|
-
function
|
|
22102
|
+
function $g(a, t, e) {
|
|
22105
22103
|
const s = a.type;
|
|
22106
22104
|
return {
|
|
22107
|
-
"application/pdf":
|
|
22105
|
+
"application/pdf": qg,
|
|
22108
22106
|
"image/png": Ba,
|
|
22109
22107
|
"image/jpeg": Ba
|
|
22110
22108
|
}[s]?.(a, t, e) ?? Promise.reject(new Error(`Unsupported ${s} file type.`));
|
|
22111
22109
|
}
|
|
22112
|
-
async function
|
|
22113
|
-
const s = await
|
|
22114
|
-
|
|
22115
|
-
const i = Bg(a, s), n = await Bl({ page: 1, data: s, scale: 0.8, password: t }, e);
|
|
22116
|
-
return { ...i, pages: n };
|
|
22110
|
+
async function qg(a, t, e) {
|
|
22111
|
+
const s = jg(a), i = await jl({ page: 1, data: a, scale: 0.8, password: t }, e);
|
|
22112
|
+
return { ...s, pages: i };
|
|
22117
22113
|
}
|
|
22118
|
-
function
|
|
22119
|
-
return
|
|
22114
|
+
function jl(a, t) {
|
|
22115
|
+
return Ig(a, t).then(({ canvas: e, pages: s }) => (e && t && Hg(t, e), s));
|
|
22120
22116
|
}
|
|
22121
22117
|
async function Ba(a, t, e) {
|
|
22122
|
-
return await
|
|
22118
|
+
return await zg(a, e);
|
|
22123
22119
|
}
|
|
22124
|
-
function
|
|
22120
|
+
function Kg(a, t) {
|
|
22125
22121
|
const e = Ft.get(a);
|
|
22126
22122
|
if (!e) return;
|
|
22127
22123
|
const s = e.getActiveObject();
|
|
@@ -22129,17 +22125,17 @@ function Jg(a, t) {
|
|
|
22129
22125
|
i.set(t);
|
|
22130
22126
|
}) : s.set(t), e.renderAll());
|
|
22131
22127
|
}
|
|
22132
|
-
async function
|
|
22128
|
+
async function Jg(a, t) {
|
|
22133
22129
|
const e = Ft.get(a);
|
|
22134
22130
|
if (!e) return;
|
|
22135
22131
|
const s = e?.getActiveObject();
|
|
22136
22132
|
if (!s) return;
|
|
22137
|
-
const i = await s.clone(
|
|
22133
|
+
const i = await s.clone(Ql);
|
|
22138
22134
|
i instanceof qt ? i.forEachObject((n) => {
|
|
22139
22135
|
e.add(n), t(e, n);
|
|
22140
22136
|
}) : (e.add(i), t(e, i)), jr(i, { x: -0.1, y: -0.1 }), e.setActiveObject(i);
|
|
22141
22137
|
}
|
|
22142
|
-
function
|
|
22138
|
+
function Zg(a) {
|
|
22143
22139
|
const t = Ft.get(a);
|
|
22144
22140
|
if (!t) return;
|
|
22145
22141
|
const e = t.getActiveObject();
|
|
@@ -22147,7 +22143,7 @@ function Qg(a) {
|
|
|
22147
22143
|
t.remove(s);
|
|
22148
22144
|
}), t.discardActiveObject()) : t.remove(e));
|
|
22149
22145
|
}
|
|
22150
|
-
function
|
|
22146
|
+
function Qg(a) {
|
|
22151
22147
|
const {
|
|
22152
22148
|
id: t = "",
|
|
22153
22149
|
selectionOptions: e,
|
|
@@ -22157,10 +22153,10 @@ function tp(a) {
|
|
|
22157
22153
|
selectionCreated: r,
|
|
22158
22154
|
selectionCleared: o
|
|
22159
22155
|
} = a || {};
|
|
22160
|
-
let h = null, l = null, c = 1, u = { ...
|
|
22156
|
+
let h = null, l = null, c = 1, u = { ...Zl };
|
|
22161
22157
|
function d() {
|
|
22162
22158
|
if (!t || Ft.has(t)) return;
|
|
22163
|
-
const k =
|
|
22159
|
+
const k = Ng(t);
|
|
22164
22160
|
return k.on("selection:created", (O) => {
|
|
22165
22161
|
if (r?.(O), O.selected.length <= 1) return;
|
|
22166
22162
|
const j = k.getActiveObject();
|
|
@@ -22170,25 +22166,25 @@ function tp(a) {
|
|
|
22170
22166
|
}), s && k.on("mouse:down", s), i && k.on("mouse:move", i), n && k.on("mouse:up", n), k;
|
|
22171
22167
|
}
|
|
22172
22168
|
function f(k, O) {
|
|
22173
|
-
return
|
|
22169
|
+
return $g(k, O, t);
|
|
22174
22170
|
}
|
|
22175
22171
|
function g(k) {
|
|
22176
|
-
return
|
|
22172
|
+
return jl(k, t);
|
|
22177
22173
|
}
|
|
22178
|
-
function p({ data: k,
|
|
22179
|
-
return
|
|
22174
|
+
function p({ data: k, scale: O = 0.5 }) {
|
|
22175
|
+
return Il(t, { data: k, scale: O });
|
|
22180
22176
|
}
|
|
22181
22177
|
async function b(k, O, j) {
|
|
22182
22178
|
const M = Ft.get(t);
|
|
22183
22179
|
if (!M) return;
|
|
22184
|
-
const R = await Tt.fromURL(k, {}, { ...
|
|
22180
|
+
const R = await Tt.fromURL(k, {}, { ...ql, ...O });
|
|
22185
22181
|
jr(R, j), M.add(R), v(M, R), M.setActiveObject(R);
|
|
22186
22182
|
}
|
|
22187
22183
|
function m(k, O, j) {
|
|
22188
22184
|
const M = Ft.get(t);
|
|
22189
22185
|
if (!M) return;
|
|
22190
22186
|
const R = new Ct(k, {
|
|
22191
|
-
...
|
|
22187
|
+
...Kl,
|
|
22192
22188
|
...O
|
|
22193
22189
|
});
|
|
22194
22190
|
jr(R, j), M.add(R), v(M, R), M.setActiveObject(R);
|
|
@@ -22203,7 +22199,7 @@ function tp(a) {
|
|
|
22203
22199
|
uuid: M = Date.now()
|
|
22204
22200
|
}) {
|
|
22205
22201
|
if (k.getActiveObjects().length > 1 || h?.stroke === `${j}-${M}`) return;
|
|
22206
|
-
const G = await
|
|
22202
|
+
const G = await Bg(u, M, j);
|
|
22207
22203
|
T(k), h = G, l = O, _(k, O, M), S(c, !0), G && k.add(G);
|
|
22208
22204
|
}
|
|
22209
22205
|
function _(k, O, j) {
|
|
@@ -22222,7 +22218,7 @@ function tp(a) {
|
|
|
22222
22218
|
}
|
|
22223
22219
|
function S(k, O = !1) {
|
|
22224
22220
|
const j = Ft.get(t);
|
|
22225
|
-
c = k, j && (
|
|
22221
|
+
c = k, j && (Xg(l, k), Vg(l, k, h), !O && j.renderAll());
|
|
22226
22222
|
}
|
|
22227
22223
|
function A(k) {
|
|
22228
22224
|
if (!k) return;
|
|
@@ -22234,19 +22230,19 @@ function tp(a) {
|
|
|
22234
22230
|
l = null, h && (k.remove(h), h = null);
|
|
22235
22231
|
}
|
|
22236
22232
|
function E() {
|
|
22237
|
-
|
|
22233
|
+
Wg(t);
|
|
22238
22234
|
}
|
|
22239
22235
|
function P() {
|
|
22240
|
-
|
|
22236
|
+
Ug(t);
|
|
22241
22237
|
}
|
|
22242
22238
|
function N(k) {
|
|
22243
|
-
|
|
22239
|
+
Kg(t, k);
|
|
22244
22240
|
}
|
|
22245
22241
|
function D() {
|
|
22246
|
-
return
|
|
22242
|
+
return Jg(t, v);
|
|
22247
22243
|
}
|
|
22248
22244
|
function L() {
|
|
22249
|
-
|
|
22245
|
+
Zg(t);
|
|
22250
22246
|
}
|
|
22251
22247
|
return {
|
|
22252
22248
|
createCanvas: d,
|
|
@@ -22264,18 +22260,18 @@ function tp(a) {
|
|
|
22264
22260
|
deleteActiveFabric: L
|
|
22265
22261
|
};
|
|
22266
22262
|
}
|
|
22267
|
-
function
|
|
22263
|
+
function tp(a) {
|
|
22268
22264
|
let t = 0;
|
|
22269
|
-
const e =
|
|
22265
|
+
const e = Lg(() => {
|
|
22270
22266
|
t !== window.innerWidth && (t = window.innerWidth, a());
|
|
22271
22267
|
});
|
|
22272
|
-
|
|
22268
|
+
Bl(() => {
|
|
22273
22269
|
window.addEventListener("resize", e);
|
|
22274
22270
|
}), Ha(() => {
|
|
22275
22271
|
window.removeEventListener("resize", e);
|
|
22276
22272
|
});
|
|
22277
22273
|
}
|
|
22278
|
-
const
|
|
22274
|
+
const ip = /* @__PURE__ */ Hl({
|
|
22279
22275
|
__name: "pdf-canvas",
|
|
22280
22276
|
props: {
|
|
22281
22277
|
file: {},
|
|
@@ -22296,7 +22292,7 @@ const np = /* @__PURE__ */ zl({
|
|
|
22296
22292
|
},
|
|
22297
22293
|
emits: ["loaded", "reload", "pointerDown", "pointerMove", "pointerUp", "selectionCreated", "selectionCleared"],
|
|
22298
22294
|
setup(a, { expose: t, emit: e }) {
|
|
22299
|
-
const s = a, i = e, { onDestroy: n } = s, r =
|
|
22295
|
+
const s = a, i = e, { onDestroy: n } = s, r = zl(null), o = `${s.canvasId}-${s.page - 1}`, h = ko(() => s.fileZoom * s.canvasScale), l = ko(() => ({ ...Jl, ...s.selectionOptions })), {
|
|
22300
22296
|
createCanvas: c,
|
|
22301
22297
|
specifyPage: u,
|
|
22302
22298
|
addFabric: d,
|
|
@@ -22309,7 +22305,7 @@ const np = /* @__PURE__ */ zl({
|
|
|
22309
22305
|
setCloseSvgOptions: y,
|
|
22310
22306
|
copyActiveFabric: _,
|
|
22311
22307
|
deleteActiveFabric: S
|
|
22312
|
-
} =
|
|
22308
|
+
} = Qg({
|
|
22313
22309
|
id: o,
|
|
22314
22310
|
selectionOptions: l,
|
|
22315
22311
|
pointerDown: (D) => i("pointerDown", D),
|
|
@@ -22318,12 +22314,12 @@ const np = /* @__PURE__ */ zl({
|
|
|
22318
22314
|
selectionCreated: (D) => i("selectionCreated", D),
|
|
22319
22315
|
selectionCleared: (D) => i("selectionCleared", D)
|
|
22320
22316
|
});
|
|
22321
|
-
A(),
|
|
22317
|
+
A(), tp(N);
|
|
22322
22318
|
async function A() {
|
|
22323
22319
|
const { file: D, page: L, fileScale: k } = s;
|
|
22324
22320
|
globalThis.requestAnimationFrame(async () => {
|
|
22325
|
-
if (await
|
|
22326
|
-
g({ data: D.data, scale: k / 3
|
|
22321
|
+
if (await Gl(), c(), D.data.type.startsWith("image/")) {
|
|
22322
|
+
g({ data: D.data, scale: k / 3 }), i("loaded");
|
|
22327
22323
|
return;
|
|
22328
22324
|
}
|
|
22329
22325
|
await u({
|
|
@@ -22358,25 +22354,25 @@ const np = /* @__PURE__ */ zl({
|
|
|
22358
22354
|
copyActiveFabric: _,
|
|
22359
22355
|
deleteActiveFabric: S,
|
|
22360
22356
|
canvasRef: r
|
|
22361
|
-
}), (D, L) => (
|
|
22362
|
-
style:
|
|
22357
|
+
}), (D, L) => (Xl(), Vl("div", {
|
|
22358
|
+
style: Wl({ transform: `scale(${h.value})` }),
|
|
22363
22359
|
onDragover: L[0] || (L[0] = Un(() => {
|
|
22364
22360
|
}, ["prevent"])),
|
|
22365
22361
|
onDragenter: L[1] || (L[1] = Un(() => {
|
|
22366
22362
|
}, ["prevent"])),
|
|
22367
22363
|
onDrop: Un(T, ["stop", "prevent"])
|
|
22368
22364
|
}, [
|
|
22369
|
-
|
|
22365
|
+
Ul("canvas", {
|
|
22370
22366
|
id: o,
|
|
22371
22367
|
ref_key: "canvasRef",
|
|
22372
22368
|
ref: r,
|
|
22373
|
-
class:
|
|
22369
|
+
class: Yl(a.canvasClass)
|
|
22374
22370
|
}, null, 2)
|
|
22375
22371
|
], 36));
|
|
22376
22372
|
}
|
|
22377
22373
|
});
|
|
22378
22374
|
export {
|
|
22379
|
-
|
|
22380
|
-
|
|
22381
|
-
|
|
22375
|
+
ip as default,
|
|
22376
|
+
$g as loadFile,
|
|
22377
|
+
Qg as useFabric
|
|
22382
22378
|
};
|