UNPKG

svgedit

Version:

Powerful SVG-Editor for your browser

1,027 lines 1.43 MB
//#region \0rolldown/runtime.js var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescriptor, r = Object.getOwnPropertyNames, i = Object.getPrototypeOf, a = Object.prototype.hasOwnProperty, o = (e, t, n) => () => { if (n) throw n[0]; try { return e && (t = e(e = 0)), t; } catch (e) { throw n = [e], e; } }, s = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), c = (e, n) => { let r = {}; for (var i in e) t(r, i, { get: e[i], enumerable: !0 }); return n || t(r, Symbol.toStringTag, { value: "Module" }), r; }, l = (e, i, o, s) => { if (i && typeof i == "object" || typeof i == "function") for (var c = r(i), l = 0, u = c.length, d; l < u; l++) d = c[l], !a.call(e, d) && d !== o && t(e, d, { get: ((e) => i[e]).bind(null, d), enumerable: !(s = n(i, d)) || s.enumerable }); return e; }, u = (n, r, a) => (a = n == null ? {} : e(i(n)), l(r || !n || !n.__esModule ? t(a, "default", { value: n, enumerable: !0 }) : a, n)); //#endregion //#region ../../node_modules/pathseg/pathseg.js (function() { typeof window > "u" || ("SVGPathSeg" in window || (window.SVGPathSeg = function(e, t, n) { this.pathSegType = e, this.pathSegTypeAsLetter = t, this._owningPathSegList = n; }, window.SVGPathSeg.prototype.classname = "SVGPathSeg", window.SVGPathSeg.PATHSEG_UNKNOWN = 0, window.SVGPathSeg.PATHSEG_CLOSEPATH = 1, window.SVGPathSeg.PATHSEG_MOVETO_ABS = 2, window.SVGPathSeg.PATHSEG_MOVETO_REL = 3, window.SVGPathSeg.PATHSEG_LINETO_ABS = 4, window.SVGPathSeg.PATHSEG_LINETO_REL = 5, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS = 6, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL = 7, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS = 8, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL = 9, window.SVGPathSeg.PATHSEG_ARC_ABS = 10, window.SVGPathSeg.PATHSEG_ARC_REL = 11, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS = 12, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL = 13, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS = 14, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL = 15, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19, window.SVGPathSeg.prototype._segmentChanged = function() { this._owningPathSegList && this._owningPathSegList.segmentChanged(this); }, window.SVGPathSegClosePath = function(e) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CLOSEPATH, "z", e); }, window.SVGPathSegClosePath.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegClosePath.prototype.toString = function() { return "[object SVGPathSegClosePath]"; }, window.SVGPathSegClosePath.prototype._asPathString = function() { return this.pathSegTypeAsLetter; }, window.SVGPathSegClosePath.prototype.clone = function() { return new window.SVGPathSegClosePath(void 0); }, window.SVGPathSegMovetoAbs = function(e, t, n) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_ABS, "M", e), this._x = t, this._y = n; }, window.SVGPathSegMovetoAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegMovetoAbs.prototype.toString = function() { return "[object SVGPathSegMovetoAbs]"; }, window.SVGPathSegMovetoAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x + " " + this._y; }, window.SVGPathSegMovetoAbs.prototype.clone = function() { return new window.SVGPathSegMovetoAbs(void 0, this._x, this._y); }, Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegMovetoAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegMovetoRel = function(e, t, n) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_MOVETO_REL, "m", e), this._x = t, this._y = n; }, window.SVGPathSegMovetoRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegMovetoRel.prototype.toString = function() { return "[object SVGPathSegMovetoRel]"; }, window.SVGPathSegMovetoRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x + " " + this._y; }, window.SVGPathSegMovetoRel.prototype.clone = function() { return new window.SVGPathSegMovetoRel(void 0, this._x, this._y); }, Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegMovetoRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegLinetoAbs = function(e, t, n) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_ABS, "L", e), this._x = t, this._y = n; }, window.SVGPathSegLinetoAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegLinetoAbs.prototype.toString = function() { return "[object SVGPathSegLinetoAbs]"; }, window.SVGPathSegLinetoAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x + " " + this._y; }, window.SVGPathSegLinetoAbs.prototype.clone = function() { return new window.SVGPathSegLinetoAbs(void 0, this._x, this._y); }, Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegLinetoAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegLinetoRel = function(e, t, n) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_REL, "l", e), this._x = t, this._y = n; }, window.SVGPathSegLinetoRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegLinetoRel.prototype.toString = function() { return "[object SVGPathSegLinetoRel]"; }, window.SVGPathSegLinetoRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x + " " + this._y; }, window.SVGPathSegLinetoRel.prototype.clone = function() { return new window.SVGPathSegLinetoRel(void 0, this._x, this._y); }, Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegLinetoRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoCubicAbs = function(e, t, n, r, i, a, o) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS, "C", e), this._x = t, this._y = n, this._x1 = r, this._y1 = i, this._x2 = a, this._y2 = o; }, window.SVGPathSegCurvetoCubicAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoCubicAbs.prototype.toString = function() { return "[object SVGPathSegCurvetoCubicAbs]"; }, window.SVGPathSegCurvetoCubicAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoCubicAbs.prototype.clone = function() { return new window.SVGPathSegCurvetoCubicAbs(void 0, this._x, this._y, this._x1, this._y1, this._x2, this._y2); }, Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x1", { get: function() { return this._x1; }, set: function(e) { this._x1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y1", { get: function() { return this._y1; }, set: function(e) { this._y1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "x2", { get: function() { return this._x2; }, set: function(e) { this._x2 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicAbs.prototype, "y2", { get: function() { return this._y2; }, set: function(e) { this._y2 = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoCubicRel = function(e, t, n, r, i, a, o) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL, "c", e), this._x = t, this._y = n, this._x1 = r, this._y1 = i, this._x2 = a, this._y2 = o; }, window.SVGPathSegCurvetoCubicRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoCubicRel.prototype.toString = function() { return "[object SVGPathSegCurvetoCubicRel]"; }, window.SVGPathSegCurvetoCubicRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoCubicRel.prototype.clone = function() { return new window.SVGPathSegCurvetoCubicRel(void 0, this._x, this._y, this._x1, this._y1, this._x2, this._y2); }, Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x1", { get: function() { return this._x1; }, set: function(e) { this._x1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y1", { get: function() { return this._y1; }, set: function(e) { this._y1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "x2", { get: function() { return this._x2; }, set: function(e) { this._x2 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicRel.prototype, "y2", { get: function() { return this._y2; }, set: function(e) { this._y2 = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoQuadraticAbs = function(e, t, n, r, i) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS, "Q", e), this._x = t, this._y = n, this._x1 = r, this._y1 = i; }, window.SVGPathSegCurvetoQuadraticAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoQuadraticAbs.prototype.toString = function() { return "[object SVGPathSegCurvetoQuadraticAbs]"; }, window.SVGPathSegCurvetoQuadraticAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoQuadraticAbs.prototype.clone = function() { return new window.SVGPathSegCurvetoQuadraticAbs(void 0, this._x, this._y, this._x1, this._y1); }, Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "x1", { get: function() { return this._x1; }, set: function(e) { this._x1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticAbs.prototype, "y1", { get: function() { return this._y1; }, set: function(e) { this._y1 = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoQuadraticRel = function(e, t, n, r, i) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL, "q", e), this._x = t, this._y = n, this._x1 = r, this._y1 = i; }, window.SVGPathSegCurvetoQuadraticRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoQuadraticRel.prototype.toString = function() { return "[object SVGPathSegCurvetoQuadraticRel]"; }, window.SVGPathSegCurvetoQuadraticRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x1 + " " + this._y1 + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoQuadraticRel.prototype.clone = function() { return new window.SVGPathSegCurvetoQuadraticRel(void 0, this._x, this._y, this._x1, this._y1); }, Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "x1", { get: function() { return this._x1; }, set: function(e) { this._x1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticRel.prototype, "y1", { get: function() { return this._y1; }, set: function(e) { this._y1 = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegArcAbs = function(e, t, n, r, i, a, o, s) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_ABS, "A", e), this._x = t, this._y = n, this._r1 = r, this._r2 = i, this._angle = a, this._largeArcFlag = o, this._sweepFlag = s; }, window.SVGPathSegArcAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegArcAbs.prototype.toString = function() { return "[object SVGPathSegArcAbs]"; }, window.SVGPathSegArcAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._r1 + " " + this._r2 + " " + this._angle + " " + (this._largeArcFlag ? "1" : "0") + " " + (this._sweepFlag ? "1" : "0") + " " + this._x + " " + this._y; }, window.SVGPathSegArcAbs.prototype.clone = function() { return new window.SVGPathSegArcAbs(void 0, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag); }, Object.defineProperty(window.SVGPathSegArcAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r1", { get: function() { return this._r1; }, set: function(e) { this._r1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcAbs.prototype, "r2", { get: function() { return this._r2; }, set: function(e) { this._r2 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcAbs.prototype, "angle", { get: function() { return this._angle; }, set: function(e) { this._angle = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcAbs.prototype, "largeArcFlag", { get: function() { return this._largeArcFlag; }, set: function(e) { this._largeArcFlag = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcAbs.prototype, "sweepFlag", { get: function() { return this._sweepFlag; }, set: function(e) { this._sweepFlag = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegArcRel = function(e, t, n, r, i, a, o, s) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_ARC_REL, "a", e), this._x = t, this._y = n, this._r1 = r, this._r2 = i, this._angle = a, this._largeArcFlag = o, this._sweepFlag = s; }, window.SVGPathSegArcRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegArcRel.prototype.toString = function() { return "[object SVGPathSegArcRel]"; }, window.SVGPathSegArcRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._r1 + " " + this._r2 + " " + this._angle + " " + (this._largeArcFlag ? "1" : "0") + " " + (this._sweepFlag ? "1" : "0") + " " + this._x + " " + this._y; }, window.SVGPathSegArcRel.prototype.clone = function() { return new window.SVGPathSegArcRel(void 0, this._x, this._y, this._r1, this._r2, this._angle, this._largeArcFlag, this._sweepFlag); }, Object.defineProperty(window.SVGPathSegArcRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcRel.prototype, "r1", { get: function() { return this._r1; }, set: function(e) { this._r1 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcRel.prototype, "r2", { get: function() { return this._r2; }, set: function(e) { this._r2 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcRel.prototype, "angle", { get: function() { return this._angle; }, set: function(e) { this._angle = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcRel.prototype, "largeArcFlag", { get: function() { return this._largeArcFlag; }, set: function(e) { this._largeArcFlag = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegArcRel.prototype, "sweepFlag", { get: function() { return this._sweepFlag; }, set: function(e) { this._sweepFlag = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegLinetoHorizontalAbs = function(e, t) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS, "H", e), this._x = t; }, window.SVGPathSegLinetoHorizontalAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegLinetoHorizontalAbs.prototype.toString = function() { return "[object SVGPathSegLinetoHorizontalAbs]"; }, window.SVGPathSegLinetoHorizontalAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x; }, window.SVGPathSegLinetoHorizontalAbs.prototype.clone = function() { return new window.SVGPathSegLinetoHorizontalAbs(void 0, this._x); }, Object.defineProperty(window.SVGPathSegLinetoHorizontalAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegLinetoHorizontalRel = function(e, t) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL, "h", e), this._x = t; }, window.SVGPathSegLinetoHorizontalRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegLinetoHorizontalRel.prototype.toString = function() { return "[object SVGPathSegLinetoHorizontalRel]"; }, window.SVGPathSegLinetoHorizontalRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x; }, window.SVGPathSegLinetoHorizontalRel.prototype.clone = function() { return new window.SVGPathSegLinetoHorizontalRel(void 0, this._x); }, Object.defineProperty(window.SVGPathSegLinetoHorizontalRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegLinetoVerticalAbs = function(e, t) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS, "V", e), this._y = t; }, window.SVGPathSegLinetoVerticalAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegLinetoVerticalAbs.prototype.toString = function() { return "[object SVGPathSegLinetoVerticalAbs]"; }, window.SVGPathSegLinetoVerticalAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._y; }, window.SVGPathSegLinetoVerticalAbs.prototype.clone = function() { return new window.SVGPathSegLinetoVerticalAbs(void 0, this._y); }, Object.defineProperty(window.SVGPathSegLinetoVerticalAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegLinetoVerticalRel = function(e, t) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL, "v", e), this._y = t; }, window.SVGPathSegLinetoVerticalRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegLinetoVerticalRel.prototype.toString = function() { return "[object SVGPathSegLinetoVerticalRel]"; }, window.SVGPathSegLinetoVerticalRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._y; }, window.SVGPathSegLinetoVerticalRel.prototype.clone = function() { return new window.SVGPathSegLinetoVerticalRel(void 0, this._y); }, Object.defineProperty(window.SVGPathSegLinetoVerticalRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoCubicSmoothAbs = function(e, t, n, r, i) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS, "S", e), this._x = t, this._y = n, this._x2 = r, this._y2 = i; }, window.SVGPathSegCurvetoCubicSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoCubicSmoothAbs.prototype.toString = function() { return "[object SVGPathSegCurvetoCubicSmoothAbs]"; }, window.SVGPathSegCurvetoCubicSmoothAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoCubicSmoothAbs.prototype.clone = function() { return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0, this._x, this._y, this._x2, this._y2); }, Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "x2", { get: function() { return this._x2; }, set: function(e) { this._x2 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothAbs.prototype, "y2", { get: function() { return this._y2; }, set: function(e) { this._y2 = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoCubicSmoothRel = function(e, t, n, r, i) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL, "s", e), this._x = t, this._y = n, this._x2 = r, this._y2 = i; }, window.SVGPathSegCurvetoCubicSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoCubicSmoothRel.prototype.toString = function() { return "[object SVGPathSegCurvetoCubicSmoothRel]"; }, window.SVGPathSegCurvetoCubicSmoothRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x2 + " " + this._y2 + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoCubicSmoothRel.prototype.clone = function() { return new window.SVGPathSegCurvetoCubicSmoothRel(void 0, this._x, this._y, this._x2, this._y2); }, Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "x2", { get: function() { return this._x2; }, set: function(e) { this._x2 = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoCubicSmoothRel.prototype, "y2", { get: function() { return this._y2; }, set: function(e) { this._y2 = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoQuadraticSmoothAbs = function(e, t, n) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS, "T", e), this._x = t, this._y = n; }, window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.toString = function() { return "[object SVGPathSegCurvetoQuadraticSmoothAbs]"; }, window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype.clone = function() { return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0, this._x, this._y); }, Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothAbs.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathSegCurvetoQuadraticSmoothRel = function(e, t, n) { window.SVGPathSeg.call(this, window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL, "t", e), this._x = t, this._y = n; }, window.SVGPathSegCurvetoQuadraticSmoothRel.prototype = Object.create(window.SVGPathSeg.prototype), window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.toString = function() { return "[object SVGPathSegCurvetoQuadraticSmoothRel]"; }, window.SVGPathSegCurvetoQuadraticSmoothRel.prototype._asPathString = function() { return this.pathSegTypeAsLetter + " " + this._x + " " + this._y; }, window.SVGPathSegCurvetoQuadraticSmoothRel.prototype.clone = function() { return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0, this._x, this._y); }, Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "x", { get: function() { return this._x; }, set: function(e) { this._x = e, this._segmentChanged(); }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegCurvetoQuadraticSmoothRel.prototype, "y", { get: function() { return this._y; }, set: function(e) { this._y = e, this._segmentChanged(); }, enumerable: !0 }), window.SVGPathElement.prototype.createSVGPathSegClosePath = function() { return new window.SVGPathSegClosePath(void 0); }, window.SVGPathElement.prototype.createSVGPathSegMovetoAbs = function(e, t) { return new window.SVGPathSegMovetoAbs(void 0, e, t); }, window.SVGPathElement.prototype.createSVGPathSegMovetoRel = function(e, t) { return new window.SVGPathSegMovetoRel(void 0, e, t); }, window.SVGPathElement.prototype.createSVGPathSegLinetoAbs = function(e, t) { return new window.SVGPathSegLinetoAbs(void 0, e, t); }, window.SVGPathElement.prototype.createSVGPathSegLinetoRel = function(e, t) { return new window.SVGPathSegLinetoRel(void 0, e, t); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicAbs = function(e, t, n, r, i, a) { return new window.SVGPathSegCurvetoCubicAbs(void 0, e, t, n, r, i, a); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicRel = function(e, t, n, r, i, a) { return new window.SVGPathSegCurvetoCubicRel(void 0, e, t, n, r, i, a); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticAbs = function(e, t, n, r) { return new window.SVGPathSegCurvetoQuadraticAbs(void 0, e, t, n, r); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticRel = function(e, t, n, r) { return new window.SVGPathSegCurvetoQuadraticRel(void 0, e, t, n, r); }, window.SVGPathElement.prototype.createSVGPathSegArcAbs = function(e, t, n, r, i, a, o) { return new window.SVGPathSegArcAbs(void 0, e, t, n, r, i, a, o); }, window.SVGPathElement.prototype.createSVGPathSegArcRel = function(e, t, n, r, i, a, o) { return new window.SVGPathSegArcRel(void 0, e, t, n, r, i, a, o); }, window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalAbs = function(e) { return new window.SVGPathSegLinetoHorizontalAbs(void 0, e); }, window.SVGPathElement.prototype.createSVGPathSegLinetoHorizontalRel = function(e) { return new window.SVGPathSegLinetoHorizontalRel(void 0, e); }, window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalAbs = function(e) { return new window.SVGPathSegLinetoVerticalAbs(void 0, e); }, window.SVGPathElement.prototype.createSVGPathSegLinetoVerticalRel = function(e) { return new window.SVGPathSegLinetoVerticalRel(void 0, e); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothAbs = function(e, t, n, r) { return new window.SVGPathSegCurvetoCubicSmoothAbs(void 0, e, t, n, r); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoCubicSmoothRel = function(e, t, n, r) { return new window.SVGPathSegCurvetoCubicSmoothRel(void 0, e, t, n, r); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothAbs = function(e, t) { return new window.SVGPathSegCurvetoQuadraticSmoothAbs(void 0, e, t); }, window.SVGPathElement.prototype.createSVGPathSegCurvetoQuadraticSmoothRel = function(e, t) { return new window.SVGPathSegCurvetoQuadraticSmoothRel(void 0, e, t); }, "getPathSegAtLength" in window.SVGPathElement.prototype || (window.SVGPathElement.prototype.getPathSegAtLength = function(e) { if (e === void 0 || !isFinite(e)) throw "Invalid arguments."; var t = document.createElementNS("http://www.w3.org/2000/svg", "path"); t.setAttribute("d", this.getAttribute("d")); var n = t.pathSegList.numberOfItems - 1; if (n <= 0) return 0; do { if (t.pathSegList.removeItem(n), e > t.getTotalLength()) break; n--; } while (n > 0); return n; })), (!("SVGPathSegList" in window) || !("appendItem" in window.SVGPathSegList.prototype)) && (window.SVGPathSegList = function(e) { this._pathElement = e, this._list = this._parsePath(this._pathElement.getAttribute("d")), this._mutationObserverConfig = { attributes: !0, attributeFilter: ["d"] }, this._pathElementMutationObserver = new MutationObserver(this._updateListFromPathMutations.bind(this)), this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig); }, window.SVGPathSegList.prototype.classname = "SVGPathSegList", Object.defineProperty(window.SVGPathSegList.prototype, "numberOfItems", { get: function() { return this._checkPathSynchronizedToList(), this._list.length; }, enumerable: !0 }), Object.defineProperty(window.SVGPathSegList.prototype, "length", { get: function() { return this._checkPathSynchronizedToList(), this._list.length; }, enumerable: !0 }), Object.defineProperty(window.SVGPathElement.prototype, "pathSegList", { get: function() { return this._pathSegList ||= new window.SVGPathSegList(this), this._pathSegList; }, enumerable: !0 }), Object.defineProperty(window.SVGPathElement.prototype, "normalizedPathSegList", { get: function() { return this.pathSegList; }, enumerable: !0 }), Object.defineProperty(window.SVGPathElement.prototype, "animatedPathSegList", { get: function() { return this.pathSegList; }, enumerable: !0 }), Object.defineProperty(window.SVGPathElement.prototype, "animatedNormalizedPathSegList", { get: function() { return this.pathSegList; }, enumerable: !0 }), window.SVGPathSegList.prototype._checkPathSynchronizedToList = function() { this._updateListFromPathMutations(this._pathElementMutationObserver.takeRecords()); }, window.SVGPathSegList.prototype._updateListFromPathMutations = function(e) { if (this._pathElement) { var t = !1; e.forEach(function(e) { e.attributeName == "d" && (t = !0); }), t && (this._list = this._parsePath(this._pathElement.getAttribute("d"))); } }, window.SVGPathSegList.prototype._writeListToPath = function() { this._pathElementMutationObserver.disconnect(), this._pathElement.setAttribute("d", window.SVGPathSegList._pathSegArrayAsString(this._list)), this._pathElementMutationObserver.observe(this._pathElement, this._mutationObserverConfig); }, window.SVGPathSegList.prototype.segmentChanged = function(e) { this._writeListToPath(); }, window.SVGPathSegList.prototype.clear = function() { this._checkPathSynchronizedToList(), this._list.forEach(function(e) { e._owningPathSegList = null; }), this._list = [], this._writeListToPath(); }, window.SVGPathSegList.prototype.initialize = function(e) { return this._checkPathSynchronizedToList(), this._list = [e], e._owningPathSegList = this, this._writeListToPath(), e; }, window.SVGPathSegList.prototype._checkValidIndex = function(e) { if (isNaN(e) || e < 0 || e >= this.numberOfItems) throw "INDEX_SIZE_ERR"; }, window.SVGPathSegList.prototype.getItem = function(e) { return this._checkPathSynchronizedToList(), this._checkValidIndex(e), this._list[e]; }, window.SVGPathSegList.prototype.insertItemBefore = function(e, t) { return this._checkPathSynchronizedToList(), t > this.numberOfItems && (t = this.numberOfItems), e._owningPathSegList && (e = e.clone()), this._list.splice(t, 0, e), e._owningPathSegList = this, this._writeListToPath(), e; }, window.SVGPathSegList.prototype.replaceItem = function(e, t) { return this._checkPathSynchronizedToList(), e._owningPathSegList && (e = e.clone()), this._checkValidIndex(t), this._list[t] = e, e._owningPathSegList = this, this._writeListToPath(), e; }, window.SVGPathSegList.prototype.removeItem = function(e) { this._checkPathSynchronizedToList(), this._checkValidIndex(e); var t = this._list[e]; return this._list.splice(e, 1), this._writeListToPath(), t; }, window.SVGPathSegList.prototype.appendItem = function(e) { return this._checkPathSynchronizedToList(), e._owningPathSegList && (e = e.clone()), this._list.push(e), e._owningPathSegList = this, this._writeListToPath(), e; }, window.SVGPathSegList._pathSegArrayAsString = function(e) { var t = "", n = !0; return e.forEach(function(e) { n ? (n = !1, t += e._asPathString()) : t += " " + e._asPathString(); }), t; }, window.SVGPathSegList.prototype._parsePath = function(e) { if (!e || e.length == 0) return []; var t = this, n = function() { this.pathSegList = []; }; n.prototype.appendSegment = function(e) { this.pathSegList.push(e); }; var r = function(e) { this._string = e, this._currentIndex = 0, this._endIndex = this._string.length, this._previousCommand = window.SVGPathSeg.PATHSEG_UNKNOWN, this._skipOptionalSpaces(); }; r.prototype._isCurrentSpace = function() { var e = this._string[this._currentIndex]; return e <= " " && (e == " " || e == "\n" || e == " " || e == "\r" || e == "\f"); }, r.prototype._skipOptionalSpaces = function() { for (; this._currentIndex < this._endIndex && this._isCurrentSpace();) this._currentIndex++; return this._currentIndex < this._endIndex; }, r.prototype._skipOptionalSpacesOrDelimiter = function() { return this._currentIndex < this._endIndex && !this._isCurrentSpace() && this._string.charAt(this._currentIndex) != "," ? !1 : (this._skipOptionalSpaces() && this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "," && (this._currentIndex++, this._skipOptionalSpaces()), this._currentIndex < this._endIndex); }, r.prototype.hasMoreData = function() { return this._currentIndex < this._endIndex; }, r.prototype.peekSegmentType = function() { var e = this._string[this._currentIndex]; return this._pathSegTypeFromChar(e); }, r.prototype._pathSegTypeFromChar = function(e) { switch (e) { case "Z": case "z": return window.SVGPathSeg.PATHSEG_CLOSEPATH; case "M": return window.SVGPathSeg.PATHSEG_MOVETO_ABS; case "m": return window.SVGPathSeg.PATHSEG_MOVETO_REL; case "L": return window.SVGPathSeg.PATHSEG_LINETO_ABS; case "l": return window.SVGPathSeg.PATHSEG_LINETO_REL; case "C": return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS; case "c": return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL; case "Q": return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS; case "q": return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL; case "A": return window.SVGPathSeg.PATHSEG_ARC_ABS; case "a": return window.SVGPathSeg.PATHSEG_ARC_REL; case "H": return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS; case "h": return window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL; case "V": return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS; case "v": return window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL; case "S": return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS; case "s": return window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL; case "T": return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS; case "t": return window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL; default: return window.SVGPathSeg.PATHSEG_UNKNOWN; } }, r.prototype._nextCommandHelper = function(e, t) { return (e == "+" || e == "-" || e == "." || e >= "0" && e <= "9") && t != window.SVGPathSeg.PATHSEG_CLOSEPATH ? t == window.SVGPathSeg.PATHSEG_MOVETO_ABS ? window.SVGPathSeg.PATHSEG_LINETO_ABS : t == window.SVGPathSeg.PATHSEG_MOVETO_REL ? window.SVGPathSeg.PATHSEG_LINETO_REL : t : window.SVGPathSeg.PATHSEG_UNKNOWN; }, r.prototype.initialCommandIsMoveTo = function() { if (!this.hasMoreData()) return !0; var e = this.peekSegmentType(); return e == window.SVGPathSeg.PATHSEG_MOVETO_ABS || e == window.SVGPathSeg.PATHSEG_MOVETO_REL; }, r.prototype._parseNumber = function() { var e = 0, t = 0, n = 1, r = 0, i = 1, a = 1, o = this._currentIndex; if (this._skipOptionalSpaces(), this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "+" ? this._currentIndex++ : this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == "-" && (this._currentIndex++, i = -1), !(this._currentIndex == this._endIndex || (this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") && this._string.charAt(this._currentIndex) != ".")) { for (var s = this._currentIndex; this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9";) this._currentIndex++; if (this._currentIndex != s) for (var c = this._currentIndex - 1, l = 1; c >= s;) t += l * (this._string.charAt(c--) - "0"), l *= 10; if (this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) == ".") { if (this._currentIndex++, this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return; for (; this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9";) n *= 10, r += (this._string.charAt(this._currentIndex) - "0") / n, this._currentIndex += 1; } if (this._currentIndex != o && this._currentIndex + 1 < this._endIndex && (this._string.charAt(this._currentIndex) == "e" || this._string.charAt(this._currentIndex) == "E") && this._string.charAt(this._currentIndex + 1) != "x" && this._string.charAt(this._currentIndex + 1) != "m") { if (this._currentIndex++, this._string.charAt(this._currentIndex) == "+" ? this._currentIndex++ : this._string.charAt(this._currentIndex) == "-" && (this._currentIndex++, a = -1), this._currentIndex >= this._endIndex || this._string.charAt(this._currentIndex) < "0" || this._string.charAt(this._currentIndex) > "9") return; for (; this._currentIndex < this._endIndex && this._string.charAt(this._currentIndex) >= "0" && this._string.charAt(this._currentIndex) <= "9";) e *= 10, e += this._string.charAt(this._currentIndex) - "0", this._currentIndex++; } var u = t + r; if (u *= i, e && (u *= 10 ** (a * e)), o != this._currentIndex) return this._skipOptionalSpacesOrDelimiter(), u; } }, r.prototype._parseArcFlag = function() { if (!(this._currentIndex >= this._endIndex)) { var e = !1, t = this._string.charAt(this._currentIndex++); if (t == "0") e = !1; else if (t == "1") e = !0; else return; return this._skipOptionalSpacesOrDelimiter(), e; } }, r.prototype.parseSegment = function() { var e = this._string[this._currentIndex], n = this._pathSegTypeFromChar(e); if (n == window.SVGPathSeg.PATHSEG_UNKNOWN) { if (this._previousCommand == window.SVGPathSeg.PATHSEG_UNKNOWN || (n = this._nextCommandHelper(e, this._previousCommand), n == window.SVGPathSeg.PATHSEG_UNKNOWN)) return null; } else this._currentIndex++; switch (this._previousCommand = n, n) { case window.SVGPathSeg.PATHSEG_MOVETO_REL: return new window.SVGPathSegMovetoRel(t, this._parseNumber(), this._parseNumber()); case window.SVGPathSeg.PATHSEG_MOVETO_ABS: return new window.SVGPathSegMovetoAbs(t, this._parseNumber(), this._parseNumber()); case window.SVGPathSeg.PATHSEG_LINETO_REL: return new window.SVGPathSegLinetoRel(t, this._parseNumber(), this._parseNumber()); case window.SVGPathSeg.PATHSEG_LINETO_ABS: return new window.SVGPathSegLinetoAbs(t, this._parseNumber(), this._parseNumber()); case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_REL: return new window.SVGPathSegLinetoHorizontalRel(t, this._parseNumber()); case window.SVGPathSeg.PATHSEG_LINETO_HORIZONTAL_ABS: return new window.SVGPathSegLinetoHorizontalAbs(t, this._parseNumber()); case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_REL: return new window.SVGPathSegLinetoVerticalRel(t, this._parseNumber()); case window.SVGPathSeg.PATHSEG_LINETO_VERTICAL_ABS: return new window.SVGPathSegLinetoVerticalAbs(t, this._parseNumber()); case window.SVGPathSeg.PATHSEG_CLOSEPATH: return this._skipOptionalSpaces(), new window.SVGPathSegClosePath(t); case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_REL: var r = { x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegCurvetoCubicRel(t, r.x, r.y, r.x1, r.y1, r.x2, r.y2); case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_ABS: var r = { x1: this._parseNumber(), y1: this._parseNumber(), x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegCurvetoCubicAbs(t, r.x, r.y, r.x1, r.y1, r.x2, r.y2); case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_REL: var r = { x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegCurvetoCubicSmoothRel(t, r.x, r.y, r.x2, r.y2); case window.SVGPathSeg.PATHSEG_CURVETO_CUBIC_SMOOTH_ABS: var r = { x2: this._parseNumber(), y2: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegCurvetoCubicSmoothAbs(t, r.x, r.y, r.x2, r.y2); case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_REL: var r = { x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegCurvetoQuadraticRel(t, r.x, r.y, r.x1, r.y1); case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_ABS: var r = { x1: this._parseNumber(), y1: this._parseNumber(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegCurvetoQuadraticAbs(t, r.x, r.y, r.x1, r.y1); case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL: return new window.SVGPathSegCurvetoQuadraticSmoothRel(t, this._parseNumber(), this._parseNumber()); case window.SVGPathSeg.PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS: return new window.SVGPathSegCurvetoQuadraticSmoothAbs(t, this._parseNumber(), this._parseNumber()); case window.SVGPathSeg.PATHSEG_ARC_REL: var r = { x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegArcRel(t, r.x, r.y, r.x1, r.y1, r.arcAngle, r.arcLarge, r.arcSweep); case window.SVGPathSeg.PATHSEG_ARC_ABS: var r = { x1: this._parseNumber(), y1: this._parseNumber(), arcAngle: this._parseNumber(), arcLarge: this._parseArcFlag(), arcSweep: this._parseArcFlag(), x: this._parseNumber(), y: this._parseNumber() }; return new window.SVGPathSegArcAbs(t, r.x, r.y, r.x1, r.y1, r.arcAngle, r.arcLarge, r.arcSweep); default: throw "Unknown path seg type."; } }; var i = new n(), a = new r(e); if (!a.initialCommandIsMoveTo()) return []; for (; a.hasMoreData();) { var o = a.parseSegment(); if (!o) return []; i.appendSegment(o); } return i.pathSegList; })); })(); //#endregion //#region core/paint.js var d = class e { static #e(e) { let t = Number(e); return Number.isFinite(t) ? Math.min(100, Math.max(0, t)) : 100; } static #t(e) { if (e == null) return null; let t = String(e).trim(); return t ? t === "none" ? "none" : t.startsWith("#") ? t.slice(1) : t : null; } static #n(e) { if (!e) return null; let t = String(e).trim(); if (!t) return null; if (t.startsWith("#")) return t.slice(1); let n = t.match(/url\(\s*['"]?#([^'")\s]+)['"]?\s*\)/); if (n?.[1]) return n[1]; let r = t.lastIndexOf("#"); return r >= 0 && r < t.length - 1 ? t.slice(r + 1) : null; } static #r(t) { if (!t?.cloneNode) return null; let n = t.ownerDocument || document, r = /* @__PURE__ */ new Set(), i = t.cloneNode(!0), a = e.#n(i.getAttribute("href") || i.getAttribute("xlink:href")); for (; a && !r.has(a);) { r.add(a); let t = n.getElementById(a); if (!t?.getAttribute) break; let o = String(i.tagName || "").toLowerCase(), s = String(t.tagName || "").toLowerCase(); if (!["lineargradient", "radialgradient"].includes(s) || s !== o) break; for (let e of t.attributes || []) { let t = e.name; if (t === "id" || t === "href" || t === "xlink:href") continue; let n = i.getAttribute(t); (n === null || n === "") && i.setAttribute(t, e.value); } if (i.querySelectorAll("stop").length === 0) for (let e of t.querySelectorAll?.("stop") || []) i.append(e.cloneNode(!0)); a = e.#n(t.getAttribute("href") || t.getAttribute("xlink:href")); } return i.removeAttribute("href"), i.removeAttribute("xlink:href"), i; } constructor(t) { let n = t || {}; if (this.alpha = e.#e(n.alpha), n.copy) switch (this.type = n.copy.type, this.alpha = e.#e(n.copy.alpha), this.solidColor = null, this.linearGradient = null, this.radialGradient = null, this.type) { case "none": break; case "solidColor": this.solidColor = e.#t(n.copy.solidColor); break; case "linearGradient": this.linearGradient = n.copy.linearGradient?.cloneNode ? n.copy.linearGradient.cloneNode(!0) : null; break; case "radialGradient": this.radialGradient = n.copy.radialGradient?.cloneNode ? n.copy.radialGradient.cloneNode(!0) : null; break; } else n.linearGradient ? (this.type = "linearGradient", this.solidColor = null, this.radialGradient = null, this.linearGradient = e.#r(n.linearGradient)) : n.radialGradient ? (this.type = "radialGradient", this.solidColor = null, this.linearGradient = null, this.radialGradient = e.#r(n.radialGradient)) : n.solidColor ? (this.type = "solidColor", this.solidColor = e.#t(n.solidColor)) : (this.type = "none", this.solidColor = null, this.linearGradient = null, this.radialGradient = null); } }, f = { NONE: 0, ERROR: 1, WARN: 2, INFO: 3, DEBUG: 4 }, p = { currentLevel: f.WARN, enabled: !0, prefix: "[SVGCanvas]" }, m = (e, t = "") => { let n = t ? ` [${t}]` : ""; return `${p.prefix}${n} ${e}`; }, h = (e, t, n = "") => { !p.enabled || p.currentLevel < f.ERROR || (console.error(m(e, n)), t && console.error(t)); }, g = (e, t, n = "") => { !p.enabled || p.cur