aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.eslintrc3
-rw-r--r--.eslintrc.yaml9
-rw-r--r--dist/svg.js569
-rw-r--r--dist/svg.js.map2
-rw-r--r--dist/svg.min.js2
-rw-r--r--dist/svg.min.js.map2
-rw-r--r--dist/svg.node.js526
-rw-r--r--dist/svg.node.js.map2
-rw-r--r--spec/SpecRunner.html8
-rw-r--r--spec/spec/color.js270
-rw-r--r--src/animation/Animator.js4
-rw-r--r--src/animation/Controller.js26
-rw-r--r--src/animation/Morphable.js15
-rw-r--r--src/animation/Runner.js16
-rw-r--r--src/elements/A.js4
-rw-r--r--src/elements/Defs.js8
-rw-r--r--src/elements/Dom.js4
-rw-r--r--src/elements/Element.js14
-rw-r--r--src/elements/Line.js2
-rw-r--r--src/elements/Marker.js6
-rw-r--r--src/elements/Svg.js10
-rw-r--r--src/modules/core/attr.js2
-rw-r--r--src/modules/core/event.js16
-rw-r--r--src/modules/core/poly.js2
-rw-r--r--src/modules/optional/css.js12
-rw-r--r--src/modules/optional/data.js4
-rw-r--r--src/modules/optional/sugar.js34
-rw-r--r--src/modules/optional/transform.js6
-rw-r--r--src/types/Box.js12
-rw-r--r--src/types/Color.js430
-rw-r--r--src/types/List.js8
-rw-r--r--src/types/Matrix.js50
-rw-r--r--src/types/PathArray.js26
-rw-r--r--src/types/Point.js4
-rw-r--r--src/types/PointArray.js4
-rw-r--r--src/types/SVGNumber.js8
-rw-r--r--src/utils/adopter.js2
-rw-r--r--src/utils/methods.js2
-rw-r--r--src/utils/utils.js8
39 files changed, 1720 insertions, 412 deletions
diff --git a/.eslintrc b/.eslintrc
deleted file mode 100644
index e3578aa..0000000
--- a/.eslintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": "standard"
-}
diff --git a/.eslintrc.yaml b/.eslintrc.yaml
new file mode 100644
index 0000000..c2212c7
--- /dev/null
+++ b/.eslintrc.yaml
@@ -0,0 +1,9 @@
+
+extends: standard
+rules:
+ operator-linebreak: [ error, before ]
+ object-curly-spacing: [ error, always ]
+ indent: [ error, 2, {
+ flatTernaryExpressions: true
+ }]
+ padded-blocks: off
diff --git a/dist/svg.js b/dist/svg.js
index 97d9a67..b5e6a8e 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@mick-wout.com>
* @license MIT
*
-* BUILT: Wed Nov 28 2018 13:48:04 GMT+0100 (GMT+01:00)
+* BUILT: Fri Nov 30 2018 13:17:15 GMT+0100 (GMT+01:00)
*/;
function createCommonjsModule(fn, module) {
return module = { exports: {} }, fn(module, module.exports), module.exports;
@@ -1442,6 +1442,44 @@ function dispatch(node, event, data) {
return event;
}
+function _arrayWithHoles(arr) {
+ if (Array.isArray(arr)) return arr;
+}
+
+function _iterableToArrayLimit(arr, i) {
+ var _arr = [];
+ var _n = true;
+ var _d = false;
+ var _e = undefined;
+
+ try {
+ for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {
+ _arr.push(_s.value);
+
+ if (i && _arr.length === i) break;
+ }
+ } catch (err) {
+ _d = true;
+ _e = err;
+ } finally {
+ try {
+ if (!_n && _i["return"] != null) _i["return"]();
+ } finally {
+ if (_d) throw _e;
+ }
+ }
+
+ return _arr;
+}
+
+function _nonIterableRest() {
+ throw new TypeError("Invalid attempt to destructure non-iterable instance");
+}
+
+function _slicedToArray(arr, i) {
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();
+}
+
// 21.2.5.3 get RegExp.prototype.flags
var _flags = function () {
@@ -1482,85 +1520,488 @@ if (_fails(function () { return $toString.call({ source: 'a', flags: 'b' }) != '
});
}
-function fullHex(hex$$1) {
+function sixDigitHex(hex$$1) {
return hex$$1.length === 4 ? ['#', hex$$1.substring(1, 2), hex$$1.substring(1, 2), hex$$1.substring(2, 3), hex$$1.substring(2, 3), hex$$1.substring(3, 4), hex$$1.substring(3, 4)].join('') : hex$$1;
-} // Component to hex value
-
+}
-function compToHex(comp) {
- var hex$$1 = comp.toString(16);
+function componentHex(component) {
+ const integer = Math.round(component);
+ const hex$$1 = integer.toString(16);
return hex$$1.length === 1 ? '0' + hex$$1 : hex$$1;
}
-class Color {
- constructor(...args) {
- this.init(...args);
+function is$1(object, space) {
+ for (const key of space) {
+ if (object[key] == null) {
+ return false;
+ }
}
- init(color, g, b) {
- let match; // initialize defaults
+ return true;
+}
- this.r = 0;
- this.g = 0;
- this.b = 0;
- if (!color) return; // parse color
+function getParameters(a, b) {
+ const params = is$1(a, 'rgb') ? {
+ _a: a.r,
+ _b: a.g,
+ _c: a.b,
+ space: 'rgb'
+ } : is$1(a, 'xyz') ? {
+ _a: a.x,
+ _b: a.y,
+ _c: a.z,
+ _d: 0,
+ space: 'xyz'
+ } : is$1(a, 'hsl') ? {
+ _a: a.h,
+ _b: a.s,
+ _c: a.l,
+ _d: 0,
+ space: 'hsl'
+ } : is$1(a, 'lab') ? {
+ _a: a.l,
+ _b: a.a,
+ _c: a.b,
+ _d: 0,
+ space: 'lab'
+ } : is$1(a, 'lch') ? {
+ _a: a.l,
+ _b: a.c,
+ _c: a.h,
+ _d: 0,
+ space: 'lch'
+ } : is$1(a, 'cmyk') ? {
+ _a: a.c,
+ _b: a.m,
+ _c: a.y,
+ _d: a.k,
+ space: 'cmyk'
+ } : {
+ _a: 0,
+ _b: 0,
+ _c: 0,
+ space: 'rgb'
+ };
+ params.space = b || params.space;
+ return params;
+}
- if (typeof color === 'string') {
- if (isRgb.test(color)) {
- // get rgb values
- match = rgb.exec(color.replace(whitespace, '')); // parse numeric values
+function cieSpace(space) {
+ if (space === 'lab' || space === 'xyz' || space === 'lch') {
+ return true;
+ } else {
+ return false;
+ }
+}
- this.r = parseInt(match[1]);
- this.g = parseInt(match[2]);
- this.b = parseInt(match[3]);
- } else if (isHex.test(color)) {
- // get hex values
- match = hex.exec(fullHex(color)); // parse numeric values
+function hueToRgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
+}
+
+class Color {
+ constructor(...inputs) {
+ this.init(...inputs);
+ }
- this.r = parseInt(match[1], 16);
- this.g = parseInt(match[2], 16);
- this.b = parseInt(match[3], 16);
+ init(a = 0, b = 0, c = 0, d = 0, space = 'rgb') {
+ // Reset all values in case the init function is rerun with new color space
+ if (this.space) {
+ for (let component in this.space) {
+ delete this[this.space[component]];
}
- } else if (Array.isArray(color)) {
- this.r = color[0];
- this.g = color[1];
- this.b = color[2];
- } else if (typeof color === 'object') {
- this.r = color.r;
- this.g = color.g;
- this.b = color.b;
- } else if (arguments.length === 3) {
- this.r = color;
- this.g = g;
- this.b = b;
}
- return this;
- } // Default to hex conversion
+ if (typeof a === 'number') {
+ // Allow for the case that we don't need d...
+ space = typeof d === 'string' ? d : space;
+ d = typeof d === 'string' ? 0 : d; // Assign the values straight to the color
+
+ Object.assign(this, {
+ _a: a,
+ _b: b,
+ _c: c,
+ _d: d,
+ space
+ }); // If the user gave us an array, make the color from it
+ } else if (a instanceof Array) {
+ this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb';
+ Object.assign(this, {
+ _a: a[0],
+ _b: a[1],
+ _c: a[2],
+ _d: a[3] || 0
+ });
+ } else if (a instanceof Object) {
+ // Set the object up and assign its values directly
+ const values = getParameters(a, b);
+ Object.assign(this, values);
+ } else if (typeof a === 'string') {
+ if (isRgb.test(a)) {
+ const noWhitespace = a.replace(whitespace, '');
+
+ const _rgb$exec$slice$map = rgb.exec(noWhitespace).slice(1, 4).map(v => parseInt(v)),
+ _rgb$exec$slice$map2 = _slicedToArray(_rgb$exec$slice$map, 3),
+ _a = _rgb$exec$slice$map2[0],
+ _b = _rgb$exec$slice$map2[1],
+ _c = _rgb$exec$slice$map2[2];
+
+ Object.assign(this, {
+ _a,
+ _b,
+ _c,
+ _d: 0,
+ space: 'rgb'
+ });
+ } else if (isHex.test(a)) {
+ const hexParse = v => parseInt(v, 16);
+
+ const _hex$exec$map = hex.exec(sixDigitHex(a)).map(hexParse),
+ _hex$exec$map2 = _slicedToArray(_hex$exec$map, 4),
+ _a = _hex$exec$map2[1],
+ _b = _hex$exec$map2[2],
+ _c = _hex$exec$map2[3];
+
+ Object.assign(this, {
+ _a,
+ _b,
+ _c,
+ _d: 0,
+ space: 'rgb'
+ });
+ } else throw Error(`Unsupported string format, can't construct Color`);
+ } // Now add the components as a convenience
+
+
+ const _a = this._a,
+ _b = this._b,
+ _c = this._c,
+ _d = this._d;
+ const components = this.space === 'rgb' ? {
+ r: _a,
+ g: _b,
+ b: _c
+ } : this.space === 'xyz' ? {
+ x: _a,
+ y: _b,
+ z: _c
+ } : this.space === 'hsl' ? {
+ h: _a,
+ s: _b,
+ l: _c
+ } : this.space === 'lab' ? {
+ l: _a,
+ a: _b,
+ b: _c
+ } : this.space === 'lch' ? {
+ l: _a,
+ c: _b,
+ h: _c
+ } : this.space === 'cmyk' ? {
+ c: _a,
+ m: _b,
+ y: _c,
+ k: _d
+ } : {};
+ Object.assign(this, components);
+ }
+ /*
+ Conversion Methods
+ */
- toString() {
- return this.toHex();
+ rgb() {
+ if (this.space === 'rgb') {
+ return this;
+ } else if (cieSpace(this.space)) {
+ // Convert to the xyz color space
+ let x = this.x,
+ y = this.y,
+ z = this.z;
+
+ if (this.space === 'lab' || this.space === 'lch') {
+ // Get the values in the lab space
+ let l = this.l,
+ a = this.a,
+ b = this.b;
+
+ if (this.space === 'lch') {
+ let c = this.c,
+ h = this.h;
+ const dToR = Math.PI / 180;
+ a = c * Math.cos(dToR * h);
+ b = c * Math.sin(dToR * h);
+ } // Undo the nonlinear function
+
+
+ const yL = (l + 16) / 116;
+ const xL = a / 500 + yL;
+ const zL = yL - b / 200; // Get the xyz values
+
+ const ct = 16 / 116;
+ const mx = 0.008856;
+ const nm = 7.787;
+ x = 0.95047 * (xL ** 3 > mx ? xL ** 3 : (xL - ct) / nm);
+ y = 1.00000 * (yL ** 3 > mx ? yL ** 3 : (yL - ct) / nm);
+ z = 1.08883 * (zL ** 3 > mx ? zL ** 3 : (zL - ct) / nm);
+ } // Convert xyz to unbounded rgb values
+
+
+ const rU = x * 3.2406 + y * -1.5372 + z * -0.4986;
+ const gU = x * -0.9689 + y * 1.8758 + z * 0.0415;
+ const bU = x * 0.0557 + y * -0.2040 + z * 1.0570; // Convert the values to true rgb values
+
+ let pow = Math.pow;
+ let bd = 0.0031308;
+ const r = rU > bd ? 1.055 * pow(rU, 1 / 2.4) - 0.055 : 12.92 * rU;
+ const g = gU > bd ? 1.055 * pow(gU, 1 / 2.4) - 0.055 : 12.92 * gU;
+ const b = bU > bd ? 1.055 * pow(bU, 1 / 2.4) - 0.055 : 12.92 * bU; // Make and return the color
+
+ const color = new Color(255 * r, 255 * g, 255 * b);
+ return color;
+ } else if (this.space === 'hsl') {
+ // https://bgrins.github.io/TinyColor/docs/tinycolor.html
+ // Get the current hsl values
+ let h = this.h,
+ s = this.s,
+ l = this.l;
+ h /= 360;
+ s /= 100;
+ l /= 100; // If we are grey, then just make the color directly
+
+ if (s === 0) {
+ l *= 255;
+ let color = new Color(l, l, l);
+ return color;
+ } // TODO I have no idea what this does :D If you figure it out, tell me!
+
+
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ const p = 2 * l - q; // Get the rgb values
+
+ const r = 255 * hueToRgb(p, q, h + 1 / 3);
+ const g = 255 * hueToRgb(p, q, h);
+ const b = 255 * hueToRgb(p, q, h - 1 / 3); // Make a new color
+
+ const color = new Color(r, g, b);
+ return color;
+ } else if (this.space === 'cmyk') {
+ // https://gist.github.com/felipesabino/5066336
+ // Get the normalised cmyk values
+ const c = this.c,
+ m = this.m,
+ y = this.y,
+ k = this.k; // Get the rgb values
+
+ const r = 255 * (1 - Math.min(1, c * (1 - k) + k));
+ const g = 255 * (1 - Math.min(1, m * (1 - k) + k));
+ const b = 255 * (1 - Math.min(1, y * (1 - k) + k)); // Form the color and return it
+
+ const color = new Color(r, g, b);
+ return color;
+ } else {
+ return this;
+ }
}
- toArray() {
- return [this.r, this.g, this.b];
- } // Build hex value
+ lab() {
+ // Get the xyz color
+ const _this$xyz = this.xyz(),
+ x = _this$xyz.x,
+ y = _this$xyz.y,
+ z = _this$xyz.z; // Get the lab components
+
+
+ const l = 116 * y - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z); // Construct and return a new color
+
+ const color = new Color(l, a, b, 'lab');
+ return color;
+ }
+
+ xyz() {
+ // Normalise the red, green and blue values
+ const _this$rgb = this.rgb(),
+ r255 = _this$rgb._a,
+ g255 = _this$rgb._b,
+ b255 = _this$rgb._c;
+
+ const _map = [r255, g255, b255].map(v => v / 255),
+ _map2 = _slicedToArray(_map, 3),
+ r = _map2[0],
+ g = _map2[1],
+ b = _map2[2]; // Convert to the lab rgb space
+
+
+ const rL = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
+ const gL = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
+ const bL = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; // Convert to the xyz color space without bounding the values
+
+ const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047;
+ const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.00000;
+ const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883; // Get the proper xyz values by applying the bounding
+
+ const x = xU > 0.008856 ? Math.pow(xU, 1 / 3) : 7.787 * xU + 16 / 116;
+ const y = yU > 0.008856 ? Math.pow(yU, 1 / 3) : 7.787 * yU + 16 / 116;
+ const z = zU > 0.008856 ? Math.pow(zU, 1 / 3) : 7.787 * zU + 16 / 116; // Make and return the color
+
+ const color = new Color(x, y, z, 'xyz');
+ return color;
+ }
+
+ lch() {
+ // Get the lab color directly
+ const _this$lab = this.lab(),
+ l = _this$lab.l,
+ a = _this$lab.a,
+ b = _this$lab.b; // Get the chromaticity and the hue using polar coordinates
+
+
+ const c = Math.sqrt(a ** 2 + b ** 2);
+ let h = 180 * Math.atan2(b, a) / Math.PI;
+
+ if (h < 0) {
+ h *= -1;
+ h = 360 - h;
+ } // Make a new color and return it
+
+
+ const color = new Color(l, c, h, 'lch');
+ return color;
+ }
+
+ hsl() {
+ // Get the rgb values
+ const _this$rgb2 = this.rgb(),
+ _a = _this$rgb2._a,
+ _b = _this$rgb2._b,
+ _c = _this$rgb2._c;
+
+ const _map3 = [_a, _b, _c].map(v => v / 255),
+ _map4 = _slicedToArray(_map3, 3),
+ r = _map4[0],
+ g = _map4[1],
+ b = _map4[2]; // Find the maximum and minimum values to get the lightness
+
+
+ const max = Math.max(r, g, b);
+ const min = Math.min(r, g, b);
+ const l = (max + min) / 2; // If the r, g, v values are identical then we are grey
+
+ const isGrey = max === min; // Calculate the hue and saturation
+
+ const delta = max - min;
+ const s = isGrey ? 0 : l > 0.5 ? delta / (2 - max - min) : delta / (max + min);
+ const h = isGrey ? 0 : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6 : max === g ? ((b - r) / delta + 2) / 6 : max === b ? ((r - g) / delta + 4) / 6 : 0; // Construct and return the new color
+
+ const color = new Color(360 * h, 100 * s, 100 * l, 'hsl');
+ return color;
+ }
+
+ cmyk() {
+ // Get the rgb values for the current color
+ const _this$rgb3 = this.rgb(),
+ _a = _this$rgb3._a,
+ _b = _this$rgb3._b,
+ _c = _this$rgb3._c;
+
+ const _map5 = [_a, _b, _c].map(v => v / 255),
+ _map6 = _slicedToArray(_map5, 3),
+ r = _map6[0],
+ g = _map6[1],
+ b = _map6[2]; // Get the cmyk values in an unbounded format
+
+
+ const k = Math.min(1 - r, 1 - g, 1 - b);
+
+ if (k === 1) {
+ // Catch the black case
+ return new Color(0, 0, 0, 1, 'cmyk');
+ }
+
+ const c = (1 - r - k) / (1 - k);
+ const m = (1 - g - k) / (1 - k);
+ const y = (1 - b - k) / (1 - k); // Construct the new color
+
+ const color = new Color(c, m, y, k, 'cmyk');
+ return color;
+ }
+ /*
+ Input and Output methods
+ */
toHex() {
- return '#' + compToHex(Math.round(this.r)) + compToHex(Math.round(this.g)) + compToHex(Math.round(this.b));
- } // Build rgb value
+ let _this$rgb4 = this.rgb(),
+ _a = _this$rgb4._a,
+ _b = _this$rgb4._b,
+ _c = _this$rgb4._c;
+ let _map7 = [_a, _b, _c].map(componentHex),
+ _map8 = _slicedToArray(_map7, 3),
+ r = _map8[0],
+ g = _map8[1],
+ b = _map8[2];
+
+ return `#${r}${g}${b}`;
+ }
+
+ toString() {
+ return this.toHex();
+ }
toRgb() {
- return 'rgb(' + [this.r, this.g, this.b].join() + ')';
- } // Calculate true brightness
+ let _this$rgb5 = this.rgb(),
+ r = _this$rgb5.r,
+ g = _this$rgb5.g,
+ b = _this$rgb5.b;
+
+ let max = Math.max,
+ min = Math.min,
+ round = Math.round;
+
+ let format = v => max(0, min(round(v), 255));
+
+ let _map9 = [r, g, b].map(format),
+ _map10 = _slicedToArray(_map9, 3),
+ rV = _map10[0],
+ gV = _map10[1],
+ bV = _map10[2];
+
+ let string = `rgb(${rV},${gV},${bV})`;
+ return string;
+ }
+
+ toArray() {
+ let _a = this._a,
+ _b = this._b,
+ _c = this._c,
+ _d = this._d,
+ space = this.space;
+ return [_a, _b, _c, _d, space];
+ }
+ /*
+ Generating random colors
+ */
- brightness() {
- return this.r / 255 * 0.30 + this.g / 255 * 0.59 + this.b / 255 * 0.11;
- } // Testers
+ static random(mode = 'vibrant') {
+ 'sine';
+ 'pastel';
+ 'vibrant';
+ 'dark';
+ 'rgb';
+ 'lab';
+ 'grey';
+ }
+ /*
+ Constructing colors
+ */
// Test if given value is a color string
@@ -3057,7 +3498,7 @@ var sugar = {
return this.attr(m);
}
- if (typeof o === 'string' || Color.isRgb(o) || o instanceof Element) {
+ if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || o instanceof Element) {
this.attr(m, o);
} else {
// set all attributes from sugar.fill and sugar.stroke list
@@ -4596,7 +5037,13 @@ class Morphable {
}
}
- var result = new this._type(value).toArray();
+ var result = new this._type(value);
+
+ if (this._type === Color) {
+ result = this._to ? result[this._to[4]]() : this._from ? result[this._from[4]]() : result;
+ }
+
+ result = result.toArray();
this._morphObj = this._morphObj || new this._type();
this._context = this._context || Array.apply(null, Array(result.length)).map(Object);
return result;
@@ -6285,7 +6732,7 @@ registerMethods({
});
register(Svg$1, 'Svg', true);
-class Symbol extends Container {
+class Symbol$1 extends Container {
// Initialize node
constructor(node) {
super(nodeOrNew('symbol', node), node);
@@ -6295,11 +6742,11 @@ class Symbol extends Container {
registerMethods({
Container: {
symbol: wrapWithAttrCheck(function () {
- return this.put(new Symbol());
+ return this.put(new Symbol$1());
})
}
});
-register(Symbol);
+register(Symbol$1);
function plain(text) {
// clear if build mode is disabled
@@ -6840,7 +7287,7 @@ register(Use);
/* Optional Modules */
const SVG = makeInstance;
-extend([Svg$1, Symbol, Image, Pattern, Marker], getMethodsFor('viewbox'));
+extend([Svg$1, Symbol$1, Image, Pattern, Marker], getMethodsFor('viewbox'));
extend([Line, Polyline, Polygon, Path], getMethodsFor('marker'));
extend(Text, getMethodsFor('Text'));
extend(Path, getMethodsFor('Path'));
@@ -6858,5 +7305,5 @@ List.extend(getMethodNames());
registerMorphableType([SVGNumber, Color, Box, Matrix, SVGArray, PointArray, PathArray]);
makeMorphable();
-export { Morphable, registerMorphableType, makeMorphable, TransformBag, ObjectBag, NonMorphable, defaults, utils, namespaces, regex, SVG, parser, baseFind as find, registerWindow, Animator, Controller, Ease, PID, Spring, easing, Queue, Runner, Timeline, SVGArray as Array, Box, Color, EventTarget, Matrix, SVGNumber as Number, PathArray, Point, PointArray, List, Circle, ClipPath, Container, Defs, Dom, Element, Ellipse, Gradient, G, A, Image, Line, Marker, Mask, Path, Pattern, Polygon, Polyline, Rect, Shape, Stop, Style, Svg$1 as Svg, Symbol, Text, TextPath, Tspan, Use, on, off, dispatch, root, makeNode, makeInstance, nodeOrNew, adopt, mockAdopt, register, getClass, eid, assignNewId, extend, wrapWithAttrCheck };
+export { Morphable, registerMorphableType, makeMorphable, TransformBag, ObjectBag, NonMorphable, defaults, utils, namespaces, regex, SVG, parser, baseFind as find, registerWindow, Animator, Controller, Ease, PID, Spring, easing, Queue, Runner, Timeline, SVGArray as Array, Box, Color, EventTarget, Matrix, SVGNumber as Number, PathArray, Point, PointArray, List, Circle, ClipPath, Container, Defs, Dom, Element, Ellipse, Gradient, G, A, Image, Line, Marker, Mask, Path, Pattern, Polygon, Polyline, Rect, Shape, Stop, Style, Svg$1 as Svg, Symbol$1 as Symbol, Text, TextPath, Tspan, Use, on, off, dispatch, root, makeNode, makeInstance, nodeOrNew, adopt, mockAdopt, register, getClass, eid, assignNewId, extend, wrapWithAttrCheck };
//# sourceMappingURL=svg.js.map
diff --git a/dist/svg.js.map b/dist/svg.js.map
index a67c588..e805009 100644
--- a/dist/svg.js.map
+++ b/dist/svg.js.map
@@ -1 +1 @@
-{"version":3,"file":"svg.js","sources":["../node_modules/core-js/modules/_core.js","../node_modules/core-js/modules/_global.js","../node_modules/core-js/modules/_library.js","../node_modules/core-js/modules/_shared.js","../node_modules/core-js/modules/_uid.js","../node_modules/core-js/modules/_wks.js","../node_modules/core-js/modules/_is-object.js","../node_modules/core-js/modules/_an-object.js","../node_modules/core-js/modules/_fails.js","../node_modules/core-js/modules/_descriptors.js","../node_modules/core-js/modules/_dom-create.js","../node_modules/core-js/modules/_ie8-dom-define.js","../node_modules/core-js/modules/_to-primitive.js","../node_modules/core-js/modules/_object-dp.js","../node_modules/core-js/modules/_property-desc.js","../node_modules/core-js/modules/_hide.js","../node_modules/core-js/modules/_add-to-unscopables.js","../node_modules/core-js/modules/_iter-step.js","../node_modules/core-js/modules/_iterators.js","../node_modules/core-js/modules/_cof.js","../node_modules/core-js/modules/_iobject.js","../node_modules/core-js/modules/_defined.js","../node_modules/core-js/modules/_to-iobject.js","../node_modules/core-js/modules/_has.js","../node_modules/core-js/modules/_redefine.js","../node_modules/core-js/modules/_a-function.js","../node_modules/core-js/modules/_ctx.js","../node_modules/core-js/modules/_export.js","../node_modules/core-js/modules/_to-integer.js","../node_modules/core-js/modules/_to-length.js","../node_modules/core-js/modules/_to-absolute-index.js","../node_modules/core-js/modules/_array-includes.js","../node_modules/core-js/modules/_shared-key.js","../node_modules/core-js/modules/_object-keys-internal.js","../node_modules/core-js/modules/_enum-bug-keys.js","../node_modules/core-js/modules/_object-keys.js","../node_modules/core-js/modules/_object-dps.js","../node_modules/core-js/modules/_html.js","../node_modules/core-js/modules/_object-create.js","../node_modules/core-js/modules/_set-to-string-tag.js","../node_modules/core-js/modules/_iter-create.js","../node_modules/core-js/modules/_to-object.js","../node_modules/core-js/modules/_object-gpo.js","../node_modules/core-js/modules/_iter-define.js","../node_modules/core-js/modules/es6.array.iterator.js","../node_modules/core-js/modules/web.dom.iterable.js","../src/utils/methods.js","../node_modules/core-js/modules/_fix-re-wks.js","../node_modules/core-js/modules/es6.regexp.replace.js","../src/utils/utils.js","../src/modules/core/namespaces.js","../src/utils/window.js","../src/types/Base.js","../src/utils/adopter.js","../src/modules/optional/arrange.js","../node_modules/core-js/modules/_is-regexp.js","../node_modules/core-js/modules/es6.regexp.split.js","../src/modules/core/regex.js","../src/modules/optional/class.js","../src/modules/optional/css.js","../src/modules/optional/data.js","../src/modules/optional/memory.js","../src/modules/core/event.js","../node_modules/core-js/modules/_flags.js","../node_modules/core-js/modules/es6.regexp.flags.js","../node_modules/core-js/modules/es6.regexp.to-string.js","../src/types/Color.js","../node_modules/core-js/modules/es6.regexp.match.js","../src/types/Point.js","../src/modules/core/parser.js","../src/types/Box.js","../src/types/Matrix.js","../src/types/ArrayPolyfill.js","../src/types/List.js","../src/modules/core/selector.js","../src/types/EventTarget.js","../src/modules/core/defaults.js","../src/types/SVGArray.js","../src/types/SVGNumber.js","../src/modules/core/attr.js","../src/elements/Dom.js","../src/elements/Element.js","../src/modules/optional/sugar.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/objectSpread.js","../src/modules/optional/transform.js","../src/modules/core/circled.js","../src/elements/Shape.js","../src/elements/Circle.js","../src/elements/Container.js","../src/elements/Defs.js","../src/elements/Ellipse.js","../src/elements/Stop.js","../src/modules/core/gradiented.js","../src/elements/Gradient.js","../src/elements/Pattern.js","../src/elements/Image.js","../src/types/PointArray.js","../src/modules/core/pointed.js","../src/elements/Line.js","../src/elements/Marker.js","../node_modules/core-js/modules/_strict-method.js","../node_modules/core-js/modules/es6.array.sort.js","../src/animation/Controller.js","../src/types/PathArray.js","../src/animation/Morphable.js","../src/elements/Path.js","../src/modules/core/poly.js","../src/elements/Polygon.js","../src/elements/Polyline.js","../src/elements/Rect.js","../src/animation/Queue.js","../src/animation/Animator.js","../src/animation/Timeline.js","../src/animation/Runner.js","../src/elements/Svg.js","../src/elements/Symbol.js","../src/modules/core/textable.js","../src/elements/Text.js","../src/elements/Tspan.js","../src/elements/ClipPath.js","../src/elements/G.js","../src/elements/A.js","../src/elements/Mask.js","../src/elements/Style.js","../src/elements/TextPath.js","../src/elements/Use.js","../src/main.js"],"sourcesContent":["var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","module.exports = false;\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","const methods = {}\r\nconst names = []\r\n\r\nexport function registerMethods (name, m) {\r\n if (Array.isArray(name)) {\r\n for (let _name of name) {\r\n registerMethods(_name, m)\r\n }\r\n return\r\n }\r\n\r\n if (typeof name === 'object') {\r\n for (let _name in name) {\r\n registerMethods(_name, name[_name])\r\n }\r\n return\r\n }\r\n\r\n addMethodNames(Object.keys(m))\r\n methods[name] = Object.assign(methods[name] || {}, m)\r\n}\r\n\r\nexport function getMethodsFor (name) {\r\n return methods[name] || {}\r\n}\r\n\r\nexport function getMethodNames () {\r\n return [...new Set(names)]\r\n}\r\n\r\nexport function addMethodNames (_names) {\r\n names.push(..._names)\r\n}\r\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","// Map function\r\nexport function map (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n result.push(block(array[i]))\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Filter function\r\nexport function filter (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n if (block(array[i])) { result.push(array[i]) }\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Degrees to radians\r\nexport function radians (d) {\r\n return d % 360 * Math.PI / 180\r\n}\r\n\r\n// Radians to degrees\r\nexport function degrees (r) {\r\n return r * 180 / Math.PI % 360\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nexport function camelCase (s) {\r\n return s.toLowerCase().replace(/-(.)/g, function (m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Convert camel cased string to string seperated\r\nexport function unCamelCase (s) {\r\n return s.replace(/([A-Z])/g, function (m, g) {\r\n return '-' + g.toLowerCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nexport function capitalize (s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nexport function proportionalSize (element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null) {\r\n width = box.width / box.height * height\r\n } else if (height == null) {\r\n height = box.height / box.width * width\r\n }\r\n }\r\n\r\n return {\r\n width: width,\r\n height: height\r\n }\r\n}\r\n\r\nexport function getOrigin (o, element) {\r\n // Allow origin or around as the names\r\n let origin = o.origin // o.around == null ? o.origin : o.around\r\n let ox, oy\r\n\r\n // Allow the user to pass a string to rotate around a given point\r\n if (typeof origin === 'string' || origin == null) {\r\n // Get the bounding box of the element with no transformations applied\r\n const string = (origin || 'center').toLowerCase().trim()\r\n const { height, width, x, y } = element.bbox()\r\n\r\n // Calculate the transformed x and y coordinates\r\n let bx = string.includes('left') ? x\r\n : string.includes('right') ? x + width\r\n : x + width / 2\r\n let by = string.includes('top') ? y\r\n : string.includes('bottom') ? y + height\r\n : y + height / 2\r\n\r\n // Set the bounds eg : \"bottom-left\", \"Top right\", \"middle\" etc...\r\n ox = o.ox != null ? o.ox : bx\r\n oy = o.oy != null ? o.oy : by\r\n } else {\r\n ox = origin[0]\r\n oy = origin[1]\r\n }\r\n\r\n // Return the origin as it is if it wasn't a string\r\n return [ ox, oy ]\r\n}\r\n","// Default namespaces\r\nexport let ns = 'http://www.w3.org/2000/svg'\r\nexport let xmlns = 'http://www.w3.org/2000/xmlns/'\r\nexport let xlink = 'http://www.w3.org/1999/xlink'\r\nexport let svgjs = 'http://svgjs.com/svgjs'\r\n","export const globals = {\r\n window: typeof window === 'undefined' ? null : window,\r\n document: typeof document === 'undefined' ? null : document\r\n}\r\n\r\nexport function registerWindow (win = null, doc = null) {\r\n globals.window = win\r\n globals.document = doc\r\n}\r\n\r\nconst save = {}\r\n\r\nexport function saveWindow () {\r\n save.window = globals.window\r\n save.document = globals.document\r\n}\r\n\r\nexport function restoreWindow () {\r\n globals.window = save.window\r\n globals.document = save.document\r\n}\r\n\r\nexport function withWindow (win, fn) {\r\n saveWindow()\r\n registerWindow(win, win.document)\r\n fn(win, win.document)\r\n restoreWindow()\r\n}\r\n\r\nexport function getWindow () {\r\n return globals.window\r\n}\r\n","export default class Base {\r\n // constructor (node/*, {extensions = []} */) {\r\n // // this.tags = []\r\n // //\r\n // // for (let extension of extensions) {\r\n // // extension.setup.call(this, node)\r\n // // this.tags.push(extension.name)\r\n // // }\r\n // }\r\n}\r\n","import { addMethodNames } from './methods.js'\r\nimport { capitalize } from './utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Base from '../types/Base.js'\r\n\r\nconst elements = {}\r\nexport const root = '___SYMBOL___ROOT___'\r\n\r\n// Method for element creation\r\nexport function makeNode (name) {\r\n // create element\r\n return globals.document.createElementNS(ns, name)\r\n}\r\n\r\nexport function makeInstance (element) {\r\n if (element instanceof Base) return element\r\n\r\n if (typeof element === 'object') {\r\n return adopter(element)\r\n }\r\n\r\n if (element == null) {\r\n return new elements[root]()\r\n }\r\n\r\n if (typeof element === 'string' && element.charAt(0) !== '<') {\r\n return adopter(globals.document.querySelector(element))\r\n }\r\n\r\n var node = makeNode('svg')\r\n node.innerHTML = element\r\n\r\n // We can use firstChild here because we know,\r\n // that the first char is < and thus an element\r\n element = adopter(node.firstChild)\r\n\r\n return element\r\n}\r\n\r\nexport function nodeOrNew (name, node) {\r\n return node instanceof globals.window.Node ? node : makeNode(name)\r\n}\r\n\r\n// Adopt existing svg elements\r\nexport function adopt (node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance instanceof Base) return node.instance\r\n\r\n // initialize variables\r\n var className = capitalize(node.nodeName)\r\n\r\n // Make sure that gradients are adopted correctly\r\n if (className === 'LinearGradient' || className === 'RadialGradient') {\r\n className = 'Gradient'\r\n\r\n // Fallback to Dom if element is not known\r\n } else if (!elements[className]) {\r\n className = 'Dom'\r\n }\r\n\r\n return new elements[className](node)\r\n}\r\n\r\nlet adopter = adopt\r\n\r\nexport function mockAdopt (mock = adopt) {\r\n adopter = mock\r\n}\r\n\r\nexport function register (element, name = element.name, asRoot = false) {\r\n elements[name] = element\r\n if (asRoot) elements[root] = element\r\n\r\n addMethodNames(Object.keys(element.prototype))\r\n\r\n return element\r\n}\r\n\r\nexport function getClass (name) {\r\n return elements[name]\r\n}\r\n\r\n// Element id sequence\r\nlet did = 1000\r\n\r\n// Get next named element id\r\nexport function eid (name) {\r\n return 'Svgjs' + capitalize(name) + (did++)\r\n}\r\n\r\n// Deep new id assignment\r\nexport function assignNewId (node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.children.length - 1; i >= 0; i--) {\r\n assignNewId(node.children[i])\r\n }\r\n\r\n if (node.id) {\r\n return adopt(node).id(eid(node.nodeName))\r\n }\r\n\r\n return adopt(node)\r\n}\r\n\r\n// Method for extending objects\r\nexport function extend (modules, methods, attrCheck) {\r\n var key, i\r\n\r\n modules = Array.isArray(modules) ? modules : [modules]\r\n\r\n for (i = modules.length - 1; i >= 0; i--) {\r\n for (key in methods) {\r\n let method = methods[key]\r\n if (attrCheck) {\r\n method = wrapWithAttrCheck(methods[key])\r\n }\r\n modules[i].prototype[key] = method\r\n }\r\n }\r\n}\r\n\r\n// export function extendWithAttrCheck (...args) {\r\n// extend(...args, true)\r\n// }\r\n\r\nexport function wrapWithAttrCheck (fn) {\r\n return function (...args) {\r\n let o = args[args.length - 1]\r\n\r\n if (o && o.constructor === Object && !(o instanceof Array)) {\r\n return fn.apply(this, args.slice(0, -1)).attr(o)\r\n } else {\r\n return fn.apply(this, args)\r\n }\r\n }\r\n}\r\n","import { makeInstance } from '../../utils/adopter.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Get all siblings, including myself\r\nexport function siblings () {\r\n return this.parent().children()\r\n}\r\n\r\n// Get the curent position siblings\r\nexport function position () {\r\n return this.parent().index(this)\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function next () {\r\n return this.siblings()[this.position() + 1]\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function prev () {\r\n return this.siblings()[this.position() - 1]\r\n}\r\n\r\n// Send given element one step forward\r\nexport function forward () {\r\n var i = this.position() + 1\r\n var p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element one step backward\r\nexport function backward () {\r\n var i = this.position()\r\n\r\n if (i > 0) {\r\n this.parent().removeElement(this).add(this, i - 1)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the front\r\nexport function front () {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the back\r\nexport function back () {\r\n if (this.position() > 0) {\r\n this.parent().removeElement(this).add(this, 0)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element before the targeted element\r\nexport function before (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element after the targeted element\r\nexport function after (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n}\r\n\r\nexport function insertBefore (element) {\r\n element = makeInstance(element)\r\n element.before(this)\r\n}\r\n\r\nexport function insertAfter (element) {\r\n element = makeInstance(element)\r\n element.after(this)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n siblings,\r\n position,\r\n next,\r\n prev,\r\n forward,\r\n backward,\r\n front,\r\n back,\r\n before,\r\n after,\r\n insertBefore,\r\n insertAfter\r\n})\r\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n","// Parse unit value\r\nexport let numberAndUnit = /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n// Parse hex value\r\nexport let hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n// Parse rgb value\r\nexport let rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n// Parse reference id\r\nexport let reference = /(#[a-z0-9\\-_]+)/i\r\n\r\n// splits a transformation chain\r\nexport let transforms = /\\)\\s*,?\\s*/\r\n\r\n// Whitespace\r\nexport let whitespace = /\\s/g\r\n\r\n// Test hex value\r\nexport let isHex = /^#[a-f0-9]{3,6}$/i\r\n\r\n// Test rgb value\r\nexport let isRgb = /^rgb\\(/\r\n\r\n// Test css declaration\r\nexport let isCss = /[^:]+:[^;]+;?/\r\n\r\n// Test for blank string\r\nexport let isBlank = /^(\\s+)?$/\r\n\r\n// Test for numeric string\r\nexport let isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n// Test for percent value\r\nexport let isPercent = /^-?[\\d.]+%$/\r\n\r\n// Test for image url\r\nexport let isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n// split at whitespace and comma\r\nexport let delimiter = /[\\s,]+/\r\n\r\n// The following regex are used to parse the d attribute of a path\r\n\r\n// Matches all hyphens which are not after an exponent\r\nexport let hyphen = /([^e])-/gi\r\n\r\n// Replaces and tests for all path letters\r\nexport let pathLetters = /[MLHVCSQTAZ]/gi\r\n\r\n// yes we need this one, too\r\nexport let isPathLetter = /[MLHVCSQTAZ]/i\r\n\r\n// matches 0.154.23.45\r\nexport let numbersWithDots = /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n// matches .\r\nexport let dots = /\\./g\r\n","import { delimiter } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Return array of classes on the node\r\nexport function classes () {\r\n var attr = this.attr('class')\r\n return attr == null ? [] : attr.trim().split(delimiter)\r\n}\r\n\r\n// Return true if class exists on the node, false otherwise\r\nexport function hasClass (name) {\r\n return this.classes().indexOf(name) !== -1\r\n}\r\n\r\n// Add class to the node\r\nexport function addClass (name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Remove class from the node\r\nexport function removeClass (name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function (c) {\r\n return c !== name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Toggle the presence of a class on the node\r\nexport function toggleClass (name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n classes, hasClass, addClass, removeClass, toggleClass\r\n})\r\n","import { camelCase } from '../../utils/utils.js'\r\nimport { isBlank } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Dynamic style generator\r\nexport function css (style, val) {\r\n let ret = {}\r\n if (arguments.length === 0) {\r\n // get full style as object\r\n this.node.style.cssText.split(/\\s*;\\s*/)\r\n .filter(function (el) { return !!el.length })\r\n .forEach(function (el) {\r\n let t = el.split(/\\s*:\\s*/)\r\n ret[t[0]] = t[1]\r\n })\r\n return ret\r\n }\r\n\r\n if (arguments.length < 2) {\r\n // get style properties in the array\r\n if (Array.isArray(style)) {\r\n for (let name of style) {\r\n let cased = camelCase(name)\r\n ret[cased] = this.node.style[cased]\r\n }\r\n return ret\r\n }\r\n\r\n // get style for property\r\n if (typeof style === 'string') {\r\n return this.node.style[camelCase(style)]\r\n }\r\n\r\n // set styles in object\r\n if (typeof style === 'object') {\r\n for (let name in style) {\r\n // set empty string if null/undefined/'' was given\r\n this.node.style[camelCase(name)] =\r\n (style[name] == null || isBlank.test(style[name])) ? '' : style[name]\r\n }\r\n }\r\n }\r\n\r\n // set style for property\r\n if (arguments.length === 2) {\r\n this.node.style[camelCase(style)] =\r\n (val == null || isBlank.test(val)) ? '' : val\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Show element\r\nexport function show () {\r\n return this.css('display', '')\r\n}\r\n\r\n// Hide element\r\nexport function hide () {\r\n return this.css('display', 'none')\r\n}\r\n\r\n// Is element visible?\r\nexport function visible () {\r\n return this.css('display') !== 'none'\r\n}\r\n\r\nregisterMethods('Dom', {\r\n css, show, hide, visible\r\n})\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Store data values on svg nodes\r\nexport function data (a, v, r) {\r\n if (typeof a === 'object') {\r\n for (v in a) {\r\n this.data(v, a[v])\r\n }\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch (e) {\r\n return this.attr('data-' + a)\r\n }\r\n } else {\r\n this.attr('data-' + a,\r\n v === null ? null\r\n : r === true || typeof v === 'string' || typeof v === 'number' ? v\r\n : JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n}\r\n\r\nregisterMethods('Dom', { data })\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Remember arbitrary data\r\nexport function remember (k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] === 'object') {\r\n for (var key in k) {\r\n this.remember(key, k[key])\r\n }\r\n } else if (arguments.length === 1) {\r\n // retrieve memory\r\n return this.memory()[k]\r\n } else {\r\n // store memory\r\n this.memory()[k] = v\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Erase a given memory\r\nexport function forget () {\r\n if (arguments.length === 0) {\r\n this._memory = {}\r\n } else {\r\n for (var i = arguments.length - 1; i >= 0; i--) {\r\n delete this.memory()[arguments[i]]\r\n }\r\n }\r\n return this\r\n}\r\n\r\n// This triggers creation of a new hidden class which is not performant\r\n// However, this function is not rarely used so it will not happen frequently\r\n// Return local memory object\r\nexport function memory () {\r\n return (this._memory = this._memory || {})\r\n}\r\n\r\nregisterMethods('Dom', { remember, forget, memory })\r\n","import { delimiter } from './regex.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\n\r\nlet listenerId = 0\r\n\r\nfunction getEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (!n.events) n.events = {}\r\n return n.events\r\n}\r\n\r\nfunction getEventTarget (node) {\r\n return makeInstance(node).getEventTarget()\r\n}\r\n\r\nfunction clearEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (n.events) n.events = {}\r\n}\r\n\r\n// Add event binder in the SVG namespace\r\nexport function on (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // events can be an array of events or a string of events\r\n events = Array.isArray(events) ? events : events.split(delimiter)\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) {\r\n listener._svgjsListenerId = ++listenerId\r\n }\r\n\r\n events.forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nexport function off (node, events, listener, options) {\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n // events can be an array of events or a string or undefined\r\n events = Array.isArray(events) ? events : (events || '').split(delimiter)\r\n\r\n events.forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) { off(n, [ev, ns].join('.'), l) }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) { off(n, [event, ns].join('.')) }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) { off(n, [ev, namespace].join('.')) }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) { off(n, event) }\r\n\r\n clearEvents(node)\r\n }\r\n })\r\n}\r\n\r\nexport function dispatch (node, event, data) {\r\n var n = getEventTarget(node)\r\n\r\n // Dispatch event\r\n if (event instanceof globals.window.Event) {\r\n n.dispatchEvent(event)\r\n } else {\r\n event = new globals.window.CustomEvent(event, { detail: data, cancelable: true })\r\n n.dispatchEvent(event)\r\n }\r\n return event\r\n}\r\n","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","/*\r\n\r\nColor {\r\n constructor (a, b, c, space) {\r\n space: 'hsl'\r\n a: 30\r\n b: 20\r\n c: 10\r\n },\r\n\r\n toRgb () { return new Color in rgb space }\r\n toHsl () { return new Color in hsl space }\r\n toLab () { return new Color in lab space }\r\n\r\n toArray () { [space, a, b, c] }\r\n fromArray () { convert it back }\r\n}\r\n\r\n// Conversions aren't always exact because of monitor profiles etc...\r\nnew Color(h, s, l, 'hsl') !== new Color(r, g, b).hsl()\r\nnew Color(100, 100, 100, [space])\r\nnew Color('hsl(30, 20, 10)')\r\n\r\n// Sugar\r\nSVG.rgb(30, 20, 50).lab()\r\nSVG.hsl()\r\nSVG.lab('rgb(100, 100, 100)')\r\n*/\r\n\r\nimport { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\r\n\r\n// Ensure to six-based hex\r\nfunction fullHex (hex) {\r\n return hex.length === 4\r\n ? [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2),\r\n hex.substring(2, 3), hex.substring(2, 3),\r\n hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('')\r\n : hex\r\n}\r\n\r\n// Component to hex value\r\nfunction compToHex (comp) {\r\n var hex = comp.toString(16)\r\n return hex.length === 1 ? '0' + hex : hex\r\n}\r\n\r\nexport default class Color {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (color, g, b) {\r\n let match\r\n\r\n // initialize defaults\r\n this.r = 0\r\n this.g = 0\r\n this.b = 0\r\n\r\n if (!color) return\r\n\r\n // parse color\r\n if (typeof color === 'string') {\r\n if (isRgb.test(color)) {\r\n // get rgb values\r\n match = rgb.exec(color.replace(whitespace, ''))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1])\r\n this.g = parseInt(match[2])\r\n this.b = parseInt(match[3])\r\n } else if (isHex.test(color)) {\r\n // get hex values\r\n match = hex.exec(fullHex(color))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1], 16)\r\n this.g = parseInt(match[2], 16)\r\n this.b = parseInt(match[3], 16)\r\n }\r\n } else if (Array.isArray(color)) {\r\n this.r = color[0]\r\n this.g = color[1]\r\n this.b = color[2]\r\n } else if (typeof color === 'object') {\r\n this.r = color.r\r\n this.g = color.g\r\n this.b = color.b\r\n } else if (arguments.length === 3) {\r\n this.r = color\r\n this.g = g\r\n this.b = b\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Default to hex conversion\r\n toString () {\r\n return this.toHex()\r\n }\r\n\r\n toArray () {\r\n return [this.r, this.g, this.b]\r\n }\r\n\r\n // Build hex value\r\n toHex () {\r\n return '#' +\r\n compToHex(Math.round(this.r)) +\r\n compToHex(Math.round(this.g)) +\r\n compToHex(Math.round(this.b))\r\n }\r\n\r\n // Build rgb value\r\n toRgb () {\r\n return 'rgb(' + [this.r, this.g, this.b].join() + ')'\r\n }\r\n\r\n // Calculate true brightness\r\n brightness () {\r\n return (this.r / 255 * 0.30) +\r\n (this.g / 255 * 0.59) +\r\n (this.b / 255 * 0.11)\r\n }\r\n\r\n // Testers\r\n\r\n // Test if given value is a color string\r\n static test (color) {\r\n color += ''\r\n return isHex.test(color) || isRgb.test(color)\r\n }\r\n\r\n // Test if given value is a rgb object\r\n static isRgb (color) {\r\n return color && typeof color.r === 'number' &&\r\n typeof color.g === 'number' &&\r\n typeof color.b === 'number'\r\n }\r\n\r\n // Test if given value is a color\r\n static isColor (color) {\r\n return this.isRgb(color) || this.test(color)\r\n }\r\n}\r\n","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n","export default class Point {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (x, y) {\r\n let source\r\n let base = { x: 0, y: 0 }\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ? { x: x[0], y: x[1] }\r\n : typeof x === 'object' ? { x: x.x, y: x.y }\r\n : { x: x, y: y }\r\n\r\n // merge source\r\n this.x = source.x == null ? base.x : source.x\r\n this.y = source.y == null ? base.y : source.y\r\n\r\n return this\r\n }\r\n\r\n // Clone point\r\n clone () {\r\n return new Point(this)\r\n }\r\n\r\n // transform point with matrix\r\n transform (m) {\r\n // Perform the matrix multiplication\r\n var x = m.a * this.x + m.c * this.y + m.e\r\n var y = m.b * this.x + m.d * this.y + m.f\r\n\r\n // Return the required point\r\n return new Point(x, y)\r\n }\r\n\r\n toArray () {\r\n return [this.x, this.y]\r\n }\r\n}\r\n\r\nexport function point (x, y) {\r\n return new Point(x, y).transform(this.screenCTM().inverse())\r\n}\r\n","import { globals } from '../../utils/window.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\n\r\nexport default function parser () {\r\n // Reuse cached element if possible\r\n if (!parser.nodes) {\r\n let svg = makeInstance().size(2, 0)\r\n svg.node.cssText = [\r\n 'opacity: 0',\r\n 'position: absolute',\r\n 'left: -100%',\r\n 'top: -100%',\r\n 'overflow: hidden'\r\n ].join(';')\r\n\r\n let path = svg.path().node\r\n\r\n parser.nodes = { svg, path }\r\n }\r\n\r\n if (!parser.nodes.svg.node.parentNode) {\r\n let b = globals.document.body || globals.document.documentElement\r\n parser.nodes.svg.addTo(b)\r\n }\r\n\r\n return parser.nodes\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Point from './Point.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nfunction isNulledBox (box) {\r\n return !box.w && !box.h && !box.x && !box.y\r\n}\r\n\r\nfunction domContains (node) {\r\n return (globals.document.documentElement.contains || function (node) {\r\n // This is IE - it does not support contains() for top-level SVGs\r\n while (node.parentNode) {\r\n node = node.parentNode\r\n }\r\n return node === document\r\n }).call(globals.document.documentElement, node)\r\n}\r\n\r\nexport default class Box {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (source) {\r\n var base = [0, 0, 0, 0]\r\n source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)\r\n : Array.isArray(source) ? source\r\n : typeof source === 'object' ? [source.left != null ? source.left\r\n : source.x, source.top != null ? source.top : source.y, source.width, source.height]\r\n : arguments.length === 4 ? [].slice.call(arguments)\r\n : base\r\n\r\n this.x = source[0] || 0\r\n this.y = source[1] || 0\r\n this.width = this.w = source[2] || 0\r\n this.height = this.h = source[3] || 0\r\n\r\n // Add more bounding box properties\r\n this.x2 = this.x + this.w\r\n this.y2 = this.y + this.h\r\n this.cx = this.x + this.w / 2\r\n this.cy = this.y + this.h / 2\r\n\r\n return this\r\n }\r\n\r\n // Merge rect box with another, return a new instance\r\n merge (box) {\r\n let x = Math.min(this.x, box.x)\r\n let y = Math.min(this.y, box.y)\r\n let width = Math.max(this.x + this.width, box.x + box.width) - x\r\n let height = Math.max(this.y + this.height, box.y + box.height) - y\r\n\r\n return new Box(x, y, width, height)\r\n }\r\n\r\n transform (m) {\r\n let xMin = Infinity\r\n let xMax = -Infinity\r\n let yMin = Infinity\r\n let yMax = -Infinity\r\n\r\n let pts = [\r\n new Point(this.x, this.y),\r\n new Point(this.x2, this.y),\r\n new Point(this.x, this.y2),\r\n new Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function (p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin, p.x)\r\n xMax = Math.max(xMax, p.x)\r\n yMin = Math.min(yMin, p.y)\r\n yMax = Math.max(yMax, p.y)\r\n })\r\n\r\n return new Box(\r\n xMin, yMin,\r\n xMax - xMin,\r\n yMax - yMin\r\n )\r\n }\r\n\r\n addOffset () {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += globals.window.pageXOffset\r\n this.y += globals.window.pageYOffset\r\n return this\r\n }\r\n\r\n toString () {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n\r\n toArray () {\r\n return [this.x, this.y, this.width, this.height]\r\n }\r\n\r\n isNulled () {\r\n return isNulledBox(this)\r\n }\r\n}\r\n\r\nfunction getBox (cb, retry) {\r\n let box\r\n\r\n try {\r\n box = cb(this.node)\r\n\r\n if (isNulledBox(box) && !domContains(this.node)) {\r\n throw new Error('Element not in the dom')\r\n }\r\n } catch (e) {\r\n box = retry(this)\r\n }\r\n\r\n return box\r\n}\r\n\r\nexport function bbox () {\r\n return new Box(getBox.call(this, (node) => node.getBBox(), (el) => {\r\n try {\r\n let clone = el.clone().addTo(parser().svg).show()\r\n let box = clone.node.getBBox()\r\n clone.remove()\r\n return box\r\n } catch (e) {\r\n throw new Error('Getting bbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }\r\n }))\r\n}\r\n\r\nexport function rbox (el) {\r\n let box = new Box(getBox.call(this, (node) => node.getBoundingClientRect(), (el) => {\r\n throw new Error('Getting rbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }))\r\n if (el) return box.transform(el.screenCTM().inverse())\r\n return box.addOffset()\r\n}\r\n\r\nregisterMethods({\r\n viewbox: {\r\n viewbox (x, y, width, height) {\r\n // act as getter\r\n if (x == null) return new Box(this.attr('viewBox'))\r\n\r\n // act as setter\r\n return this.attr('viewBox', new Box(x, y, width, height))\r\n }\r\n }\r\n})\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { radians } from '../utils/utils.js'\r\nimport Element from '../elements/Element.js'\r\nimport Point from './Point.js'\r\n\r\nfunction closeEnough (a, b, threshold) {\r\n return Math.abs(b - a) < (threshold || 1e-6)\r\n}\r\n\r\nexport default class Matrix {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n // Initialize\r\n init (source) {\r\n var base = Matrix.fromArray([1, 0, 0, 1, 0, 0])\r\n\r\n // ensure source as object\r\n source = source instanceof Element ? source.matrixify()\r\n : typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\r\n : Array.isArray(source) ? Matrix.fromArray(source)\r\n : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source\r\n : (typeof source === 'object') ? new Matrix().transform(source)\r\n : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))\r\n : base\r\n\r\n // Merge the source matrix with the base matrix\r\n this.a = source.a != null ? source.a : base.a\r\n this.b = source.b != null ? source.b : base.b\r\n this.c = source.c != null ? source.c : base.c\r\n this.d = source.d != null ? source.d : base.d\r\n this.e = source.e != null ? source.e : base.e\r\n this.f = source.f != null ? source.f : base.f\r\n\r\n return this\r\n }\r\n\r\n // Clones this matrix\r\n clone () {\r\n return new Matrix(this)\r\n }\r\n\r\n // Transform a matrix into another matrix by manipulating the space\r\n transform (o) {\r\n // Check if o is a matrix and then left multiply it directly\r\n if (Matrix.isMatrixLike(o)) {\r\n var matrix = new Matrix(o)\r\n return matrix.multiplyO(this)\r\n }\r\n\r\n // Get the proposed transformations and the current transformations\r\n var t = Matrix.formatTransforms(o)\r\n var current = this\r\n let { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\r\n\r\n // Construct the resulting matrix\r\n var transformer = new Matrix()\r\n .translateO(t.rx, t.ry)\r\n .lmultiplyO(current)\r\n .translateO(-ox, -oy)\r\n .scaleO(t.scaleX, t.scaleY)\r\n .skewO(t.skewX, t.skewY)\r\n .shearO(t.shear)\r\n .rotateO(t.theta)\r\n .translateO(ox, oy)\r\n\r\n // If we want the origin at a particular place, we force it there\r\n if (isFinite(t.px) || isFinite(t.py)) {\r\n const origin = new Point(ox, oy).transform(transformer)\r\n // TODO: Replace t.px with isFinite(t.px)\r\n const dx = t.px ? t.px - origin.x : 0\r\n const dy = t.py ? t.py - origin.y : 0\r\n transformer.translateO(dx, dy)\r\n }\r\n\r\n // Translate now after positioning\r\n transformer.translateO(t.tx, t.ty)\r\n return transformer\r\n }\r\n\r\n // Applies a matrix defined by its affine parameters\r\n compose (o) {\r\n if (o.origin) {\r\n o.originX = o.origin[0]\r\n o.originY = o.origin[1]\r\n }\r\n // Get the parameters\r\n var ox = o.originX || 0\r\n var oy = o.originY || 0\r\n var sx = o.scaleX || 1\r\n var sy = o.scaleY || 1\r\n var lam = o.shear || 0\r\n var theta = o.rotate || 0\r\n var tx = o.translateX || 0\r\n var ty = o.translateY || 0\r\n\r\n // Apply the standard matrix\r\n var result = new Matrix()\r\n .translateO(-ox, -oy)\r\n .scaleO(sx, sy)\r\n .shearO(lam)\r\n .rotateO(theta)\r\n .translateO(tx, ty)\r\n .lmultiplyO(this)\r\n .translateO(ox, oy)\r\n return result\r\n }\r\n\r\n // Decomposes this matrix into its affine parameters\r\n decompose (cx = 0, cy = 0) {\r\n // Get the parameters from the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Figure out if the winding direction is clockwise or counterclockwise\r\n var determinant = a * d - b * c\r\n var ccw = determinant > 0 ? 1 : -1\r\n\r\n // Since we only shear in x, we can use the x basis to get the x scale\r\n // and the rotation of the resulting matrix\r\n var sx = ccw * Math.sqrt(a * a + b * b)\r\n var thetaRad = Math.atan2(ccw * b, ccw * a)\r\n var theta = 180 / Math.PI * thetaRad\r\n var ct = Math.cos(thetaRad)\r\n var st = Math.sin(thetaRad)\r\n\r\n // We can then solve the y basis vector simultaneously to get the other\r\n // two affine parameters directly from these parameters\r\n var lam = (a * c + b * d) / determinant\r\n var sy = ((c * sx) / (lam * a - b)) || ((d * sx) / (lam * b + a))\r\n\r\n // Use the translations\r\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy)\r\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy)\r\n\r\n // Construct the decomposition and return it\r\n return {\r\n // Return the affine parameters\r\n scaleX: sx,\r\n scaleY: sy,\r\n shear: lam,\r\n rotate: theta,\r\n translateX: tx,\r\n translateY: ty,\r\n originX: cx,\r\n originY: cy,\r\n\r\n // Return the matrix parameters\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n // Left multiplies by the given matrix\r\n multiply (matrix) {\r\n return this.clone().multiplyO(matrix)\r\n }\r\n\r\n multiplyO (matrix) {\r\n // Get the matrices\r\n var l = this\r\n var r = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n lmultiply (matrix) {\r\n return this.clone().lmultiplyO(matrix)\r\n }\r\n\r\n lmultiplyO (matrix) {\r\n var r = this\r\n var l = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n // Inverses matrix\r\n inverseO () {\r\n // Get the current parameters out of the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Invert the 2x2 matrix in the top left\r\n var det = a * d - b * c\r\n if (!det) throw new Error('Cannot invert ' + this)\r\n\r\n // Calculate the top 2x2 matrix\r\n var na = d / det\r\n var nb = -b / det\r\n var nc = -c / det\r\n var nd = a / det\r\n\r\n // Apply the inverted matrix to the top right\r\n var ne = -(na * e + nc * f)\r\n var nf = -(nb * e + nd * f)\r\n\r\n // Construct the inverted matrix\r\n this.a = na\r\n this.b = nb\r\n this.c = nc\r\n this.d = nd\r\n this.e = ne\r\n this.f = nf\r\n\r\n return this\r\n }\r\n\r\n inverse () {\r\n return this.clone().inverseO()\r\n }\r\n\r\n // Translate matrix\r\n translate (x, y) {\r\n return this.clone().translateO(x, y)\r\n }\r\n\r\n translateO (x, y) {\r\n this.e += x || 0\r\n this.f += y || 0\r\n return this\r\n }\r\n\r\n // Scale matrix\r\n scale (x, y, cx, cy) {\r\n return this.clone().scaleO(...arguments)\r\n }\r\n\r\n scaleO (x, y = x, cx = 0, cy = 0) {\r\n // Support uniform scaling\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * x\r\n this.b = b * y\r\n this.c = c * x\r\n this.d = d * y\r\n this.e = e * x - cx * x + cx\r\n this.f = f * y - cy * y + cy\r\n\r\n return this\r\n }\r\n\r\n // Rotate matrix\r\n rotate (r, cx, cy) {\r\n return this.clone().rotateO(r, cx, cy)\r\n }\r\n\r\n rotateO (r, cx = 0, cy = 0) {\r\n // Convert degrees to radians\r\n r = radians(r)\r\n\r\n let cos = Math.cos(r)\r\n let sin = Math.sin(r)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * cos - b * sin\r\n this.b = b * cos + a * sin\r\n this.c = c * cos - d * sin\r\n this.d = d * cos + c * sin\r\n this.e = e * cos - f * sin + cy * sin - cx * cos + cx\r\n this.f = f * cos + e * sin - cx * sin - cy * cos + cy\r\n\r\n return this\r\n }\r\n\r\n // Flip matrix on x or y, at a given offset\r\n flip (axis, around) {\r\n return this.clone().flipO(axis, around)\r\n }\r\n\r\n flipO (axis, around) {\r\n return axis === 'x' ? this.scaleO(-1, 1, around, 0)\r\n : axis === 'y' ? this.scaleO(1, -1, 0, around)\r\n : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\r\n }\r\n\r\n // Shear matrix\r\n shear (a, cx, cy) {\r\n return this.clone().shearO(a, cx, cy)\r\n }\r\n\r\n shearO (lx, cx = 0, cy = 0) {\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.c = c + d * lx\r\n this.e = e + f * lx - cy * lx\r\n\r\n return this\r\n }\r\n\r\n // Skew Matrix\r\n skew (x, y, cx, cy) {\r\n return this.clone().skewO(...arguments)\r\n }\r\n\r\n skewO (x, y = x, cx = 0, cy = 0) {\r\n // support uniformal skew\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // Convert degrees to radians\r\n x = radians(x)\r\n y = radians(y)\r\n\r\n let lx = Math.tan(x)\r\n let ly = Math.tan(y)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.b = b + a * ly\r\n this.c = c + d * lx\r\n this.d = d + c * ly\r\n this.e = e + f * lx - cy * lx\r\n this.f = f + e * ly - cx * ly\r\n\r\n return this\r\n }\r\n\r\n // SkewX\r\n skewX (x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n\r\n skewXO (x, cx, cy) {\r\n return this.skewO(x, 0, cx, cy)\r\n }\r\n\r\n // SkewY\r\n skewY (y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n\r\n skewYO (y, cx, cy) {\r\n return this.skewO(0, y, cx, cy)\r\n }\r\n\r\n // Transform around a center point\r\n aroundO (cx, cy, matrix) {\r\n var dx = cx || 0\r\n var dy = cy || 0\r\n return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\r\n }\r\n\r\n around (cx, cy, matrix) {\r\n return this.clone().aroundO(cx, cy, matrix)\r\n }\r\n\r\n // Check if two matrices are equal\r\n equals (other) {\r\n var comp = new Matrix(other)\r\n return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b) &&\r\n closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d) &&\r\n closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)\r\n }\r\n\r\n // Convert matrix to string\r\n toString () {\r\n return 'matrix(' + this.a + ',' + this.b + ',' + this.c + ',' + this.d + ',' + this.e + ',' + this.f + ')'\r\n }\r\n\r\n toArray () {\r\n return [this.a, this.b, this.c, this.d, this.e, this.f]\r\n }\r\n\r\n valueOf () {\r\n return {\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n static fromArray (a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n }\r\n\r\n static isMatrixLike (o) {\r\n return (\r\n o.a != null ||\r\n o.b != null ||\r\n o.c != null ||\r\n o.d != null ||\r\n o.e != null ||\r\n o.f != null\r\n )\r\n }\r\n\r\n static formatTransforms (o) {\r\n // Get all of the parameters required to form the matrix\r\n var flipBoth = o.flip === 'both' || o.flip === true\r\n var flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\r\n var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\r\n var skewX = o.skew && o.skew.length ? o.skew[0]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewX) ? o.skewX\r\n : 0\r\n var skewY = o.skew && o.skew.length ? o.skew[1]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewY) ? o.skewY\r\n : 0\r\n var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX\r\n : isFinite(o.scale) ? o.scale * flipX\r\n : isFinite(o.scaleX) ? o.scaleX * flipX\r\n : flipX\r\n var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY\r\n : isFinite(o.scale) ? o.scale * flipY\r\n : isFinite(o.scaleY) ? o.scaleY * flipY\r\n : flipY\r\n var shear = o.shear || 0\r\n var theta = o.rotate || o.theta || 0\r\n var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)\r\n var ox = origin.x\r\n var oy = origin.y\r\n var position = new Point(o.position || o.px || o.positionX, o.py || o.positionY)\r\n var px = position.x\r\n var py = position.y\r\n var translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY)\r\n var tx = translate.x\r\n var ty = translate.y\r\n var relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY)\r\n var rx = relative.x\r\n var ry = relative.y\r\n\r\n // Populate all of the values\r\n return {\r\n scaleX, scaleY, skewX, skewY, shear, theta, rx, ry, tx, ty, ox, oy, px, py\r\n }\r\n }\r\n\r\n // left matrix, right matrix, target matrix which is overwritten\r\n static matrixMultiply (l, r, o) {\r\n // Work out the product directly\r\n var a = l.a * r.a + l.c * r.b\r\n var b = l.b * r.a + l.d * r.b\r\n var c = l.a * r.c + l.c * r.d\r\n var d = l.b * r.c + l.d * r.d\r\n var e = l.e + l.a * r.e + l.c * r.f\r\n var f = l.f + l.b * r.e + l.d * r.f\r\n\r\n // make sure to use local variables because l/r and o could be the same\r\n o.a = a\r\n o.b = b\r\n o.c = c\r\n o.d = d\r\n o.e = e\r\n o.f = f\r\n\r\n return o\r\n }\r\n}\r\n\r\nexport function ctm () {\r\n return new Matrix(this.node.getCTM())\r\n}\r\n\r\nexport function screenCTM () {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if (typeof this.isRoot === 'function' && !this.isRoot()) {\r\n var rect = this.rect(1, 1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new Matrix(m)\r\n }\r\n return new Matrix(this.node.getScreenCTM())\r\n}\r\n","/* eslint no-new-func: \"off\" */\r\nexport const subClassArray = (function () {\r\n try {\r\n // try es6 subclassing\r\n return Function('name', 'baseClass', '_constructor', [\r\n 'baseClass = baseClass || Array',\r\n 'return {',\r\n ' [name]: class extends baseClass {',\r\n ' constructor (...args) {',\r\n ' super(...args)',\r\n ' _constructor && _constructor.apply(this, args)',\r\n ' }',\r\n ' }',\r\n '}[name]'\r\n ].join('\\n'))\r\n } catch (e) {\r\n // Use es5 approach\r\n return (name, baseClass = Array, _constructor) => {\r\n const Arr = function () {\r\n baseClass.apply(this, arguments)\r\n _constructor && _constructor.apply(this, arguments)\r\n }\r\n\r\n Arr.prototype = Object.create(baseClass.prototype)\r\n Arr.prototype.constructor = Arr\r\n\r\n Arr.prototype.map = function (fn) {\r\n const arr = new Arr()\r\n arr.push.apply(arr, Array.prototype.map.call(this, fn))\r\n return arr\r\n }\r\n\r\n return Arr\r\n }\r\n }\r\n})()\r\n","import { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst List = subClassArray('List', Array, function (arr = []) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...arr)\r\n})\r\n\r\nexport default List\r\n\r\nextend(List, {\r\n each (fnOrMethodName, ...args) {\r\n if (typeof fnOrMethodName === 'function') {\r\n this.forEach((el) => { fnOrMethodName.call(el, el) })\r\n } else {\r\n return this.map(el => { return el[fnOrMethodName](...args) })\r\n }\r\n\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n }\r\n})\r\n\r\nList.extend = function (methods) {\r\n methods = methods.reduce((obj, name) => {\r\n obj[name] = function (...attrs) {\r\n return this.each(name, ...attrs)\r\n }\r\n return obj\r\n }, {})\r\n\r\n extend(List, methods)\r\n}\r\n","import { adopt } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\nimport { map } from '../../utils/utils.js'\r\nimport List from '../../types/List.js'\r\n\r\nexport default function baseFind (query, parent) {\r\n return new List(map((parent || globals.document).querySelectorAll(query), function (node) {\r\n return adopt(node)\r\n }))\r\n}\r\n\r\n// Scoped find method\r\nexport function find (query) {\r\n return baseFind(query, this.node)\r\n}\r\n","import { dispatch, off, on } from '../modules/core/event.js'\r\nimport Base from './Base.js'\r\n\r\nexport default class EventTarget extends Base {\r\n constructor ({ events = {} } = {}) {\r\n super()\r\n this.events = events\r\n }\r\n\r\n addEventListener () {}\r\n\r\n dispatch (event, data) {\r\n return dispatch(this, event, data)\r\n }\r\n\r\n dispatchEvent (event) {\r\n const bag = this.getEventHolder().events\r\n if (!bag) return true\r\n\r\n const events = bag[event.type]\r\n\r\n for (let i in events) {\r\n for (let j in events[i]) {\r\n events[i][j](event)\r\n }\r\n }\r\n\r\n return !event.defaultPrevented\r\n }\r\n\r\n // Fire given event\r\n fire (event, data) {\r\n this.dispatch(event, data)\r\n return this\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n getEventTarget () {\r\n return this\r\n }\r\n\r\n // Unbind event from listener\r\n off (event, listener) {\r\n off(this, event, listener)\r\n return this\r\n }\r\n\r\n // Bind given event to listener\r\n on (event, listener, binding, options) {\r\n on(this, event, listener, binding, options)\r\n return this\r\n }\r\n\r\n removeEventListener () {}\r\n}\r\n","\r\nexport function noop () {}\r\n\r\n// Default animation values\r\nexport let timeline = {\r\n duration: 400,\r\n ease: '>',\r\n delay: 0\r\n}\r\n\r\n// Default attribute values\r\nexport let attrs = {\r\n\r\n // fill and stroke\r\n 'fill-opacity': 1,\r\n 'stroke-opacity': 1,\r\n 'stroke-width': 0,\r\n 'stroke-linejoin': 'miter',\r\n 'stroke-linecap': 'butt',\r\n fill: '#000000',\r\n stroke: '#000000',\r\n opacity: 1,\r\n\r\n // position\r\n x: 0,\r\n y: 0,\r\n cx: 0,\r\n cy: 0,\r\n\r\n // size\r\n width: 0,\r\n height: 0,\r\n\r\n // radius\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n\r\n // gradient\r\n offset: 0,\r\n 'stop-opacity': 1,\r\n 'stop-color': '#000000',\r\n\r\n // text\r\n 'font-size': 16,\r\n 'font-family': 'Helvetica, Arial, sans-serif',\r\n 'text-anchor': 'start'\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst SVGArray = subClassArray('SVGArray', Array, function (arr) {\r\n this.init(arr)\r\n})\r\n\r\nexport default SVGArray\r\n\r\nextend(SVGArray, {\r\n init (arr) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...this.parse(arr))\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n },\r\n\r\n toString () {\r\n return this.join(' ')\r\n },\r\n\r\n // Flattens the array if needed\r\n valueOf () {\r\n const ret = []\r\n ret.push(...this)\r\n return ret\r\n },\r\n\r\n // Parse whitespace separated string\r\n parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n },\r\n\r\n clone () {\r\n return new this.constructor(this)\r\n },\r\n\r\n toSet () {\r\n return new Set(this)\r\n }\r\n})\r\n","import { numberAndUnit } from '../modules/core/regex.js'\r\n\r\n// Module for unit convertions\r\nexport default class SVGNumber {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (value, unit) {\r\n unit = Array.isArray(value) ? value[1] : unit\r\n value = Array.isArray(value) ? value[0] : value\r\n\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n } else if (typeof value === 'string') {\r\n unit = value.match(numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] === '%') { this.value /= 100 } else if (unit[5] === 's') {\r\n this.value *= 1000\r\n }\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n } else {\r\n if (value instanceof SVGNumber) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n toString () {\r\n return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6\r\n : this.unit === 's' ? this.value / 1e3\r\n : this.value\r\n ) + this.unit\r\n }\r\n\r\n toJSON () {\r\n return this.toString()\r\n }\r\n\r\n toArray () {\r\n return [this.value, this.unit]\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n // Add number\r\n plus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this + number, this.unit || number.unit)\r\n }\r\n\r\n // Subtract number\r\n minus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this - number, this.unit || number.unit)\r\n }\r\n\r\n // Multiply number\r\n times (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this * number, this.unit || number.unit)\r\n }\r\n\r\n // Divide number\r\n divide (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this / number, this.unit || number.unit)\r\n }\r\n}\r\n","import { attrs as defaults } from './defaults.js'\r\nimport { isNumber } from './regex.js'\r\nimport Color from '../../types/Color.js'\r\nimport SVGArray from '../../types/SVGArray.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\nconst hooks = []\r\nexport function registerAttrHook (fn) {\r\n hooks.push(fn)\r\n}\r\n\r\n// Set svg element attribute\r\nexport default function attr (attr, val, ns) {\r\n // act as full getter\r\n if (attr == null) {\r\n // get an object of attributes\r\n attr = {}\r\n val = this.node.attributes\r\n\r\n for (let node of val) {\r\n attr[node.nodeName] = isNumber.test(node.nodeValue)\r\n ? parseFloat(node.nodeValue)\r\n : node.nodeValue\r\n }\r\n\r\n return attr\r\n } else if (attr instanceof Array) {\r\n // loop through array and get all values\r\n return attr.reduce((last, curr) => {\r\n last[curr] = this.attr(curr)\r\n return last\r\n }, {})\r\n } else if (typeof attr === 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (val in attr) this.attr(val, attr[val])\r\n } else if (val === null) {\r\n // remove value\r\n this.node.removeAttribute(attr)\r\n } else if (val == null) {\r\n // act as a getter if the first and only argument is not an object\r\n val = this.node.getAttribute(attr)\r\n return val == null ? defaults[attr]\r\n : isNumber.test(val) ? parseFloat(val)\r\n : val\r\n } else {\r\n // Loop through hooks and execute them to convert value\r\n val = hooks.reduce((_val, hook) => {\r\n return hook(attr, _val, this)\r\n }, val)\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof val === 'number') {\r\n val = new SVGNumber(val)\r\n } else if (Color.isColor(val)) {\r\n // ensure full hex color\r\n val = new Color(val)\r\n } else if (val.constructor === Array) {\r\n // Check for plain arrays and parse array values\r\n val = new SVGArray(val)\r\n }\r\n\r\n // if the passed attribute is leading...\r\n if (attr === 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading) {\r\n this.leading(val)\r\n }\r\n } else {\r\n // set given attribute on node\r\n typeof ns === 'string' ? this.node.setAttributeNS(ns, attr, val.toString())\r\n : this.node.setAttribute(attr, val.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\r\n this.rebuild()\r\n }\r\n }\r\n\r\n return this\r\n}\r\n","import {\r\n adopt,\r\n assignNewId,\r\n eid,\r\n extend,\r\n makeInstance,\r\n makeNode,\r\n register\r\n} from '../utils/adopter.js'\r\nimport { find } from '../modules/core/selector.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { map } from '../utils/utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport List from '../types/List.js'\r\nimport attr from '../modules/core/attr.js'\r\n\r\nexport default class Dom extends EventTarget {\r\n constructor (node, attrs) {\r\n super(node)\r\n this.node = node\r\n this.type = node.nodeName\r\n\r\n if (attrs && node !== attrs) {\r\n this.attr(attrs)\r\n }\r\n }\r\n\r\n // Add given element at a position\r\n add (element, i) {\r\n element = makeInstance(element)\r\n\r\n if (i == null) {\r\n this.node.appendChild(element.node)\r\n } else if (element.node !== this.node.childNodes[i]) {\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Add element to given container and return self\r\n addTo (parent) {\r\n return makeInstance(parent).put(this)\r\n }\r\n\r\n // Returns all child elements\r\n children () {\r\n return new List(map(this.node.children, function (node) {\r\n return adopt(node)\r\n }))\r\n }\r\n\r\n // Remove all elements in this container\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n\r\n // Clone element\r\n clone () {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n return assignNewId(this.node.cloneNode(true))\r\n }\r\n\r\n // Iterates over all children and invokes a given block\r\n each (block, deep) {\r\n var children = this.children()\r\n var i, il\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n block.apply(children[i], [i, children])\r\n\r\n if (deep) {\r\n children[i].each(block, deep)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n element (nodeName) {\r\n return this.put(new Dom(makeNode(nodeName)))\r\n }\r\n\r\n // Get first child\r\n first () {\r\n return adopt(this.node.firstChild)\r\n }\r\n\r\n // Get a element at the given index\r\n get (i) {\r\n return adopt(this.node.childNodes[i])\r\n }\r\n\r\n getEventHolder () {\r\n return this.node\r\n }\r\n\r\n getEventTarget () {\r\n return this.node\r\n }\r\n\r\n // Checks if the given element is a child\r\n has (element) {\r\n return this.index(element) >= 0\r\n }\r\n\r\n // Get / set id\r\n id (id) {\r\n // generate new id if no id set\r\n if (typeof id === 'undefined' && !this.node.id) {\r\n this.node.id = eid(this.type)\r\n }\r\n\r\n // dont't set directly width this.node.id to make `null` work correctly\r\n return this.attr('id', id)\r\n }\r\n\r\n // Gets index of given element\r\n index (element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n\r\n // Get the last child\r\n last () {\r\n return adopt(this.node.lastChild)\r\n }\r\n\r\n // matches the element vs a css selector\r\n matches (selector) {\r\n const el = this.node\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector)\r\n }\r\n\r\n // Returns the parent element instance\r\n parent (type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if (!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = adopt(parent.node.parentNode)\r\n\r\n if (!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while (parent && parent.node instanceof globals.window.SVGElement) { // FIXME: That shouldnt be neccessary\r\n if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n parent = adopt(parent.node.parentNode)\r\n }\r\n }\r\n\r\n // Basically does the same as `add()` but returns the added element instead\r\n put (element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n\r\n // Add element to given container and return container\r\n putIn (parent) {\r\n return makeInstance(parent).add(this)\r\n }\r\n\r\n // Remove element\r\n remove () {\r\n if (this.parent()) {\r\n this.parent().removeElement(this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Remove a given child\r\n removeElement (element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n\r\n // Replace this with element\r\n replace (element) {\r\n element = makeInstance(element)\r\n this.node.parentNode.replaceChild(element.node, this.node)\r\n return element\r\n }\r\n\r\n round (precision = 2, map) {\r\n const factor = 10 ** precision\r\n const attrs = this.attr()\r\n\r\n // If we have no map, build one from attrs\r\n if (!map) {\r\n map = Object.keys(attrs)\r\n }\r\n\r\n // Holds rounded attributes\r\n const newAttrs = {}\r\n map.forEach((key) => {\r\n newAttrs[key] = Math.round(attrs[key] * factor) / factor\r\n })\r\n\r\n this.attr(newAttrs)\r\n return this\r\n }\r\n\r\n // Return id on string conversion\r\n toString () {\r\n return this.id()\r\n }\r\n\r\n // Import raw svg\r\n svg (svgOrFn, outerHTML) {\r\n var well, len, fragment\r\n\r\n if (svgOrFn === false) {\r\n outerHTML = false\r\n svgOrFn = null\r\n }\r\n\r\n // act as getter if no svg string is given\r\n if (svgOrFn == null || typeof svgOrFn === 'function') {\r\n // The default for exports is, that the outerNode is included\r\n outerHTML = outerHTML == null ? true : outerHTML\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n let current = this\r\n\r\n // An export modifier was passed\r\n if (svgOrFn != null) {\r\n current = adopt(current.node.cloneNode(true))\r\n\r\n // If the user wants outerHTML we need to process this node, too\r\n if (outerHTML) {\r\n let result = svgOrFn(current)\r\n current = result || current\r\n\r\n // The user does not want this node? Well, then he gets nothing\r\n if (result === false) return ''\r\n }\r\n\r\n // Deep loop through all children and apply modifier\r\n current.each(function () {\r\n let result = svgOrFn(this)\r\n let _this = result || this\r\n\r\n // If modifier returns false, discard node\r\n if (result === false) {\r\n this.remove()\r\n\r\n // If modifier returns new node, use it\r\n } else if (result && this !== _this) {\r\n this.replace(_this)\r\n }\r\n }, true)\r\n }\r\n\r\n // Return outer or inner content\r\n return outerHTML\r\n ? current.node.outerHTML\r\n : current.node.innerHTML\r\n }\r\n\r\n // Act as setter if we got a string\r\n\r\n // The default for import is, that the current node is not replaced\r\n outerHTML = outerHTML == null ? false : outerHTML\r\n\r\n // Create temporary holder\r\n well = globals.document.createElementNS(ns, 'svg')\r\n fragment = globals.document.createDocumentFragment()\r\n\r\n // Dump raw svg\r\n well.innerHTML = svgOrFn\r\n\r\n // Transplant nodes into the fragment\r\n for (len = well.children.length; len--;) {\r\n fragment.appendChild(well.firstElementChild)\r\n }\r\n\r\n let parent = this.parent()\r\n\r\n // Add the whole fragment at once\r\n return outerHTML\r\n ? this.replace(fragment) && parent\r\n : this.add(fragment)\r\n }\r\n\r\n words (text) {\r\n // This is faster than removing all children and adding a new one\r\n this.node.textContent = text\r\n return this\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // dump variables recursively\r\n this.each(function () {\r\n this.writeDataToDom()\r\n })\r\n\r\n return this\r\n }\r\n}\r\n\r\nextend(Dom, { attr, find })\r\nregister(Dom)\r\n","import { bbox, rbox } from '../types/Box.js'\r\nimport { ctm, screenCTM } from '../types/Matrix.js'\r\nimport {\r\n extend,\r\n getClass,\r\n makeInstance,\r\n register,\r\n root\r\n} from '../utils/adopter.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { point } from '../types/Point.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { reference } from '../modules/core/regex.js'\r\nimport Dom from './Dom.js'\r\nimport List from '../types/List.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nconst Svg = getClass(root)\r\n\r\nexport default class Element extends Dom {\r\n constructor (node, attrs) {\r\n super(node, attrs)\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n this.node.instance = this\r\n\r\n if (node.hasAttribute('svgjs:data')) {\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n this.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n }\r\n }\r\n\r\n // Move element by its center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n\r\n // Move by center over x-axis\r\n cx (x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n\r\n // Move by center over y-axis\r\n cy (y) {\r\n return y == null\r\n ? this.y() + this.height() / 2\r\n : this.y(y - this.height() / 2)\r\n }\r\n\r\n // Get defs\r\n defs () {\r\n return this.root().defs()\r\n }\r\n\r\n // Get parent document\r\n root () {\r\n let p = this.parent(Svg)\r\n return p && p.root()\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('height', height)\r\n }\r\n\r\n // Checks whether the given point inside the bounding box of the element\r\n inside (x, y) {\r\n let box = this.bbox()\r\n\r\n return x > box.x &&\r\n y > box.y &&\r\n x < box.x + box.width &&\r\n y < box.y + box.height\r\n }\r\n\r\n // Move element to given x and y values\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n }\r\n\r\n // return array of all ancestors of given type up to the root svg\r\n parents (until = globals.document) {\r\n until = makeInstance(until)\r\n let parents = new List()\r\n let parent = this\r\n\r\n while (\r\n (parent = parent.parent()) &&\r\n parent.node !== until.node &&\r\n parent.node !== globals.document\r\n ) {\r\n parents.push(parent)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Get referenced element form attribute value\r\n reference (attr) {\r\n attr = this.attr(attr)\r\n if (!attr) return null\r\n\r\n const m = attr.match(reference)\r\n return m ? makeInstance(m[1]) : null\r\n }\r\n\r\n // set given data to the elements data property\r\n setData (o) {\r\n this.dom = o\r\n return this\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVGNumber(p.width))\r\n .height(new SVGNumber(p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('width', width)\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if (Object.keys(this.dom).length) {\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n }\r\n\r\n return super.writeDataToDom()\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n return this.attr('y', y)\r\n }\r\n}\r\n\r\nextend(Element, {\r\n bbox, rbox, point, ctm, screenCTM\r\n})\r\n\r\nregister(Element)\r\n","import { on, off } from '../core/event.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Color from '../../types/Color.js'\r\nimport Element from '../../elements/Element.js'\r\nimport Matrix from '../../types/Matrix.js'\r\nimport Point from '../../types/Point.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'],\r\n fill: ['color', 'opacity', 'rule'],\r\n prefix: function (t, a) {\r\n return a === 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;['fill', 'stroke'].forEach(function (m) {\r\n var extension = {}\r\n var i\r\n\r\n extension[m] = function (o) {\r\n if (typeof o === 'undefined') {\r\n return this.attr(m)\r\n }\r\n if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) {\r\n this.attr(m, o)\r\n } else {\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--) {\r\n if (o[sugar[m][i]] != null) {\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n }\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n registerMethods(['Shape', 'Runner'], extension)\r\n})\r\n\r\nregisterMethods(['Element', 'Runner'], {\r\n // Let the user set the matrix directly\r\n matrix: function (mat, b, c, d, e, f) {\r\n // Act as a getter\r\n if (mat == null) {\r\n return new Matrix(this)\r\n }\r\n\r\n // Act as a setter, the user can pass a matrix or a set of numbers\r\n return this.attr('transform', new Matrix(mat, b, c, d, e, f))\r\n },\r\n\r\n // Map rotation to transform\r\n rotate: function (angle, cx, cy) {\r\n return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map skew to transform\r\n skew: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ skew: x, ox: y, oy: cx }, true)\r\n : this.transform({ skew: [x, y], ox: cx, oy: cy }, true)\r\n },\r\n\r\n shear: function (lam, cx, cy) {\r\n return this.transform({ shear: lam, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map scale to transform\r\n scale: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ scale: x, ox: y, oy: cx }, true)\r\n : this.transform({ scale: [x, y], ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map translate to transform\r\n translate: function (x, y) {\r\n return this.transform({ translate: [x, y] }, true)\r\n },\r\n\r\n // Map relative translations to transform\r\n relative: function (x, y) {\r\n return this.transform({ relative: [x, y] }, true)\r\n },\r\n\r\n // Map flip to transform\r\n flip: function (direction, around) {\r\n var directionString = typeof direction === 'string' ? direction\r\n : isFinite(direction) ? 'both'\r\n : 'both'\r\n var origin = (direction === 'both' && isFinite(around)) ? [around, around]\r\n : (direction === 'x') ? [around, 0]\r\n : (direction === 'y') ? [0, around]\r\n : isFinite(direction) ? [direction, direction]\r\n : [0, 0]\r\n this.transform({ flip: directionString, origin: origin }, true)\r\n },\r\n\r\n // Opacity\r\n opacity: function (value) {\r\n return this.attr('opacity', value)\r\n },\r\n\r\n // Relative move over x and y axes\r\n dmove: function (x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nregisterMethods('Element', {\r\n // Relative move over x axis\r\n dx: function (x) {\r\n return this.x(new SVGNumber(x).plus(this.x()))\r\n },\r\n\r\n // Relative move over y axis\r\n dy: function (y) {\r\n return this.y(new SVGNumber(y).plus(this.y()))\r\n }\r\n})\r\n\r\nregisterMethods('radius', {\r\n // Add x and y radius\r\n radius: function (x, y) {\r\n var type = (this._element || this).type\r\n return type === 'radialGradient' || type === 'radialGradient'\r\n ? this.attr('r', new SVGNumber(x))\r\n : this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nregisterMethods('Path', {\r\n // Get path length\r\n length: function () {\r\n return this.node.getTotalLength()\r\n },\r\n // Get point at length\r\n pointAt: function (length) {\r\n return new Point(this.node.getPointAtLength(length))\r\n }\r\n})\r\n\r\nregisterMethods(['Element', 'Runner'], {\r\n // Set font\r\n font: function (a, v) {\r\n if (typeof a === 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a === 'leading'\r\n ? this.leading(v)\r\n : a === 'anchor'\r\n ? this.attr('text-anchor', v)\r\n : a === 'size' || a === 'family' || a === 'weight' || a === 'stretch' || a === 'variant' || a === 'style'\r\n ? this.attr('font-' + a, v)\r\n : this.attr(a, v)\r\n }\r\n})\r\n\r\nregisterMethods('Text', {\r\n ax (x) {\r\n return this.attr('x', x)\r\n },\r\n ay (y) {\r\n return this.attr('y', y)\r\n },\r\n amove (x, y) {\r\n return this.ax(x).ay(y)\r\n }\r\n})\r\n\r\n// Add events to elements\r\nconst methods = [ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].reduce(function (last, event) {\r\n // add event to Element\r\n const fn = function (f) {\r\n if (f === null) {\r\n off(this, event)\r\n } else {\r\n on(this, event, f)\r\n }\r\n return this\r\n }\r\n\r\n last[event] = fn\r\n return last\r\n}, {})\r\n\r\nregisterMethods('Element', methods)\r\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import { getOrigin } from '../../utils/utils.js'\r\nimport { delimiter, transforms } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Matrix from '../../types/Matrix.js'\r\n\r\n// Reset all transformations\r\nexport function untransform () {\r\n return this.attr('transform', null)\r\n}\r\n\r\n// merge the whole transformation chain into one matrix and returns it\r\nexport function matrixify () {\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(transforms).slice(0, -1).map(function (str) {\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [kv[0],\r\n kv[1].split(delimiter)\r\n .map(function (str) { return parseFloat(str) })\r\n ]\r\n })\r\n .reverse()\r\n // merge every transformation into one matrix\r\n .reduce(function (matrix, transform) {\r\n if (transform[0] === 'matrix') {\r\n return matrix.lmultiply(Matrix.fromArray(transform[1]))\r\n }\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n }, new Matrix())\r\n\r\n return matrix\r\n}\r\n\r\n// add an element to another parent without changing the visual representation on the screen\r\nexport function toParent (parent) {\r\n if (this === parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n}\r\n\r\n// same as above with parent equals root-svg\r\nexport function toRoot () {\r\n return this.toParent(this.root())\r\n}\r\n\r\n// Add transformations\r\nexport function transform (o, relative) {\r\n // Act as a getter if no object was passed\r\n if (o == null || typeof o === 'string') {\r\n var decomposed = new Matrix(this).decompose()\r\n return decomposed[o] || decomposed\r\n }\r\n\r\n if (!Matrix.isMatrixLike(o)) {\r\n // Set the origin according to the defined transform\r\n o = { ...o, origin: getOrigin(o, this) }\r\n }\r\n\r\n // The user can pass a boolean, an Element or an Matrix or nothing\r\n var cleanRelative = relative === true ? this : (relative || false)\r\n var result = new Matrix(cleanRelative).transform(o)\r\n return this.attr('transform', result)\r\n}\r\n\r\nregisterMethods('Element', {\r\n untransform, matrixify, toParent, toRoot, transform\r\n})\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Radius x value\r\nexport function rx (rx) {\r\n return this.attr('rx', rx)\r\n}\r\n\r\n// Radius y value\r\nexport function ry (ry) {\r\n return this.attr('ry', ry)\r\n}\r\n\r\n// Move over x-axis\r\nexport function x (x) {\r\n return x == null\r\n ? this.cx() - this.rx()\r\n : this.cx(x + this.rx())\r\n}\r\n\r\n// Move over y-axis\r\nexport function y (y) {\r\n return y == null\r\n ? this.cy() - this.ry()\r\n : this.cy(y + this.ry())\r\n}\r\n\r\n// Move by center over x-axis\r\nexport function cx (x) {\r\n return x == null\r\n ? this.attr('cx')\r\n : this.attr('cx', x)\r\n}\r\n\r\n// Move by center over y-axis\r\nexport function cy (y) {\r\n return y == null\r\n ? this.attr('cy')\r\n : this.attr('cy', y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n return width == null\r\n ? this.rx() * 2\r\n : this.rx(new SVGNumber(width).divide(2))\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Shape extends Element {}\r\n\r\nregister(Shape)\r\n","import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\r\nimport {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Circle extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('circle', node), node)\r\n }\r\n\r\n radius (r) {\r\n return this.attr('r', r)\r\n }\r\n\r\n // Radius x value\r\n rx (rx) {\r\n return this.attr('r', rx)\r\n }\r\n\r\n // Alias radius x value\r\n ry (ry) {\r\n return this.rx(ry)\r\n }\r\n\r\n size (size) {\r\n return this.radius(new SVGNumber(size).divide(2))\r\n }\r\n}\r\n\r\nextend(Circle, { x, y, cx, cy, width, height })\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create circle element\r\n circle: wrapWithAttrCheck(function (size) {\r\n return this.put(new Circle())\r\n .size(size)\r\n .move(0, 0)\r\n })\r\n }\r\n})\r\n\r\nregister(Circle)\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Container extends Element {\r\n flatten (parent) {\r\n this.each(function () {\r\n if (this instanceof Container) return this.flatten(parent).ungroup(parent)\r\n return this.toParent(parent)\r\n })\r\n\r\n // we need this so that the root does not get removed\r\n this.node.firstElementChild || this.remove()\r\n\r\n return this\r\n }\r\n\r\n ungroup (parent) {\r\n parent = parent || this.parent()\r\n\r\n this.each(function () {\r\n return this.toParent(parent)\r\n })\r\n\r\n this.remove()\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Container)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Defs extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('defs', node), node)\r\n }\r\n\r\n flatten () { return this }\r\n ungroup () { return this }\r\n}\r\n\r\nregister(Defs)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport * as circled from '../modules/core/circled.js'\r\n\r\nexport default class Ellipse extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('ellipse', node), node)\r\n }\r\n\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVGNumber(p.width).divide(2))\r\n .ry(new SVGNumber(p.height).divide(2))\r\n }\r\n}\r\n\r\nextend(Ellipse, circled)\r\n\r\nregisterMethods('Container', {\r\n // Create an ellipse\r\n ellipse: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Ellipse()).size(width, height).move(0, 0)\r\n })\r\n})\r\n\r\nregister(Ellipse)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Stop extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('stop', node), node)\r\n }\r\n\r\n // add color stops\r\n update (o) {\r\n if (typeof o === 'number' || o instanceof SVGNumber) {\r\n o = {\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Stop)\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\nexport function from (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\r\n : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\r\n}\r\n\r\nexport function to (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\r\n : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport Stop from './Stop.js'\r\nimport baseFind from '../modules/core/selector.js'\r\nimport * as gradiented from '../modules/core/gradiented.js'\r\n\r\nexport default class Gradient extends Container {\r\n constructor (type, attrs) {\r\n super(\r\n nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\r\n attrs\r\n )\r\n }\r\n\r\n // Add a color stop\r\n stop (offset, color, opacity) {\r\n return this.put(new Stop()).update(offset, color, opacity)\r\n }\r\n\r\n // Update gradient\r\n update (block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'gradientTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nextend(Gradient, gradiented)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create gradient element in defs\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.defs().gradient(type, block)\r\n })\r\n },\r\n // define gradient\r\n Defs: {\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.put(new Gradient(type)).update(block)\r\n })\r\n }\r\n})\r\n\r\nregister(Gradient)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Pattern extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('pattern', node), node)\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Update pattern by rebuilding\r\n update (block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'patternTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create pattern element in defs\r\n pattern (...args) {\r\n return this.defs().pattern(...args)\r\n }\r\n },\r\n Defs: {\r\n pattern: wrapWithAttrCheck(function (width, height, block) {\r\n return this.put(new Pattern()).update(block).attr({\r\n x: 0,\r\n y: 0,\r\n width: width,\r\n height: height,\r\n patternUnits: 'userSpaceOnUse'\r\n })\r\n })\r\n }\r\n})\r\n\r\nregister(Pattern)\r\n","import { isImage } from '../modules/core/regex.js'\r\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { off, on } from '../modules/core/event.js'\r\nimport { registerAttrHook } from '../modules/core/attr.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Pattern from './Pattern.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Image extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('image', node), node)\r\n }\r\n\r\n // (re)load image\r\n load (url, callback) {\r\n if (!url) return this\r\n\r\n var img = new globals.window.Image()\r\n\r\n on(img, 'load', function (e) {\r\n var p = this.parent(Pattern)\r\n\r\n // ensure image size\r\n if (this.width() === 0 && this.height() === 0) {\r\n this.size(img.width, img.height)\r\n }\r\n\r\n if (p instanceof Pattern) {\r\n // ensure pattern size if not set\r\n if (p.width() === 0 && p.height() === 0) {\r\n p.size(this.width(), this.height())\r\n }\r\n }\r\n\r\n if (typeof callback === 'function') {\r\n callback.call(this, e)\r\n }\r\n }, this)\r\n\r\n on(img, 'load error', function () {\r\n // dont forget to unbind memory leaking events\r\n off(img)\r\n })\r\n\r\n return this.attr('href', (img.src = url), xlink)\r\n }\r\n}\r\n\r\nregisterAttrHook(function (attr, val, _this) {\r\n // convert image fill and stroke to patterns\r\n if (attr === 'fill' || attr === 'stroke') {\r\n if (isImage.test(val)) {\r\n val = _this.root().defs().image(val)\r\n }\r\n }\r\n\r\n if (val instanceof Image) {\r\n val = _this.root().defs().pattern(0, 0, (pattern) => {\r\n pattern.add(val)\r\n })\r\n }\r\n\r\n return val\r\n})\r\n\r\nregisterMethods({\r\n Container: {\r\n // create image element, load image and set its size\r\n image: wrapWithAttrCheck(function (source, callback) {\r\n return this.put(new Image()).size(0, 0).load(source, callback)\r\n })\r\n }\r\n})\r\n\r\nregister(Image)\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport SVGArray from './SVGArray.js'\r\n\r\nconst PointArray = subClassArray('PointArray', SVGArray)\r\n\r\nexport default PointArray\r\n\r\nextend(PointArray, {\r\n // Convert array to string\r\n toString () {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push(this[i].join(','))\r\n }\r\n\r\n return array.join(' ')\r\n },\r\n\r\n // Convert array to line object\r\n toLine () {\r\n return {\r\n x1: this[0][0],\r\n y1: this[0][1],\r\n x2: this[1][0],\r\n y2: this[1][1]\r\n }\r\n },\r\n\r\n // Get morphed array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push([\r\n this[i][0] + (this.destination[i][0] - this[i][0]) * pos,\r\n this[i][1] + (this.destination[i][1] - this[i][1]) * pos\r\n ])\r\n }\r\n\r\n return new PointArray(array)\r\n },\r\n\r\n // Parse point string and flat array\r\n parse (array = [[0, 0]]) {\r\n var points = []\r\n\r\n // if it is an array\r\n if (array instanceof Array) {\r\n // and it is not flat, there is no need to parse it\r\n if (array[0] instanceof Array) {\r\n return array\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for (var i = 0, len = array.length; i < len; i = i + 2) {\r\n points.push([ array[i], array[i + 1] ])\r\n }\r\n\r\n return points\r\n },\r\n\r\n // Move point string\r\n move (x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y)) {\r\n for (var i = this.length - 1; i >= 0; i--) {\r\n this[i] = [this[i][0] + x, this[i][1] + y]\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize poly string\r\n size (width, height) {\r\n var i\r\n var box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n if (box.width) this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\r\n if (box.height) this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get bounding box of points\r\n bbox () {\r\n var maxX = -Infinity\r\n var maxY = -Infinity\r\n var minX = Infinity\r\n var minY = Infinity\r\n this.forEach(function (el) {\r\n maxX = Math.max(el[0], maxX)\r\n maxY = Math.max(el[1], maxY)\r\n minX = Math.min(el[0], minX)\r\n minY = Math.min(el[1], minY)\r\n })\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\r\n }\r\n})\r\n","import PointArray from '../../types/PointArray.js'\r\n\r\nexport let MorphArray = PointArray\r\n\r\n// Move by left top corner over x-axis\r\nexport function x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n}\r\n\r\n// Move by left top corner over y-axis\r\nexport function y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n let b = this.bbox()\r\n return width == null ? b.width : this.size(width, b.height)\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n let b = this.bbox()\r\n return height == null ? b.height : this.size(b.width, height)\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\n\r\nexport default class Line extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('line', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return new PointArray([\r\n [ this.attr('x1'), this.attr('y1') ],\r\n [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n\r\n // Overwrite native plot() method\r\n plot (x1, y1, x2, y2) {\r\n if (x1 == null) {\r\n return this.array()\r\n } else if (typeof y1 !== 'undefined') {\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n } else {\r\n x1 = new PointArray(x1).toLine()\r\n }\r\n\r\n return this.attr(x1)\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n}\r\n\r\nextend(Line, pointed)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a line element\r\n line: wrapWithAttrCheck(function (...args) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a PointArray\r\n return Line.prototype.plot.apply(\r\n this.put(new Line())\r\n , args[0] != null ? args : [0, 0, 0, 0]\r\n )\r\n })\r\n }\r\n})\r\n\r\nregister(Line)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Marker extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('marker', node), node)\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n\r\n // Set marker refX and refY\r\n ref (x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n\r\n // Update marker\r\n update (block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') { block.call(this, this) }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n toString () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n marker (...args) {\r\n // Create marker element in defs\r\n return this.defs().marker(...args)\r\n }\r\n },\r\n Defs: {\r\n // Create marker\r\n marker: wrapWithAttrCheck(function (width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new Marker())\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n })\r\n },\r\n marker: {\r\n // Create and attach markers\r\n marker (marker, width, height, block) {\r\n var attr = ['marker']\r\n\r\n // Build attribute name\r\n if (marker !== 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof Marker\r\n ? arguments[1]\r\n : this.defs().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n }\r\n})\r\n\r\nregister(Marker)\r\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import { timeline } from '../modules/core/defaults.js'\r\nimport { extend } from '../utils/adopter.js'\r\n\r\n/***\r\nBase Class\r\n==========\r\nThe base stepper class that will be\r\n***/\r\n\r\nfunction makeSetterGetter (k, f) {\r\n return function (v) {\r\n if (v == null) return this[v]\r\n this[k] = v\r\n if (f) f.call(this)\r\n return this\r\n }\r\n}\r\n\r\nexport let easing = {\r\n '-': function (pos) { return pos },\r\n '<>': function (pos) { return -Math.cos(pos * Math.PI) / 2 + 0.5 },\r\n '>': function (pos) { return Math.sin(pos * Math.PI / 2) },\r\n '<': function (pos) { return -Math.cos(pos * Math.PI / 2) + 1 },\r\n bezier: function (x1, y1, x2, y2) {\r\n // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\r\n return function (t) {\r\n if (t < 0) {\r\n if (x1 > 0) {\r\n return y1 / x1 * t\r\n } else if (x2 > 0) {\r\n return y2 / x2 * t\r\n } else {\r\n return 0\r\n }\r\n } else if (t > 1) {\r\n if (x2 < 1) {\r\n return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2)\r\n } else if (x1 < 1) {\r\n return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1)\r\n } else {\r\n return 1\r\n }\r\n } else {\r\n return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\r\n }\r\n }\r\n },\r\n // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\r\n steps: function (steps, stepPosition = 'end') {\r\n // deal with \"jump-\" prefix\r\n stepPosition = stepPosition.split('-').reverse()[0]\r\n\r\n let jumps = steps\r\n if (stepPosition === 'none') {\r\n --jumps\r\n } else if (stepPosition === 'both') {\r\n ++jumps\r\n }\r\n\r\n // The beforeFlag is essentially useless\r\n return (t, beforeFlag = false) => {\r\n // Step is called currentStep in referenced url\r\n let step = Math.floor(t * steps)\r\n const jumping = (t * step) % 1 === 0\r\n\r\n if (stepPosition === 'start' || stepPosition === 'both') {\r\n ++step\r\n }\r\n\r\n if (beforeFlag && jumping) {\r\n --step\r\n }\r\n\r\n if (t >= 0 && step < 0) {\r\n step = 0\r\n }\r\n\r\n if (t <= 1 && step > jumps) {\r\n step = jumps\r\n }\r\n\r\n return step / jumps\r\n }\r\n }\r\n}\r\n\r\nexport class Stepper {\r\n done () { return false }\r\n}\r\n\r\n/***\r\nEasing Functions\r\n================\r\n***/\r\n\r\nexport class Ease extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.ease = easing[fn || timeline.ease] || fn\r\n }\r\n\r\n step (from, to, pos) {\r\n if (typeof from !== 'number') {\r\n return pos < 1 ? from : to\r\n }\r\n return from + (to - from) * this.ease(pos)\r\n }\r\n}\r\n\r\n/***\r\nController Types\r\n================\r\n***/\r\n\r\nexport class Controller extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.stepper = fn\r\n }\r\n\r\n step (current, target, dt, c) {\r\n return this.stepper(current, target, dt, c)\r\n }\r\n\r\n done (c) {\r\n return c.done\r\n }\r\n}\r\n\r\nfunction recalculate () {\r\n // Apply the default parameters\r\n var duration = (this._duration || 500) / 1000\r\n var overshoot = this._overshoot || 0\r\n\r\n // Calculate the PID natural response\r\n var eps = 1e-10\r\n var pi = Math.PI\r\n var os = Math.log(overshoot / 100 + eps)\r\n var zeta = -os / Math.sqrt(pi * pi + os * os)\r\n var wn = 3.9 / (zeta * duration)\r\n\r\n // Calculate the Spring values\r\n this.d = 2 * zeta * wn\r\n this.k = wn * wn\r\n}\r\n\r\nexport class Spring extends Controller {\r\n constructor (duration, overshoot) {\r\n super()\r\n this.duration(duration || 500)\r\n .overshoot(overshoot || 0)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n if (dt > 100) dt = 16\r\n\r\n dt /= 1000\r\n\r\n // Get the previous velocity\r\n var velocity = c.velocity || 0\r\n\r\n // Apply the control to get the new position and store it\r\n var acceleration = -this.d * velocity - this.k * (current - target)\r\n var newPosition = current +\r\n velocity * dt +\r\n acceleration * dt * dt / 2\r\n\r\n // Store the velocity\r\n c.velocity = velocity + acceleration * dt\r\n\r\n // Figure out if we have converged, and if so, pass the value\r\n c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\r\n return c.done ? target : newPosition\r\n }\r\n}\r\n\r\nextend(Spring, {\r\n duration: makeSetterGetter('_duration', recalculate),\r\n overshoot: makeSetterGetter('_overshoot', recalculate)\r\n})\r\n\r\nexport class PID extends Controller {\r\n constructor (p, i, d, windup) {\r\n super()\r\n\r\n p = p == null ? 0.1 : p\r\n i = i == null ? 0.01 : i\r\n d = d == null ? 0 : d\r\n windup = windup == null ? 1000 : windup\r\n this.p(p).i(i).d(d).windup(windup)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n var p = target - current\r\n var i = (c.integral || 0) + p * dt\r\n var d = (p - (c.error || 0)) / dt\r\n var windup = this.windup\r\n\r\n // antiwindup\r\n if (windup !== false) {\r\n i = Math.max(-windup, Math.min(i, windup))\r\n }\r\n\r\n c.error = p\r\n c.integral = i\r\n\r\n c.done = Math.abs(p) < 0.001\r\n\r\n return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\r\n }\r\n}\r\n\r\nextend(PID, {\r\n windup: makeSetterGetter('windup'),\r\n p: makeSetterGetter('P'),\r\n i: makeSetterGetter('I'),\r\n d: makeSetterGetter('D')\r\n})\r\n","import {\r\n delimiter,\r\n dots,\r\n hyphen,\r\n isPathLetter,\r\n numbersWithDots,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport Point from './Point.js'\r\nimport SVGArray from './SVGArray.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nconst PathArray = subClassArray('PathArray', SVGArray)\r\n\r\nexport default PathArray\r\n\r\nexport function pathRegReplace (a, b, c, d) {\r\n return c + d.replace(dots, ' .')\r\n}\r\n\r\nfunction arrayToString (a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\nconst pathHandlers = {\r\n M: function (c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return ['M', p.x, p.y]\r\n },\r\n L: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['L', c[0], c[1]]\r\n },\r\n H: function (c, p) {\r\n p.x = c[0]\r\n return ['H', c[0]]\r\n },\r\n V: function (c, p) {\r\n p.y = c[0]\r\n return ['V', c[0]]\r\n },\r\n C: function (c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]\r\n },\r\n S: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['S', c[0], c[1], c[2], c[3]]\r\n },\r\n Q: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['Q', c[0], c[1], c[2], c[3]]\r\n },\r\n T: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['T', c[0], c[1]]\r\n },\r\n Z: function (c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return ['Z']\r\n },\r\n A: function (c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]\r\n }\r\n}\r\n\r\nlet mlhvqtcsaz = 'mlhvqtcsaz'.split('')\r\n\r\nfor (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\r\n pathHandlers[mlhvqtcsaz[i]] = (function (i) {\r\n return function (c, p, p0) {\r\n if (i === 'H') c[0] = c[0] + p.x\r\n else if (i === 'V') c[0] = c[0] + p.y\r\n else if (i === 'A') {\r\n c[5] = c[5] + p.x\r\n c[6] = c[6] + p.y\r\n } else {\r\n for (var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j % 2 ? p.y : p.x)\r\n }\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsaz[i].toUpperCase())\r\n}\r\n\r\nextend(PathArray, {\r\n // Convert array to string\r\n toString () {\r\n return arrayToString(this)\r\n },\r\n\r\n // Move path string\r\n move (x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n } else if (l === 'H') {\r\n this[i][1] += x\r\n } else if (l === 'V') {\r\n this[i][1] += y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n this[i][3] += x\r\n this[i][4] += y\r\n\r\n if (l === 'C') {\r\n this[i][5] += x\r\n this[i][6] += y\r\n }\r\n } else if (l === 'A') {\r\n this[i][6] += x\r\n this[i][7] += y\r\n }\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize path string\r\n size (width, height) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n var i, l\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n } else if (l === 'H') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n } else if (l === 'V') {\r\n this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\r\n this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l === 'C') {\r\n this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\r\n this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n } else if (l === 'A') {\r\n // resize radii\r\n this[i][1] = (this[i][1] * width) / box.width\r\n this[i][2] = (this[i][2] * height) / box.height\r\n\r\n // move position values\r\n this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\r\n this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Test if the passed path array use the same path data commands as this path array\r\n equalCommands (pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new PathArray(pathArray)\r\n\r\n equalCommands = this.length === pathArray.length\r\n for (i = 0, il = this.length; equalCommands && i < il; i++) {\r\n equalCommands = this[i][0] === pathArray[i][0]\r\n }\r\n\r\n return equalCommands\r\n },\r\n\r\n // Make path array morphable\r\n morph (pathArray) {\r\n pathArray = new PathArray(pathArray)\r\n\r\n if (this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get morphed path array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this\r\n var destinationArray = this.destination.value\r\n var array = []\r\n var pathArray = new PathArray()\r\n var i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [sourceArray[i][0]]\r\n for (j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if (array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] !== 0)\r\n array[i][5] = +(array[i][5] !== 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n },\r\n\r\n // Absolutize and parse path to array\r\n parse (array = [['M', 0, 0]]) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof PathArray) return array\r\n\r\n // prepare for parsing\r\n var s\r\n var paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 }\r\n\r\n if (typeof array === 'string') {\r\n array = array\r\n .replace(numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(delimiter) // split into array\r\n } else {\r\n array = array.reduce(function (prev, curr) {\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var result = []\r\n var p = new Point()\r\n var p0 = new Point()\r\n var index = 0\r\n var len = array.length\r\n\r\n do {\r\n // Test if we have a path letter\r\n if (isPathLetter.test(array[index])) {\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n } else if (s === 'M') {\r\n s = 'L'\r\n } else if (s === 'm') {\r\n s = 'l'\r\n }\r\n\r\n result.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n } while (len > index)\r\n\r\n return result\r\n },\r\n\r\n // Get bounding box of path\r\n bbox () {\r\n parser().path.setAttribute('d', this.toString())\r\n return parser.nodes.path.getBBox()\r\n }\r\n})\r\n","import { Ease } from './Controller.js'\r\nimport {\r\n delimiter,\r\n numberAndUnit,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport Color from '../types/Color.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport SVGArray from '../types/SVGArray.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Morphable {\r\n constructor (stepper) {\r\n this._stepper = stepper || new Ease('-')\r\n\r\n this._from = null\r\n this._to = null\r\n this._type = null\r\n this._context = null\r\n this._morphObj = null\r\n }\r\n\r\n from (val) {\r\n if (val == null) {\r\n return this._from\r\n }\r\n\r\n this._from = this._set(val)\r\n return this\r\n }\r\n\r\n to (val) {\r\n if (val == null) {\r\n return this._to\r\n }\r\n\r\n this._to = this._set(val)\r\n return this\r\n }\r\n\r\n type (type) {\r\n // getter\r\n if (type == null) {\r\n return this._type\r\n }\r\n\r\n // setter\r\n this._type = type\r\n return this\r\n }\r\n\r\n _set (value) {\r\n if (!this._type) {\r\n var type = typeof value\r\n\r\n if (type === 'number') {\r\n this.type(SVGNumber)\r\n } else if (type === 'string') {\r\n if (Color.isColor(value)) {\r\n this.type(Color)\r\n } else if (delimiter.test(value)) {\r\n this.type(pathLetters.test(value)\r\n ? PathArray\r\n : SVGArray\r\n )\r\n } else if (numberAndUnit.test(value)) {\r\n this.type(SVGNumber)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n } else if (morphableTypes.indexOf(value.constructor) > -1) {\r\n this.type(value.constructor)\r\n } else if (Array.isArray(value)) {\r\n this.type(SVGArray)\r\n } else if (type === 'object') {\r\n this.type(ObjectBag)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n }\r\n\r\n var result = (new this._type(value)).toArray()\r\n this._morphObj = this._morphObj || new this._type()\r\n this._context = this._context ||\r\n Array.apply(null, Array(result.length)).map(Object)\r\n return result\r\n }\r\n\r\n stepper (stepper) {\r\n if (stepper == null) return this._stepper\r\n this._stepper = stepper\r\n return this\r\n }\r\n\r\n done () {\r\n var complete = this._context\r\n .map(this._stepper.done)\r\n .reduce(function (last, curr) {\r\n return last && curr\r\n }, true)\r\n return complete\r\n }\r\n\r\n at (pos) {\r\n var _this = this\r\n\r\n return this._morphObj.fromArray(\r\n this._from.map(function (i, index) {\r\n return _this._stepper.step(i, _this._to[index], pos, _this._context[index], _this._context)\r\n })\r\n )\r\n }\r\n}\r\n\r\nexport class NonMorphable {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (val) {\r\n val = Array.isArray(val) ? val[0] : val\r\n this.value = val\r\n return this\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n toArray () {\r\n return [this.value]\r\n }\r\n}\r\n\r\nexport class TransformBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (obj) {\r\n if (Array.isArray(obj)) {\r\n obj = {\r\n scaleX: obj[0],\r\n scaleY: obj[1],\r\n shear: obj[2],\r\n rotate: obj[3],\r\n translateX: obj[4],\r\n translateY: obj[5],\r\n originX: obj[6],\r\n originY: obj[7]\r\n }\r\n }\r\n\r\n Object.assign(this, TransformBag.defaults, obj)\r\n return this\r\n }\r\n\r\n toArray () {\r\n var v = this\r\n\r\n return [\r\n v.scaleX,\r\n v.scaleY,\r\n v.shear,\r\n v.rotate,\r\n v.translateX,\r\n v.translateY,\r\n v.originX,\r\n v.originY\r\n ]\r\n }\r\n}\r\n\r\nTransformBag.defaults = {\r\n scaleX: 1,\r\n scaleY: 1,\r\n shear: 0,\r\n rotate: 0,\r\n translateX: 0,\r\n translateY: 0,\r\n originX: 0,\r\n originY: 0\r\n}\r\n\r\nexport class ObjectBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (objOrArr) {\r\n this.values = []\r\n\r\n if (Array.isArray(objOrArr)) {\r\n this.values = objOrArr\r\n return\r\n }\r\n\r\n objOrArr = objOrArr || {}\r\n var entries = []\r\n\r\n for (let i in objOrArr) {\r\n entries.push([i, objOrArr[i]])\r\n }\r\n\r\n entries.sort((a, b) => {\r\n return a[0] - b[0]\r\n })\r\n\r\n this.values = entries.reduce((last, curr) => last.concat(curr), [])\r\n return this\r\n }\r\n\r\n valueOf () {\r\n var obj = {}\r\n var arr = this.values\r\n\r\n for (var i = 0, len = arr.length; i < len; i += 2) {\r\n obj[arr[i]] = arr[i + 1]\r\n }\r\n\r\n return obj\r\n }\r\n\r\n toArray () {\r\n return this.values\r\n }\r\n}\r\n\r\nconst morphableTypes = [\r\n NonMorphable,\r\n TransformBag,\r\n ObjectBag\r\n]\r\n\r\nexport function registerMorphableType (type = []) {\r\n morphableTypes.push(...[].concat(type))\r\n}\r\n\r\nexport function makeMorphable () {\r\n extend(morphableTypes, {\r\n to (val) {\r\n return new Morphable()\r\n .type(this.constructor)\r\n .from(this.valueOf())\r\n .to(val)\r\n },\r\n fromArray (arr) {\r\n this.init(arr)\r\n return this\r\n }\r\n })\r\n}\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Shape from './Shape.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Path extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('path', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return this._array || (this._array = new PathArray(this.attr('d')))\r\n }\r\n\r\n // Plot new path\r\n plot (d) {\r\n return (d == null) ? this.array()\r\n : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new PathArray(d)))\r\n }\r\n\r\n // Clear array cache\r\n clear () {\r\n delete this._array\r\n return this\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n\r\n // Move by left top corner over x-axis\r\n x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n\r\n // Move by left top corner over y-axis\r\n y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg textpath [href*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\n// Define morphable array\r\nPath.prototype.MorphArray = PathArray\r\n\r\n// Add parent method\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped path element\r\n path: wrapWithAttrCheck(function (d) {\r\n // make sure plot is called as a setter\r\n return this.put(new Path()).plot(d || new PathArray())\r\n })\r\n }\r\n})\r\n\r\nregister(Path)\r\n","import { proportionalSize } from '../../utils/utils.js'\r\nimport PointArray from '../../types/PointArray.js'\r\n\r\n// Get array\r\nexport function array () {\r\n return this._array || (this._array = new PointArray(this.attr('points')))\r\n}\r\n\r\n// Plot new path\r\nexport function plot (p) {\r\n return (p == null) ? this.array()\r\n : this.clear().attr('points', typeof p === 'string' ? p\r\n : (this._array = new PointArray(p)))\r\n}\r\n\r\n// Clear array cache\r\nexport function clear () {\r\n delete this._array\r\n return this\r\n}\r\n\r\n// Move by left top corner\r\nexport function move (x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n}\r\n\r\n// Set element size to given width and height\r\nexport function size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polygon extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polygon', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polygon: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polygon()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polygon, pointed)\r\nextend(Polygon, poly)\r\nregister(Polygon)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polyline extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polyline', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polyline: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polyline()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polyline, pointed)\r\nextend(Polyline, poly)\r\nregister(Polyline)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Rect extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('rect', node), node)\r\n }\r\n}\r\n\r\nextend(Rect, { rx, ry })\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a rect element\r\n rect: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Rect()).size(width, height)\r\n })\r\n }\r\n})\r\n\r\nregister(Rect)\r\n","export default class Queue {\r\n constructor () {\r\n this._first = null\r\n this._last = null\r\n }\r\n\r\n push (value) {\r\n // An item stores an id and the provided value\r\n var item = value.next ? value : { value: value, next: null, prev: null }\r\n\r\n // Deal with the queue being empty or populated\r\n if (this._last) {\r\n item.prev = this._last\r\n this._last.next = item\r\n this._last = item\r\n } else {\r\n this._last = item\r\n this._first = item\r\n }\r\n\r\n // Update the length and return the current item\r\n return item\r\n }\r\n\r\n shift () {\r\n // Check if we have a value\r\n var remove = this._first\r\n if (!remove) return null\r\n\r\n // If we do, remove it and relink things\r\n this._first = remove.next\r\n if (this._first) this._first.prev = null\r\n this._last = this._first ? this._last : null\r\n return remove.value\r\n }\r\n\r\n // Shows us the first item in the list\r\n first () {\r\n return this._first && this._first.value\r\n }\r\n\r\n // Shows us the last item in the list\r\n last () {\r\n return this._last && this._last.value\r\n }\r\n\r\n // Removes the item that was returned from the push\r\n remove (item) {\r\n // Relink the previous item\r\n if (item.prev) item.prev.next = item.next\r\n if (item.next) item.next.prev = item.prev\r\n if (item === this._last) this._last = item.prev\r\n if (item === this._first) this._first = item.next\r\n\r\n // Invalidate item\r\n item.prev = null\r\n item.next = null\r\n }\r\n}\r\n","import { globals } from '../utils/window.js'\r\nimport Queue from './Queue.js'\r\n\r\nconst Animator = {\r\n nextDraw: null,\r\n frames: new Queue(),\r\n timeouts: new Queue(),\r\n timer: () => globals.window.performance || globals.window.Date,\r\n transforms: [],\r\n\r\n frame (fn) {\r\n // Store the node\r\n var node = Animator.frames.push({ run: fn })\r\n\r\n // Request an animation frame if we don't have one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n // Return the node so we can remove it easily\r\n return node\r\n },\r\n\r\n transform_frame (fn, id) {\r\n Animator.transforms[id] = fn\r\n },\r\n\r\n timeout (fn, delay) {\r\n delay = delay || 0\r\n\r\n // Work out when the event should fire\r\n var time = Animator.timer().now() + delay\r\n\r\n // Add the timeout to the end of the queue\r\n var node = Animator.timeouts.push({ run: fn, time: time })\r\n\r\n // Request another animation frame if we need one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n return node\r\n },\r\n\r\n cancelFrame (node) {\r\n node != null && Animator.frames.remove(node)\r\n },\r\n\r\n clearTimeout (node) {\r\n node != null && Animator.timeouts.remove(node)\r\n },\r\n\r\n _draw (now) {\r\n // Run all the timeouts we can run, if they are not ready yet, add them\r\n // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\r\n var nextTimeout = null\r\n var lastTimeout = Animator.timeouts.last()\r\n while ((nextTimeout = Animator.timeouts.shift())) {\r\n // Run the timeout if its time, or push it to the end\r\n if (now >= nextTimeout.time) {\r\n nextTimeout.run()\r\n } else {\r\n Animator.timeouts.push(nextTimeout)\r\n }\r\n\r\n // If we hit the last item, we should stop shifting out more items\r\n if (nextTimeout === lastTimeout) break\r\n }\r\n\r\n // Run all of the animation frames\r\n var nextFrame = null\r\n var lastFrame = Animator.frames.last()\r\n while ((nextFrame !== lastFrame) && (nextFrame = Animator.frames.shift())) {\r\n nextFrame.run()\r\n }\r\n\r\n Animator.transforms.forEach(function (el) { el() })\r\n\r\n // If we have remaining timeouts or frames, draw until we don't anymore\r\n Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()\r\n ? globals.window.requestAnimationFrame(Animator._draw)\r\n : null\r\n }\r\n}\r\n\r\nexport default Animator\r\n","import { globals } from '../utils/window.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Animator from './Animator.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\n\r\nvar makeSchedule = function (runnerInfo) {\r\n var start = runnerInfo.start\r\n var duration = runnerInfo.runner.duration()\r\n var end = start + duration\r\n return { start: start, duration: duration, end: end, runner: runnerInfo.runner }\r\n}\r\n\r\nconst defaultSource = function () {\r\n let w = globals.window\r\n return (w.performance || w.Date).now()\r\n}\r\n\r\nexport default class Timeline extends EventTarget {\r\n // Construct a new timeline on the given element\r\n constructor (timeSource = defaultSource) {\r\n super()\r\n\r\n this._timeSource = timeSource\r\n\r\n // Store the timing variables\r\n this._startTime = 0\r\n this._speed = 1.0\r\n\r\n // Determines how long a runner is hold in memory. Can be a dt or true/false\r\n this._persist = 0\r\n\r\n // Keep track of the running animations and their starting parameters\r\n this._nextFrame = null\r\n this._paused = true\r\n this._runners = []\r\n this._order = []\r\n this._time = 0\r\n this._lastSourceTime = 0\r\n this._lastStepTime = 0\r\n\r\n // Make sure that step is always called in class context\r\n this._step = this._step.bind(this)\r\n }\r\n\r\n // schedules a runner on the timeline\r\n schedule (runner, delay, when) {\r\n if (runner == null) {\r\n return this._runners.map(makeSchedule).sort(function (a, b) {\r\n return a.runner.id - b.runner.id\r\n })\r\n }\r\n\r\n // The start time for the next animation can either be given explicitly,\r\n // derived from the current timeline time or it can be relative to the\r\n // last start time to chain animations direclty\r\n\r\n var absoluteStartTime = 0\r\n var endTime = this.getEndTime()\r\n delay = delay || 0\r\n\r\n // Work out when to start the animation\r\n if (when == null || when === 'last' || when === 'after') {\r\n // Take the last time and increment\r\n absoluteStartTime = endTime\r\n } else if (when === 'absolute' || when === 'start') {\r\n absoluteStartTime = delay\r\n delay = 0\r\n } else if (when === 'now') {\r\n absoluteStartTime = this._time\r\n } else if (when === 'relative') {\r\n let runnerInfo = this._runners[runner.id]\r\n if (runnerInfo) {\r\n absoluteStartTime = runnerInfo.start + delay\r\n delay = 0\r\n }\r\n } else {\r\n throw new Error('Invalid value for the \"when\" parameter')\r\n }\r\n\r\n // Manage runner\r\n runner.unschedule()\r\n runner.timeline(this)\r\n // runner.time(-delay)\r\n\r\n // Save runnerInfo\r\n this._runners[runner.id] = {\r\n persist: this.persist(),\r\n runner: runner,\r\n start: absoluteStartTime + delay\r\n }\r\n\r\n // Save order, update Time if needed and continue\r\n this._order.push(runner.id)\r\n this.updateTime()._continue()\r\n return this\r\n }\r\n\r\n // Remove the runner from this timeline\r\n unschedule (runner) {\r\n var index = this._order.indexOf(runner.id)\r\n if (index < 0) return this\r\n\r\n delete this._runners[runner.id]\r\n this._order.splice(index, 1)\r\n runner.timeline(null)\r\n return this\r\n }\r\n\r\n // Calculates the end of the timeline\r\n getEndTime () {\r\n var lastRunnerInfo = this._runners[this._order[this._order.length - 1]]\r\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\r\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0\r\n return lastStartTime + lastDuration\r\n }\r\n\r\n // Makes sure, that after pausing the time doesn't jump\r\n updateTime () {\r\n if (!this.active()) {\r\n this._lastSourceTime = this._timeSource()\r\n }\r\n return this\r\n }\r\n\r\n play () {\r\n // Now make sure we are not paused and continue the animation\r\n this._paused = false\r\n return this.updateTime()._continue()\r\n }\r\n\r\n pause () {\r\n this._paused = true\r\n return this._continue()\r\n }\r\n\r\n stop () {\r\n // Go to start and pause\r\n this.time(0)\r\n return this.pause()\r\n }\r\n\r\n finish () {\r\n // Go to end and pause\r\n this.time(this.getEndTime() + 1)\r\n return this.pause()\r\n }\r\n\r\n speed (speed) {\r\n if (speed == null) return this._speed\r\n this._speed = speed\r\n return this\r\n }\r\n\r\n reverse (yes) {\r\n var currentSpeed = this.speed()\r\n if (yes == null) return this.speed(-currentSpeed)\r\n\r\n var positive = Math.abs(currentSpeed)\r\n return this.speed(yes ? positive : -positive)\r\n }\r\n\r\n seek (dt) {\r\n return this.time(this._time + dt)\r\n }\r\n\r\n time (time) {\r\n if (time == null) return this._time\r\n this._time = time\r\n return this._continue(true)\r\n }\r\n\r\n persist (dtOrForever) {\r\n if (dtOrForever == null) return this._persist\r\n this._persist = dtOrForever\r\n return this\r\n }\r\n\r\n source (fn) {\r\n if (fn == null) return this._timeSource\r\n this._timeSource = fn\r\n return this\r\n }\r\n\r\n _step (immediateStep = false) {\r\n // Get the time delta from the last time and update the time\r\n var time = this._timeSource()\r\n var dtSource = time - this._lastSourceTime\r\n\r\n if (immediateStep) dtSource = 0\r\n\r\n var dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\r\n this._lastSourceTime = time\r\n\r\n // Only update the time if we use the timeSource.\r\n // Otherwise use the current time\r\n if (!immediateStep) {\r\n // Update the time\r\n this._time += dtTime\r\n this._time = this._time < 0 ? 0 : this._time\r\n }\r\n this._lastStepTime = this._time\r\n this.fire('time', this._time)\r\n\r\n // Run all of the runners directly\r\n var runnersLeft = false\r\n for (var i = 0, len = this._order.length; i < len; i++) {\r\n // Get and run the current runner and ignore it if its inactive\r\n var runnerInfo = this._runners[this._order[i]]\r\n var runner = runnerInfo.runner\r\n let dt = dtTime\r\n\r\n // Make sure that we give the actual difference\r\n // between runner start time and now\r\n let dtToStart = this._time - runnerInfo.start\r\n\r\n // Dont run runner if not started yet\r\n if (dtToStart <= 0) {\r\n runnersLeft = true\r\n\r\n // This is for the case that teh timeline was seeked so that the time\r\n // is now before the startTime of the runner. Thats why we need to set\r\n // the runner to position 0\r\n runner.reset()\r\n continue\r\n } else if (dtToStart < dt) {\r\n // Adjust dt to make sure that animation is on point\r\n dt = dtToStart\r\n }\r\n\r\n if (!runner.active()) continue\r\n\r\n // If this runner is still going, signal that we need another animation\r\n // frame, otherwise, remove the completed runner\r\n var finished = runner.step(dt).done\r\n if (!finished) {\r\n runnersLeft = true\r\n // continue\r\n } else if (runnerInfo.persist !== true) {\r\n // runner is finished. And runner might get removed\r\n\r\n var endTime = runner.duration() - runner.time() + this._time\r\n\r\n if (endTime + this._persist < this._time) {\r\n // Delete runner and correct index\r\n delete this._runners[this._order[i]]\r\n this._order.splice(i--, 1) && --len\r\n runner.timeline(null)\r\n }\r\n }\r\n }\r\n\r\n // Basically: we continue when there are runners right from us in time\r\n // when -->, and when runners are left from us when <--\r\n if ((runnersLeft && !(this._speed < 0 && this._time === 0)) || (this._order.length && this._speed < 0 && this._time > 0)) {\r\n this._continue()\r\n } else {\r\n this.fire('finished')\r\n this.pause()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Checks if we are running and continues the animation\r\n _continue (immediateStep = false) {\r\n Animator.cancelFrame(this._nextFrame)\r\n this._nextFrame = null\r\n\r\n if (immediateStep) return this._step(true)\r\n if (this._paused) return this\r\n\r\n this._nextFrame = Animator.frame(this._step)\r\n return this\r\n }\r\n\r\n active () {\r\n return !!this._nextFrame\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n timeline: function () {\r\n this._timeline = (this._timeline || new Timeline())\r\n return this._timeline\r\n }\r\n }\r\n})\r\n","import { Controller, Ease, Stepper } from './Controller.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { from, to } from '../modules/core/gradiented.js'\r\nimport { getOrigin } from '../utils/utils.js'\r\nimport { noop, timeline } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Animator from './Animator.js'\r\nimport Box from '../types/Box.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport Matrix from '../types/Matrix.js'\r\nimport Morphable, { TransformBag } from './Morphable.js'\r\nimport Point from '../types/Point.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Timeline from './Timeline.js'\r\n\r\nexport default class Runner extends EventTarget {\r\n constructor (options) {\r\n super()\r\n\r\n // Store a unique id on the runner, so that we can identify it later\r\n this.id = Runner.id++\r\n\r\n // Ensure a default value\r\n options = options == null\r\n ? timeline.duration\r\n : options\r\n\r\n // Ensure that we get a controller\r\n options = typeof options === 'function'\r\n ? new Controller(options)\r\n : options\r\n\r\n // Declare all of the variables\r\n this._element = null\r\n this._timeline = null\r\n this.done = false\r\n this._queue = []\r\n\r\n // Work out the stepper and the duration\r\n this._duration = typeof options === 'number' && options\r\n this._isDeclarative = options instanceof Controller\r\n this._stepper = this._isDeclarative ? options : new Ease()\r\n\r\n // We copy the current values from the timeline because they can change\r\n this._history = {}\r\n\r\n // Store the state of the runner\r\n this.enabled = true\r\n this._time = 0\r\n this._lastTime = 0\r\n\r\n // At creation, the runner is in reseted state\r\n this._reseted = true\r\n\r\n // Save transforms applied to this runner\r\n this.transforms = new Matrix()\r\n this.transformId = 1\r\n\r\n // Looping variables\r\n this._haveReversed = false\r\n this._reverse = false\r\n this._loopsDone = 0\r\n this._swing = false\r\n this._wait = 0\r\n this._times = 1\r\n }\r\n\r\n /*\r\n Runner Definitions\r\n ==================\r\n These methods help us define the runtime behaviour of the Runner or they\r\n help us make new runners from the current runner\r\n */\r\n\r\n element (element) {\r\n if (element == null) return this._element\r\n this._element = element\r\n element._prepareRunner()\r\n return this\r\n }\r\n\r\n timeline (timeline) {\r\n // check explicitly for undefined so we can set the timeline to null\r\n if (typeof timeline === 'undefined') return this._timeline\r\n this._timeline = timeline\r\n return this\r\n }\r\n\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var runner = new Runner(o.duration)\r\n if (this._timeline) runner.timeline(this._timeline)\r\n if (this._element) runner.element(this._element)\r\n return runner.loop(o).schedule(delay, when)\r\n }\r\n\r\n schedule (timeline, delay, when) {\r\n // The user doesn't need to pass a timeline if we already have one\r\n if (!(timeline instanceof Timeline)) {\r\n when = delay\r\n delay = timeline\r\n timeline = this.timeline()\r\n }\r\n\r\n // If there is no timeline, yell at the user...\r\n if (!timeline) {\r\n throw Error('Runner cannot be scheduled without timeline')\r\n }\r\n\r\n // Schedule the runner on the timeline provided\r\n timeline.schedule(this, delay, when)\r\n return this\r\n }\r\n\r\n unschedule () {\r\n var timeline = this.timeline()\r\n timeline && timeline.unschedule(this)\r\n return this\r\n }\r\n\r\n loop (times, swing, wait) {\r\n // Deal with the user passing in an object\r\n if (typeof times === 'object') {\r\n swing = times.swing\r\n wait = times.wait\r\n times = times.times\r\n }\r\n\r\n // Sanitise the values and store them\r\n this._times = times || Infinity\r\n this._swing = swing || false\r\n this._wait = wait || 0\r\n return this\r\n }\r\n\r\n delay (delay) {\r\n return this.animate(0, delay)\r\n }\r\n\r\n /*\r\n Basic Functionality\r\n ===================\r\n These methods allow us to attach basic functions to the runner directly\r\n */\r\n\r\n queue (initFn, runFn, retargetFn, isTransform) {\r\n this._queue.push({\r\n initialiser: initFn || noop,\r\n runner: runFn || noop,\r\n retarget: retargetFn,\r\n isTransform: isTransform,\r\n initialised: false,\r\n finished: false\r\n })\r\n var timeline = this.timeline()\r\n timeline && this.timeline()._continue()\r\n return this\r\n }\r\n\r\n during (fn) {\r\n return this.queue(null, fn)\r\n }\r\n\r\n after (fn) {\r\n return this.on('finish', fn)\r\n }\r\n\r\n /*\r\n Runner animation methods\r\n ========================\r\n Control how the animation plays\r\n */\r\n\r\n time (time) {\r\n if (time == null) {\r\n return this._time\r\n }\r\n let dt = time - this._time\r\n this.step(dt)\r\n return this\r\n }\r\n\r\n duration () {\r\n return this._times * (this._wait + this._duration) - this._wait\r\n }\r\n\r\n loops (p) {\r\n var loopDuration = this._duration + this._wait\r\n if (p == null) {\r\n var loopsDone = Math.floor(this._time / loopDuration)\r\n var relativeTime = (this._time - loopsDone * loopDuration)\r\n var position = relativeTime / this._duration\r\n return Math.min(loopsDone + position, this._times)\r\n }\r\n var whole = Math.floor(p)\r\n var partial = p % 1\r\n var time = loopDuration * whole + this._duration * partial\r\n return this.time(time)\r\n }\r\n\r\n position (p) {\r\n // Get all of the variables we need\r\n var x = this._time\r\n var d = this._duration\r\n var w = this._wait\r\n var t = this._times\r\n var s = this._swing\r\n var r = this._reverse\r\n var position\r\n\r\n if (p == null) {\r\n /*\r\n This function converts a time to a position in the range [0, 1]\r\n The full explanation can be found in this desmos demonstration\r\n https://www.desmos.com/calculator/u4fbavgche\r\n The logic is slightly simplified here because we can use booleans\r\n */\r\n\r\n // Figure out the value without thinking about the start or end time\r\n const f = function (x) {\r\n var swinging = s * Math.floor(x % (2 * (w + d)) / (w + d))\r\n var backwards = (swinging && !r) || (!swinging && r)\r\n var uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards\r\n var clipped = Math.max(Math.min(uncliped, 1), 0)\r\n return clipped\r\n }\r\n\r\n // Figure out the value by incorporating the start time\r\n var endTime = t * (w + d) - w\r\n position = x <= 0 ? Math.round(f(1e-5))\r\n : x < endTime ? f(x)\r\n : Math.round(f(endTime - 1e-5))\r\n return position\r\n }\r\n\r\n // Work out the loops done and add the position to the loops done\r\n var loopsDone = Math.floor(this.loops())\r\n var swingForward = s && (loopsDone % 2 === 0)\r\n var forwards = (swingForward && !r) || (r && swingForward)\r\n position = loopsDone + (forwards ? p : 1 - p)\r\n return this.loops(position)\r\n }\r\n\r\n progress (p) {\r\n if (p == null) {\r\n return Math.min(1, this._time / this.duration())\r\n }\r\n return this.time(p * this.duration())\r\n }\r\n\r\n step (dt) {\r\n // If we are inactive, this stepper just gets skipped\r\n if (!this.enabled) return this\r\n\r\n // Update the time and get the new position\r\n dt = dt == null ? 16 : dt\r\n this._time += dt\r\n var position = this.position()\r\n\r\n // Figure out if we need to run the stepper in this frame\r\n var running = this._lastPosition !== position && this._time >= 0\r\n this._lastPosition = position\r\n\r\n // Figure out if we just started\r\n var duration = this.duration()\r\n var justStarted = this._lastTime <= 0 && this._time > 0\r\n var justFinished = this._lastTime < this._time && this.time > duration\r\n this._lastTime = this._time\r\n if (justStarted) {\r\n this.fire('start', this)\r\n }\r\n\r\n // Work out if the runner is finished set the done flag here so animations\r\n // know, that they are running in the last step (this is good for\r\n // transformations which can be merged)\r\n var declarative = this._isDeclarative\r\n this.done = !declarative && !justFinished && this._time >= duration\r\n\r\n // Runner is running. So its not in reseted state anymore\r\n this._reseted = false\r\n\r\n // Call initialise and the run function\r\n if (running || declarative) {\r\n this._initialise(running)\r\n\r\n // clear the transforms on this runner so they dont get added again and again\r\n this.transforms = new Matrix()\r\n var converged = this._run(declarative ? dt : position)\r\n\r\n this.fire('step', this)\r\n }\r\n // correct the done flag here\r\n // declaritive animations itself know when they converged\r\n this.done = this.done || (converged && declarative)\r\n if (this.done) {\r\n this.fire('finish', this)\r\n }\r\n return this\r\n }\r\n\r\n reset () {\r\n if (this._reseted) return this\r\n this.loops(0)\r\n this._reseted = true\r\n return this\r\n }\r\n\r\n finish () {\r\n return this.step(Infinity)\r\n }\r\n\r\n reverse (reverse) {\r\n this._reverse = reverse == null ? !this._reverse : reverse\r\n return this\r\n }\r\n\r\n ease (fn) {\r\n this._stepper = new Ease(fn)\r\n return this\r\n }\r\n\r\n active (enabled) {\r\n if (enabled == null) return this.enabled\r\n this.enabled = enabled\r\n return this\r\n }\r\n\r\n /*\r\n Private Methods\r\n ===============\r\n Methods that shouldn't be used externally\r\n */\r\n\r\n // Save a morpher to the morpher list so that we can retarget it later\r\n _rememberMorpher (method, morpher) {\r\n this._history[method] = {\r\n morpher: morpher,\r\n caller: this._queue[this._queue.length - 1]\r\n }\r\n }\r\n\r\n // Try to set the target for a morpher if the morpher exists, otherwise\r\n // do nothing and return false\r\n _tryRetarget (method, target) {\r\n if (this._history[method]) {\r\n // if the last method wasnt even initialised, throw it away\r\n if (!this._history[method].caller.initialised) {\r\n let index = this._queue.indexOf(this._history[method].caller)\r\n this._queue.splice(index, 1)\r\n return false\r\n }\r\n\r\n // for the case of transformations, we use the special retarget function\r\n // which has access to the outer scope\r\n if (this._history[method].caller.retarget) {\r\n this._history[method].caller.retarget(target)\r\n // for everything else a simple morpher change is sufficient\r\n } else {\r\n this._history[method].morpher.to(target)\r\n }\r\n\r\n this._history[method].caller.finished = false\r\n var timeline = this.timeline()\r\n timeline && timeline._continue()\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n // Run each initialise function in the runner if required\r\n _initialise (running) {\r\n // If we aren't running, we shouldn't initialise when not declarative\r\n if (!running && !this._isDeclarative) return\r\n\r\n // Loop through all of the initialisers\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current initialiser\r\n var current = this._queue[i]\r\n\r\n // Determine whether we need to initialise\r\n var needsIt = this._isDeclarative || (!current.initialised && running)\r\n running = !current.finished\r\n\r\n // Call the initialiser if we need to\r\n if (needsIt && running) {\r\n current.initialiser.call(this)\r\n current.initialised = true\r\n }\r\n }\r\n }\r\n\r\n // Run each run function for the position or dt given\r\n _run (positionOrDt) {\r\n // Run all of the _queue directly\r\n var allfinished = true\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current function to run\r\n var current = this._queue[i]\r\n\r\n // Run the function if its not finished, we keep track of the finished\r\n // flag for the sake of declarative _queue\r\n var converged = current.runner.call(this, positionOrDt)\r\n current.finished = current.finished || (converged === true)\r\n allfinished = allfinished && current.finished\r\n }\r\n\r\n // We report when all of the constructors are finished\r\n return allfinished\r\n }\r\n\r\n addTransform (transform, index) {\r\n this.transforms.lmultiplyO(transform)\r\n return this\r\n }\r\n\r\n clearTransform () {\r\n this.transforms = new Matrix()\r\n return this\r\n }\r\n\r\n // TODO: Keep track of all transformations so that deletion is faster\r\n clearTransformsFromQueue () {\r\n if (!this.done) {\r\n this._queue = this._queue.filter((item) => {\r\n return !item.isTransform\r\n })\r\n }\r\n }\r\n\r\n static sanitise (duration, delay, when) {\r\n // Initialise the default parameters\r\n var times = 1\r\n var swing = false\r\n var wait = 0\r\n duration = duration || timeline.duration\r\n delay = delay || timeline.delay\r\n when = when || 'last'\r\n\r\n // If we have an object, unpack the values\r\n if (typeof duration === 'object' && !(duration instanceof Stepper)) {\r\n delay = duration.delay || delay\r\n when = duration.when || when\r\n swing = duration.swing || swing\r\n times = duration.times || times\r\n wait = duration.wait || wait\r\n duration = duration.duration || timeline.duration\r\n }\r\n\r\n return {\r\n duration: duration,\r\n delay: delay,\r\n swing: swing,\r\n times: times,\r\n wait: wait,\r\n when: when\r\n }\r\n }\r\n}\r\n\r\nRunner.id = 0\r\n\r\nclass FakeRunner {\r\n constructor (transforms = new Matrix(), id = -1, done = true) {\r\n this.transforms = transforms\r\n this.id = id\r\n this.done = done\r\n }\r\n\r\n clearTransformsFromQueue () { }\r\n}\r\n\r\nextend([Runner, FakeRunner], {\r\n mergeWith (runner) {\r\n return new FakeRunner(\r\n runner.transforms.lmultiply(this.transforms),\r\n runner.id\r\n )\r\n }\r\n})\r\n\r\n// FakeRunner.emptyRunner = new FakeRunner()\r\n\r\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\r\nconst getRunnerTransform = (runner) => runner.transforms\r\n\r\nfunction mergeTransforms () {\r\n // Find the matrix to apply to the element and apply it\r\n let runners = this._transformationRunners.runners\r\n let netTransform = runners\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n\r\n this.transform(netTransform)\r\n\r\n this._transformationRunners.merge()\r\n\r\n if (this._transformationRunners.length() === 1) {\r\n this._frameId = null\r\n }\r\n}\r\n\r\nclass RunnerArray {\r\n constructor () {\r\n this.runners = []\r\n this.ids = []\r\n }\r\n\r\n add (runner) {\r\n if (this.runners.includes(runner)) return\r\n\r\n let id = runner.id + 1\r\n\r\n let leftSibling = this.ids.reduce((last, curr) => {\r\n if (curr > last && curr < id) return curr\r\n return last\r\n }, 0)\r\n\r\n let index = this.ids.indexOf(leftSibling) + 1\r\n\r\n this.ids.splice(index, 0, id)\r\n this.runners.splice(index, 0, runner)\r\n\r\n return this\r\n }\r\n\r\n getByID (id) {\r\n return this.runners[this.ids.indexOf(id + 1)]\r\n }\r\n\r\n remove (id) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1)\r\n this.runners.splice(index, 1)\r\n return this\r\n }\r\n\r\n merge () {\r\n let lastRunner = null\r\n this.runners.forEach((runner, i) => {\r\n if (lastRunner && runner.done && lastRunner.done) {\r\n this.remove(runner.id)\r\n this.edit(lastRunner.id, runner.mergeWith(lastRunner))\r\n }\r\n\r\n lastRunner = runner\r\n })\r\n\r\n return this\r\n }\r\n\r\n edit (id, newRunner) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1, id)\r\n this.runners.splice(index, 1, newRunner)\r\n return this\r\n }\r\n\r\n length () {\r\n return this.ids.length\r\n }\r\n\r\n clearBefore (id) {\r\n let deleteCnt = this.ids.indexOf(id + 1) || 1\r\n this.ids.splice(0, deleteCnt, 0)\r\n this.runners.splice(0, deleteCnt, new FakeRunner())\r\n .forEach((r) => r.clearTransformsFromQueue())\r\n return this\r\n }\r\n}\r\n\r\nlet frameId = 0\r\nregisterMethods({\r\n Element: {\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var timeline = this.timeline()\r\n return new Runner(o.duration)\r\n .loop(o)\r\n .element(this)\r\n .timeline(timeline.play())\r\n .schedule(delay, when)\r\n },\r\n\r\n delay (by, when) {\r\n return this.animate(0, by, when)\r\n },\r\n\r\n // this function searches for all runners on the element and deletes the ones\r\n // which run before the current one. This is because absolute transformations\r\n // overwfrite anything anyway so there is no need to waste time computing\r\n // other runners\r\n _clearTransformRunnersBefore (currentRunner) {\r\n this._transformationRunners.clearBefore(currentRunner.id)\r\n },\r\n\r\n _currentTransform (current) {\r\n return this._transformationRunners.runners\r\n // we need the equal sign here to make sure, that also transformations\r\n // on the same runner which execute before the current transformation are\r\n // taken into account\r\n .filter((runner) => runner.id <= current.id)\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n },\r\n\r\n addRunner (runner) {\r\n this._transformationRunners.add(runner)\r\n\r\n Animator.transform_frame(\r\n mergeTransforms.bind(this), this._frameId\r\n )\r\n },\r\n\r\n _prepareRunner () {\r\n if (this._frameId == null) {\r\n this._transformationRunners = new RunnerArray()\r\n .add(new FakeRunner(new Matrix(this)))\r\n\r\n this._frameId = frameId++\r\n }\r\n }\r\n }\r\n})\r\n\r\nextend(Runner, {\r\n attr (a, v) {\r\n return this.styleAttr('attr', a, v)\r\n },\r\n\r\n // Add animatable styles\r\n css (s, v) {\r\n return this.styleAttr('css', s, v)\r\n },\r\n\r\n styleAttr (type, name, val) {\r\n // apply attributes individually\r\n if (typeof name === 'object') {\r\n for (var key in val) {\r\n this.styleAttr(type, key, val[key])\r\n }\r\n }\r\n\r\n var morpher = new Morphable(this._stepper).to(val)\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.element()[type](name))\r\n }, function (pos) {\r\n this.element()[type](name, morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n zoom (level, point) {\r\n var morpher = new Morphable(this._stepper).to(new SVGNumber(level))\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.zoom())\r\n }, function (pos) {\r\n this.element().zoom(morpher.at(pos), point)\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n ** absolute transformations\r\n **/\r\n\r\n //\r\n // M v -----|-----(D M v = F v)------|-----> T v\r\n //\r\n // 1. define the final state (T) and decompose it (once)\r\n // t = [tx, ty, the, lam, sy, sx]\r\n // 2. on every frame: pull the current state of all previous transforms\r\n // (M - m can change)\r\n // and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\r\n // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\r\n // - Note F(0) = M\r\n // - Note F(1) = T\r\n // 4. Now you get the delta matrix as a result: D = F * inv(M)\r\n\r\n transform (transforms, relative, affine) {\r\n // If we have a declarative function, we should retarget it if possible\r\n relative = transforms.relative || relative\r\n if (this._isDeclarative && !relative && this._tryRetarget('transform', transforms)) {\r\n return this\r\n }\r\n\r\n // Parse the parameters\r\n var isMatrix = Matrix.isMatrixLike(transforms)\r\n affine = transforms.affine != null\r\n ? transforms.affine\r\n : (affine != null ? affine : !isMatrix)\r\n\r\n // Create a morepher and set its type\r\n const morpher = new Morphable(this._stepper)\r\n .type(affine ? TransformBag : Matrix)\r\n\r\n let origin\r\n let element\r\n let current\r\n let currentAngle\r\n let startTransform\r\n\r\n function setup () {\r\n // make sure element and origin is defined\r\n element = element || this.element()\r\n origin = origin || getOrigin(transforms, element)\r\n\r\n startTransform = new Matrix(relative ? undefined : element)\r\n\r\n // add the runner to the element so it can merge transformations\r\n element.addRunner(this)\r\n\r\n // Deactivate all transforms that have run so far if we are absolute\r\n if (!relative) {\r\n element._clearTransformRunnersBefore(this)\r\n }\r\n }\r\n\r\n function run (pos) {\r\n // clear all other transforms before this in case something is saved\r\n // on this runner. We are absolute. We dont need these!\r\n if (!relative) this.clearTransform()\r\n\r\n let { x, y } = new Point(origin).transform(element._currentTransform(this))\r\n\r\n let target = new Matrix({ ...transforms, origin: [x, y] })\r\n let start = this._isDeclarative && current\r\n ? current\r\n : startTransform\r\n\r\n if (affine) {\r\n target = target.decompose(x, y)\r\n start = start.decompose(x, y)\r\n\r\n // Get the current and target angle as it was set\r\n const rTarget = target.rotate\r\n const rCurrent = start.rotate\r\n\r\n // Figure out the shortest path to rotate directly\r\n const possibilities = [rTarget - 360, rTarget, rTarget + 360]\r\n const distances = possibilities.map(a => Math.abs(a - rCurrent))\r\n const shortest = Math.min(...distances)\r\n const index = distances.indexOf(shortest)\r\n target.rotate = possibilities[index]\r\n }\r\n\r\n if (relative) {\r\n // we have to be careful here not to overwrite the rotation\r\n // with the rotate method of Matrix\r\n if (!isMatrix) {\r\n target.rotate = transforms.rotate || 0\r\n }\r\n if (this._isDeclarative && currentAngle) {\r\n start.rotate = currentAngle\r\n }\r\n }\r\n\r\n morpher.from(start)\r\n morpher.to(target)\r\n\r\n let affineParameters = morpher.at(pos)\r\n currentAngle = affineParameters.rotate\r\n current = new Matrix(affineParameters)\r\n\r\n this.addTransform(current)\r\n return morpher.done()\r\n }\r\n\r\n function retarget (newTransforms) {\r\n // only get a new origin if it changed since the last call\r\n if (\r\n (newTransforms.origin || 'center').toString() !==\r\n (transforms.origin || 'center').toString()\r\n ) {\r\n origin = getOrigin(transforms, element)\r\n }\r\n\r\n // overwrite the old transformations with the new ones\r\n transforms = { ...newTransforms, origin }\r\n }\r\n\r\n this.queue(setup, run, retarget, true)\r\n this._isDeclarative && this._rememberMorpher('transform', morpher)\r\n return this\r\n },\r\n\r\n // Animatable x-axis\r\n x (x, relative) {\r\n return this._queueNumber('x', x)\r\n },\r\n\r\n // Animatable y-axis\r\n y (y) {\r\n return this._queueNumber('y', y)\r\n },\r\n\r\n dx (x) {\r\n return this._queueNumberDelta('x', x)\r\n },\r\n\r\n dy (y) {\r\n return this._queueNumberDelta('y', y)\r\n },\r\n\r\n _queueNumberDelta (method, to) {\r\n to = new SVGNumber(to)\r\n\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n var from = null\r\n this.queue(function () {\r\n from = this.element()[method]()\r\n morpher.from(from)\r\n morpher.to(from + to)\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n }, function (newTo) {\r\n morpher.to(from + new SVGNumber(newTo))\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueObject (method, to) {\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n this.queue(function () {\r\n morpher.from(this.element()[method]())\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueNumber (method, value) {\r\n return this._queueObject(method, new SVGNumber(value))\r\n },\r\n\r\n // Animatable center x-axis\r\n cx (x) {\r\n return this._queueNumber('cx', x)\r\n },\r\n\r\n // Animatable center y-axis\r\n cy (y) {\r\n return this._queueNumber('cy', y)\r\n },\r\n\r\n // Add animatable move\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n },\r\n\r\n // Add animatable center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n },\r\n\r\n // Add animatable size\r\n size (width, height) {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if (!width || !height) {\r\n box = this._element.bbox()\r\n }\r\n\r\n if (!width) {\r\n width = box.width / box.height * height\r\n }\r\n\r\n if (!height) {\r\n height = box.height / box.width * width\r\n }\r\n\r\n return this\r\n .width(width)\r\n .height(height)\r\n },\r\n\r\n // Add animatable width\r\n width (width) {\r\n return this._queueNumber('width', width)\r\n },\r\n\r\n // Add animatable height\r\n height (height) {\r\n return this._queueNumber('height', height)\r\n },\r\n\r\n // Add animatable plot\r\n plot (a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if (arguments.length === 4) {\r\n return this.plot([a, b, c, d])\r\n }\r\n\r\n var morpher = this._element.MorphArray().to(a)\r\n\r\n this.queue(function () {\r\n morpher.from(this._element.array())\r\n }, function (pos) {\r\n this._element.plot(morpher.at(pos))\r\n })\r\n\r\n return this\r\n },\r\n\r\n // Add leading method\r\n leading (value) {\r\n return this._queueNumber('leading', value)\r\n },\r\n\r\n // Add animatable viewbox\r\n viewbox (x, y, width, height) {\r\n return this._queueObject('viewbox', new Box(x, y, width, height))\r\n },\r\n\r\n update (o) {\r\n if (typeof o !== 'object') {\r\n return this.update({\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n\r\n return this\r\n }\r\n})\r\n\r\nextend(Runner, { rx, ry, from, to })\r\n","import {\r\n adopt,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport Defs from './Defs.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Svg extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('svg', node), node)\r\n this.namespace()\r\n }\r\n\r\n isRoot () {\r\n return !this.node.parentNode ||\r\n !(this.node.parentNode instanceof globals.window.SVGElement) ||\r\n this.node.parentNode.nodeName === '#document'\r\n }\r\n\r\n // Check if this is a root svg\r\n // If not, call docs from this element\r\n root () {\r\n if (this.isRoot()) return this\r\n return super.root()\r\n }\r\n\r\n // Add namespaces\r\n namespace () {\r\n if (!this.isRoot()) return this.root().namespace()\r\n return this\r\n .attr({ xmlns: ns, version: '1.1' })\r\n .attr('xmlns:xlink', xlink, xmlns)\r\n .attr('xmlns:svgjs', svgjs, xmlns)\r\n }\r\n\r\n // Creates and returns defs element\r\n defs () {\r\n if (!this.isRoot()) return this.root().defs()\r\n\r\n return adopt(this.node.getElementsByTagName('defs')[0]) ||\r\n this.put(new Defs())\r\n }\r\n\r\n // custom parent method\r\n parent (type) {\r\n if (this.isRoot()) {\r\n return this.node.parentNode.nodeName === '#document'\r\n ? null\r\n : adopt(this.node.parentNode)\r\n }\r\n\r\n return super.parent(type)\r\n }\r\n\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n return this\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create nested svg document\r\n nested: wrapWithAttrCheck(function () {\r\n return this.put(new Svg())\r\n })\r\n }\r\n})\r\n\r\nregister(Svg, 'Svg', true)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Symbol extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('symbol', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n symbol: wrapWithAttrCheck(function () {\r\n return this.put(new Symbol())\r\n })\r\n }\r\n})\r\n\r\nregister(Symbol)\r\n","import { globals } from '../../utils/window.js'\r\n\r\n// Create plain text node\r\nexport function plain (text) {\r\n // clear if build mode is disabled\r\n if (this._build === false) {\r\n this.clear()\r\n }\r\n\r\n // create text node\r\n this.node.appendChild(globals.document.createTextNode(text))\r\n\r\n return this\r\n}\r\n\r\n// Get length of text element\r\nexport function length () {\r\n return this.node.getComputedTextLength()\r\n}\r\n","import {\r\n adopt,\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { attrs } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Text extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('text', node), node)\r\n\r\n this.dom.leading = new SVGNumber(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', attrs['font-family'])\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n // act as getter\r\n if (x == null) {\r\n return this.attr('x')\r\n }\r\n\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n var oy = this.attr('y')\r\n var o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null) {\r\n return typeof oy === 'number' ? oy - o : oy\r\n }\r\n\r\n return this.attr('y', typeof y === 'number' ? y + o : y)\r\n }\r\n\r\n // Move center over x-axis\r\n cx (x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n\r\n // Move center over y-axis\r\n cy (y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n\r\n // Set the text content\r\n text (text) {\r\n // act as getter\r\n if (text === undefined) {\r\n var children = this.node.childNodes\r\n var firstLine = 0\r\n text = ''\r\n\r\n for (var i = 0, len = children.length; i < len; ++i) {\r\n // skip textPaths - they are no lines\r\n if (children[i].nodeName === 'textPath') {\r\n if (i === 0) firstLine = 1\r\n continue\r\n }\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var j = 0, jl = text.length; j < jl; j++) {\r\n this.tspan(text[j]).newLine()\r\n }\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n\r\n // Set / get leading\r\n leading (value) {\r\n // act as getter\r\n if (value == null) {\r\n return this.dom.leading\r\n }\r\n\r\n // act as setter\r\n this.dom.leading = new SVGNumber(value)\r\n\r\n return this.rebuild()\r\n }\r\n\r\n // Rebuild appearance type\r\n rebuild (rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild === 'boolean') {\r\n this._rebuild = rebuild\r\n }\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n var blankLineOffset = 0\r\n var leading = this.dom.leading\r\n\r\n this.each(function () {\r\n var fontSize = globals.window.getComputedStyle(this.node)\r\n .getPropertyValue('font-size')\r\n var dy = leading * new SVGNumber(fontSize)\r\n\r\n if (this.dom.newLined) {\r\n this.attr('x', self.attr('x'))\r\n\r\n if (this.text() === '\\n') {\r\n blankLineOffset += dy\r\n } else {\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Enable / disable build mode\r\n build (build) {\r\n this._build = !!build\r\n return this\r\n }\r\n\r\n // overwrite method from parent to set data properly\r\n setData (o) {\r\n this.dom = o\r\n this.dom.leading = new SVGNumber(o.leading || 1.3)\r\n return this\r\n }\r\n}\r\n\r\nextend(Text, textable)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create text element\r\n text: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).text(text)\r\n }),\r\n\r\n // Create plain text element\r\n plain: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).plain(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Text)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Text from './Text.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Tspan extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('tspan', node), node)\r\n }\r\n\r\n // Set text content\r\n text (text) {\r\n if (text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n\r\n // Shortcut dx\r\n dx (dx) {\r\n return this.attr('dx', dx)\r\n }\r\n\r\n // Shortcut dy\r\n dy (dy) {\r\n return this.attr('dy', dy)\r\n }\r\n\r\n // Create new line\r\n newLine () {\r\n // fetch text parent\r\n var t = this.parent(Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new position\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n}\r\n\r\nextend(Tspan, textable)\r\n\r\nregisterMethods({\r\n Tspan: {\r\n tspan: wrapWithAttrCheck(function (text) {\r\n var tspan = new Tspan()\r\n\r\n // clear if build mode is disabled\r\n if (!this._build) {\r\n this.clear()\r\n }\r\n\r\n // add new tspan\r\n this.node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Tspan)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class ClipPath extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('clipPath', node), node)\r\n }\r\n\r\n // Unclip all clipped elements and remove itself\r\n remove () {\r\n // unclip all targets\r\n this.targets().forEach(function (el) {\r\n el.unclip()\r\n })\r\n\r\n // remove clipPath from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [clip-path*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create clipping element\r\n clip: wrapWithAttrCheck(function () {\r\n return this.defs().put(new ClipPath())\r\n })\r\n },\r\n Element: {\r\n // Distribute clipPath to svg element\r\n clipWith (element) {\r\n // use given clip or create a new one\r\n let clipper = element instanceof ClipPath\r\n ? element\r\n : this.parent().clip().add(element)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + clipper.id() + '\")')\r\n },\r\n\r\n // Unclip element\r\n unclip () {\r\n return this.attr('clip-path', null)\r\n },\r\n\r\n clipper () {\r\n return this.reference('clip-path')\r\n }\r\n }\r\n})\r\n\r\nregister(ClipPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class G extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('g', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create a group element\r\n group: wrapWithAttrCheck(function () {\r\n return this.put(new G())\r\n })\r\n }\r\n})\r\n\r\nregister(G)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class A extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('a', node), node)\r\n }\r\n\r\n // Link url\r\n to (url) {\r\n return this.attr('href', url, xlink)\r\n }\r\n\r\n // Link target attribute\r\n target (target) {\r\n return this.attr('target', target)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a hyperlink element\r\n link: wrapWithAttrCheck(function (url) {\r\n return this.put(new A()).to(url)\r\n })\r\n },\r\n Element: {\r\n // Create a hyperlink element\r\n linkTo: function (url) {\r\n var link = new A()\r\n\r\n if (typeof url === 'function') { url.call(link, link) } else {\r\n link.to(url)\r\n }\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n }\r\n})\r\n\r\nregister(A)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Mask extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('mask', node), node)\r\n }\r\n\r\n // Unmask all masked elements and remove itself\r\n remove () {\r\n // unmask all targets\r\n this.targets().forEach(function (el) {\r\n el.unmask()\r\n })\r\n\r\n // remove mask from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [mask*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n mask: wrapWithAttrCheck(function () {\r\n return this.defs().put(new Mask())\r\n })\r\n },\r\n Element: {\r\n // Distribute mask to svg element\r\n maskWith (element) {\r\n // use given mask or create a new one\r\n var masker = element instanceof Mask\r\n ? element\r\n : this.parent().mask().add(element)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + masker.id() + '\")')\r\n },\r\n\r\n // Unmask element\r\n unmask () {\r\n return this.attr('mask', null)\r\n },\r\n\r\n masker () {\r\n return this.reference('mask')\r\n }\r\n }\r\n})\r\n\r\nregister(Mask)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { unCamelCase } from '../utils/utils.js'\r\nimport Element from './Element.js'\r\n\r\nfunction cssRule (selector, rule) {\r\n if (!selector) return ''\r\n if (!rule) return selector\r\n\r\n var ret = selector + '{'\r\n\r\n for (var i in rule) {\r\n ret += unCamelCase(i) + ':' + rule[i] + ';'\r\n }\r\n\r\n ret += '}'\r\n\r\n return ret\r\n}\r\n\r\nexport default class Style extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('style', node), node)\r\n }\r\n\r\n addText (w = '') {\r\n this.node.textContent += w\r\n return this\r\n }\r\n\r\n font (name, src, params = {}) {\r\n return this.rule('@font-face', {\r\n fontFamily: name,\r\n src: src,\r\n ...params\r\n })\r\n }\r\n\r\n rule (selector, obj) {\r\n return this.addText(cssRule(selector, obj))\r\n }\r\n}\r\n\r\nregisterMethods('Dom', {\r\n style: wrapWithAttrCheck(function (selector, obj) {\r\n return this.put(new Style()).rule(selector, obj)\r\n }),\r\n fontface: wrapWithAttrCheck(function (name, src, params) {\r\n return this.put(new Style()).font(name, src, params)\r\n })\r\n})\r\n\r\nregister(Style)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Path from './Path.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Text from './Text.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class TextPath extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('textPath', node), node)\r\n }\r\n\r\n // return the array of the path track element\r\n array () {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n\r\n // Plot path if any\r\n plot (d) {\r\n var track = this.track()\r\n var pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n\r\n // Get the path element\r\n track () {\r\n return this.reference('href')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n textPath: wrapWithAttrCheck(function (text, path) {\r\n return this.defs().path(path).text(text).addTo(this)\r\n })\r\n },\r\n Text: {\r\n // Create path for text to run on\r\n path: wrapWithAttrCheck(function (track) {\r\n var path = new TextPath()\r\n\r\n // if track is a path, reuse it\r\n if (!(track instanceof Path)) {\r\n // create path element\r\n track = this.root().defs().path(track)\r\n }\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, xlink)\r\n\r\n // add textPath element as child node and return textPath\r\n return this.put(path)\r\n }),\r\n\r\n // Get the textPath children\r\n textPath () {\r\n return this.find('textPath')[0]\r\n }\r\n },\r\n Path: {\r\n // creates a textPath from this path\r\n text: wrapWithAttrCheck(function (text) {\r\n if (text instanceof Text) {\r\n var txt = text.text()\r\n return text.clear().path(this).text(txt)\r\n }\r\n return this.parent().put(new Text()).path(this).text(text)\r\n }),\r\n\r\n targets () {\r\n return baseFind('svg [href*=\"' + this.id() + '\"]')\r\n }\r\n }\r\n})\r\n\r\nTextPath.prototype.MorphArray = PathArray\r\nregister(TextPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Use extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('use', node), node)\r\n }\r\n\r\n // Use element as a reference\r\n element (element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, xlink)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a use element\r\n use: wrapWithAttrCheck(function (element, file) {\r\n return this.put(new Use()).element(element, file)\r\n })\r\n }\r\n})\r\n\r\nregister(Use)\r\n","/* Optional Modules */\r\nimport './modules/optional/arrange.js'\r\nimport './modules/optional/class.js'\r\nimport './modules/optional/css.js'\r\nimport './modules/optional/data.js'\r\nimport './modules/optional/memory.js'\r\nimport './modules/optional/sugar.js'\r\nimport './modules/optional/transform.js'\r\n\r\nimport { extend, makeInstance } from './utils/adopter.js'\r\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\r\nimport Box from './types/Box.js'\r\nimport Circle from './elements/Circle.js'\r\nimport Color from './types/Color.js'\r\nimport Container from './elements/Container.js'\r\nimport Defs from './elements/Defs.js'\r\nimport Dom from './elements/Dom.js'\r\nimport Element from './elements/Element.js'\r\nimport Ellipse from './elements/Ellipse.js'\r\nimport EventTarget from './types/EventTarget.js'\r\nimport Gradient from './elements/Gradient.js'\r\nimport Image from './elements/Image.js'\r\nimport Line from './elements/Line.js'\r\nimport List from './types/List.js'\r\nimport Marker from './elements/Marker.js'\r\nimport Matrix from './types/Matrix.js'\r\nimport Morphable, {\r\n NonMorphable,\r\n ObjectBag,\r\n TransformBag,\r\n makeMorphable,\r\n registerMorphableType\r\n} from './animation/Morphable.js'\r\nimport Path from './elements/Path.js'\r\nimport PathArray from './types/PathArray.js'\r\nimport Pattern from './elements/Pattern.js'\r\nimport PointArray from './types/PointArray.js'\r\nimport Polygon from './elements/Polygon.js'\r\nimport Polyline from './elements/Polyline.js'\r\nimport Rect from './elements/Rect.js'\r\nimport Runner from './animation/Runner.js'\r\nimport SVGArray from './types/SVGArray.js'\r\nimport SVGNumber from './types/SVGNumber.js'\r\nimport Shape from './elements/Shape.js'\r\nimport Svg from './elements/Svg.js'\r\nimport Symbol from './elements/Symbol.js'\r\nimport Text from './elements/Text.js'\r\nimport Tspan from './elements/Tspan.js'\r\nimport * as defaults from './modules/core/defaults.js'\r\nimport * as utils from './utils/utils.js'\r\nimport * as namespaces from './modules/core/namespaces.js'\r\nimport * as regex from './modules/core/regex.js'\r\n\r\nexport {\r\n Morphable,\r\n registerMorphableType,\r\n makeMorphable,\r\n TransformBag,\r\n ObjectBag,\r\n NonMorphable\r\n}\r\n\r\nexport { defaults, utils, namespaces, regex }\r\nexport const SVG = makeInstance\r\nexport { default as parser } from './modules/core/parser.js'\r\nexport { default as find } from './modules/core/selector.js'\r\nexport * from './modules/core/event.js'\r\nexport * from './utils/adopter.js'\r\nexport { registerWindow } from './utils/window.js'\r\n\r\n/* Animation Modules */\r\nexport { default as Animator } from './animation/Animator.js'\r\nexport { Controller, Ease, PID, Spring, easing } from './animation/Controller.js'\r\nexport { default as Queue } from './animation/Queue.js'\r\nexport { default as Runner } from './animation/Runner.js'\r\nexport { default as Timeline } from './animation/Timeline.js'\r\n\r\n/* Types */\r\nexport { default as Array } from './types/SVGArray.js'\r\nexport { default as Box } from './types/Box.js'\r\nexport { default as Color } from './types/Color.js'\r\nexport { default as EventTarget } from './types/EventTarget.js'\r\nexport { default as Matrix } from './types/Matrix.js'\r\nexport { default as Number } from './types/SVGNumber.js'\r\nexport { default as PathArray } from './types/PathArray.js'\r\nexport { default as Point } from './types/Point.js'\r\nexport { default as PointArray } from './types/PointArray.js'\r\nexport { default as List } from './types/List.js'\r\n\r\n/* Elements */\r\nexport { default as Circle } from './elements/Circle.js'\r\nexport { default as ClipPath } from './elements/ClipPath.js'\r\nexport { default as Container } from './elements/Container.js'\r\nexport { default as Defs } from './elements/Defs.js'\r\nexport { default as Dom } from './elements/Dom.js'\r\nexport { default as Element } from './elements/Element.js'\r\nexport { default as Ellipse } from './elements/Ellipse.js'\r\nexport { default as Gradient } from './elements/Gradient.js'\r\nexport { default as G } from './elements/G.js'\r\nexport { default as A } from './elements/A.js'\r\nexport { default as Image } from './elements/Image.js'\r\nexport { default as Line } from './elements/Line.js'\r\nexport { default as Marker } from './elements/Marker.js'\r\nexport { default as Mask } from './elements/Mask.js'\r\nexport { default as Path } from './elements/Path.js'\r\nexport { default as Pattern } from './elements/Pattern.js'\r\nexport { default as Polygon } from './elements/Polygon.js'\r\nexport { default as Polyline } from './elements/Polyline.js'\r\nexport { default as Rect } from './elements/Rect.js'\r\nexport { default as Shape } from './elements/Shape.js'\r\nexport { default as Stop } from './elements/Stop.js'\r\nexport { default as Style } from './elements/Style.js'\r\nexport { default as Svg } from './elements/Svg.js'\r\nexport { default as Symbol } from './elements/Symbol.js'\r\nexport { default as Text } from './elements/Text.js'\r\nexport { default as TextPath } from './elements/TextPath.js'\r\nexport { default as Tspan } from './elements/Tspan.js'\r\nexport { default as Use } from './elements/Use.js'\r\n\r\nextend([\r\n Svg,\r\n Symbol,\r\n Image,\r\n Pattern,\r\n Marker\r\n], getMethodsFor('viewbox'))\r\n\r\nextend([\r\n Line,\r\n Polyline,\r\n Polygon,\r\n Path\r\n], getMethodsFor('marker'))\r\n\r\nextend(Text, getMethodsFor('Text'))\r\nextend(Path, getMethodsFor('Path'))\r\n\r\nextend(Defs, getMethodsFor('Defs'))\r\n\r\nextend([\r\n Text,\r\n Tspan\r\n], getMethodsFor('Tspan'))\r\n\r\nextend([\r\n Rect,\r\n Ellipse,\r\n Circle,\r\n Gradient\r\n], getMethodsFor('radius'))\r\n\r\nextend(EventTarget, getMethodsFor('EventTarget'))\r\nextend(Dom, getMethodsFor('Dom'))\r\nextend(Element, getMethodsFor('Element'))\r\nextend(Shape, getMethodsFor('Shape'))\r\n// extend(Element, getConstructor('Memory'))\r\nextend(Container, getMethodsFor('Container'))\r\n\r\nextend(Runner, getMethodsFor('Runner'))\r\n\r\nList.extend(getMethodNames())\r\n\r\nregisterMorphableType([\r\n SVGNumber,\r\n Color,\r\n Box,\r\n Matrix,\r\n SVGArray,\r\n PointArray,\r\n PathArray\r\n])\r\n\r\nmakeMorphable()\r\n"],"names":["global","core","require$$0","require$$1","uid","isObject","document","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","cof","IObject","defined","has","hide","aFunction","ctx","redefine","toInteger","min","toIObject","toLength","toAbsoluteIndex","$keys","enumBugKeys","getKeys","IE_PROTO","PROTOTYPE","dPs","create","descriptor","setToStringTag","toObject","$iterCreate","getPrototypeOf","LIBRARY","Iterators","$export","step","addToUnscopables","ITERATOR","wks","$iterators","methods","names","registerMethods","name","m","Array","isArray","_name","addMethodNames","Object","keys","assign","getMethodsFor","getMethodNames","Set","_names","push","fails","map","array","block","i","il","length","result","filter","radians","d","Math","PI","degrees","r","camelCase","s","toLowerCase","replace","g","toUpperCase","unCamelCase","capitalize","charAt","slice","proportionalSize","element","width","height","box","bbox","getOrigin","o","origin","ox","oy","string","trim","x","y","bx","includes","by","ns","xmlns","xlink","svgjs","globals","window","registerWindow","win","doc","Base","elements","root","makeNode","createElementNS","makeInstance","adopter","querySelector","node","innerHTML","firstChild","nodeOrNew","Node","adopt","instance","className","nodeName","mockAdopt","mock","register","asRoot","prototype","getClass","did","eid","assignNewId","children","id","extend","modules","attrCheck","key","method","wrapWithAttrCheck","fn","args","constructor","apply","attr","siblings","parent","position","index","next","prev","forward","p","removeElement","add","isRoot","appendChild","defs","backward","front","back","before","remove","after","insertBefore","insertAfter","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isCss","isBlank","isNumber","isPercent","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","classes","split","hasClass","indexOf","addClass","join","removeClass","c","toggleClass","css","style","val","ret","arguments","cssText","el","forEach","t","cased","test","show","visible","data","a","v","JSON","parse","e","stringify","remember","k","memory","forget","_memory","listenerId","getEvents","n","getEventHolder","events","getEventTarget","clearEvents","on","listener","binding","options","l","bind","bag","_svgjsListenerId","event","ev","addEventListener","off","namespace","removeEventListener","dispatch","Event","dispatchEvent","CustomEvent","detail","cancelable","DESCRIPTORS","$flags","fullHex","substring","compToHex","comp","toString","Color","init","color","b","match","exec","parseInt","toHex","toArray","round","toRgb","brightness","isColor","Point","source","base","clone","transform","f","point","screenCTM","inverse","parser","nodes","svg","size","path","parentNode","body","documentElement","addTo","isNulledBox","w","h","domContains","contains","call","Box","parseFloat","left","top","x2","y2","cx","cy","merge","max","xMin","Infinity","xMax","yMin","yMax","pts","addOffset","pageXOffset","pageYOffset","isNulled","getBox","cb","retry","Error","getBBox","rbox","getBoundingClientRect","viewbox","closeEnough","threshold","abs","Matrix","fromArray","Element","matrixify","isMatrixLike","matrix","multiplyO","formatTransforms","current","transformer","translateO","rx","ry","lmultiplyO","scaleO","scaleX","scaleY","skewO","skewX","skewY","shearO","shear","rotateO","theta","isFinite","px","py","dx","dy","tx","ty","compose","originX","originY","sx","sy","lam","rotate","translateX","translateY","decompose","determinant","ccw","sqrt","thetaRad","atan2","ct","cos","st","sin","multiply","matrixMultiply","lmultiply","inverseO","det","na","nb","nc","nd","ne","nf","translate","scale","flip","axis","around","flipO","lx","skew","tan","ly","skewXO","skewYO","aroundO","equals","other","valueOf","flipBoth","flipX","flipY","positionX","positionY","relative","relativeX","relativeY","ctm","getCTM","rect","getScreenCTM","subClassArray","Function","baseClass","_constructor","Arr","arr","List","each","fnOrMethodName","concat","reduce","obj","attrs","baseFind","query","querySelectorAll","find","EventTarget","type","j","defaultPrevented","fire","noop","timeline","duration","ease","delay","fill","stroke","opacity","offset","SVGArray","toSet","SVGNumber","value","unit","isNaN","toJSON","plus","number","minus","times","divide","hooks","registerAttrHook","attributes","nodeValue","last","curr","removeAttribute","getAttribute","defaults","_val","hook","leading","setAttributeNS","setAttribute","rebuild","Dom","childNodes","put","clear","hasChildNodes","removeChild","lastChild","_defs","writeDataToDom","cloneNode","deep","first","get","matches","selector","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","SVGElement","putIn","replaceChild","precision","factor","newAttrs","svgOrFn","outerHTML","well","len","fragment","_this","createDocumentFragment","firstElementChild","words","text","textContent","Svg","dom","hasAttribute","setData","center","inside","move","parents","until","sugar","prefix","extension","mat","angle","direction","directionString","dmove","radius","_element","getTotalLength","pointAt","getPointAtLength","font","ax","ay","amove","defineProperty","untransform","str","kv","reverse","toParent","pCtm","toRoot","decomposed","cleanRelative","Shape","Circle","circle","Container","flatten","ungroup","Defs","Ellipse","circled","ellipse","Stop","update","from","fx","fy","x1","y1","to","Gradient","stop","url","targets","gradiented","gradient","Pattern","pattern","patternUnits","Image","load","callback","img","src","image","PointArray","toLine","at","pos","destination","points","pop","maxX","maxY","minX","minY","MorphArray","Line","plot","pointed","line","Marker","ref","marker","makeSetterGetter","easing","bezier","steps","stepPosition","jumps","beforeFlag","floor","jumping","Stepper","done","Ease","Controller","stepper","target","dt","recalculate","_duration","overshoot","_overshoot","eps","pi","os","log","zeta","wn","Spring","velocity","acceleration","newPosition","PID","windup","integral","error","P","I","D","PathArray","pathRegReplace","arrayToString","pathHandlers","M","p0","L","H","V","C","S","Q","T","Z","A","mlhvqtcsaz","jl","equalCommands","pathArray","morph","sourceArray","destinationArray","paramCnt","Morphable","_stepper","_from","_to","_type","_context","_morphObj","_set","NonMorphable","morphableTypes","ObjectBag","complete","TransformBag","objOrArr","values","entries","sort","registerMorphableType","makeMorphable","Path","_array","Polygon","polygon","poly","Polyline","polyline","Rect","Queue","_first","_last","item","shift","Animator","nextDraw","frames","timeouts","timer","performance","Date","frame","run","requestAnimationFrame","_draw","transform_frame","timeout","time","now","cancelFrame","clearTimeout","nextTimeout","lastTimeout","nextFrame","lastFrame","makeSchedule","runnerInfo","start","runner","end","defaultSource","Timeline","timeSource","_timeSource","_startTime","_speed","_persist","_nextFrame","_paused","_runners","_order","_time","_lastSourceTime","_lastStepTime","_step","schedule","when","absoluteStartTime","endTime","getEndTime","unschedule","persist","updateTime","_continue","splice","lastRunnerInfo","lastDuration","lastStartTime","active","play","pause","finish","speed","yes","currentSpeed","positive","seek","dtOrForever","immediateStep","dtSource","dtTime","runnersLeft","dtToStart","reset","finished","_timeline","Runner","_queue","_isDeclarative","_history","enabled","_lastTime","_reseted","transformId","_haveReversed","_reverse","_loopsDone","_swing","_wait","_times","_prepareRunner","animate","sanitise","loop","swing","wait","queue","initFn","runFn","retargetFn","isTransform","initialiser","retarget","initialised","during","loops","loopDuration","loopsDone","relativeTime","whole","partial","swinging","backwards","uncliped","pow","clipped","swingForward","forwards","progress","running","_lastPosition","justStarted","justFinished","declarative","_initialise","converged","_run","_rememberMorpher","morpher","caller","_tryRetarget","needsIt","positionOrDt","allfinished","addTransform","clearTransform","clearTransformsFromQueue","FakeRunner","mergeWith","getRunnerTransform","mergeTransforms","runners","_transformationRunners","netTransform","_frameId","RunnerArray","ids","leftSibling","getByID","lastRunner","edit","newRunner","clearBefore","deleteCnt","frameId","_clearTransformRunnersBefore","currentRunner","_currentTransform","addRunner","styleAttr","zoom","level","affine","isMatrix","currentAngle","startTransform","setup","undefined","rTarget","rCurrent","possibilities","distances","shortest","affineParameters","newTransforms","_queueNumber","_queueNumberDelta","newTo","_queueObject","version","getElementsByTagName","nested","Symbol","symbol","plain","_build","createTextNode","getComputedTextLength","Text","_rebuild","firstLine","nodeType","newLined","build","tspan","newLine","self","blankLineOffset","fontSize","getComputedStyle","getPropertyValue","textable","Tspan","ClipPath","unclip","clip","clipWith","clipper","G","group","link","linkTo","Mask","unmask","mask","maskWith","masker","cssRule","rule","Style","addText","params","fontFamily","fontface","TextPath","track","textPath","txt","Use","file","use","SVG"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAI,IAAI,GAAG,cAAc,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACjD,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;;;;;;ACAvC,IAAI,MAAM,GAAG,cAAc,GAAG,OAAO,MAAM,IAAI,WAAW,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI;IAC7E,MAAM,GAAG,OAAO,IAAI,IAAI,WAAW,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI;;IAE/D,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;AAC9B,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE,GAAG,GAAG,MAAM,CAAC;;;ACLzC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N;AAEAqF,MAAM,CAAC+mB,MAAD,EAASpsB,aAAa,CAAC,QAAD,CAAtB,CAAN;AAEA+W,IAAI,CAAC1R,MAAL,CAAYpF,cAAc,EAA1B;AAEA4mB,qBAAqB,CAAC,CACpBnO,SADoB,EAEpB9L,KAFoB,EAGpBqC,GAHoB,EAIpB+B,MAJoB,EAKpBwH,QALoB,EAMpBqI,UANoB,EAOpBwD,SAPoB,CAAD,CAArB;AAUAyC,aAAa;;;;"} \ No newline at end of file
+{"version":3,"file":"svg.js","sources":["../node_modules/core-js/modules/_core.js","../node_modules/core-js/modules/_global.js","../node_modules/core-js/modules/_library.js","../node_modules/core-js/modules/_shared.js","../node_modules/core-js/modules/_uid.js","../node_modules/core-js/modules/_wks.js","../node_modules/core-js/modules/_is-object.js","../node_modules/core-js/modules/_an-object.js","../node_modules/core-js/modules/_fails.js","../node_modules/core-js/modules/_descriptors.js","../node_modules/core-js/modules/_dom-create.js","../node_modules/core-js/modules/_ie8-dom-define.js","../node_modules/core-js/modules/_to-primitive.js","../node_modules/core-js/modules/_object-dp.js","../node_modules/core-js/modules/_property-desc.js","../node_modules/core-js/modules/_hide.js","../node_modules/core-js/modules/_add-to-unscopables.js","../node_modules/core-js/modules/_iter-step.js","../node_modules/core-js/modules/_iterators.js","../node_modules/core-js/modules/_cof.js","../node_modules/core-js/modules/_iobject.js","../node_modules/core-js/modules/_defined.js","../node_modules/core-js/modules/_to-iobject.js","../node_modules/core-js/modules/_has.js","../node_modules/core-js/modules/_redefine.js","../node_modules/core-js/modules/_a-function.js","../node_modules/core-js/modules/_ctx.js","../node_modules/core-js/modules/_export.js","../node_modules/core-js/modules/_to-integer.js","../node_modules/core-js/modules/_to-length.js","../node_modules/core-js/modules/_to-absolute-index.js","../node_modules/core-js/modules/_array-includes.js","../node_modules/core-js/modules/_shared-key.js","../node_modules/core-js/modules/_object-keys-internal.js","../node_modules/core-js/modules/_enum-bug-keys.js","../node_modules/core-js/modules/_object-keys.js","../node_modules/core-js/modules/_object-dps.js","../node_modules/core-js/modules/_html.js","../node_modules/core-js/modules/_object-create.js","../node_modules/core-js/modules/_set-to-string-tag.js","../node_modules/core-js/modules/_iter-create.js","../node_modules/core-js/modules/_to-object.js","../node_modules/core-js/modules/_object-gpo.js","../node_modules/core-js/modules/_iter-define.js","../node_modules/core-js/modules/es6.array.iterator.js","../node_modules/core-js/modules/web.dom.iterable.js","../src/utils/methods.js","../node_modules/core-js/modules/_fix-re-wks.js","../node_modules/core-js/modules/es6.regexp.replace.js","../src/utils/utils.js","../src/modules/core/namespaces.js","../src/utils/window.js","../src/types/Base.js","../src/utils/adopter.js","../src/modules/optional/arrange.js","../node_modules/core-js/modules/_is-regexp.js","../node_modules/core-js/modules/es6.regexp.split.js","../src/modules/core/regex.js","../src/modules/optional/class.js","../src/modules/optional/css.js","../src/modules/optional/data.js","../src/modules/optional/memory.js","../src/modules/core/event.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/core-js/modules/_flags.js","../node_modules/core-js/modules/es6.regexp.flags.js","../node_modules/core-js/modules/es6.regexp.to-string.js","../src/types/Color.js","../node_modules/core-js/modules/es6.regexp.match.js","../src/types/Point.js","../src/modules/core/parser.js","../src/types/Box.js","../src/types/Matrix.js","../src/types/ArrayPolyfill.js","../src/types/List.js","../src/modules/core/selector.js","../src/types/EventTarget.js","../src/modules/core/defaults.js","../src/types/SVGArray.js","../src/types/SVGNumber.js","../src/modules/core/attr.js","../src/elements/Dom.js","../src/elements/Element.js","../src/modules/optional/sugar.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/objectSpread.js","../src/modules/optional/transform.js","../src/modules/core/circled.js","../src/elements/Shape.js","../src/elements/Circle.js","../src/elements/Container.js","../src/elements/Defs.js","../src/elements/Ellipse.js","../src/elements/Stop.js","../src/modules/core/gradiented.js","../src/elements/Gradient.js","../src/elements/Pattern.js","../src/elements/Image.js","../src/types/PointArray.js","../src/modules/core/pointed.js","../src/elements/Line.js","../src/elements/Marker.js","../node_modules/core-js/modules/_strict-method.js","../node_modules/core-js/modules/es6.array.sort.js","../src/animation/Controller.js","../src/types/PathArray.js","../src/animation/Morphable.js","../src/elements/Path.js","../src/modules/core/poly.js","../src/elements/Polygon.js","../src/elements/Polyline.js","../src/elements/Rect.js","../src/animation/Queue.js","../src/animation/Animator.js","../src/animation/Timeline.js","../src/animation/Runner.js","../src/elements/Svg.js","../src/elements/Symbol.js","../src/modules/core/textable.js","../src/elements/Text.js","../src/elements/Tspan.js","../src/elements/ClipPath.js","../src/elements/G.js","../src/elements/A.js","../src/elements/Mask.js","../src/elements/Style.js","../src/elements/TextPath.js","../src/elements/Use.js","../src/main.js"],"sourcesContent":["var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","module.exports = false;\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","const methods = {}\r\nconst names = []\r\n\r\nexport function registerMethods (name, m) {\r\n if (Array.isArray(name)) {\r\n for (let _name of name) {\r\n registerMethods(_name, m)\r\n }\r\n return\r\n }\r\n\r\n if (typeof name === 'object') {\r\n for (let _name in name) {\r\n registerMethods(_name, name[_name])\r\n }\r\n return\r\n }\r\n\r\n addMethodNames(Object.keys(m))\r\n methods[name] = Object.assign(methods[name] || {}, m)\r\n}\r\n\r\nexport function getMethodsFor (name) {\r\n return methods[name] || {}\r\n}\r\n\r\nexport function getMethodNames () {\r\n return [ ...new Set(names) ]\r\n}\r\n\r\nexport function addMethodNames (_names) {\r\n names.push(..._names)\r\n}\r\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","// Map function\r\nexport function map (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n result.push(block(array[i]))\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Filter function\r\nexport function filter (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n if (block(array[i])) {\r\n result.push(array[i])\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Degrees to radians\r\nexport function radians (d) {\r\n return d % 360 * Math.PI / 180\r\n}\r\n\r\n// Radians to degrees\r\nexport function degrees (r) {\r\n return r * 180 / Math.PI % 360\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nexport function camelCase (s) {\r\n return s.toLowerCase().replace(/-(.)/g, function (m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Convert camel cased string to string seperated\r\nexport function unCamelCase (s) {\r\n return s.replace(/([A-Z])/g, function (m, g) {\r\n return '-' + g.toLowerCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nexport function capitalize (s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nexport function proportionalSize (element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null) {\r\n width = box.width / box.height * height\r\n } else if (height == null) {\r\n height = box.height / box.width * width\r\n }\r\n }\r\n\r\n return {\r\n width: width,\r\n height: height\r\n }\r\n}\r\n\r\nexport function getOrigin (o, element) {\r\n // Allow origin or around as the names\r\n let origin = o.origin // o.around == null ? o.origin : o.around\r\n let ox, oy\r\n\r\n // Allow the user to pass a string to rotate around a given point\r\n if (typeof origin === 'string' || origin == null) {\r\n // Get the bounding box of the element with no transformations applied\r\n const string = (origin || 'center').toLowerCase().trim()\r\n const { height, width, x, y } = element.bbox()\r\n\r\n // Calculate the transformed x and y coordinates\r\n let bx = string.includes('left') ? x\r\n : string.includes('right') ? x + width\r\n : x + width / 2\r\n let by = string.includes('top') ? y\r\n : string.includes('bottom') ? y + height\r\n : y + height / 2\r\n\r\n // Set the bounds eg : \"bottom-left\", \"Top right\", \"middle\" etc...\r\n ox = o.ox != null ? o.ox : bx\r\n oy = o.oy != null ? o.oy : by\r\n } else {\r\n ox = origin[0]\r\n oy = origin[1]\r\n }\r\n\r\n // Return the origin as it is if it wasn't a string\r\n return [ ox, oy ]\r\n}\r\n","// Default namespaces\r\nexport let ns = 'http://www.w3.org/2000/svg'\r\nexport let xmlns = 'http://www.w3.org/2000/xmlns/'\r\nexport let xlink = 'http://www.w3.org/1999/xlink'\r\nexport let svgjs = 'http://svgjs.com/svgjs'\r\n","export const globals = {\r\n window: typeof window === 'undefined' ? null : window,\r\n document: typeof document === 'undefined' ? null : document\r\n}\r\n\r\nexport function registerWindow (win = null, doc = null) {\r\n globals.window = win\r\n globals.document = doc\r\n}\r\n\r\nconst save = {}\r\n\r\nexport function saveWindow () {\r\n save.window = globals.window\r\n save.document = globals.document\r\n}\r\n\r\nexport function restoreWindow () {\r\n globals.window = save.window\r\n globals.document = save.document\r\n}\r\n\r\nexport function withWindow (win, fn) {\r\n saveWindow()\r\n registerWindow(win, win.document)\r\n fn(win, win.document)\r\n restoreWindow()\r\n}\r\n\r\nexport function getWindow () {\r\n return globals.window\r\n}\r\n","export default class Base {\r\n // constructor (node/*, {extensions = []} */) {\r\n // // this.tags = []\r\n // //\r\n // // for (let extension of extensions) {\r\n // // extension.setup.call(this, node)\r\n // // this.tags.push(extension.name)\r\n // // }\r\n // }\r\n}\r\n","import { addMethodNames } from './methods.js'\r\nimport { capitalize } from './utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Base from '../types/Base.js'\r\n\r\nconst elements = {}\r\nexport const root = '___SYMBOL___ROOT___'\r\n\r\n// Method for element creation\r\nexport function makeNode (name) {\r\n // create element\r\n return globals.document.createElementNS(ns, name)\r\n}\r\n\r\nexport function makeInstance (element) {\r\n if (element instanceof Base) return element\r\n\r\n if (typeof element === 'object') {\r\n return adopter(element)\r\n }\r\n\r\n if (element == null) {\r\n return new elements[root]()\r\n }\r\n\r\n if (typeof element === 'string' && element.charAt(0) !== '<') {\r\n return adopter(globals.document.querySelector(element))\r\n }\r\n\r\n var node = makeNode('svg')\r\n node.innerHTML = element\r\n\r\n // We can use firstChild here because we know,\r\n // that the first char is < and thus an element\r\n element = adopter(node.firstChild)\r\n\r\n return element\r\n}\r\n\r\nexport function nodeOrNew (name, node) {\r\n return node instanceof globals.window.Node ? node : makeNode(name)\r\n}\r\n\r\n// Adopt existing svg elements\r\nexport function adopt (node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance instanceof Base) return node.instance\r\n\r\n // initialize variables\r\n var className = capitalize(node.nodeName)\r\n\r\n // Make sure that gradients are adopted correctly\r\n if (className === 'LinearGradient' || className === 'RadialGradient') {\r\n className = 'Gradient'\r\n\r\n // Fallback to Dom if element is not known\r\n } else if (!elements[className]) {\r\n className = 'Dom'\r\n }\r\n\r\n return new elements[className](node)\r\n}\r\n\r\nlet adopter = adopt\r\n\r\nexport function mockAdopt (mock = adopt) {\r\n adopter = mock\r\n}\r\n\r\nexport function register (element, name = element.name, asRoot = false) {\r\n elements[name] = element\r\n if (asRoot) elements[root] = element\r\n\r\n addMethodNames(Object.keys(element.prototype))\r\n\r\n return element\r\n}\r\n\r\nexport function getClass (name) {\r\n return elements[name]\r\n}\r\n\r\n// Element id sequence\r\nlet did = 1000\r\n\r\n// Get next named element id\r\nexport function eid (name) {\r\n return 'Svgjs' + capitalize(name) + (did++)\r\n}\r\n\r\n// Deep new id assignment\r\nexport function assignNewId (node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.children.length - 1; i >= 0; i--) {\r\n assignNewId(node.children[i])\r\n }\r\n\r\n if (node.id) {\r\n return adopt(node).id(eid(node.nodeName))\r\n }\r\n\r\n return adopt(node)\r\n}\r\n\r\n// Method for extending objects\r\nexport function extend (modules, methods, attrCheck) {\r\n var key, i\r\n\r\n modules = Array.isArray(modules) ? modules : [ modules ]\r\n\r\n for (i = modules.length - 1; i >= 0; i--) {\r\n for (key in methods) {\r\n let method = methods[key]\r\n if (attrCheck) {\r\n method = wrapWithAttrCheck(methods[key])\r\n }\r\n modules[i].prototype[key] = method\r\n }\r\n }\r\n}\r\n\r\n// export function extendWithAttrCheck (...args) {\r\n// extend(...args, true)\r\n// }\r\n\r\nexport function wrapWithAttrCheck (fn) {\r\n return function (...args) {\r\n let o = args[args.length - 1]\r\n\r\n if (o && o.constructor === Object && !(o instanceof Array)) {\r\n return fn.apply(this, args.slice(0, -1)).attr(o)\r\n } else {\r\n return fn.apply(this, args)\r\n }\r\n }\r\n}\r\n","import { makeInstance } from '../../utils/adopter.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Get all siblings, including myself\r\nexport function siblings () {\r\n return this.parent().children()\r\n}\r\n\r\n// Get the curent position siblings\r\nexport function position () {\r\n return this.parent().index(this)\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function next () {\r\n return this.siblings()[this.position() + 1]\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function prev () {\r\n return this.siblings()[this.position() - 1]\r\n}\r\n\r\n// Send given element one step forward\r\nexport function forward () {\r\n var i = this.position() + 1\r\n var p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element one step backward\r\nexport function backward () {\r\n var i = this.position()\r\n\r\n if (i > 0) {\r\n this.parent().removeElement(this).add(this, i - 1)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the front\r\nexport function front () {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the back\r\nexport function back () {\r\n if (this.position() > 0) {\r\n this.parent().removeElement(this).add(this, 0)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element before the targeted element\r\nexport function before (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element after the targeted element\r\nexport function after (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n}\r\n\r\nexport function insertBefore (element) {\r\n element = makeInstance(element)\r\n element.before(this)\r\n}\r\n\r\nexport function insertAfter (element) {\r\n element = makeInstance(element)\r\n element.after(this)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n siblings,\r\n position,\r\n next,\r\n prev,\r\n forward,\r\n backward,\r\n front,\r\n back,\r\n before,\r\n after,\r\n insertBefore,\r\n insertAfter\r\n})\r\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n","// Parse unit value\r\nexport let numberAndUnit = /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n// Parse hex value\r\nexport let hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n// Parse rgb value\r\nexport let rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n// Parse reference id\r\nexport let reference = /(#[a-z0-9\\-_]+)/i\r\n\r\n// splits a transformation chain\r\nexport let transforms = /\\)\\s*,?\\s*/\r\n\r\n// Whitespace\r\nexport let whitespace = /\\s/g\r\n\r\n// Test hex value\r\nexport let isHex = /^#[a-f0-9]{3,6}$/i\r\n\r\n// Test rgb value\r\nexport let isRgb = /^rgb\\(/\r\n\r\n// Test css declaration\r\nexport let isCss = /[^:]+:[^;]+;?/\r\n\r\n// Test for blank string\r\nexport let isBlank = /^(\\s+)?$/\r\n\r\n// Test for numeric string\r\nexport let isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n// Test for percent value\r\nexport let isPercent = /^-?[\\d.]+%$/\r\n\r\n// Test for image url\r\nexport let isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n// split at whitespace and comma\r\nexport let delimiter = /[\\s,]+/\r\n\r\n// The following regex are used to parse the d attribute of a path\r\n\r\n// Matches all hyphens which are not after an exponent\r\nexport let hyphen = /([^e])-/gi\r\n\r\n// Replaces and tests for all path letters\r\nexport let pathLetters = /[MLHVCSQTAZ]/gi\r\n\r\n// yes we need this one, too\r\nexport let isPathLetter = /[MLHVCSQTAZ]/i\r\n\r\n// matches 0.154.23.45\r\nexport let numbersWithDots = /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n// matches .\r\nexport let dots = /\\./g\r\n","import { delimiter } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Return array of classes on the node\r\nexport function classes () {\r\n var attr = this.attr('class')\r\n return attr == null ? [] : attr.trim().split(delimiter)\r\n}\r\n\r\n// Return true if class exists on the node, false otherwise\r\nexport function hasClass (name) {\r\n return this.classes().indexOf(name) !== -1\r\n}\r\n\r\n// Add class to the node\r\nexport function addClass (name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Remove class from the node\r\nexport function removeClass (name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function (c) {\r\n return c !== name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Toggle the presence of a class on the node\r\nexport function toggleClass (name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n classes, hasClass, addClass, removeClass, toggleClass\r\n})\r\n","import { camelCase } from '../../utils/utils.js'\r\nimport { isBlank } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Dynamic style generator\r\nexport function css (style, val) {\r\n let ret = {}\r\n if (arguments.length === 0) {\r\n // get full style as object\r\n this.node.style.cssText.split(/\\s*;\\s*/)\r\n .filter(function (el) {\r\n return !!el.length\r\n })\r\n .forEach(function (el) {\r\n let t = el.split(/\\s*:\\s*/)\r\n ret[t[0]] = t[1]\r\n })\r\n return ret\r\n }\r\n\r\n if (arguments.length < 2) {\r\n // get style properties in the array\r\n if (Array.isArray(style)) {\r\n for (let name of style) {\r\n let cased = camelCase(name)\r\n ret[cased] = this.node.style[cased]\r\n }\r\n return ret\r\n }\r\n\r\n // get style for property\r\n if (typeof style === 'string') {\r\n return this.node.style[camelCase(style)]\r\n }\r\n\r\n // set styles in object\r\n if (typeof style === 'object') {\r\n for (let name in style) {\r\n // set empty string if null/undefined/'' was given\r\n this.node.style[camelCase(name)]\r\n = (style[name] == null || isBlank.test(style[name])) ? '' : style[name]\r\n }\r\n }\r\n }\r\n\r\n // set style for property\r\n if (arguments.length === 2) {\r\n this.node.style[camelCase(style)]\r\n = (val == null || isBlank.test(val)) ? '' : val\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Show element\r\nexport function show () {\r\n return this.css('display', '')\r\n}\r\n\r\n// Hide element\r\nexport function hide () {\r\n return this.css('display', 'none')\r\n}\r\n\r\n// Is element visible?\r\nexport function visible () {\r\n return this.css('display') !== 'none'\r\n}\r\n\r\nregisterMethods('Dom', {\r\n css, show, hide, visible\r\n})\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Store data values on svg nodes\r\nexport function data (a, v, r) {\r\n if (typeof a === 'object') {\r\n for (v in a) {\r\n this.data(v, a[v])\r\n }\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch (e) {\r\n return this.attr('data-' + a)\r\n }\r\n } else {\r\n this.attr('data-' + a,\r\n v === null ? null\r\n : r === true || typeof v === 'string' || typeof v === 'number' ? v\r\n : JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n}\r\n\r\nregisterMethods('Dom', { data })\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Remember arbitrary data\r\nexport function remember (k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] === 'object') {\r\n for (var key in k) {\r\n this.remember(key, k[key])\r\n }\r\n } else if (arguments.length === 1) {\r\n // retrieve memory\r\n return this.memory()[k]\r\n } else {\r\n // store memory\r\n this.memory()[k] = v\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Erase a given memory\r\nexport function forget () {\r\n if (arguments.length === 0) {\r\n this._memory = {}\r\n } else {\r\n for (var i = arguments.length - 1; i >= 0; i--) {\r\n delete this.memory()[arguments[i]]\r\n }\r\n }\r\n return this\r\n}\r\n\r\n// This triggers creation of a new hidden class which is not performant\r\n// However, this function is not rarely used so it will not happen frequently\r\n// Return local memory object\r\nexport function memory () {\r\n return (this._memory = this._memory || {})\r\n}\r\n\r\nregisterMethods('Dom', { remember, forget, memory })\r\n","import { delimiter } from './regex.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\n\r\nlet listenerId = 0\r\n\r\nfunction getEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (!n.events) n.events = {}\r\n return n.events\r\n}\r\n\r\nfunction getEventTarget (node) {\r\n return makeInstance(node).getEventTarget()\r\n}\r\n\r\nfunction clearEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (n.events) n.events = {}\r\n}\r\n\r\n// Add event binder in the SVG namespace\r\nexport function on (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // events can be an array of events or a string of events\r\n events = Array.isArray(events) ? events : events.split(delimiter)\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) {\r\n listener._svgjsListenerId = ++listenerId\r\n }\r\n\r\n events.forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nexport function off (node, events, listener, options) {\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n // events can be an array of events or a string or undefined\r\n events = Array.isArray(events) ? events : (events || '').split(delimiter)\r\n\r\n events.forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) {\r\n off(n, [ ev, ns ].join('.'), l)\r\n }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) {\r\n off(n, [ event, ns ].join('.'))\r\n }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) {\r\n off(n, [ ev, namespace ].join('.'))\r\n }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) {\r\n off(n, event)\r\n }\r\n\r\n clearEvents(node)\r\n }\r\n })\r\n}\r\n\r\nexport function dispatch (node, event, data) {\r\n var n = getEventTarget(node)\r\n\r\n // Dispatch event\r\n if (event instanceof globals.window.Event) {\r\n n.dispatchEvent(event)\r\n } else {\r\n event = new globals.window.CustomEvent(event, { detail: data, cancelable: true })\r\n n.dispatchEvent(event)\r\n }\r\n return event\r\n}\r\n","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","\r\nimport { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\r\n\r\nfunction sixDigitHex (hex) {\r\n return hex.length === 4\r\n ? [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2),\r\n hex.substring(2, 3), hex.substring(2, 3),\r\n hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('')\r\n : hex\r\n}\r\n\r\nfunction componentHex (component) {\r\n const integer = Math.round(component)\r\n const hex = integer.toString(16)\r\n return hex.length === 1 ? '0' + hex : hex\r\n}\r\n\r\nfunction is (object, space) {\r\n for (const key of space) {\r\n if (object[key] == null) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction getParameters (a, b) {\r\n const params = is(a, 'rgb') ? { _a: a.r, _b: a.g, _c: a.b, space: 'rgb' }\r\n : is(a, 'xyz') ? { _a: a.x, _b: a.y, _c: a.z, _d: 0, space: 'xyz' }\r\n : is(a, 'hsl') ? { _a: a.h, _b: a.s, _c: a.l, _d: 0, space: 'hsl' }\r\n : is(a, 'lab') ? { _a: a.l, _b: a.a, _c: a.b, _d: 0, space: 'lab' }\r\n : is(a, 'lch') ? { _a: a.l, _b: a.c, _c: a.h, _d: 0, space: 'lch' }\r\n : is(a, 'cmyk') ? { _a: a.c, _b: a.m, _c: a.y, _d: a.k, space: 'cmyk' }\r\n : { _a: 0, _b: 0, _c: 0, space: 'rgb' }\r\n\r\n params.space = b || params.space\r\n return params\r\n}\r\n\r\nfunction cieSpace (space) {\r\n if (space === 'lab' || space === 'xyz' || space === 'lch') {\r\n return true\r\n } else {\r\n return false\r\n }\r\n}\r\n\r\nfunction hueToRgb (p, q, t) {\r\n if (t < 0) t += 1\r\n if (t > 1) t -= 1\r\n if (t < 1 / 6) return p + (q - p) * 6 * t\r\n if (t < 1 / 2) return q\r\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\r\n return p\r\n}\r\n\r\nexport default class Color {\r\n constructor (...inputs) {\r\n this.init(...inputs)\r\n }\r\n\r\n init (a = 0, b = 0, c = 0, d = 0, space = 'rgb') {\r\n // Reset all values in case the init function is rerun with new color space\r\n if (this.space) {\r\n for (let component in this.space) {\r\n delete this[this.space[component]]\r\n }\r\n }\r\n\r\n if (typeof a === 'number') {\r\n // Allow for the case that we don't need d...\r\n space = typeof d === 'string' ? d : space\r\n d = typeof d === 'string' ? 0 : d\r\n\r\n // Assign the values straight to the color\r\n Object.assign(this, { _a: a, _b: b, _c: c, _d: d, space })\r\n // If the user gave us an array, make the color from it\r\n } else if (a instanceof Array) {\r\n this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb'\r\n Object.assign(this, { _a: a[0], _b: a[1], _c: a[2], _d: a[3] || 0 })\r\n } else if (a instanceof Object) {\r\n // Set the object up and assign its values directly\r\n const values = getParameters(a, b)\r\n Object.assign(this, values)\r\n } else if (typeof a === 'string') {\r\n if (isRgb.test(a)) {\r\n const noWhitespace = a.replace(whitespace, '')\r\n const [ _a, _b, _c ] = rgb.exec(noWhitespace)\r\n .slice(1, 4).map(v => parseInt(v))\r\n Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\r\n } else if (isHex.test(a)) {\r\n const hexParse = v => parseInt(v, 16)\r\n const [ , _a, _b, _c ] = hex.exec(sixDigitHex(a)).map(hexParse)\r\n Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\r\n } else throw Error(`Unsupported string format, can't construct Color`)\r\n }\r\n\r\n // Now add the components as a convenience\r\n const { _a, _b, _c, _d } = this\r\n const components = this.space === 'rgb' ? { r: _a, g: _b, b: _c }\r\n : this.space === 'xyz' ? { x: _a, y: _b, z: _c }\r\n : this.space === 'hsl' ? { h: _a, s: _b, l: _c }\r\n : this.space === 'lab' ? { l: _a, a: _b, b: _c }\r\n : this.space === 'lch' ? { l: _a, c: _b, h: _c }\r\n : this.space === 'cmyk' ? { c: _a, m: _b, y: _c, k: _d }\r\n : {}\r\n Object.assign(this, components)\r\n }\r\n\r\n /*\r\n Conversion Methods\r\n */\r\n\r\n rgb () {\r\n if (this.space === 'rgb') {\r\n return this\r\n } else if (cieSpace(this.space)) {\r\n // Convert to the xyz color space\r\n let { x, y, z } = this\r\n if (this.space === 'lab' || this.space === 'lch') {\r\n // Get the values in the lab space\r\n let { l, a, b } = this\r\n if (this.space === 'lch') {\r\n let { c, h } = this\r\n const dToR = Math.PI / 180\r\n a = c * Math.cos(dToR * h)\r\n b = c * Math.sin(dToR * h)\r\n }\r\n\r\n // Undo the nonlinear function\r\n const yL = (l + 16) / 116\r\n const xL = a / 500 + yL\r\n const zL = yL - b / 200\r\n\r\n // Get the xyz values\r\n const ct = 16 / 116\r\n const mx = 0.008856\r\n const nm = 7.787\r\n x = 0.95047 * ((xL ** 3 > mx) ? xL ** 3 : (xL - ct) / nm)\r\n y = 1.00000 * ((yL ** 3 > mx) ? yL ** 3 : (yL - ct) / nm)\r\n z = 1.08883 * ((zL ** 3 > mx) ? zL ** 3 : (zL - ct) / nm)\r\n }\r\n\r\n // Convert xyz to unbounded rgb values\r\n const rU = x * 3.2406 + y * -1.5372 + z * -0.4986\r\n const gU = x * -0.9689 + y * 1.8758 + z * 0.0415\r\n const bU = x * 0.0557 + y * -0.2040 + z * 1.0570\r\n\r\n // Convert the values to true rgb values\r\n let pow = Math.pow\r\n let bd = 0.0031308\r\n const r = (rU > bd) ? (1.055 * pow(rU, 1 / 2.4) - 0.055) : 12.92 * rU\r\n const g = (gU > bd) ? (1.055 * pow(gU, 1 / 2.4) - 0.055) : 12.92 * gU\r\n const b = (bU > bd) ? (1.055 * pow(bU, 1 / 2.4) - 0.055) : 12.92 * bU\r\n\r\n // Make and return the color\r\n const color = new Color(255 * r, 255 * g, 255 * b)\r\n return color\r\n } else if (this.space === 'hsl') {\r\n // https://bgrins.github.io/TinyColor/docs/tinycolor.html\r\n // Get the current hsl values\r\n let { h, s, l } = this\r\n h /= 360\r\n s /= 100\r\n l /= 100\r\n\r\n // If we are grey, then just make the color directly\r\n if (s === 0) {\r\n l *= 255\r\n let color = new Color(l, l, l)\r\n return color\r\n }\r\n\r\n // TODO I have no idea what this does :D If you figure it out, tell me!\r\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s\r\n const p = 2 * l - q\r\n\r\n // Get the rgb values\r\n const r = 255 * hueToRgb(p, q, h + 1 / 3)\r\n const g = 255 * hueToRgb(p, q, h)\r\n const b = 255 * hueToRgb(p, q, h - 1 / 3)\r\n\r\n // Make a new color\r\n const color = new Color(r, g, b)\r\n return color\r\n } else if (this.space === 'cmyk') {\r\n // https://gist.github.com/felipesabino/5066336\r\n // Get the normalised cmyk values\r\n const { c, m, y, k } = this\r\n\r\n // Get the rgb values\r\n const r = 255 * (1 - Math.min(1, c * (1 - k) + k))\r\n const g = 255 * (1 - Math.min(1, m * (1 - k) + k))\r\n const b = 255 * (1 - Math.min(1, y * (1 - k) + k))\r\n\r\n // Form the color and return it\r\n const color = new Color(r, g, b)\r\n return color\r\n } else {\r\n return this\r\n }\r\n }\r\n\r\n lab () {\r\n // Get the xyz color\r\n const { x, y, z } = this.xyz()\r\n\r\n // Get the lab components\r\n const l = (116 * y) - 16\r\n const a = 500 * (x - y)\r\n const b = 200 * (y - z)\r\n\r\n // Construct and return a new color\r\n const color = new Color(l, a, b, 'lab')\r\n return color\r\n }\r\n\r\n xyz () {\r\n\r\n // Normalise the red, green and blue values\r\n const { _a: r255, _b: g255, _c: b255 } = this.rgb()\r\n const [ r, g, b ] = [ r255, g255, b255 ].map(v => v / 255)\r\n\r\n // Convert to the lab rgb space\r\n const rL = (r > 0.04045) ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92\r\n const gL = (g > 0.04045) ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92\r\n const bL = (b > 0.04045) ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92\r\n\r\n // Convert to the xyz color space without bounding the values\r\n const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047\r\n const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.00000\r\n const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883\r\n\r\n // Get the proper xyz values by applying the bounding\r\n const x = (xU > 0.008856) ? Math.pow(xU, 1 / 3) : (7.787 * xU) + 16 / 116\r\n const y = (yU > 0.008856) ? Math.pow(yU, 1 / 3) : (7.787 * yU) + 16 / 116\r\n const z = (zU > 0.008856) ? Math.pow(zU, 1 / 3) : (7.787 * zU) + 16 / 116\r\n\r\n // Make and return the color\r\n const color = new Color(x, y, z, 'xyz')\r\n return color\r\n }\r\n\r\n lch () {\r\n\r\n // Get the lab color directly\r\n const { l, a, b } = this.lab()\r\n\r\n // Get the chromaticity and the hue using polar coordinates\r\n const c = Math.sqrt(a ** 2 + b ** 2)\r\n let h = 180 * Math.atan2(b, a) / Math.PI\r\n if (h < 0) {\r\n h *= -1\r\n h = 360 - h\r\n }\r\n\r\n // Make a new color and return it\r\n const color = new Color(l, c, h, 'lch')\r\n return color\r\n }\r\n\r\n hsl () {\r\n\r\n // Get the rgb values\r\n const { _a, _b, _c } = this.rgb()\r\n const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)\r\n\r\n // Find the maximum and minimum values to get the lightness\r\n const max = Math.max(r, g, b)\r\n const min = Math.min(r, g, b)\r\n const l = (max + min) / 2\r\n\r\n // If the r, g, v values are identical then we are grey\r\n const isGrey = max === min\r\n\r\n // Calculate the hue and saturation\r\n const delta = max - min\r\n const s = isGrey ? 0\r\n : l > 0.5 ? delta / (2 - max - min)\r\n : delta / (max + min)\r\n const h = isGrey ? 0\r\n : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6\r\n : max === g ? ((b - r) / delta + 2) / 6\r\n : max === b ? ((r - g) / delta + 4) / 6\r\n : 0\r\n\r\n // Construct and return the new color\r\n const color = new Color(360 * h, 100 * s, 100 * l, 'hsl')\r\n return color\r\n }\r\n\r\n cmyk () {\r\n\r\n // Get the rgb values for the current color\r\n const { _a, _b, _c } = this.rgb()\r\n const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)\r\n\r\n // Get the cmyk values in an unbounded format\r\n const k = Math.min(1 - r, 1 - g, 1 - b)\r\n\r\n if (k === 1) {\r\n // Catch the black case\r\n return new Color(0, 0, 0, 1, 'cmyk')\r\n }\r\n\r\n const c = (1 - r - k) / (1 - k)\r\n const m = (1 - g - k) / (1 - k)\r\n const y = (1 - b - k) / (1 - k)\r\n\r\n // Construct the new color\r\n const color = new Color(c, m, y, k, 'cmyk')\r\n return color\r\n }\r\n\r\n /*\r\n Input and Output methods\r\n */\r\n\r\n toHex () {\r\n let { _a, _b, _c } = this.rgb()\r\n let [ r, g, b ] = [ _a, _b, _c ].map(componentHex)\r\n return `#${r}${g}${b}`\r\n }\r\n\r\n toString () {\r\n return this.toHex()\r\n }\r\n\r\n toRgb () {\r\n let { r, g, b } = this.rgb()\r\n let { max, min, round } = Math\r\n let format = v => max(0, min(round(v), 255))\r\n let [ rV, gV, bV ] = [ r, g, b ].map(format)\r\n let string = `rgb(${rV},${gV},${bV})`\r\n return string\r\n }\r\n\r\n toArray () {\r\n let { _a, _b, _c, _d, space } = this\r\n return [ _a, _b, _c, _d, space ]\r\n }\r\n\r\n /*\r\n Generating random colors\r\n */\r\n\r\n static random (mode = 'vibrant') {\r\n 'sine'\r\n 'pastel'\r\n 'vibrant'\r\n 'dark'\r\n 'rgb'\r\n 'lab'\r\n 'grey'\r\n }\r\n\r\n /*\r\n Constructing colors\r\n */\r\n\r\n // Test if given value is a color string\r\n static test (color) {\r\n color += ''\r\n return isHex.test(color) || isRgb.test(color)\r\n }\r\n\r\n // Test if given value is a rgb object\r\n static isRgb (color) {\r\n return color && typeof color.r === 'number'\r\n && typeof color.g === 'number'\r\n && typeof color.b === 'number'\r\n }\r\n\r\n // Test if given value is a color\r\n static isColor (color) {\r\n return this.isRgb(color) || this.test(color)\r\n }\r\n}\r\n","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n","export default class Point {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (x, y) {\r\n let source\r\n let base = { x: 0, y: 0 }\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ? { x: x[0], y: x[1] }\r\n : typeof x === 'object' ? { x: x.x, y: x.y }\r\n : { x: x, y: y }\r\n\r\n // merge source\r\n this.x = source.x == null ? base.x : source.x\r\n this.y = source.y == null ? base.y : source.y\r\n\r\n return this\r\n }\r\n\r\n // Clone point\r\n clone () {\r\n return new Point(this)\r\n }\r\n\r\n // transform point with matrix\r\n transform (m) {\r\n // Perform the matrix multiplication\r\n var x = m.a * this.x + m.c * this.y + m.e\r\n var y = m.b * this.x + m.d * this.y + m.f\r\n\r\n // Return the required point\r\n return new Point(x, y)\r\n }\r\n\r\n toArray () {\r\n return [ this.x, this.y ]\r\n }\r\n}\r\n\r\nexport function point (x, y) {\r\n return new Point(x, y).transform(this.screenCTM().inverse())\r\n}\r\n","import { globals } from '../../utils/window.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\n\r\nexport default function parser () {\r\n // Reuse cached element if possible\r\n if (!parser.nodes) {\r\n let svg = makeInstance().size(2, 0)\r\n svg.node.cssText = [\r\n 'opacity: 0',\r\n 'position: absolute',\r\n 'left: -100%',\r\n 'top: -100%',\r\n 'overflow: hidden'\r\n ].join(';')\r\n\r\n let path = svg.path().node\r\n\r\n parser.nodes = { svg, path }\r\n }\r\n\r\n if (!parser.nodes.svg.node.parentNode) {\r\n let b = globals.document.body || globals.document.documentElement\r\n parser.nodes.svg.addTo(b)\r\n }\r\n\r\n return parser.nodes\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Point from './Point.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nfunction isNulledBox (box) {\r\n return !box.w && !box.h && !box.x && !box.y\r\n}\r\n\r\nfunction domContains (node) {\r\n return (globals.document.documentElement.contains || function (node) {\r\n // This is IE - it does not support contains() for top-level SVGs\r\n while (node.parentNode) {\r\n node = node.parentNode\r\n }\r\n return node === document\r\n }).call(globals.document.documentElement, node)\r\n}\r\n\r\nexport default class Box {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (source) {\r\n var base = [ 0, 0, 0, 0 ]\r\n source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)\r\n : Array.isArray(source) ? source\r\n : typeof source === 'object' ? [ source.left != null ? source.left\r\n : source.x, source.top != null ? source.top : source.y, source.width, source.height ]\r\n : arguments.length === 4 ? [].slice.call(arguments)\r\n : base\r\n\r\n this.x = source[0] || 0\r\n this.y = source[1] || 0\r\n this.width = this.w = source[2] || 0\r\n this.height = this.h = source[3] || 0\r\n\r\n // Add more bounding box properties\r\n this.x2 = this.x + this.w\r\n this.y2 = this.y + this.h\r\n this.cx = this.x + this.w / 2\r\n this.cy = this.y + this.h / 2\r\n\r\n return this\r\n }\r\n\r\n // Merge rect box with another, return a new instance\r\n merge (box) {\r\n let x = Math.min(this.x, box.x)\r\n let y = Math.min(this.y, box.y)\r\n let width = Math.max(this.x + this.width, box.x + box.width) - x\r\n let height = Math.max(this.y + this.height, box.y + box.height) - y\r\n\r\n return new Box(x, y, width, height)\r\n }\r\n\r\n transform (m) {\r\n let xMin = Infinity\r\n let xMax = -Infinity\r\n let yMin = Infinity\r\n let yMax = -Infinity\r\n\r\n let pts = [\r\n new Point(this.x, this.y),\r\n new Point(this.x2, this.y),\r\n new Point(this.x, this.y2),\r\n new Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function (p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin, p.x)\r\n xMax = Math.max(xMax, p.x)\r\n yMin = Math.min(yMin, p.y)\r\n yMax = Math.max(yMax, p.y)\r\n })\r\n\r\n return new Box(\r\n xMin, yMin,\r\n xMax - xMin,\r\n yMax - yMin\r\n )\r\n }\r\n\r\n addOffset () {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += globals.window.pageXOffset\r\n this.y += globals.window.pageYOffset\r\n return this\r\n }\r\n\r\n toString () {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n\r\n toArray () {\r\n return [ this.x, this.y, this.width, this.height ]\r\n }\r\n\r\n isNulled () {\r\n return isNulledBox(this)\r\n }\r\n}\r\n\r\nfunction getBox (cb, retry) {\r\n let box\r\n\r\n try {\r\n box = cb(this.node)\r\n\r\n if (isNulledBox(box) && !domContains(this.node)) {\r\n throw new Error('Element not in the dom')\r\n }\r\n } catch (e) {\r\n box = retry(this)\r\n }\r\n\r\n return box\r\n}\r\n\r\nexport function bbox () {\r\n return new Box(getBox.call(this, (node) => node.getBBox(), (el) => {\r\n try {\r\n let clone = el.clone().addTo(parser().svg).show()\r\n let box = clone.node.getBBox()\r\n clone.remove()\r\n return box\r\n } catch (e) {\r\n throw new Error('Getting bbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }\r\n }))\r\n}\r\n\r\nexport function rbox (el) {\r\n let box = new Box(getBox.call(this, (node) => node.getBoundingClientRect(), (el) => {\r\n throw new Error('Getting rbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }))\r\n if (el) return box.transform(el.screenCTM().inverse())\r\n return box.addOffset()\r\n}\r\n\r\nregisterMethods({\r\n viewbox: {\r\n viewbox (x, y, width, height) {\r\n // act as getter\r\n if (x == null) return new Box(this.attr('viewBox'))\r\n\r\n // act as setter\r\n return this.attr('viewBox', new Box(x, y, width, height))\r\n }\r\n }\r\n})\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { radians } from '../utils/utils.js'\r\nimport Element from '../elements/Element.js'\r\nimport Point from './Point.js'\r\n\r\nfunction closeEnough (a, b, threshold) {\r\n return Math.abs(b - a) < (threshold || 1e-6)\r\n}\r\n\r\nexport default class Matrix {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n // Initialize\r\n init (source) {\r\n var base = Matrix.fromArray([ 1, 0, 0, 1, 0, 0 ])\r\n\r\n // ensure source as object\r\n source = source instanceof Element ? source.matrixify()\r\n : typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\r\n : Array.isArray(source) ? Matrix.fromArray(source)\r\n : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source\r\n : (typeof source === 'object') ? new Matrix().transform(source)\r\n : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))\r\n : base\r\n\r\n // Merge the source matrix with the base matrix\r\n this.a = source.a != null ? source.a : base.a\r\n this.b = source.b != null ? source.b : base.b\r\n this.c = source.c != null ? source.c : base.c\r\n this.d = source.d != null ? source.d : base.d\r\n this.e = source.e != null ? source.e : base.e\r\n this.f = source.f != null ? source.f : base.f\r\n\r\n return this\r\n }\r\n\r\n // Clones this matrix\r\n clone () {\r\n return new Matrix(this)\r\n }\r\n\r\n // Transform a matrix into another matrix by manipulating the space\r\n transform (o) {\r\n // Check if o is a matrix and then left multiply it directly\r\n if (Matrix.isMatrixLike(o)) {\r\n var matrix = new Matrix(o)\r\n return matrix.multiplyO(this)\r\n }\r\n\r\n // Get the proposed transformations and the current transformations\r\n var t = Matrix.formatTransforms(o)\r\n var current = this\r\n let { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\r\n\r\n // Construct the resulting matrix\r\n var transformer = new Matrix()\r\n .translateO(t.rx, t.ry)\r\n .lmultiplyO(current)\r\n .translateO(-ox, -oy)\r\n .scaleO(t.scaleX, t.scaleY)\r\n .skewO(t.skewX, t.skewY)\r\n .shearO(t.shear)\r\n .rotateO(t.theta)\r\n .translateO(ox, oy)\r\n\r\n // If we want the origin at a particular place, we force it there\r\n if (isFinite(t.px) || isFinite(t.py)) {\r\n const origin = new Point(ox, oy).transform(transformer)\r\n // TODO: Replace t.px with isFinite(t.px)\r\n const dx = t.px ? t.px - origin.x : 0\r\n const dy = t.py ? t.py - origin.y : 0\r\n transformer.translateO(dx, dy)\r\n }\r\n\r\n // Translate now after positioning\r\n transformer.translateO(t.tx, t.ty)\r\n return transformer\r\n }\r\n\r\n // Applies a matrix defined by its affine parameters\r\n compose (o) {\r\n if (o.origin) {\r\n o.originX = o.origin[0]\r\n o.originY = o.origin[1]\r\n }\r\n // Get the parameters\r\n var ox = o.originX || 0\r\n var oy = o.originY || 0\r\n var sx = o.scaleX || 1\r\n var sy = o.scaleY || 1\r\n var lam = o.shear || 0\r\n var theta = o.rotate || 0\r\n var tx = o.translateX || 0\r\n var ty = o.translateY || 0\r\n\r\n // Apply the standard matrix\r\n var result = new Matrix()\r\n .translateO(-ox, -oy)\r\n .scaleO(sx, sy)\r\n .shearO(lam)\r\n .rotateO(theta)\r\n .translateO(tx, ty)\r\n .lmultiplyO(this)\r\n .translateO(ox, oy)\r\n return result\r\n }\r\n\r\n // Decomposes this matrix into its affine parameters\r\n decompose (cx = 0, cy = 0) {\r\n // Get the parameters from the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Figure out if the winding direction is clockwise or counterclockwise\r\n var determinant = a * d - b * c\r\n var ccw = determinant > 0 ? 1 : -1\r\n\r\n // Since we only shear in x, we can use the x basis to get the x scale\r\n // and the rotation of the resulting matrix\r\n var sx = ccw * Math.sqrt(a * a + b * b)\r\n var thetaRad = Math.atan2(ccw * b, ccw * a)\r\n var theta = 180 / Math.PI * thetaRad\r\n var ct = Math.cos(thetaRad)\r\n var st = Math.sin(thetaRad)\r\n\r\n // We can then solve the y basis vector simultaneously to get the other\r\n // two affine parameters directly from these parameters\r\n var lam = (a * c + b * d) / determinant\r\n var sy = ((c * sx) / (lam * a - b)) || ((d * sx) / (lam * b + a))\r\n\r\n // Use the translations\r\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy)\r\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy)\r\n\r\n // Construct the decomposition and return it\r\n return {\r\n // Return the affine parameters\r\n scaleX: sx,\r\n scaleY: sy,\r\n shear: lam,\r\n rotate: theta,\r\n translateX: tx,\r\n translateY: ty,\r\n originX: cx,\r\n originY: cy,\r\n\r\n // Return the matrix parameters\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n // Left multiplies by the given matrix\r\n multiply (matrix) {\r\n return this.clone().multiplyO(matrix)\r\n }\r\n\r\n multiplyO (matrix) {\r\n // Get the matrices\r\n var l = this\r\n var r = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n lmultiply (matrix) {\r\n return this.clone().lmultiplyO(matrix)\r\n }\r\n\r\n lmultiplyO (matrix) {\r\n var r = this\r\n var l = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n // Inverses matrix\r\n inverseO () {\r\n // Get the current parameters out of the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Invert the 2x2 matrix in the top left\r\n var det = a * d - b * c\r\n if (!det) throw new Error('Cannot invert ' + this)\r\n\r\n // Calculate the top 2x2 matrix\r\n var na = d / det\r\n var nb = -b / det\r\n var nc = -c / det\r\n var nd = a / det\r\n\r\n // Apply the inverted matrix to the top right\r\n var ne = -(na * e + nc * f)\r\n var nf = -(nb * e + nd * f)\r\n\r\n // Construct the inverted matrix\r\n this.a = na\r\n this.b = nb\r\n this.c = nc\r\n this.d = nd\r\n this.e = ne\r\n this.f = nf\r\n\r\n return this\r\n }\r\n\r\n inverse () {\r\n return this.clone().inverseO()\r\n }\r\n\r\n // Translate matrix\r\n translate (x, y) {\r\n return this.clone().translateO(x, y)\r\n }\r\n\r\n translateO (x, y) {\r\n this.e += x || 0\r\n this.f += y || 0\r\n return this\r\n }\r\n\r\n // Scale matrix\r\n scale (x, y, cx, cy) {\r\n return this.clone().scaleO(...arguments)\r\n }\r\n\r\n scaleO (x, y = x, cx = 0, cy = 0) {\r\n // Support uniform scaling\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * x\r\n this.b = b * y\r\n this.c = c * x\r\n this.d = d * y\r\n this.e = e * x - cx * x + cx\r\n this.f = f * y - cy * y + cy\r\n\r\n return this\r\n }\r\n\r\n // Rotate matrix\r\n rotate (r, cx, cy) {\r\n return this.clone().rotateO(r, cx, cy)\r\n }\r\n\r\n rotateO (r, cx = 0, cy = 0) {\r\n // Convert degrees to radians\r\n r = radians(r)\r\n\r\n let cos = Math.cos(r)\r\n let sin = Math.sin(r)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * cos - b * sin\r\n this.b = b * cos + a * sin\r\n this.c = c * cos - d * sin\r\n this.d = d * cos + c * sin\r\n this.e = e * cos - f * sin + cy * sin - cx * cos + cx\r\n this.f = f * cos + e * sin - cx * sin - cy * cos + cy\r\n\r\n return this\r\n }\r\n\r\n // Flip matrix on x or y, at a given offset\r\n flip (axis, around) {\r\n return this.clone().flipO(axis, around)\r\n }\r\n\r\n flipO (axis, around) {\r\n return axis === 'x' ? this.scaleO(-1, 1, around, 0)\r\n : axis === 'y' ? this.scaleO(1, -1, 0, around)\r\n : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\r\n }\r\n\r\n // Shear matrix\r\n shear (a, cx, cy) {\r\n return this.clone().shearO(a, cx, cy)\r\n }\r\n\r\n shearO (lx, cx = 0, cy = 0) {\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.c = c + d * lx\r\n this.e = e + f * lx - cy * lx\r\n\r\n return this\r\n }\r\n\r\n // Skew Matrix\r\n skew (x, y, cx, cy) {\r\n return this.clone().skewO(...arguments)\r\n }\r\n\r\n skewO (x, y = x, cx = 0, cy = 0) {\r\n // support uniformal skew\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // Convert degrees to radians\r\n x = radians(x)\r\n y = radians(y)\r\n\r\n let lx = Math.tan(x)\r\n let ly = Math.tan(y)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.b = b + a * ly\r\n this.c = c + d * lx\r\n this.d = d + c * ly\r\n this.e = e + f * lx - cy * lx\r\n this.f = f + e * ly - cx * ly\r\n\r\n return this\r\n }\r\n\r\n // SkewX\r\n skewX (x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n\r\n skewXO (x, cx, cy) {\r\n return this.skewO(x, 0, cx, cy)\r\n }\r\n\r\n // SkewY\r\n skewY (y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n\r\n skewYO (y, cx, cy) {\r\n return this.skewO(0, y, cx, cy)\r\n }\r\n\r\n // Transform around a center point\r\n aroundO (cx, cy, matrix) {\r\n var dx = cx || 0\r\n var dy = cy || 0\r\n return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\r\n }\r\n\r\n around (cx, cy, matrix) {\r\n return this.clone().aroundO(cx, cy, matrix)\r\n }\r\n\r\n // Check if two matrices are equal\r\n equals (other) {\r\n var comp = new Matrix(other)\r\n return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b)\r\n && closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d)\r\n && closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)\r\n }\r\n\r\n // Convert matrix to string\r\n toString () {\r\n return 'matrix(' + this.a + ',' + this.b + ',' + this.c + ',' + this.d + ',' + this.e + ',' + this.f + ')'\r\n }\r\n\r\n toArray () {\r\n return [ this.a, this.b, this.c, this.d, this.e, this.f ]\r\n }\r\n\r\n valueOf () {\r\n return {\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n static fromArray (a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n }\r\n\r\n static isMatrixLike (o) {\r\n return (\r\n o.a != null\r\n || o.b != null\r\n || o.c != null\r\n || o.d != null\r\n || o.e != null\r\n || o.f != null\r\n )\r\n }\r\n\r\n static formatTransforms (o) {\r\n // Get all of the parameters required to form the matrix\r\n var flipBoth = o.flip === 'both' || o.flip === true\r\n var flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\r\n var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\r\n var skewX = o.skew && o.skew.length ? o.skew[0]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewX) ? o.skewX\r\n : 0\r\n var skewY = o.skew && o.skew.length ? o.skew[1]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewY) ? o.skewY\r\n : 0\r\n var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX\r\n : isFinite(o.scale) ? o.scale * flipX\r\n : isFinite(o.scaleX) ? o.scaleX * flipX\r\n : flipX\r\n var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY\r\n : isFinite(o.scale) ? o.scale * flipY\r\n : isFinite(o.scaleY) ? o.scaleY * flipY\r\n : flipY\r\n var shear = o.shear || 0\r\n var theta = o.rotate || o.theta || 0\r\n var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)\r\n var ox = origin.x\r\n var oy = origin.y\r\n var position = new Point(o.position || o.px || o.positionX, o.py || o.positionY)\r\n var px = position.x\r\n var py = position.y\r\n var translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY)\r\n var tx = translate.x\r\n var ty = translate.y\r\n var relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY)\r\n var rx = relative.x\r\n var ry = relative.y\r\n\r\n // Populate all of the values\r\n return {\r\n scaleX, scaleY, skewX, skewY, shear, theta, rx, ry, tx, ty, ox, oy, px, py\r\n }\r\n }\r\n\r\n // left matrix, right matrix, target matrix which is overwritten\r\n static matrixMultiply (l, r, o) {\r\n // Work out the product directly\r\n var a = l.a * r.a + l.c * r.b\r\n var b = l.b * r.a + l.d * r.b\r\n var c = l.a * r.c + l.c * r.d\r\n var d = l.b * r.c + l.d * r.d\r\n var e = l.e + l.a * r.e + l.c * r.f\r\n var f = l.f + l.b * r.e + l.d * r.f\r\n\r\n // make sure to use local variables because l/r and o could be the same\r\n o.a = a\r\n o.b = b\r\n o.c = c\r\n o.d = d\r\n o.e = e\r\n o.f = f\r\n\r\n return o\r\n }\r\n}\r\n\r\nexport function ctm () {\r\n return new Matrix(this.node.getCTM())\r\n}\r\n\r\nexport function screenCTM () {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if (typeof this.isRoot === 'function' && !this.isRoot()) {\r\n var rect = this.rect(1, 1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new Matrix(m)\r\n }\r\n return new Matrix(this.node.getScreenCTM())\r\n}\r\n","/* eslint no-new-func: \"off\" */\r\nexport const subClassArray = (function () {\r\n try {\r\n // try es6 subclassing\r\n return Function('name', 'baseClass', '_constructor', [\r\n 'baseClass = baseClass || Array',\r\n 'return {',\r\n ' [name]: class extends baseClass {',\r\n ' constructor (...args) {',\r\n ' super(...args)',\r\n ' _constructor && _constructor.apply(this, args)',\r\n ' }',\r\n ' }',\r\n '}[name]'\r\n ].join('\\n'))\r\n } catch (e) {\r\n // Use es5 approach\r\n return (name, baseClass = Array, _constructor) => {\r\n const Arr = function () {\r\n baseClass.apply(this, arguments)\r\n _constructor && _constructor.apply(this, arguments)\r\n }\r\n\r\n Arr.prototype = Object.create(baseClass.prototype)\r\n Arr.prototype.constructor = Arr\r\n\r\n Arr.prototype.map = function (fn) {\r\n const arr = new Arr()\r\n arr.push.apply(arr, Array.prototype.map.call(this, fn))\r\n return arr\r\n }\r\n\r\n return Arr\r\n }\r\n }\r\n})()\r\n","import { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst List = subClassArray('List', Array, function (arr = []) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...arr)\r\n})\r\n\r\nexport default List\r\n\r\nextend(List, {\r\n each (fnOrMethodName, ...args) {\r\n if (typeof fnOrMethodName === 'function') {\r\n this.forEach((el) => {\r\n fnOrMethodName.call(el, el)\r\n })\r\n } else {\r\n return this.map(el => {\r\n return el[fnOrMethodName](...args)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n }\r\n})\r\n\r\nList.extend = function (methods) {\r\n methods = methods.reduce((obj, name) => {\r\n obj[name] = function (...attrs) {\r\n return this.each(name, ...attrs)\r\n }\r\n return obj\r\n }, {})\r\n\r\n extend(List, methods)\r\n}\r\n","import { adopt } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\nimport { map } from '../../utils/utils.js'\r\nimport List from '../../types/List.js'\r\n\r\nexport default function baseFind (query, parent) {\r\n return new List(map((parent || globals.document).querySelectorAll(query), function (node) {\r\n return adopt(node)\r\n }))\r\n}\r\n\r\n// Scoped find method\r\nexport function find (query) {\r\n return baseFind(query, this.node)\r\n}\r\n","import { dispatch, off, on } from '../modules/core/event.js'\r\nimport Base from './Base.js'\r\n\r\nexport default class EventTarget extends Base {\r\n constructor ({ events = {} } = {}) {\r\n super()\r\n this.events = events\r\n }\r\n\r\n addEventListener () {}\r\n\r\n dispatch (event, data) {\r\n return dispatch(this, event, data)\r\n }\r\n\r\n dispatchEvent (event) {\r\n const bag = this.getEventHolder().events\r\n if (!bag) return true\r\n\r\n const events = bag[event.type]\r\n\r\n for (let i in events) {\r\n for (let j in events[i]) {\r\n events[i][j](event)\r\n }\r\n }\r\n\r\n return !event.defaultPrevented\r\n }\r\n\r\n // Fire given event\r\n fire (event, data) {\r\n this.dispatch(event, data)\r\n return this\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n getEventTarget () {\r\n return this\r\n }\r\n\r\n // Unbind event from listener\r\n off (event, listener) {\r\n off(this, event, listener)\r\n return this\r\n }\r\n\r\n // Bind given event to listener\r\n on (event, listener, binding, options) {\r\n on(this, event, listener, binding, options)\r\n return this\r\n }\r\n\r\n removeEventListener () {}\r\n}\r\n","\r\nexport function noop () {}\r\n\r\n// Default animation values\r\nexport let timeline = {\r\n duration: 400,\r\n ease: '>',\r\n delay: 0\r\n}\r\n\r\n// Default attribute values\r\nexport let attrs = {\r\n\r\n // fill and stroke\r\n 'fill-opacity': 1,\r\n 'stroke-opacity': 1,\r\n 'stroke-width': 0,\r\n 'stroke-linejoin': 'miter',\r\n 'stroke-linecap': 'butt',\r\n fill: '#000000',\r\n stroke: '#000000',\r\n opacity: 1,\r\n\r\n // position\r\n x: 0,\r\n y: 0,\r\n cx: 0,\r\n cy: 0,\r\n\r\n // size\r\n width: 0,\r\n height: 0,\r\n\r\n // radius\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n\r\n // gradient\r\n offset: 0,\r\n 'stop-opacity': 1,\r\n 'stop-color': '#000000',\r\n\r\n // text\r\n 'font-size': 16,\r\n 'font-family': 'Helvetica, Arial, sans-serif',\r\n 'text-anchor': 'start'\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst SVGArray = subClassArray('SVGArray', Array, function (arr) {\r\n this.init(arr)\r\n})\r\n\r\nexport default SVGArray\r\n\r\nextend(SVGArray, {\r\n init (arr) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...this.parse(arr))\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n },\r\n\r\n toString () {\r\n return this.join(' ')\r\n },\r\n\r\n // Flattens the array if needed\r\n valueOf () {\r\n const ret = []\r\n ret.push(...this)\r\n return ret\r\n },\r\n\r\n // Parse whitespace separated string\r\n parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n },\r\n\r\n clone () {\r\n return new this.constructor(this)\r\n },\r\n\r\n toSet () {\r\n return new Set(this)\r\n }\r\n})\r\n","import { numberAndUnit } from '../modules/core/regex.js'\r\n\r\n// Module for unit convertions\r\nexport default class SVGNumber {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (value, unit) {\r\n unit = Array.isArray(value) ? value[1] : unit\r\n value = Array.isArray(value) ? value[0] : value\r\n\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n } else if (typeof value === 'string') {\r\n unit = value.match(numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] === '%') {\r\n this.value /= 100\r\n } else if (unit[5] === 's') {\r\n this.value *= 1000\r\n }\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n } else {\r\n if (value instanceof SVGNumber) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n toString () {\r\n return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6\r\n : this.unit === 's' ? this.value / 1e3\r\n : this.value\r\n ) + this.unit\r\n }\r\n\r\n toJSON () {\r\n return this.toString()\r\n }\r\n\r\n toArray () {\r\n return [ this.value, this.unit ]\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n // Add number\r\n plus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this + number, this.unit || number.unit)\r\n }\r\n\r\n // Subtract number\r\n minus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this - number, this.unit || number.unit)\r\n }\r\n\r\n // Multiply number\r\n times (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this * number, this.unit || number.unit)\r\n }\r\n\r\n // Divide number\r\n divide (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this / number, this.unit || number.unit)\r\n }\r\n}\r\n","import { attrs as defaults } from './defaults.js'\r\nimport { isNumber } from './regex.js'\r\nimport Color from '../../types/Color.js'\r\nimport SVGArray from '../../types/SVGArray.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\nconst hooks = []\r\nexport function registerAttrHook (fn) {\r\n hooks.push(fn)\r\n}\r\n\r\n// Set svg element attribute\r\nexport default function attr (attr, val, ns) {\r\n // act as full getter\r\n if (attr == null) {\r\n // get an object of attributes\r\n attr = {}\r\n val = this.node.attributes\r\n\r\n for (let node of val) {\r\n attr[node.nodeName] = isNumber.test(node.nodeValue)\r\n ? parseFloat(node.nodeValue)\r\n : node.nodeValue\r\n }\r\n\r\n return attr\r\n } else if (attr instanceof Array) {\r\n // loop through array and get all values\r\n return attr.reduce((last, curr) => {\r\n last[curr] = this.attr(curr)\r\n return last\r\n }, {})\r\n } else if (typeof attr === 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (val in attr) this.attr(val, attr[val])\r\n } else if (val === null) {\r\n // remove value\r\n this.node.removeAttribute(attr)\r\n } else if (val == null) {\r\n // act as a getter if the first and only argument is not an object\r\n val = this.node.getAttribute(attr)\r\n return val == null ? defaults[attr]\r\n : isNumber.test(val) ? parseFloat(val)\r\n : val\r\n } else {\r\n // Loop through hooks and execute them to convert value\r\n val = hooks.reduce((_val, hook) => {\r\n return hook(attr, _val, this)\r\n }, val)\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof val === 'number') {\r\n val = new SVGNumber(val)\r\n } else if (Color.isColor(val)) {\r\n // ensure full hex color\r\n val = new Color(val)\r\n } else if (val.constructor === Array) {\r\n // Check for plain arrays and parse array values\r\n val = new SVGArray(val)\r\n }\r\n\r\n // if the passed attribute is leading...\r\n if (attr === 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading) {\r\n this.leading(val)\r\n }\r\n } else {\r\n // set given attribute on node\r\n typeof ns === 'string' ? this.node.setAttributeNS(ns, attr, val.toString())\r\n : this.node.setAttribute(attr, val.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\r\n this.rebuild()\r\n }\r\n }\r\n\r\n return this\r\n}\r\n","import {\r\n adopt,\r\n assignNewId,\r\n eid,\r\n extend,\r\n makeInstance,\r\n makeNode,\r\n register\r\n} from '../utils/adopter.js'\r\nimport { find } from '../modules/core/selector.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { map } from '../utils/utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport List from '../types/List.js'\r\nimport attr from '../modules/core/attr.js'\r\n\r\nexport default class Dom extends EventTarget {\r\n constructor (node, attrs) {\r\n super(node)\r\n this.node = node\r\n this.type = node.nodeName\r\n\r\n if (attrs && node !== attrs) {\r\n this.attr(attrs)\r\n }\r\n }\r\n\r\n // Add given element at a position\r\n add (element, i) {\r\n element = makeInstance(element)\r\n\r\n if (i == null) {\r\n this.node.appendChild(element.node)\r\n } else if (element.node !== this.node.childNodes[i]) {\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Add element to given container and return self\r\n addTo (parent) {\r\n return makeInstance(parent).put(this)\r\n }\r\n\r\n // Returns all child elements\r\n children () {\r\n return new List(map(this.node.children, function (node) {\r\n return adopt(node)\r\n }))\r\n }\r\n\r\n // Remove all elements in this container\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n\r\n // Clone element\r\n clone () {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n return assignNewId(this.node.cloneNode(true))\r\n }\r\n\r\n // Iterates over all children and invokes a given block\r\n each (block, deep) {\r\n var children = this.children()\r\n var i, il\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n block.apply(children[i], [ i, children ])\r\n\r\n if (deep) {\r\n children[i].each(block, deep)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n element (nodeName) {\r\n return this.put(new Dom(makeNode(nodeName)))\r\n }\r\n\r\n // Get first child\r\n first () {\r\n return adopt(this.node.firstChild)\r\n }\r\n\r\n // Get a element at the given index\r\n get (i) {\r\n return adopt(this.node.childNodes[i])\r\n }\r\n\r\n getEventHolder () {\r\n return this.node\r\n }\r\n\r\n getEventTarget () {\r\n return this.node\r\n }\r\n\r\n // Checks if the given element is a child\r\n has (element) {\r\n return this.index(element) >= 0\r\n }\r\n\r\n // Get / set id\r\n id (id) {\r\n // generate new id if no id set\r\n if (typeof id === 'undefined' && !this.node.id) {\r\n this.node.id = eid(this.type)\r\n }\r\n\r\n // dont't set directly width this.node.id to make `null` work correctly\r\n return this.attr('id', id)\r\n }\r\n\r\n // Gets index of given element\r\n index (element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n\r\n // Get the last child\r\n last () {\r\n return adopt(this.node.lastChild)\r\n }\r\n\r\n // matches the element vs a css selector\r\n matches (selector) {\r\n const el = this.node\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector)\r\n }\r\n\r\n // Returns the parent element instance\r\n parent (type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if (!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = adopt(parent.node.parentNode)\r\n\r\n if (!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while (parent && parent.node instanceof globals.window.SVGElement) { // FIXME: That shouldnt be neccessary\r\n if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n parent = adopt(parent.node.parentNode)\r\n }\r\n }\r\n\r\n // Basically does the same as `add()` but returns the added element instead\r\n put (element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n\r\n // Add element to given container and return container\r\n putIn (parent) {\r\n return makeInstance(parent).add(this)\r\n }\r\n\r\n // Remove element\r\n remove () {\r\n if (this.parent()) {\r\n this.parent().removeElement(this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Remove a given child\r\n removeElement (element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n\r\n // Replace this with element\r\n replace (element) {\r\n element = makeInstance(element)\r\n this.node.parentNode.replaceChild(element.node, this.node)\r\n return element\r\n }\r\n\r\n round (precision = 2, map) {\r\n const factor = 10 ** precision\r\n const attrs = this.attr()\r\n\r\n // If we have no map, build one from attrs\r\n if (!map) {\r\n map = Object.keys(attrs)\r\n }\r\n\r\n // Holds rounded attributes\r\n const newAttrs = {}\r\n map.forEach((key) => {\r\n newAttrs[key] = Math.round(attrs[key] * factor) / factor\r\n })\r\n\r\n this.attr(newAttrs)\r\n return this\r\n }\r\n\r\n // Return id on string conversion\r\n toString () {\r\n return this.id()\r\n }\r\n\r\n // Import raw svg\r\n svg (svgOrFn, outerHTML) {\r\n var well, len, fragment\r\n\r\n if (svgOrFn === false) {\r\n outerHTML = false\r\n svgOrFn = null\r\n }\r\n\r\n // act as getter if no svg string is given\r\n if (svgOrFn == null || typeof svgOrFn === 'function') {\r\n // The default for exports is, that the outerNode is included\r\n outerHTML = outerHTML == null ? true : outerHTML\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n let current = this\r\n\r\n // An export modifier was passed\r\n if (svgOrFn != null) {\r\n current = adopt(current.node.cloneNode(true))\r\n\r\n // If the user wants outerHTML we need to process this node, too\r\n if (outerHTML) {\r\n let result = svgOrFn(current)\r\n current = result || current\r\n\r\n // The user does not want this node? Well, then he gets nothing\r\n if (result === false) return ''\r\n }\r\n\r\n // Deep loop through all children and apply modifier\r\n current.each(function () {\r\n let result = svgOrFn(this)\r\n let _this = result || this\r\n\r\n // If modifier returns false, discard node\r\n if (result === false) {\r\n this.remove()\r\n\r\n // If modifier returns new node, use it\r\n } else if (result && this !== _this) {\r\n this.replace(_this)\r\n }\r\n }, true)\r\n }\r\n\r\n // Return outer or inner content\r\n return outerHTML\r\n ? current.node.outerHTML\r\n : current.node.innerHTML\r\n }\r\n\r\n // Act as setter if we got a string\r\n\r\n // The default for import is, that the current node is not replaced\r\n outerHTML = outerHTML == null ? false : outerHTML\r\n\r\n // Create temporary holder\r\n well = globals.document.createElementNS(ns, 'svg')\r\n fragment = globals.document.createDocumentFragment()\r\n\r\n // Dump raw svg\r\n well.innerHTML = svgOrFn\r\n\r\n // Transplant nodes into the fragment\r\n for (len = well.children.length; len--;) {\r\n fragment.appendChild(well.firstElementChild)\r\n }\r\n\r\n let parent = this.parent()\r\n\r\n // Add the whole fragment at once\r\n return outerHTML\r\n ? this.replace(fragment) && parent\r\n : this.add(fragment)\r\n }\r\n\r\n words (text) {\r\n // This is faster than removing all children and adding a new one\r\n this.node.textContent = text\r\n return this\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // dump variables recursively\r\n this.each(function () {\r\n this.writeDataToDom()\r\n })\r\n\r\n return this\r\n }\r\n}\r\n\r\nextend(Dom, { attr, find })\r\nregister(Dom)\r\n","import { bbox, rbox } from '../types/Box.js'\r\nimport { ctm, screenCTM } from '../types/Matrix.js'\r\nimport {\r\n extend,\r\n getClass,\r\n makeInstance,\r\n register,\r\n root\r\n} from '../utils/adopter.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { point } from '../types/Point.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { reference } from '../modules/core/regex.js'\r\nimport Dom from './Dom.js'\r\nimport List from '../types/List.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nconst Svg = getClass(root)\r\n\r\nexport default class Element extends Dom {\r\n constructor (node, attrs) {\r\n super(node, attrs)\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n this.node.instance = this\r\n\r\n if (node.hasAttribute('svgjs:data')) {\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n this.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n }\r\n }\r\n\r\n // Move element by its center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n\r\n // Move by center over x-axis\r\n cx (x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n\r\n // Move by center over y-axis\r\n cy (y) {\r\n return y == null\r\n ? this.y() + this.height() / 2\r\n : this.y(y - this.height() / 2)\r\n }\r\n\r\n // Get defs\r\n defs () {\r\n return this.root().defs()\r\n }\r\n\r\n // Get parent document\r\n root () {\r\n let p = this.parent(Svg)\r\n return p && p.root()\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('height', height)\r\n }\r\n\r\n // Checks whether the given point inside the bounding box of the element\r\n inside (x, y) {\r\n let box = this.bbox()\r\n\r\n return x > box.x\r\n && y > box.y\r\n && x < box.x + box.width\r\n && y < box.y + box.height\r\n }\r\n\r\n // Move element to given x and y values\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n }\r\n\r\n // return array of all ancestors of given type up to the root svg\r\n parents (until = globals.document) {\r\n until = makeInstance(until)\r\n let parents = new List()\r\n let parent = this\r\n\r\n while (\r\n (parent = parent.parent())\r\n && parent.node !== until.node\r\n && parent.node !== globals.document\r\n ) {\r\n parents.push(parent)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Get referenced element form attribute value\r\n reference (attr) {\r\n attr = this.attr(attr)\r\n if (!attr) return null\r\n\r\n const m = attr.match(reference)\r\n return m ? makeInstance(m[1]) : null\r\n }\r\n\r\n // set given data to the elements data property\r\n setData (o) {\r\n this.dom = o\r\n return this\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVGNumber(p.width))\r\n .height(new SVGNumber(p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('width', width)\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if (Object.keys(this.dom).length) {\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n }\r\n\r\n return super.writeDataToDom()\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n return this.attr('y', y)\r\n }\r\n}\r\n\r\nextend(Element, {\r\n bbox, rbox, point, ctm, screenCTM\r\n})\r\n\r\nregister(Element)\r\n","import { on, off } from '../core/event.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Color from '../../types/Color.js'\r\nimport Element from '../../elements/Element.js'\r\nimport Matrix from '../../types/Matrix.js'\r\nimport Point from '../../types/Point.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: [ 'color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset' ],\r\n fill: [ 'color', 'opacity', 'rule' ],\r\n prefix: function (t, a) {\r\n return a === 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;[ 'fill', 'stroke' ].forEach(function (m) {\r\n var extension = {}\r\n var i\r\n\r\n extension[m] = function (o) {\r\n if (typeof o === 'undefined') {\r\n return this.attr(m)\r\n }\r\n if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || (o instanceof Element)) {\r\n this.attr(m, o)\r\n } else {\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--) {\r\n if (o[sugar[m][i]] != null) {\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n }\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n registerMethods([ 'Shape', 'Runner' ], extension)\r\n})\r\n\r\nregisterMethods([ 'Element', 'Runner' ], {\r\n // Let the user set the matrix directly\r\n matrix: function (mat, b, c, d, e, f) {\r\n // Act as a getter\r\n if (mat == null) {\r\n return new Matrix(this)\r\n }\r\n\r\n // Act as a setter, the user can pass a matrix or a set of numbers\r\n return this.attr('transform', new Matrix(mat, b, c, d, e, f))\r\n },\r\n\r\n // Map rotation to transform\r\n rotate: function (angle, cx, cy) {\r\n return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map skew to transform\r\n skew: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ skew: x, ox: y, oy: cx }, true)\r\n : this.transform({ skew: [ x, y ], ox: cx, oy: cy }, true)\r\n },\r\n\r\n shear: function (lam, cx, cy) {\r\n return this.transform({ shear: lam, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map scale to transform\r\n scale: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ scale: x, ox: y, oy: cx }, true)\r\n : this.transform({ scale: [ x, y ], ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map translate to transform\r\n translate: function (x, y) {\r\n return this.transform({ translate: [ x, y ] }, true)\r\n },\r\n\r\n // Map relative translations to transform\r\n relative: function (x, y) {\r\n return this.transform({ relative: [ x, y ] }, true)\r\n },\r\n\r\n // Map flip to transform\r\n flip: function (direction, around) {\r\n var directionString = typeof direction === 'string' ? direction\r\n : isFinite(direction) ? 'both'\r\n : 'both'\r\n var origin = (direction === 'both' && isFinite(around)) ? [ around, around ]\r\n : (direction === 'x') ? [ around, 0 ]\r\n : (direction === 'y') ? [ 0, around ]\r\n : isFinite(direction) ? [ direction, direction ]\r\n : [ 0, 0 ]\r\n this.transform({ flip: directionString, origin: origin }, true)\r\n },\r\n\r\n // Opacity\r\n opacity: function (value) {\r\n return this.attr('opacity', value)\r\n },\r\n\r\n // Relative move over x and y axes\r\n dmove: function (x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nregisterMethods('Element', {\r\n // Relative move over x axis\r\n dx: function (x) {\r\n return this.x(new SVGNumber(x).plus(this.x()))\r\n },\r\n\r\n // Relative move over y axis\r\n dy: function (y) {\r\n return this.y(new SVGNumber(y).plus(this.y()))\r\n }\r\n})\r\n\r\nregisterMethods('radius', {\r\n // Add x and y radius\r\n radius: function (x, y) {\r\n var type = (this._element || this).type\r\n return type === 'radialGradient' || type === 'radialGradient'\r\n ? this.attr('r', new SVGNumber(x))\r\n : this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nregisterMethods('Path', {\r\n // Get path length\r\n length: function () {\r\n return this.node.getTotalLength()\r\n },\r\n // Get point at length\r\n pointAt: function (length) {\r\n return new Point(this.node.getPointAtLength(length))\r\n }\r\n})\r\n\r\nregisterMethods([ 'Element', 'Runner' ], {\r\n // Set font\r\n font: function (a, v) {\r\n if (typeof a === 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a === 'leading'\r\n ? this.leading(v)\r\n : a === 'anchor'\r\n ? this.attr('text-anchor', v)\r\n : a === 'size' || a === 'family' || a === 'weight' || a === 'stretch' || a === 'variant' || a === 'style'\r\n ? this.attr('font-' + a, v)\r\n : this.attr(a, v)\r\n }\r\n})\r\n\r\nregisterMethods('Text', {\r\n ax (x) {\r\n return this.attr('x', x)\r\n },\r\n ay (y) {\r\n return this.attr('y', y)\r\n },\r\n amove (x, y) {\r\n return this.ax(x).ay(y)\r\n }\r\n})\r\n\r\n// Add events to elements\r\nconst methods = [ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].reduce(function (last, event) {\r\n // add event to Element\r\n const fn = function (f) {\r\n if (f === null) {\r\n off(this, event)\r\n } else {\r\n on(this, event, f)\r\n }\r\n return this\r\n }\r\n\r\n last[event] = fn\r\n return last\r\n}, {})\r\n\r\nregisterMethods('Element', methods)\r\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import { getOrigin } from '../../utils/utils.js'\r\nimport { delimiter, transforms } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Matrix from '../../types/Matrix.js'\r\n\r\n// Reset all transformations\r\nexport function untransform () {\r\n return this.attr('transform', null)\r\n}\r\n\r\n// merge the whole transformation chain into one matrix and returns it\r\nexport function matrixify () {\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(transforms).slice(0, -1).map(function (str) {\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [ kv[0],\r\n kv[1].split(delimiter)\r\n .map(function (str) {\r\n return parseFloat(str)\r\n })\r\n ]\r\n })\r\n .reverse()\r\n // merge every transformation into one matrix\r\n .reduce(function (matrix, transform) {\r\n if (transform[0] === 'matrix') {\r\n return matrix.lmultiply(Matrix.fromArray(transform[1]))\r\n }\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n }, new Matrix())\r\n\r\n return matrix\r\n}\r\n\r\n// add an element to another parent without changing the visual representation on the screen\r\nexport function toParent (parent) {\r\n if (this === parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n}\r\n\r\n// same as above with parent equals root-svg\r\nexport function toRoot () {\r\n return this.toParent(this.root())\r\n}\r\n\r\n// Add transformations\r\nexport function transform (o, relative) {\r\n // Act as a getter if no object was passed\r\n if (o == null || typeof o === 'string') {\r\n var decomposed = new Matrix(this).decompose()\r\n return decomposed[o] || decomposed\r\n }\r\n\r\n if (!Matrix.isMatrixLike(o)) {\r\n // Set the origin according to the defined transform\r\n o = { ...o, origin: getOrigin(o, this) }\r\n }\r\n\r\n // The user can pass a boolean, an Element or an Matrix or nothing\r\n var cleanRelative = relative === true ? this : (relative || false)\r\n var result = new Matrix(cleanRelative).transform(o)\r\n return this.attr('transform', result)\r\n}\r\n\r\nregisterMethods('Element', {\r\n untransform, matrixify, toParent, toRoot, transform\r\n})\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Radius x value\r\nexport function rx (rx) {\r\n return this.attr('rx', rx)\r\n}\r\n\r\n// Radius y value\r\nexport function ry (ry) {\r\n return this.attr('ry', ry)\r\n}\r\n\r\n// Move over x-axis\r\nexport function x (x) {\r\n return x == null\r\n ? this.cx() - this.rx()\r\n : this.cx(x + this.rx())\r\n}\r\n\r\n// Move over y-axis\r\nexport function y (y) {\r\n return y == null\r\n ? this.cy() - this.ry()\r\n : this.cy(y + this.ry())\r\n}\r\n\r\n// Move by center over x-axis\r\nexport function cx (x) {\r\n return x == null\r\n ? this.attr('cx')\r\n : this.attr('cx', x)\r\n}\r\n\r\n// Move by center over y-axis\r\nexport function cy (y) {\r\n return y == null\r\n ? this.attr('cy')\r\n : this.attr('cy', y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n return width == null\r\n ? this.rx() * 2\r\n : this.rx(new SVGNumber(width).divide(2))\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Shape extends Element {}\r\n\r\nregister(Shape)\r\n","import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\r\nimport {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Circle extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('circle', node), node)\r\n }\r\n\r\n radius (r) {\r\n return this.attr('r', r)\r\n }\r\n\r\n // Radius x value\r\n rx (rx) {\r\n return this.attr('r', rx)\r\n }\r\n\r\n // Alias radius x value\r\n ry (ry) {\r\n return this.rx(ry)\r\n }\r\n\r\n size (size) {\r\n return this.radius(new SVGNumber(size).divide(2))\r\n }\r\n}\r\n\r\nextend(Circle, { x, y, cx, cy, width, height })\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create circle element\r\n circle: wrapWithAttrCheck(function (size) {\r\n return this.put(new Circle())\r\n .size(size)\r\n .move(0, 0)\r\n })\r\n }\r\n})\r\n\r\nregister(Circle)\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Container extends Element {\r\n flatten (parent) {\r\n this.each(function () {\r\n if (this instanceof Container) return this.flatten(parent).ungroup(parent)\r\n return this.toParent(parent)\r\n })\r\n\r\n // we need this so that the root does not get removed\r\n this.node.firstElementChild || this.remove()\r\n\r\n return this\r\n }\r\n\r\n ungroup (parent) {\r\n parent = parent || this.parent()\r\n\r\n this.each(function () {\r\n return this.toParent(parent)\r\n })\r\n\r\n this.remove()\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Container)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Defs extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('defs', node), node)\r\n }\r\n\r\n flatten () {\r\n return this\r\n }\r\n ungroup () {\r\n return this\r\n }\r\n}\r\n\r\nregister(Defs)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport * as circled from '../modules/core/circled.js'\r\n\r\nexport default class Ellipse extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('ellipse', node), node)\r\n }\r\n\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVGNumber(p.width).divide(2))\r\n .ry(new SVGNumber(p.height).divide(2))\r\n }\r\n}\r\n\r\nextend(Ellipse, circled)\r\n\r\nregisterMethods('Container', {\r\n // Create an ellipse\r\n ellipse: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Ellipse()).size(width, height).move(0, 0)\r\n })\r\n})\r\n\r\nregister(Ellipse)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Stop extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('stop', node), node)\r\n }\r\n\r\n // add color stops\r\n update (o) {\r\n if (typeof o === 'number' || o instanceof SVGNumber) {\r\n o = {\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Stop)\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\nexport function from (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\r\n : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\r\n}\r\n\r\nexport function to (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\r\n : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport Stop from './Stop.js'\r\nimport baseFind from '../modules/core/selector.js'\r\nimport * as gradiented from '../modules/core/gradiented.js'\r\n\r\nexport default class Gradient extends Container {\r\n constructor (type, attrs) {\r\n super(\r\n nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\r\n attrs\r\n )\r\n }\r\n\r\n // Add a color stop\r\n stop (offset, color, opacity) {\r\n return this.put(new Stop()).update(offset, color, opacity)\r\n }\r\n\r\n // Update gradient\r\n update (block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'gradientTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nextend(Gradient, gradiented)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create gradient element in defs\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.defs().gradient(type, block)\r\n })\r\n },\r\n // define gradient\r\n Defs: {\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.put(new Gradient(type)).update(block)\r\n })\r\n }\r\n})\r\n\r\nregister(Gradient)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Pattern extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('pattern', node), node)\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Update pattern by rebuilding\r\n update (block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'patternTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create pattern element in defs\r\n pattern (...args) {\r\n return this.defs().pattern(...args)\r\n }\r\n },\r\n Defs: {\r\n pattern: wrapWithAttrCheck(function (width, height, block) {\r\n return this.put(new Pattern()).update(block).attr({\r\n x: 0,\r\n y: 0,\r\n width: width,\r\n height: height,\r\n patternUnits: 'userSpaceOnUse'\r\n })\r\n })\r\n }\r\n})\r\n\r\nregister(Pattern)\r\n","import { isImage } from '../modules/core/regex.js'\r\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { off, on } from '../modules/core/event.js'\r\nimport { registerAttrHook } from '../modules/core/attr.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Pattern from './Pattern.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Image extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('image', node), node)\r\n }\r\n\r\n // (re)load image\r\n load (url, callback) {\r\n if (!url) return this\r\n\r\n var img = new globals.window.Image()\r\n\r\n on(img, 'load', function (e) {\r\n var p = this.parent(Pattern)\r\n\r\n // ensure image size\r\n if (this.width() === 0 && this.height() === 0) {\r\n this.size(img.width, img.height)\r\n }\r\n\r\n if (p instanceof Pattern) {\r\n // ensure pattern size if not set\r\n if (p.width() === 0 && p.height() === 0) {\r\n p.size(this.width(), this.height())\r\n }\r\n }\r\n\r\n if (typeof callback === 'function') {\r\n callback.call(this, e)\r\n }\r\n }, this)\r\n\r\n on(img, 'load error', function () {\r\n // dont forget to unbind memory leaking events\r\n off(img)\r\n })\r\n\r\n return this.attr('href', (img.src = url), xlink)\r\n }\r\n}\r\n\r\nregisterAttrHook(function (attr, val, _this) {\r\n // convert image fill and stroke to patterns\r\n if (attr === 'fill' || attr === 'stroke') {\r\n if (isImage.test(val)) {\r\n val = _this.root().defs().image(val)\r\n }\r\n }\r\n\r\n if (val instanceof Image) {\r\n val = _this.root().defs().pattern(0, 0, (pattern) => {\r\n pattern.add(val)\r\n })\r\n }\r\n\r\n return val\r\n})\r\n\r\nregisterMethods({\r\n Container: {\r\n // create image element, load image and set its size\r\n image: wrapWithAttrCheck(function (source, callback) {\r\n return this.put(new Image()).size(0, 0).load(source, callback)\r\n })\r\n }\r\n})\r\n\r\nregister(Image)\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport SVGArray from './SVGArray.js'\r\n\r\nconst PointArray = subClassArray('PointArray', SVGArray)\r\n\r\nexport default PointArray\r\n\r\nextend(PointArray, {\r\n // Convert array to string\r\n toString () {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push(this[i].join(','))\r\n }\r\n\r\n return array.join(' ')\r\n },\r\n\r\n // Convert array to line object\r\n toLine () {\r\n return {\r\n x1: this[0][0],\r\n y1: this[0][1],\r\n x2: this[1][0],\r\n y2: this[1][1]\r\n }\r\n },\r\n\r\n // Get morphed array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push([\r\n this[i][0] + (this.destination[i][0] - this[i][0]) * pos,\r\n this[i][1] + (this.destination[i][1] - this[i][1]) * pos\r\n ])\r\n }\r\n\r\n return new PointArray(array)\r\n },\r\n\r\n // Parse point string and flat array\r\n parse (array = [ [ 0, 0 ] ]) {\r\n var points = []\r\n\r\n // if it is an array\r\n if (array instanceof Array) {\r\n // and it is not flat, there is no need to parse it\r\n if (array[0] instanceof Array) {\r\n return array\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for (var i = 0, len = array.length; i < len; i = i + 2) {\r\n points.push([ array[i], array[i + 1] ])\r\n }\r\n\r\n return points\r\n },\r\n\r\n // Move point string\r\n move (x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y)) {\r\n for (var i = this.length - 1; i >= 0; i--) {\r\n this[i] = [ this[i][0] + x, this[i][1] + y ]\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize poly string\r\n size (width, height) {\r\n var i\r\n var box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n if (box.width) this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\r\n if (box.height) this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get bounding box of points\r\n bbox () {\r\n var maxX = -Infinity\r\n var maxY = -Infinity\r\n var minX = Infinity\r\n var minY = Infinity\r\n this.forEach(function (el) {\r\n maxX = Math.max(el[0], maxX)\r\n maxY = Math.max(el[1], maxY)\r\n minX = Math.min(el[0], minX)\r\n minY = Math.min(el[1], minY)\r\n })\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\r\n }\r\n})\r\n","import PointArray from '../../types/PointArray.js'\r\n\r\nexport let MorphArray = PointArray\r\n\r\n// Move by left top corner over x-axis\r\nexport function x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n}\r\n\r\n// Move by left top corner over y-axis\r\nexport function y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n let b = this.bbox()\r\n return width == null ? b.width : this.size(width, b.height)\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n let b = this.bbox()\r\n return height == null ? b.height : this.size(b.width, height)\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\n\r\nexport default class Line extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('line', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return new PointArray([\r\n [ this.attr('x1'), this.attr('y1') ],\r\n [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n\r\n // Overwrite native plot() method\r\n plot (x1, y1, x2, y2) {\r\n if (x1 == null) {\r\n return this.array()\r\n } else if (typeof y1 !== 'undefined') {\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n } else {\r\n x1 = new PointArray(x1).toLine()\r\n }\r\n\r\n return this.attr(x1)\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n}\r\n\r\nextend(Line, pointed)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a line element\r\n line: wrapWithAttrCheck(function (...args) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a PointArray\r\n return Line.prototype.plot.apply(\r\n this.put(new Line())\r\n , args[0] != null ? args : [ 0, 0, 0, 0 ]\r\n )\r\n })\r\n }\r\n})\r\n\r\nregister(Line)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Marker extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('marker', node), node)\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n\r\n // Set marker refX and refY\r\n ref (x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n\r\n // Update marker\r\n update (block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n toString () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n marker (...args) {\r\n // Create marker element in defs\r\n return this.defs().marker(...args)\r\n }\r\n },\r\n Defs: {\r\n // Create marker\r\n marker: wrapWithAttrCheck(function (width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new Marker())\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n })\r\n },\r\n marker: {\r\n // Create and attach markers\r\n marker (marker, width, height, block) {\r\n var attr = [ 'marker' ]\r\n\r\n // Build attribute name\r\n if (marker !== 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof Marker\r\n ? arguments[1]\r\n : this.defs().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n }\r\n})\r\n\r\nregister(Marker)\r\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import { timeline } from '../modules/core/defaults.js'\r\nimport { extend } from '../utils/adopter.js'\r\n\r\n/***\r\nBase Class\r\n==========\r\nThe base stepper class that will be\r\n***/\r\n\r\nfunction makeSetterGetter (k, f) {\r\n return function (v) {\r\n if (v == null) return this[v]\r\n this[k] = v\r\n if (f) f.call(this)\r\n return this\r\n }\r\n}\r\n\r\nexport let easing = {\r\n '-': function (pos) {\r\n return pos\r\n },\r\n '<>': function (pos) {\r\n return -Math.cos(pos * Math.PI) / 2 + 0.5\r\n },\r\n '>': function (pos) {\r\n return Math.sin(pos * Math.PI / 2)\r\n },\r\n '<': function (pos) {\r\n return -Math.cos(pos * Math.PI / 2) + 1\r\n },\r\n bezier: function (x1, y1, x2, y2) {\r\n // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\r\n return function (t) {\r\n if (t < 0) {\r\n if (x1 > 0) {\r\n return y1 / x1 * t\r\n } else if (x2 > 0) {\r\n return y2 / x2 * t\r\n } else {\r\n return 0\r\n }\r\n } else if (t > 1) {\r\n if (x2 < 1) {\r\n return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2)\r\n } else if (x1 < 1) {\r\n return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1)\r\n } else {\r\n return 1\r\n }\r\n } else {\r\n return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\r\n }\r\n }\r\n },\r\n // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\r\n steps: function (steps, stepPosition = 'end') {\r\n // deal with \"jump-\" prefix\r\n stepPosition = stepPosition.split('-').reverse()[0]\r\n\r\n let jumps = steps\r\n if (stepPosition === 'none') {\r\n --jumps\r\n } else if (stepPosition === 'both') {\r\n ++jumps\r\n }\r\n\r\n // The beforeFlag is essentially useless\r\n return (t, beforeFlag = false) => {\r\n // Step is called currentStep in referenced url\r\n let step = Math.floor(t * steps)\r\n const jumping = (t * step) % 1 === 0\r\n\r\n if (stepPosition === 'start' || stepPosition === 'both') {\r\n ++step\r\n }\r\n\r\n if (beforeFlag && jumping) {\r\n --step\r\n }\r\n\r\n if (t >= 0 && step < 0) {\r\n step = 0\r\n }\r\n\r\n if (t <= 1 && step > jumps) {\r\n step = jumps\r\n }\r\n\r\n return step / jumps\r\n }\r\n }\r\n}\r\n\r\nexport class Stepper {\r\n done () {\r\n return false\r\n }\r\n}\r\n\r\n/***\r\nEasing Functions\r\n================\r\n***/\r\n\r\nexport class Ease extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.ease = easing[fn || timeline.ease] || fn\r\n }\r\n\r\n step (from, to, pos) {\r\n if (typeof from !== 'number') {\r\n return pos < 1 ? from : to\r\n }\r\n return from + (to - from) * this.ease(pos)\r\n }\r\n}\r\n\r\n/***\r\nController Types\r\n================\r\n***/\r\n\r\nexport class Controller extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.stepper = fn\r\n }\r\n\r\n step (current, target, dt, c) {\r\n return this.stepper(current, target, dt, c)\r\n }\r\n\r\n done (c) {\r\n return c.done\r\n }\r\n}\r\n\r\nfunction recalculate () {\r\n // Apply the default parameters\r\n var duration = (this._duration || 500) / 1000\r\n var overshoot = this._overshoot || 0\r\n\r\n // Calculate the PID natural response\r\n var eps = 1e-10\r\n var pi = Math.PI\r\n var os = Math.log(overshoot / 100 + eps)\r\n var zeta = -os / Math.sqrt(pi * pi + os * os)\r\n var wn = 3.9 / (zeta * duration)\r\n\r\n // Calculate the Spring values\r\n this.d = 2 * zeta * wn\r\n this.k = wn * wn\r\n}\r\n\r\nexport class Spring extends Controller {\r\n constructor (duration, overshoot) {\r\n super()\r\n this.duration(duration || 500)\r\n .overshoot(overshoot || 0)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n if (dt > 100) dt = 16\r\n\r\n dt /= 1000\r\n\r\n // Get the previous velocity\r\n var velocity = c.velocity || 0\r\n\r\n // Apply the control to get the new position and store it\r\n var acceleration = -this.d * velocity - this.k * (current - target)\r\n var newPosition = current\r\n + velocity * dt\r\n + acceleration * dt * dt / 2\r\n\r\n // Store the velocity\r\n c.velocity = velocity + acceleration * dt\r\n\r\n // Figure out if we have converged, and if so, pass the value\r\n c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\r\n return c.done ? target : newPosition\r\n }\r\n}\r\n\r\nextend(Spring, {\r\n duration: makeSetterGetter('_duration', recalculate),\r\n overshoot: makeSetterGetter('_overshoot', recalculate)\r\n})\r\n\r\nexport class PID extends Controller {\r\n constructor (p, i, d, windup) {\r\n super()\r\n\r\n p = p == null ? 0.1 : p\r\n i = i == null ? 0.01 : i\r\n d = d == null ? 0 : d\r\n windup = windup == null ? 1000 : windup\r\n this.p(p).i(i).d(d).windup(windup)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n var p = target - current\r\n var i = (c.integral || 0) + p * dt\r\n var d = (p - (c.error || 0)) / dt\r\n var windup = this.windup\r\n\r\n // antiwindup\r\n if (windup !== false) {\r\n i = Math.max(-windup, Math.min(i, windup))\r\n }\r\n\r\n c.error = p\r\n c.integral = i\r\n\r\n c.done = Math.abs(p) < 0.001\r\n\r\n return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\r\n }\r\n}\r\n\r\nextend(PID, {\r\n windup: makeSetterGetter('windup'),\r\n p: makeSetterGetter('P'),\r\n i: makeSetterGetter('I'),\r\n d: makeSetterGetter('D')\r\n})\r\n","import {\r\n delimiter,\r\n dots,\r\n hyphen,\r\n isPathLetter,\r\n numbersWithDots,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport Point from './Point.js'\r\nimport SVGArray from './SVGArray.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nconst PathArray = subClassArray('PathArray', SVGArray)\r\n\r\nexport default PathArray\r\n\r\nexport function pathRegReplace (a, b, c, d) {\r\n return c + d.replace(dots, ' .')\r\n}\r\n\r\nfunction arrayToString (a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\nconst pathHandlers = {\r\n M: function (c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return [ 'M', p.x, p.y ]\r\n },\r\n L: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return [ 'L', c[0], c[1] ]\r\n },\r\n H: function (c, p) {\r\n p.x = c[0]\r\n return [ 'H', c[0] ]\r\n },\r\n V: function (c, p) {\r\n p.y = c[0]\r\n return [ 'V', c[0] ]\r\n },\r\n C: function (c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return [ 'C', c[0], c[1], c[2], c[3], c[4], c[5] ]\r\n },\r\n S: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return [ 'S', c[0], c[1], c[2], c[3] ]\r\n },\r\n Q: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return [ 'Q', c[0], c[1], c[2], c[3] ]\r\n },\r\n T: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return [ 'T', c[0], c[1] ]\r\n },\r\n Z: function (c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return [ 'Z' ]\r\n },\r\n A: function (c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return [ 'A', c[0], c[1], c[2], c[3], c[4], c[5], c[6] ]\r\n }\r\n}\r\n\r\nlet mlhvqtcsaz = 'mlhvqtcsaz'.split('')\r\n\r\nfor (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\r\n pathHandlers[mlhvqtcsaz[i]] = (function (i) {\r\n return function (c, p, p0) {\r\n if (i === 'H') c[0] = c[0] + p.x\r\n else if (i === 'V') c[0] = c[0] + p.y\r\n else if (i === 'A') {\r\n c[5] = c[5] + p.x\r\n c[6] = c[6] + p.y\r\n } else {\r\n for (var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j % 2 ? p.y : p.x)\r\n }\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsaz[i].toUpperCase())\r\n}\r\n\r\nextend(PathArray, {\r\n // Convert array to string\r\n toString () {\r\n return arrayToString(this)\r\n },\r\n\r\n // Move path string\r\n move (x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n } else if (l === 'H') {\r\n this[i][1] += x\r\n } else if (l === 'V') {\r\n this[i][1] += y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n this[i][3] += x\r\n this[i][4] += y\r\n\r\n if (l === 'C') {\r\n this[i][5] += x\r\n this[i][6] += y\r\n }\r\n } else if (l === 'A') {\r\n this[i][6] += x\r\n this[i][7] += y\r\n }\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize path string\r\n size (width, height) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n var i, l\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n } else if (l === 'H') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n } else if (l === 'V') {\r\n this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\r\n this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l === 'C') {\r\n this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\r\n this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n } else if (l === 'A') {\r\n // resize radii\r\n this[i][1] = (this[i][1] * width) / box.width\r\n this[i][2] = (this[i][2] * height) / box.height\r\n\r\n // move position values\r\n this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\r\n this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Test if the passed path array use the same path data commands as this path array\r\n equalCommands (pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new PathArray(pathArray)\r\n\r\n equalCommands = this.length === pathArray.length\r\n for (i = 0, il = this.length; equalCommands && i < il; i++) {\r\n equalCommands = this[i][0] === pathArray[i][0]\r\n }\r\n\r\n return equalCommands\r\n },\r\n\r\n // Make path array morphable\r\n morph (pathArray) {\r\n pathArray = new PathArray(pathArray)\r\n\r\n if (this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get morphed path array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this\r\n var destinationArray = this.destination.value\r\n var array = []\r\n var pathArray = new PathArray()\r\n var i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [ sourceArray[i][0] ]\r\n for (j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if (array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] !== 0)\r\n array[i][5] = +(array[i][5] !== 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n },\r\n\r\n // Absolutize and parse path to array\r\n parse (array = [ [ 'M', 0, 0 ] ]) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof PathArray) return array\r\n\r\n // prepare for parsing\r\n var s\r\n var paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 }\r\n\r\n if (typeof array === 'string') {\r\n array = array\r\n .replace(numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(delimiter) // split into array\r\n } else {\r\n array = array.reduce(function (prev, curr) {\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var result = []\r\n var p = new Point()\r\n var p0 = new Point()\r\n var index = 0\r\n var len = array.length\r\n\r\n do {\r\n // Test if we have a path letter\r\n if (isPathLetter.test(array[index])) {\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n } else if (s === 'M') {\r\n s = 'L'\r\n } else if (s === 'm') {\r\n s = 'l'\r\n }\r\n\r\n result.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n } while (len > index)\r\n\r\n return result\r\n },\r\n\r\n // Get bounding box of path\r\n bbox () {\r\n parser().path.setAttribute('d', this.toString())\r\n return parser.nodes.path.getBBox()\r\n }\r\n})\r\n","import { Ease } from './Controller.js'\r\nimport {\r\n delimiter,\r\n numberAndUnit,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport Color from '../types/Color.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport SVGArray from '../types/SVGArray.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Morphable {\r\n constructor (stepper) {\r\n this._stepper = stepper || new Ease('-')\r\n\r\n this._from = null\r\n this._to = null\r\n this._type = null\r\n this._context = null\r\n this._morphObj = null\r\n }\r\n\r\n from (val) {\r\n if (val == null) {\r\n return this._from\r\n }\r\n\r\n this._from = this._set(val)\r\n return this\r\n }\r\n\r\n to (val) {\r\n if (val == null) {\r\n return this._to\r\n }\r\n\r\n this._to = this._set(val)\r\n return this\r\n }\r\n\r\n type (type) {\r\n // getter\r\n if (type == null) {\r\n return this._type\r\n }\r\n\r\n // setter\r\n this._type = type\r\n return this\r\n }\r\n\r\n _set (value) {\r\n if (!this._type) {\r\n var type = typeof value\r\n\r\n if (type === 'number') {\r\n this.type(SVGNumber)\r\n } else if (type === 'string') {\r\n if (Color.isColor(value)) {\r\n this.type(Color)\r\n } else if (delimiter.test(value)) {\r\n this.type(pathLetters.test(value)\r\n ? PathArray\r\n : SVGArray\r\n )\r\n } else if (numberAndUnit.test(value)) {\r\n this.type(SVGNumber)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n } else if (morphableTypes.indexOf(value.constructor) > -1) {\r\n this.type(value.constructor)\r\n } else if (Array.isArray(value)) {\r\n this.type(SVGArray)\r\n } else if (type === 'object') {\r\n this.type(ObjectBag)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n }\r\n\r\n var result = (new this._type(value))\r\n if (this._type === Color) {\r\n result = this._to ? result[this._to[4]]()\r\n : this._from ? result[this._from[4]]()\r\n : result\r\n }\r\n result = result.toArray()\r\n\r\n this._morphObj = this._morphObj || new this._type()\r\n this._context = this._context\r\n || Array.apply(null, Array(result.length)).map(Object)\r\n return result\r\n }\r\n\r\n stepper (stepper) {\r\n if (stepper == null) return this._stepper\r\n this._stepper = stepper\r\n return this\r\n }\r\n\r\n done () {\r\n var complete = this._context\r\n .map(this._stepper.done)\r\n .reduce(function (last, curr) {\r\n return last && curr\r\n }, true)\r\n return complete\r\n }\r\n\r\n at (pos) {\r\n var _this = this\r\n\r\n return this._morphObj.fromArray(\r\n this._from.map(function (i, index) {\r\n return _this._stepper.step(i, _this._to[index], pos, _this._context[index], _this._context)\r\n })\r\n )\r\n }\r\n}\r\n\r\nexport class NonMorphable {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (val) {\r\n val = Array.isArray(val) ? val[0] : val\r\n this.value = val\r\n return this\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n toArray () {\r\n return [ this.value ]\r\n }\r\n}\r\n\r\nexport class TransformBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (obj) {\r\n if (Array.isArray(obj)) {\r\n obj = {\r\n scaleX: obj[0],\r\n scaleY: obj[1],\r\n shear: obj[2],\r\n rotate: obj[3],\r\n translateX: obj[4],\r\n translateY: obj[5],\r\n originX: obj[6],\r\n originY: obj[7]\r\n }\r\n }\r\n\r\n Object.assign(this, TransformBag.defaults, obj)\r\n return this\r\n }\r\n\r\n toArray () {\r\n var v = this\r\n\r\n return [\r\n v.scaleX,\r\n v.scaleY,\r\n v.shear,\r\n v.rotate,\r\n v.translateX,\r\n v.translateY,\r\n v.originX,\r\n v.originY\r\n ]\r\n }\r\n}\r\n\r\nTransformBag.defaults = {\r\n scaleX: 1,\r\n scaleY: 1,\r\n shear: 0,\r\n rotate: 0,\r\n translateX: 0,\r\n translateY: 0,\r\n originX: 0,\r\n originY: 0\r\n}\r\n\r\nexport class ObjectBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (objOrArr) {\r\n this.values = []\r\n\r\n if (Array.isArray(objOrArr)) {\r\n this.values = objOrArr\r\n return\r\n }\r\n\r\n objOrArr = objOrArr || {}\r\n var entries = []\r\n\r\n for (let i in objOrArr) {\r\n entries.push([i, objOrArr[i]])\r\n }\r\n\r\n entries.sort((a, b) => {\r\n return a[0] - b[0]\r\n })\r\n\r\n this.values = entries.reduce((last, curr) => last.concat(curr), [])\r\n return this\r\n }\r\n\r\n valueOf () {\r\n var obj = {}\r\n var arr = this.values\r\n\r\n for (var i = 0, len = arr.length; i < len; i += 2) {\r\n obj[arr[i]] = arr[i + 1]\r\n }\r\n\r\n return obj\r\n }\r\n\r\n toArray () {\r\n return this.values\r\n }\r\n}\r\n\r\nconst morphableTypes = [\r\n NonMorphable,\r\n TransformBag,\r\n ObjectBag\r\n]\r\n\r\nexport function registerMorphableType (type = []) {\r\n morphableTypes.push(...[].concat(type))\r\n}\r\n\r\nexport function makeMorphable () {\r\n extend(morphableTypes, {\r\n to (val) {\r\n return new Morphable()\r\n .type(this.constructor)\r\n .from(this.valueOf())\r\n .to(val)\r\n },\r\n fromArray (arr) {\r\n this.init(arr)\r\n return this\r\n }\r\n })\r\n}\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Shape from './Shape.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Path extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('path', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return this._array || (this._array = new PathArray(this.attr('d')))\r\n }\r\n\r\n // Plot new path\r\n plot (d) {\r\n return (d == null) ? this.array()\r\n : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new PathArray(d)))\r\n }\r\n\r\n // Clear array cache\r\n clear () {\r\n delete this._array\r\n return this\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n\r\n // Move by left top corner over x-axis\r\n x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n\r\n // Move by left top corner over y-axis\r\n y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg textpath [href*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\n// Define morphable array\r\nPath.prototype.MorphArray = PathArray\r\n\r\n// Add parent method\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped path element\r\n path: wrapWithAttrCheck(function (d) {\r\n // make sure plot is called as a setter\r\n return this.put(new Path()).plot(d || new PathArray())\r\n })\r\n }\r\n})\r\n\r\nregister(Path)\r\n","import { proportionalSize } from '../../utils/utils.js'\r\nimport PointArray from '../../types/PointArray.js'\r\n\r\n// Get array\r\nexport function array () {\r\n return this._array || (this._array = new PointArray(this.attr('points')))\r\n}\r\n\r\n// Plot new path\r\nexport function plot (p) {\r\n return (p == null) ? this.array()\r\n : this.clear().attr('points', typeof p === 'string' ? p\r\n : (this._array = new PointArray(p)))\r\n}\r\n\r\n// Clear array cache\r\nexport function clear () {\r\n delete this._array\r\n return this\r\n}\r\n\r\n// Move by left top corner\r\nexport function move (x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n}\r\n\r\n// Set element size to given width and height\r\nexport function size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polygon extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polygon', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polygon: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polygon()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polygon, pointed)\r\nextend(Polygon, poly)\r\nregister(Polygon)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polyline extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polyline', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polyline: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polyline()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polyline, pointed)\r\nextend(Polyline, poly)\r\nregister(Polyline)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Rect extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('rect', node), node)\r\n }\r\n}\r\n\r\nextend(Rect, { rx, ry })\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a rect element\r\n rect: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Rect()).size(width, height)\r\n })\r\n }\r\n})\r\n\r\nregister(Rect)\r\n","export default class Queue {\r\n constructor () {\r\n this._first = null\r\n this._last = null\r\n }\r\n\r\n push (value) {\r\n // An item stores an id and the provided value\r\n var item = value.next ? value : { value: value, next: null, prev: null }\r\n\r\n // Deal with the queue being empty or populated\r\n if (this._last) {\r\n item.prev = this._last\r\n this._last.next = item\r\n this._last = item\r\n } else {\r\n this._last = item\r\n this._first = item\r\n }\r\n\r\n // Update the length and return the current item\r\n return item\r\n }\r\n\r\n shift () {\r\n // Check if we have a value\r\n var remove = this._first\r\n if (!remove) return null\r\n\r\n // If we do, remove it and relink things\r\n this._first = remove.next\r\n if (this._first) this._first.prev = null\r\n this._last = this._first ? this._last : null\r\n return remove.value\r\n }\r\n\r\n // Shows us the first item in the list\r\n first () {\r\n return this._first && this._first.value\r\n }\r\n\r\n // Shows us the last item in the list\r\n last () {\r\n return this._last && this._last.value\r\n }\r\n\r\n // Removes the item that was returned from the push\r\n remove (item) {\r\n // Relink the previous item\r\n if (item.prev) item.prev.next = item.next\r\n if (item.next) item.next.prev = item.prev\r\n if (item === this._last) this._last = item.prev\r\n if (item === this._first) this._first = item.next\r\n\r\n // Invalidate item\r\n item.prev = null\r\n item.next = null\r\n }\r\n}\r\n","import { globals } from '../utils/window.js'\r\nimport Queue from './Queue.js'\r\n\r\nconst Animator = {\r\n nextDraw: null,\r\n frames: new Queue(),\r\n timeouts: new Queue(),\r\n timer: () => globals.window.performance || globals.window.Date,\r\n transforms: [],\r\n\r\n frame (fn) {\r\n // Store the node\r\n var node = Animator.frames.push({ run: fn })\r\n\r\n // Request an animation frame if we don't have one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n // Return the node so we can remove it easily\r\n return node\r\n },\r\n\r\n transform_frame (fn, id) {\r\n Animator.transforms[id] = fn\r\n },\r\n\r\n timeout (fn, delay) {\r\n delay = delay || 0\r\n\r\n // Work out when the event should fire\r\n var time = Animator.timer().now() + delay\r\n\r\n // Add the timeout to the end of the queue\r\n var node = Animator.timeouts.push({ run: fn, time: time })\r\n\r\n // Request another animation frame if we need one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n return node\r\n },\r\n\r\n cancelFrame (node) {\r\n node != null && Animator.frames.remove(node)\r\n },\r\n\r\n clearTimeout (node) {\r\n node != null && Animator.timeouts.remove(node)\r\n },\r\n\r\n _draw (now) {\r\n // Run all the timeouts we can run, if they are not ready yet, add them\r\n // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\r\n var nextTimeout = null\r\n var lastTimeout = Animator.timeouts.last()\r\n while ((nextTimeout = Animator.timeouts.shift())) {\r\n // Run the timeout if its time, or push it to the end\r\n if (now >= nextTimeout.time) {\r\n nextTimeout.run()\r\n } else {\r\n Animator.timeouts.push(nextTimeout)\r\n }\r\n\r\n // If we hit the last item, we should stop shifting out more items\r\n if (nextTimeout === lastTimeout) break\r\n }\r\n\r\n // Run all of the animation frames\r\n var nextFrame = null\r\n var lastFrame = Animator.frames.last()\r\n while ((nextFrame !== lastFrame) && (nextFrame = Animator.frames.shift())) {\r\n nextFrame.run()\r\n }\r\n\r\n Animator.transforms.forEach(function (el) {\r\n el()\r\n })\r\n\r\n // If we have remaining timeouts or frames, draw until we don't anymore\r\n Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()\r\n ? globals.window.requestAnimationFrame(Animator._draw)\r\n : null\r\n }\r\n}\r\n\r\nexport default Animator\r\n","import { globals } from '../utils/window.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Animator from './Animator.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\n\r\nvar makeSchedule = function (runnerInfo) {\r\n var start = runnerInfo.start\r\n var duration = runnerInfo.runner.duration()\r\n var end = start + duration\r\n return { start: start, duration: duration, end: end, runner: runnerInfo.runner }\r\n}\r\n\r\nconst defaultSource = function () {\r\n let w = globals.window\r\n return (w.performance || w.Date).now()\r\n}\r\n\r\nexport default class Timeline extends EventTarget {\r\n // Construct a new timeline on the given element\r\n constructor (timeSource = defaultSource) {\r\n super()\r\n\r\n this._timeSource = timeSource\r\n\r\n // Store the timing variables\r\n this._startTime = 0\r\n this._speed = 1.0\r\n\r\n // Determines how long a runner is hold in memory. Can be a dt or true/false\r\n this._persist = 0\r\n\r\n // Keep track of the running animations and their starting parameters\r\n this._nextFrame = null\r\n this._paused = true\r\n this._runners = []\r\n this._order = []\r\n this._time = 0\r\n this._lastSourceTime = 0\r\n this._lastStepTime = 0\r\n\r\n // Make sure that step is always called in class context\r\n this._step = this._step.bind(this)\r\n }\r\n\r\n // schedules a runner on the timeline\r\n schedule (runner, delay, when) {\r\n if (runner == null) {\r\n return this._runners.map(makeSchedule).sort(function (a, b) {\r\n return a.runner.id - b.runner.id\r\n })\r\n }\r\n\r\n // The start time for the next animation can either be given explicitly,\r\n // derived from the current timeline time or it can be relative to the\r\n // last start time to chain animations direclty\r\n\r\n var absoluteStartTime = 0\r\n var endTime = this.getEndTime()\r\n delay = delay || 0\r\n\r\n // Work out when to start the animation\r\n if (when == null || when === 'last' || when === 'after') {\r\n // Take the last time and increment\r\n absoluteStartTime = endTime\r\n } else if (when === 'absolute' || when === 'start') {\r\n absoluteStartTime = delay\r\n delay = 0\r\n } else if (when === 'now') {\r\n absoluteStartTime = this._time\r\n } else if (when === 'relative') {\r\n let runnerInfo = this._runners[runner.id]\r\n if (runnerInfo) {\r\n absoluteStartTime = runnerInfo.start + delay\r\n delay = 0\r\n }\r\n } else {\r\n throw new Error('Invalid value for the \"when\" parameter')\r\n }\r\n\r\n // Manage runner\r\n runner.unschedule()\r\n runner.timeline(this)\r\n // runner.time(-delay)\r\n\r\n // Save runnerInfo\r\n this._runners[runner.id] = {\r\n persist: this.persist(),\r\n runner: runner,\r\n start: absoluteStartTime + delay\r\n }\r\n\r\n // Save order, update Time if needed and continue\r\n this._order.push(runner.id)\r\n this.updateTime()._continue()\r\n return this\r\n }\r\n\r\n // Remove the runner from this timeline\r\n unschedule (runner) {\r\n var index = this._order.indexOf(runner.id)\r\n if (index < 0) return this\r\n\r\n delete this._runners[runner.id]\r\n this._order.splice(index, 1)\r\n runner.timeline(null)\r\n return this\r\n }\r\n\r\n // Calculates the end of the timeline\r\n getEndTime () {\r\n var lastRunnerInfo = this._runners[this._order[this._order.length - 1]]\r\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\r\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0\r\n return lastStartTime + lastDuration\r\n }\r\n\r\n // Makes sure, that after pausing the time doesn't jump\r\n updateTime () {\r\n if (!this.active()) {\r\n this._lastSourceTime = this._timeSource()\r\n }\r\n return this\r\n }\r\n\r\n play () {\r\n // Now make sure we are not paused and continue the animation\r\n this._paused = false\r\n return this.updateTime()._continue()\r\n }\r\n\r\n pause () {\r\n this._paused = true\r\n return this._continue()\r\n }\r\n\r\n stop () {\r\n // Go to start and pause\r\n this.time(0)\r\n return this.pause()\r\n }\r\n\r\n finish () {\r\n // Go to end and pause\r\n this.time(this.getEndTime() + 1)\r\n return this.pause()\r\n }\r\n\r\n speed (speed) {\r\n if (speed == null) return this._speed\r\n this._speed = speed\r\n return this\r\n }\r\n\r\n reverse (yes) {\r\n var currentSpeed = this.speed()\r\n if (yes == null) return this.speed(-currentSpeed)\r\n\r\n var positive = Math.abs(currentSpeed)\r\n return this.speed(yes ? positive : -positive)\r\n }\r\n\r\n seek (dt) {\r\n return this.time(this._time + dt)\r\n }\r\n\r\n time (time) {\r\n if (time == null) return this._time\r\n this._time = time\r\n return this._continue(true)\r\n }\r\n\r\n persist (dtOrForever) {\r\n if (dtOrForever == null) return this._persist\r\n this._persist = dtOrForever\r\n return this\r\n }\r\n\r\n source (fn) {\r\n if (fn == null) return this._timeSource\r\n this._timeSource = fn\r\n return this\r\n }\r\n\r\n _step (immediateStep = false) {\r\n // Get the time delta from the last time and update the time\r\n var time = this._timeSource()\r\n var dtSource = time - this._lastSourceTime\r\n\r\n if (immediateStep) dtSource = 0\r\n\r\n var dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\r\n this._lastSourceTime = time\r\n\r\n // Only update the time if we use the timeSource.\r\n // Otherwise use the current time\r\n if (!immediateStep) {\r\n // Update the time\r\n this._time += dtTime\r\n this._time = this._time < 0 ? 0 : this._time\r\n }\r\n this._lastStepTime = this._time\r\n this.fire('time', this._time)\r\n\r\n // Run all of the runners directly\r\n var runnersLeft = false\r\n for (var i = 0, len = this._order.length; i < len; i++) {\r\n // Get and run the current runner and ignore it if its inactive\r\n var runnerInfo = this._runners[this._order[i]]\r\n var runner = runnerInfo.runner\r\n let dt = dtTime\r\n\r\n // Make sure that we give the actual difference\r\n // between runner start time and now\r\n let dtToStart = this._time - runnerInfo.start\r\n\r\n // Dont run runner if not started yet\r\n if (dtToStart <= 0) {\r\n runnersLeft = true\r\n\r\n // This is for the case that teh timeline was seeked so that the time\r\n // is now before the startTime of the runner. Thats why we need to set\r\n // the runner to position 0\r\n runner.reset()\r\n continue\r\n } else if (dtToStart < dt) {\r\n // Adjust dt to make sure that animation is on point\r\n dt = dtToStart\r\n }\r\n\r\n if (!runner.active()) continue\r\n\r\n // If this runner is still going, signal that we need another animation\r\n // frame, otherwise, remove the completed runner\r\n var finished = runner.step(dt).done\r\n if (!finished) {\r\n runnersLeft = true\r\n // continue\r\n } else if (runnerInfo.persist !== true) {\r\n // runner is finished. And runner might get removed\r\n\r\n var endTime = runner.duration() - runner.time() + this._time\r\n\r\n if (endTime + this._persist < this._time) {\r\n // Delete runner and correct index\r\n delete this._runners[this._order[i]]\r\n this._order.splice(i--, 1) && --len\r\n runner.timeline(null)\r\n }\r\n }\r\n }\r\n\r\n // Basically: we continue when there are runners right from us in time\r\n // when -->, and when runners are left from us when <--\r\n if ((runnersLeft && !(this._speed < 0 && this._time === 0)) || (this._order.length && this._speed < 0 && this._time > 0)) {\r\n this._continue()\r\n } else {\r\n this.fire('finished')\r\n this.pause()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Checks if we are running and continues the animation\r\n _continue (immediateStep = false) {\r\n Animator.cancelFrame(this._nextFrame)\r\n this._nextFrame = null\r\n\r\n if (immediateStep) return this._step(true)\r\n if (this._paused) return this\r\n\r\n this._nextFrame = Animator.frame(this._step)\r\n return this\r\n }\r\n\r\n active () {\r\n return !!this._nextFrame\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n timeline: function () {\r\n this._timeline = (this._timeline || new Timeline())\r\n return this._timeline\r\n }\r\n }\r\n})\r\n","import { Controller, Ease, Stepper } from './Controller.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { from, to } from '../modules/core/gradiented.js'\r\nimport { getOrigin } from '../utils/utils.js'\r\nimport { noop, timeline } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Animator from './Animator.js'\r\nimport Box from '../types/Box.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport Matrix from '../types/Matrix.js'\r\nimport Morphable, { TransformBag } from './Morphable.js'\r\nimport Point from '../types/Point.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Timeline from './Timeline.js'\r\n\r\nexport default class Runner extends EventTarget {\r\n constructor (options) {\r\n super()\r\n\r\n // Store a unique id on the runner, so that we can identify it later\r\n this.id = Runner.id++\r\n\r\n // Ensure a default value\r\n options = options == null\r\n ? timeline.duration\r\n : options\r\n\r\n // Ensure that we get a controller\r\n options = typeof options === 'function'\r\n ? new Controller(options)\r\n : options\r\n\r\n // Declare all of the variables\r\n this._element = null\r\n this._timeline = null\r\n this.done = false\r\n this._queue = []\r\n\r\n // Work out the stepper and the duration\r\n this._duration = typeof options === 'number' && options\r\n this._isDeclarative = options instanceof Controller\r\n this._stepper = this._isDeclarative ? options : new Ease()\r\n\r\n // We copy the current values from the timeline because they can change\r\n this._history = {}\r\n\r\n // Store the state of the runner\r\n this.enabled = true\r\n this._time = 0\r\n this._lastTime = 0\r\n\r\n // At creation, the runner is in reseted state\r\n this._reseted = true\r\n\r\n // Save transforms applied to this runner\r\n this.transforms = new Matrix()\r\n this.transformId = 1\r\n\r\n // Looping variables\r\n this._haveReversed = false\r\n this._reverse = false\r\n this._loopsDone = 0\r\n this._swing = false\r\n this._wait = 0\r\n this._times = 1\r\n }\r\n\r\n /*\r\n Runner Definitions\r\n ==================\r\n These methods help us define the runtime behaviour of the Runner or they\r\n help us make new runners from the current runner\r\n */\r\n\r\n element (element) {\r\n if (element == null) return this._element\r\n this._element = element\r\n element._prepareRunner()\r\n return this\r\n }\r\n\r\n timeline (timeline) {\r\n // check explicitly for undefined so we can set the timeline to null\r\n if (typeof timeline === 'undefined') return this._timeline\r\n this._timeline = timeline\r\n return this\r\n }\r\n\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var runner = new Runner(o.duration)\r\n if (this._timeline) runner.timeline(this._timeline)\r\n if (this._element) runner.element(this._element)\r\n return runner.loop(o).schedule(delay, when)\r\n }\r\n\r\n schedule (timeline, delay, when) {\r\n // The user doesn't need to pass a timeline if we already have one\r\n if (!(timeline instanceof Timeline)) {\r\n when = delay\r\n delay = timeline\r\n timeline = this.timeline()\r\n }\r\n\r\n // If there is no timeline, yell at the user...\r\n if (!timeline) {\r\n throw Error('Runner cannot be scheduled without timeline')\r\n }\r\n\r\n // Schedule the runner on the timeline provided\r\n timeline.schedule(this, delay, when)\r\n return this\r\n }\r\n\r\n unschedule () {\r\n var timeline = this.timeline()\r\n timeline && timeline.unschedule(this)\r\n return this\r\n }\r\n\r\n loop (times, swing, wait) {\r\n // Deal with the user passing in an object\r\n if (typeof times === 'object') {\r\n swing = times.swing\r\n wait = times.wait\r\n times = times.times\r\n }\r\n\r\n // Sanitise the values and store them\r\n this._times = times || Infinity\r\n this._swing = swing || false\r\n this._wait = wait || 0\r\n return this\r\n }\r\n\r\n delay (delay) {\r\n return this.animate(0, delay)\r\n }\r\n\r\n /*\r\n Basic Functionality\r\n ===================\r\n These methods allow us to attach basic functions to the runner directly\r\n */\r\n\r\n queue (initFn, runFn, retargetFn, isTransform) {\r\n this._queue.push({\r\n initialiser: initFn || noop,\r\n runner: runFn || noop,\r\n retarget: retargetFn,\r\n isTransform: isTransform,\r\n initialised: false,\r\n finished: false\r\n })\r\n var timeline = this.timeline()\r\n timeline && this.timeline()._continue()\r\n return this\r\n }\r\n\r\n during (fn) {\r\n return this.queue(null, fn)\r\n }\r\n\r\n after (fn) {\r\n return this.on('finish', fn)\r\n }\r\n\r\n /*\r\n Runner animation methods\r\n ========================\r\n Control how the animation plays\r\n */\r\n\r\n time (time) {\r\n if (time == null) {\r\n return this._time\r\n }\r\n let dt = time - this._time\r\n this.step(dt)\r\n return this\r\n }\r\n\r\n duration () {\r\n return this._times * (this._wait + this._duration) - this._wait\r\n }\r\n\r\n loops (p) {\r\n var loopDuration = this._duration + this._wait\r\n if (p == null) {\r\n var loopsDone = Math.floor(this._time / loopDuration)\r\n var relativeTime = (this._time - loopsDone * loopDuration)\r\n var position = relativeTime / this._duration\r\n return Math.min(loopsDone + position, this._times)\r\n }\r\n var whole = Math.floor(p)\r\n var partial = p % 1\r\n var time = loopDuration * whole + this._duration * partial\r\n return this.time(time)\r\n }\r\n\r\n position (p) {\r\n // Get all of the variables we need\r\n var x = this._time\r\n var d = this._duration\r\n var w = this._wait\r\n var t = this._times\r\n var s = this._swing\r\n var r = this._reverse\r\n var position\r\n\r\n if (p == null) {\r\n /*\r\n This function converts a time to a position in the range [0, 1]\r\n The full explanation can be found in this desmos demonstration\r\n https://www.desmos.com/calculator/u4fbavgche\r\n The logic is slightly simplified here because we can use booleans\r\n */\r\n\r\n // Figure out the value without thinking about the start or end time\r\n const f = function (x) {\r\n var swinging = s * Math.floor(x % (2 * (w + d)) / (w + d))\r\n var backwards = (swinging && !r) || (!swinging && r)\r\n var uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards\r\n var clipped = Math.max(Math.min(uncliped, 1), 0)\r\n return clipped\r\n }\r\n\r\n // Figure out the value by incorporating the start time\r\n var endTime = t * (w + d) - w\r\n position = x <= 0 ? Math.round(f(1e-5))\r\n : x < endTime ? f(x)\r\n : Math.round(f(endTime - 1e-5))\r\n return position\r\n }\r\n\r\n // Work out the loops done and add the position to the loops done\r\n var loopsDone = Math.floor(this.loops())\r\n var swingForward = s && (loopsDone % 2 === 0)\r\n var forwards = (swingForward && !r) || (r && swingForward)\r\n position = loopsDone + (forwards ? p : 1 - p)\r\n return this.loops(position)\r\n }\r\n\r\n progress (p) {\r\n if (p == null) {\r\n return Math.min(1, this._time / this.duration())\r\n }\r\n return this.time(p * this.duration())\r\n }\r\n\r\n step (dt) {\r\n // If we are inactive, this stepper just gets skipped\r\n if (!this.enabled) return this\r\n\r\n // Update the time and get the new position\r\n dt = dt == null ? 16 : dt\r\n this._time += dt\r\n var position = this.position()\r\n\r\n // Figure out if we need to run the stepper in this frame\r\n var running = this._lastPosition !== position && this._time >= 0\r\n this._lastPosition = position\r\n\r\n // Figure out if we just started\r\n var duration = this.duration()\r\n var justStarted = this._lastTime <= 0 && this._time > 0\r\n var justFinished = this._lastTime < this._time && this.time > duration\r\n this._lastTime = this._time\r\n if (justStarted) {\r\n this.fire('start', this)\r\n }\r\n\r\n // Work out if the runner is finished set the done flag here so animations\r\n // know, that they are running in the last step (this is good for\r\n // transformations which can be merged)\r\n var declarative = this._isDeclarative\r\n this.done = !declarative && !justFinished && this._time >= duration\r\n\r\n // Runner is running. So its not in reseted state anymore\r\n this._reseted = false\r\n\r\n // Call initialise and the run function\r\n if (running || declarative) {\r\n this._initialise(running)\r\n\r\n // clear the transforms on this runner so they dont get added again and again\r\n this.transforms = new Matrix()\r\n var converged = this._run(declarative ? dt : position)\r\n\r\n this.fire('step', this)\r\n }\r\n // correct the done flag here\r\n // declaritive animations itself know when they converged\r\n this.done = this.done || (converged && declarative)\r\n if (this.done) {\r\n this.fire('finish', this)\r\n }\r\n return this\r\n }\r\n\r\n reset () {\r\n if (this._reseted) return this\r\n this.loops(0)\r\n this._reseted = true\r\n return this\r\n }\r\n\r\n finish () {\r\n return this.step(Infinity)\r\n }\r\n\r\n reverse (reverse) {\r\n this._reverse = reverse == null ? !this._reverse : reverse\r\n return this\r\n }\r\n\r\n ease (fn) {\r\n this._stepper = new Ease(fn)\r\n return this\r\n }\r\n\r\n active (enabled) {\r\n if (enabled == null) return this.enabled\r\n this.enabled = enabled\r\n return this\r\n }\r\n\r\n /*\r\n Private Methods\r\n ===============\r\n Methods that shouldn't be used externally\r\n */\r\n\r\n // Save a morpher to the morpher list so that we can retarget it later\r\n _rememberMorpher (method, morpher) {\r\n this._history[method] = {\r\n morpher: morpher,\r\n caller: this._queue[this._queue.length - 1]\r\n }\r\n }\r\n\r\n // Try to set the target for a morpher if the morpher exists, otherwise\r\n // do nothing and return false\r\n _tryRetarget (method, target) {\r\n if (this._history[method]) {\r\n // if the last method wasnt even initialised, throw it away\r\n if (!this._history[method].caller.initialised) {\r\n let index = this._queue.indexOf(this._history[method].caller)\r\n this._queue.splice(index, 1)\r\n return false\r\n }\r\n\r\n // for the case of transformations, we use the special retarget function\r\n // which has access to the outer scope\r\n if (this._history[method].caller.retarget) {\r\n this._history[method].caller.retarget(target)\r\n // for everything else a simple morpher change is sufficient\r\n } else {\r\n this._history[method].morpher.to(target)\r\n }\r\n\r\n this._history[method].caller.finished = false\r\n var timeline = this.timeline()\r\n timeline && timeline._continue()\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n // Run each initialise function in the runner if required\r\n _initialise (running) {\r\n // If we aren't running, we shouldn't initialise when not declarative\r\n if (!running && !this._isDeclarative) return\r\n\r\n // Loop through all of the initialisers\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current initialiser\r\n var current = this._queue[i]\r\n\r\n // Determine whether we need to initialise\r\n var needsIt = this._isDeclarative || (!current.initialised && running)\r\n running = !current.finished\r\n\r\n // Call the initialiser if we need to\r\n if (needsIt && running) {\r\n current.initialiser.call(this)\r\n current.initialised = true\r\n }\r\n }\r\n }\r\n\r\n // Run each run function for the position or dt given\r\n _run (positionOrDt) {\r\n // Run all of the _queue directly\r\n var allfinished = true\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current function to run\r\n var current = this._queue[i]\r\n\r\n // Run the function if its not finished, we keep track of the finished\r\n // flag for the sake of declarative _queue\r\n var converged = current.runner.call(this, positionOrDt)\r\n current.finished = current.finished || (converged === true)\r\n allfinished = allfinished && current.finished\r\n }\r\n\r\n // We report when all of the constructors are finished\r\n return allfinished\r\n }\r\n\r\n addTransform (transform, index) {\r\n this.transforms.lmultiplyO(transform)\r\n return this\r\n }\r\n\r\n clearTransform () {\r\n this.transforms = new Matrix()\r\n return this\r\n }\r\n\r\n // TODO: Keep track of all transformations so that deletion is faster\r\n clearTransformsFromQueue () {\r\n if (!this.done) {\r\n this._queue = this._queue.filter((item) => {\r\n return !item.isTransform\r\n })\r\n }\r\n }\r\n\r\n static sanitise (duration, delay, when) {\r\n // Initialise the default parameters\r\n var times = 1\r\n var swing = false\r\n var wait = 0\r\n duration = duration || timeline.duration\r\n delay = delay || timeline.delay\r\n when = when || 'last'\r\n\r\n // If we have an object, unpack the values\r\n if (typeof duration === 'object' && !(duration instanceof Stepper)) {\r\n delay = duration.delay || delay\r\n when = duration.when || when\r\n swing = duration.swing || swing\r\n times = duration.times || times\r\n wait = duration.wait || wait\r\n duration = duration.duration || timeline.duration\r\n }\r\n\r\n return {\r\n duration: duration,\r\n delay: delay,\r\n swing: swing,\r\n times: times,\r\n wait: wait,\r\n when: when\r\n }\r\n }\r\n}\r\n\r\nRunner.id = 0\r\n\r\nclass FakeRunner {\r\n constructor (transforms = new Matrix(), id = -1, done = true) {\r\n this.transforms = transforms\r\n this.id = id\r\n this.done = done\r\n }\r\n\r\n clearTransformsFromQueue () { }\r\n}\r\n\r\nextend([ Runner, FakeRunner ], {\r\n mergeWith (runner) {\r\n return new FakeRunner(\r\n runner.transforms.lmultiply(this.transforms),\r\n runner.id\r\n )\r\n }\r\n})\r\n\r\n// FakeRunner.emptyRunner = new FakeRunner()\r\n\r\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\r\nconst getRunnerTransform = (runner) => runner.transforms\r\n\r\nfunction mergeTransforms () {\r\n // Find the matrix to apply to the element and apply it\r\n let runners = this._transformationRunners.runners\r\n let netTransform = runners\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n\r\n this.transform(netTransform)\r\n\r\n this._transformationRunners.merge()\r\n\r\n if (this._transformationRunners.length() === 1) {\r\n this._frameId = null\r\n }\r\n}\r\n\r\nclass RunnerArray {\r\n constructor () {\r\n this.runners = []\r\n this.ids = []\r\n }\r\n\r\n add (runner) {\r\n if (this.runners.includes(runner)) return\r\n\r\n let id = runner.id + 1\r\n\r\n let leftSibling = this.ids.reduce((last, curr) => {\r\n if (curr > last && curr < id) return curr\r\n return last\r\n }, 0)\r\n\r\n let index = this.ids.indexOf(leftSibling) + 1\r\n\r\n this.ids.splice(index, 0, id)\r\n this.runners.splice(index, 0, runner)\r\n\r\n return this\r\n }\r\n\r\n getByID (id) {\r\n return this.runners[this.ids.indexOf(id + 1)]\r\n }\r\n\r\n remove (id) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1)\r\n this.runners.splice(index, 1)\r\n return this\r\n }\r\n\r\n merge () {\r\n let lastRunner = null\r\n this.runners.forEach((runner, i) => {\r\n if (lastRunner && runner.done && lastRunner.done) {\r\n this.remove(runner.id)\r\n this.edit(lastRunner.id, runner.mergeWith(lastRunner))\r\n }\r\n\r\n lastRunner = runner\r\n })\r\n\r\n return this\r\n }\r\n\r\n edit (id, newRunner) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1, id)\r\n this.runners.splice(index, 1, newRunner)\r\n return this\r\n }\r\n\r\n length () {\r\n return this.ids.length\r\n }\r\n\r\n clearBefore (id) {\r\n let deleteCnt = this.ids.indexOf(id + 1) || 1\r\n this.ids.splice(0, deleteCnt, 0)\r\n this.runners.splice(0, deleteCnt, new FakeRunner())\r\n .forEach((r) => r.clearTransformsFromQueue())\r\n return this\r\n }\r\n}\r\n\r\nlet frameId = 0\r\nregisterMethods({\r\n Element: {\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var timeline = this.timeline()\r\n return new Runner(o.duration)\r\n .loop(o)\r\n .element(this)\r\n .timeline(timeline.play())\r\n .schedule(delay, when)\r\n },\r\n\r\n delay (by, when) {\r\n return this.animate(0, by, when)\r\n },\r\n\r\n // this function searches for all runners on the element and deletes the ones\r\n // which run before the current one. This is because absolute transformations\r\n // overwfrite anything anyway so there is no need to waste time computing\r\n // other runners\r\n _clearTransformRunnersBefore (currentRunner) {\r\n this._transformationRunners.clearBefore(currentRunner.id)\r\n },\r\n\r\n _currentTransform (current) {\r\n return this._transformationRunners.runners\r\n // we need the equal sign here to make sure, that also transformations\r\n // on the same runner which execute before the current transformation are\r\n // taken into account\r\n .filter((runner) => runner.id <= current.id)\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n },\r\n\r\n addRunner (runner) {\r\n this._transformationRunners.add(runner)\r\n\r\n Animator.transform_frame(\r\n mergeTransforms.bind(this), this._frameId\r\n )\r\n },\r\n\r\n _prepareRunner () {\r\n if (this._frameId == null) {\r\n this._transformationRunners = new RunnerArray()\r\n .add(new FakeRunner(new Matrix(this)))\r\n\r\n this._frameId = frameId++\r\n }\r\n }\r\n }\r\n})\r\n\r\nextend(Runner, {\r\n attr (a, v) {\r\n return this.styleAttr('attr', a, v)\r\n },\r\n\r\n // Add animatable styles\r\n css (s, v) {\r\n return this.styleAttr('css', s, v)\r\n },\r\n\r\n styleAttr (type, name, val) {\r\n // apply attributes individually\r\n if (typeof name === 'object') {\r\n for (var key in val) {\r\n this.styleAttr(type, key, val[key])\r\n }\r\n }\r\n\r\n var morpher = new Morphable(this._stepper).to(val)\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.element()[type](name))\r\n }, function (pos) {\r\n this.element()[type](name, morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n zoom (level, point) {\r\n var morpher = new Morphable(this._stepper).to(new SVGNumber(level))\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.zoom())\r\n }, function (pos) {\r\n this.element().zoom(morpher.at(pos), point)\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n ** absolute transformations\r\n **/\r\n\r\n //\r\n // M v -----|-----(D M v = F v)------|-----> T v\r\n //\r\n // 1. define the final state (T) and decompose it (once)\r\n // t = [tx, ty, the, lam, sy, sx]\r\n // 2. on every frame: pull the current state of all previous transforms\r\n // (M - m can change)\r\n // and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\r\n // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\r\n // - Note F(0) = M\r\n // - Note F(1) = T\r\n // 4. Now you get the delta matrix as a result: D = F * inv(M)\r\n\r\n transform (transforms, relative, affine) {\r\n // If we have a declarative function, we should retarget it if possible\r\n relative = transforms.relative || relative\r\n if (this._isDeclarative && !relative && this._tryRetarget('transform', transforms)) {\r\n return this\r\n }\r\n\r\n // Parse the parameters\r\n var isMatrix = Matrix.isMatrixLike(transforms)\r\n affine = transforms.affine != null\r\n ? transforms.affine\r\n : (affine != null ? affine : !isMatrix)\r\n\r\n // Create a morepher and set its type\r\n const morpher = new Morphable(this._stepper)\r\n .type(affine ? TransformBag : Matrix)\r\n\r\n let origin\r\n let element\r\n let current\r\n let currentAngle\r\n let startTransform\r\n\r\n function setup () {\r\n // make sure element and origin is defined\r\n element = element || this.element()\r\n origin = origin || getOrigin(transforms, element)\r\n\r\n startTransform = new Matrix(relative ? undefined : element)\r\n\r\n // add the runner to the element so it can merge transformations\r\n element.addRunner(this)\r\n\r\n // Deactivate all transforms that have run so far if we are absolute\r\n if (!relative) {\r\n element._clearTransformRunnersBefore(this)\r\n }\r\n }\r\n\r\n function run (pos) {\r\n // clear all other transforms before this in case something is saved\r\n // on this runner. We are absolute. We dont need these!\r\n if (!relative) this.clearTransform()\r\n\r\n let { x, y } = new Point(origin).transform(element._currentTransform(this))\r\n\r\n let target = new Matrix({ ...transforms, origin: [ x, y ] })\r\n let start = this._isDeclarative && current\r\n ? current\r\n : startTransform\r\n\r\n if (affine) {\r\n target = target.decompose(x, y)\r\n start = start.decompose(x, y)\r\n\r\n // Get the current and target angle as it was set\r\n const rTarget = target.rotate\r\n const rCurrent = start.rotate\r\n\r\n // Figure out the shortest path to rotate directly\r\n const possibilities = [ rTarget - 360, rTarget, rTarget + 360 ]\r\n const distances = possibilities.map(a => Math.abs(a - rCurrent))\r\n const shortest = Math.min(...distances)\r\n const index = distances.indexOf(shortest)\r\n target.rotate = possibilities[index]\r\n }\r\n\r\n if (relative) {\r\n // we have to be careful here not to overwrite the rotation\r\n // with the rotate method of Matrix\r\n if (!isMatrix) {\r\n target.rotate = transforms.rotate || 0\r\n }\r\n if (this._isDeclarative && currentAngle) {\r\n start.rotate = currentAngle\r\n }\r\n }\r\n\r\n morpher.from(start)\r\n morpher.to(target)\r\n\r\n let affineParameters = morpher.at(pos)\r\n currentAngle = affineParameters.rotate\r\n current = new Matrix(affineParameters)\r\n\r\n this.addTransform(current)\r\n return morpher.done()\r\n }\r\n\r\n function retarget (newTransforms) {\r\n // only get a new origin if it changed since the last call\r\n if (\r\n (newTransforms.origin || 'center').toString()\r\n !== (transforms.origin || 'center').toString()\r\n ) {\r\n origin = getOrigin(transforms, element)\r\n }\r\n\r\n // overwrite the old transformations with the new ones\r\n transforms = { ...newTransforms, origin }\r\n }\r\n\r\n this.queue(setup, run, retarget, true)\r\n this._isDeclarative && this._rememberMorpher('transform', morpher)\r\n return this\r\n },\r\n\r\n // Animatable x-axis\r\n x (x, relative) {\r\n return this._queueNumber('x', x)\r\n },\r\n\r\n // Animatable y-axis\r\n y (y) {\r\n return this._queueNumber('y', y)\r\n },\r\n\r\n dx (x) {\r\n return this._queueNumberDelta('x', x)\r\n },\r\n\r\n dy (y) {\r\n return this._queueNumberDelta('y', y)\r\n },\r\n\r\n _queueNumberDelta (method, to) {\r\n to = new SVGNumber(to)\r\n\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n var from = null\r\n this.queue(function () {\r\n from = this.element()[method]()\r\n morpher.from(from)\r\n morpher.to(from + to)\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n }, function (newTo) {\r\n morpher.to(from + new SVGNumber(newTo))\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueObject (method, to) {\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n this.queue(function () {\r\n morpher.from(this.element()[method]())\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueNumber (method, value) {\r\n return this._queueObject(method, new SVGNumber(value))\r\n },\r\n\r\n // Animatable center x-axis\r\n cx (x) {\r\n return this._queueNumber('cx', x)\r\n },\r\n\r\n // Animatable center y-axis\r\n cy (y) {\r\n return this._queueNumber('cy', y)\r\n },\r\n\r\n // Add animatable move\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n },\r\n\r\n // Add animatable center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n },\r\n\r\n // Add animatable size\r\n size (width, height) {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if (!width || !height) {\r\n box = this._element.bbox()\r\n }\r\n\r\n if (!width) {\r\n width = box.width / box.height * height\r\n }\r\n\r\n if (!height) {\r\n height = box.height / box.width * width\r\n }\r\n\r\n return this\r\n .width(width)\r\n .height(height)\r\n },\r\n\r\n // Add animatable width\r\n width (width) {\r\n return this._queueNumber('width', width)\r\n },\r\n\r\n // Add animatable height\r\n height (height) {\r\n return this._queueNumber('height', height)\r\n },\r\n\r\n // Add animatable plot\r\n plot (a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if (arguments.length === 4) {\r\n return this.plot([ a, b, c, d ])\r\n }\r\n\r\n var morpher = this._element.MorphArray().to(a)\r\n\r\n this.queue(function () {\r\n morpher.from(this._element.array())\r\n }, function (pos) {\r\n this._element.plot(morpher.at(pos))\r\n })\r\n\r\n return this\r\n },\r\n\r\n // Add leading method\r\n leading (value) {\r\n return this._queueNumber('leading', value)\r\n },\r\n\r\n // Add animatable viewbox\r\n viewbox (x, y, width, height) {\r\n return this._queueObject('viewbox', new Box(x, y, width, height))\r\n },\r\n\r\n update (o) {\r\n if (typeof o !== 'object') {\r\n return this.update({\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n\r\n return this\r\n }\r\n})\r\n\r\nextend(Runner, { rx, ry, from, to })\r\n","import {\r\n adopt,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport Defs from './Defs.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Svg extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('svg', node), node)\r\n this.namespace()\r\n }\r\n\r\n isRoot () {\r\n return !this.node.parentNode\r\n || !(this.node.parentNode instanceof globals.window.SVGElement)\r\n || this.node.parentNode.nodeName === '#document'\r\n }\r\n\r\n // Check if this is a root svg\r\n // If not, call docs from this element\r\n root () {\r\n if (this.isRoot()) return this\r\n return super.root()\r\n }\r\n\r\n // Add namespaces\r\n namespace () {\r\n if (!this.isRoot()) return this.root().namespace()\r\n return this\r\n .attr({ xmlns: ns, version: '1.1' })\r\n .attr('xmlns:xlink', xlink, xmlns)\r\n .attr('xmlns:svgjs', svgjs, xmlns)\r\n }\r\n\r\n // Creates and returns defs element\r\n defs () {\r\n if (!this.isRoot()) return this.root().defs()\r\n\r\n return adopt(this.node.getElementsByTagName('defs')[0])\r\n || this.put(new Defs())\r\n }\r\n\r\n // custom parent method\r\n parent (type) {\r\n if (this.isRoot()) {\r\n return this.node.parentNode.nodeName === '#document'\r\n ? null\r\n : adopt(this.node.parentNode)\r\n }\r\n\r\n return super.parent(type)\r\n }\r\n\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n return this\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create nested svg document\r\n nested: wrapWithAttrCheck(function () {\r\n return this.put(new Svg())\r\n })\r\n }\r\n})\r\n\r\nregister(Svg, 'Svg', true)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Symbol extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('symbol', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n symbol: wrapWithAttrCheck(function () {\r\n return this.put(new Symbol())\r\n })\r\n }\r\n})\r\n\r\nregister(Symbol)\r\n","import { globals } from '../../utils/window.js'\r\n\r\n// Create plain text node\r\nexport function plain (text) {\r\n // clear if build mode is disabled\r\n if (this._build === false) {\r\n this.clear()\r\n }\r\n\r\n // create text node\r\n this.node.appendChild(globals.document.createTextNode(text))\r\n\r\n return this\r\n}\r\n\r\n// Get length of text element\r\nexport function length () {\r\n return this.node.getComputedTextLength()\r\n}\r\n","import {\r\n adopt,\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { attrs } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Text extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('text', node), node)\r\n\r\n this.dom.leading = new SVGNumber(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', attrs['font-family'])\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n // act as getter\r\n if (x == null) {\r\n return this.attr('x')\r\n }\r\n\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n var oy = this.attr('y')\r\n var o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null) {\r\n return typeof oy === 'number' ? oy - o : oy\r\n }\r\n\r\n return this.attr('y', typeof y === 'number' ? y + o : y)\r\n }\r\n\r\n // Move center over x-axis\r\n cx (x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n\r\n // Move center over y-axis\r\n cy (y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n\r\n // Set the text content\r\n text (text) {\r\n // act as getter\r\n if (text === undefined) {\r\n var children = this.node.childNodes\r\n var firstLine = 0\r\n text = ''\r\n\r\n for (var i = 0, len = children.length; i < len; ++i) {\r\n // skip textPaths - they are no lines\r\n if (children[i].nodeName === 'textPath') {\r\n if (i === 0) firstLine = 1\r\n continue\r\n }\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var j = 0, jl = text.length; j < jl; j++) {\r\n this.tspan(text[j]).newLine()\r\n }\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n\r\n // Set / get leading\r\n leading (value) {\r\n // act as getter\r\n if (value == null) {\r\n return this.dom.leading\r\n }\r\n\r\n // act as setter\r\n this.dom.leading = new SVGNumber(value)\r\n\r\n return this.rebuild()\r\n }\r\n\r\n // Rebuild appearance type\r\n rebuild (rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild === 'boolean') {\r\n this._rebuild = rebuild\r\n }\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n var blankLineOffset = 0\r\n var leading = this.dom.leading\r\n\r\n this.each(function () {\r\n var fontSize = globals.window.getComputedStyle(this.node)\r\n .getPropertyValue('font-size')\r\n var dy = leading * new SVGNumber(fontSize)\r\n\r\n if (this.dom.newLined) {\r\n this.attr('x', self.attr('x'))\r\n\r\n if (this.text() === '\\n') {\r\n blankLineOffset += dy\r\n } else {\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Enable / disable build mode\r\n build (build) {\r\n this._build = !!build\r\n return this\r\n }\r\n\r\n // overwrite method from parent to set data properly\r\n setData (o) {\r\n this.dom = o\r\n this.dom.leading = new SVGNumber(o.leading || 1.3)\r\n return this\r\n }\r\n}\r\n\r\nextend(Text, textable)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create text element\r\n text: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).text(text)\r\n }),\r\n\r\n // Create plain text element\r\n plain: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).plain(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Text)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Text from './Text.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Tspan extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('tspan', node), node)\r\n }\r\n\r\n // Set text content\r\n text (text) {\r\n if (text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n\r\n // Shortcut dx\r\n dx (dx) {\r\n return this.attr('dx', dx)\r\n }\r\n\r\n // Shortcut dy\r\n dy (dy) {\r\n return this.attr('dy', dy)\r\n }\r\n\r\n // Create new line\r\n newLine () {\r\n // fetch text parent\r\n var t = this.parent(Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new position\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n}\r\n\r\nextend(Tspan, textable)\r\n\r\nregisterMethods({\r\n Tspan: {\r\n tspan: wrapWithAttrCheck(function (text) {\r\n var tspan = new Tspan()\r\n\r\n // clear if build mode is disabled\r\n if (!this._build) {\r\n this.clear()\r\n }\r\n\r\n // add new tspan\r\n this.node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Tspan)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class ClipPath extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('clipPath', node), node)\r\n }\r\n\r\n // Unclip all clipped elements and remove itself\r\n remove () {\r\n // unclip all targets\r\n this.targets().forEach(function (el) {\r\n el.unclip()\r\n })\r\n\r\n // remove clipPath from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [clip-path*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create clipping element\r\n clip: wrapWithAttrCheck(function () {\r\n return this.defs().put(new ClipPath())\r\n })\r\n },\r\n Element: {\r\n // Distribute clipPath to svg element\r\n clipWith (element) {\r\n // use given clip or create a new one\r\n let clipper = element instanceof ClipPath\r\n ? element\r\n : this.parent().clip().add(element)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + clipper.id() + '\")')\r\n },\r\n\r\n // Unclip element\r\n unclip () {\r\n return this.attr('clip-path', null)\r\n },\r\n\r\n clipper () {\r\n return this.reference('clip-path')\r\n }\r\n }\r\n})\r\n\r\nregister(ClipPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class G extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('g', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create a group element\r\n group: wrapWithAttrCheck(function () {\r\n return this.put(new G())\r\n })\r\n }\r\n})\r\n\r\nregister(G)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class A extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('a', node), node)\r\n }\r\n\r\n // Link url\r\n to (url) {\r\n return this.attr('href', url, xlink)\r\n }\r\n\r\n // Link target attribute\r\n target (target) {\r\n return this.attr('target', target)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a hyperlink element\r\n link: wrapWithAttrCheck(function (url) {\r\n return this.put(new A()).to(url)\r\n })\r\n },\r\n Element: {\r\n // Create a hyperlink element\r\n linkTo: function (url) {\r\n var link = new A()\r\n\r\n if (typeof url === 'function') {\r\n url.call(link, link)\r\n } else {\r\n link.to(url)\r\n }\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n }\r\n})\r\n\r\nregister(A)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Mask extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('mask', node), node)\r\n }\r\n\r\n // Unmask all masked elements and remove itself\r\n remove () {\r\n // unmask all targets\r\n this.targets().forEach(function (el) {\r\n el.unmask()\r\n })\r\n\r\n // remove mask from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [mask*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n mask: wrapWithAttrCheck(function () {\r\n return this.defs().put(new Mask())\r\n })\r\n },\r\n Element: {\r\n // Distribute mask to svg element\r\n maskWith (element) {\r\n // use given mask or create a new one\r\n var masker = element instanceof Mask\r\n ? element\r\n : this.parent().mask().add(element)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + masker.id() + '\")')\r\n },\r\n\r\n // Unmask element\r\n unmask () {\r\n return this.attr('mask', null)\r\n },\r\n\r\n masker () {\r\n return this.reference('mask')\r\n }\r\n }\r\n})\r\n\r\nregister(Mask)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { unCamelCase } from '../utils/utils.js'\r\nimport Element from './Element.js'\r\n\r\nfunction cssRule (selector, rule) {\r\n if (!selector) return ''\r\n if (!rule) return selector\r\n\r\n var ret = selector + '{'\r\n\r\n for (var i in rule) {\r\n ret += unCamelCase(i) + ':' + rule[i] + ';'\r\n }\r\n\r\n ret += '}'\r\n\r\n return ret\r\n}\r\n\r\nexport default class Style extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('style', node), node)\r\n }\r\n\r\n addText (w = '') {\r\n this.node.textContent += w\r\n return this\r\n }\r\n\r\n font (name, src, params = {}) {\r\n return this.rule('@font-face', {\r\n fontFamily: name,\r\n src: src,\r\n ...params\r\n })\r\n }\r\n\r\n rule (selector, obj) {\r\n return this.addText(cssRule(selector, obj))\r\n }\r\n}\r\n\r\nregisterMethods('Dom', {\r\n style: wrapWithAttrCheck(function (selector, obj) {\r\n return this.put(new Style()).rule(selector, obj)\r\n }),\r\n fontface: wrapWithAttrCheck(function (name, src, params) {\r\n return this.put(new Style()).font(name, src, params)\r\n })\r\n})\r\n\r\nregister(Style)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Path from './Path.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Text from './Text.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class TextPath extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('textPath', node), node)\r\n }\r\n\r\n // return the array of the path track element\r\n array () {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n\r\n // Plot path if any\r\n plot (d) {\r\n var track = this.track()\r\n var pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n\r\n // Get the path element\r\n track () {\r\n return this.reference('href')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n textPath: wrapWithAttrCheck(function (text, path) {\r\n return this.defs().path(path).text(text).addTo(this)\r\n })\r\n },\r\n Text: {\r\n // Create path for text to run on\r\n path: wrapWithAttrCheck(function (track) {\r\n var path = new TextPath()\r\n\r\n // if track is a path, reuse it\r\n if (!(track instanceof Path)) {\r\n // create path element\r\n track = this.root().defs().path(track)\r\n }\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, xlink)\r\n\r\n // add textPath element as child node and return textPath\r\n return this.put(path)\r\n }),\r\n\r\n // Get the textPath children\r\n textPath () {\r\n return this.find('textPath')[0]\r\n }\r\n },\r\n Path: {\r\n // creates a textPath from this path\r\n text: wrapWithAttrCheck(function (text) {\r\n if (text instanceof Text) {\r\n var txt = text.text()\r\n return text.clear().path(this).text(txt)\r\n }\r\n return this.parent().put(new Text()).path(this).text(text)\r\n }),\r\n\r\n targets () {\r\n return baseFind('svg [href*=\"' + this.id() + '\"]')\r\n }\r\n }\r\n})\r\n\r\nTextPath.prototype.MorphArray = PathArray\r\nregister(TextPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Use extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('use', node), node)\r\n }\r\n\r\n // Use element as a reference\r\n element (element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, xlink)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a use element\r\n use: wrapWithAttrCheck(function (element, file) {\r\n return this.put(new Use()).element(element, file)\r\n })\r\n }\r\n})\r\n\r\nregister(Use)\r\n","/* Optional Modules */\r\nimport './modules/optional/arrange.js'\r\nimport './modules/optional/class.js'\r\nimport './modules/optional/css.js'\r\nimport './modules/optional/data.js'\r\nimport './modules/optional/memory.js'\r\nimport './modules/optional/sugar.js'\r\nimport './modules/optional/transform.js'\r\n\r\nimport { extend, makeInstance } from './utils/adopter.js'\r\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\r\nimport Box from './types/Box.js'\r\nimport Circle from './elements/Circle.js'\r\nimport Color from './types/Color.js'\r\nimport Container from './elements/Container.js'\r\nimport Defs from './elements/Defs.js'\r\nimport Dom from './elements/Dom.js'\r\nimport Element from './elements/Element.js'\r\nimport Ellipse from './elements/Ellipse.js'\r\nimport EventTarget from './types/EventTarget.js'\r\nimport Gradient from './elements/Gradient.js'\r\nimport Image from './elements/Image.js'\r\nimport Line from './elements/Line.js'\r\nimport List from './types/List.js'\r\nimport Marker from './elements/Marker.js'\r\nimport Matrix from './types/Matrix.js'\r\nimport Morphable, {\r\n NonMorphable,\r\n ObjectBag,\r\n TransformBag,\r\n makeMorphable,\r\n registerMorphableType\r\n} from './animation/Morphable.js'\r\nimport Path from './elements/Path.js'\r\nimport PathArray from './types/PathArray.js'\r\nimport Pattern from './elements/Pattern.js'\r\nimport PointArray from './types/PointArray.js'\r\nimport Polygon from './elements/Polygon.js'\r\nimport Polyline from './elements/Polyline.js'\r\nimport Rect from './elements/Rect.js'\r\nimport Runner from './animation/Runner.js'\r\nimport SVGArray from './types/SVGArray.js'\r\nimport SVGNumber from './types/SVGNumber.js'\r\nimport Shape from './elements/Shape.js'\r\nimport Svg from './elements/Svg.js'\r\nimport Symbol from './elements/Symbol.js'\r\nimport Text from './elements/Text.js'\r\nimport Tspan from './elements/Tspan.js'\r\nimport * as defaults from './modules/core/defaults.js'\r\nimport * as utils from './utils/utils.js'\r\nimport * as namespaces from './modules/core/namespaces.js'\r\nimport * as regex from './modules/core/regex.js'\r\n\r\nexport {\r\n Morphable,\r\n registerMorphableType,\r\n makeMorphable,\r\n TransformBag,\r\n ObjectBag,\r\n NonMorphable\r\n}\r\n\r\nexport { defaults, utils, namespaces, regex }\r\nexport const SVG = makeInstance\r\nexport { default as parser } from './modules/core/parser.js'\r\nexport { default as find } from './modules/core/selector.js'\r\nexport * from './modules/core/event.js'\r\nexport * from './utils/adopter.js'\r\nexport { registerWindow } from './utils/window.js'\r\n\r\n/* Animation Modules */\r\nexport { default as Animator } from './animation/Animator.js'\r\nexport { Controller, Ease, PID, Spring, easing } from './animation/Controller.js'\r\nexport { default as Queue } from './animation/Queue.js'\r\nexport { default as Runner } from './animation/Runner.js'\r\nexport { default as Timeline } from './animation/Timeline.js'\r\n\r\n/* Types */\r\nexport { default as Array } from './types/SVGArray.js'\r\nexport { default as Box } from './types/Box.js'\r\nexport { default as Color } from './types/Color.js'\r\nexport { default as EventTarget } from './types/EventTarget.js'\r\nexport { default as Matrix } from './types/Matrix.js'\r\nexport { default as Number } from './types/SVGNumber.js'\r\nexport { default as PathArray } from './types/PathArray.js'\r\nexport { default as Point } from './types/Point.js'\r\nexport { default as PointArray } from './types/PointArray.js'\r\nexport { default as List } from './types/List.js'\r\n\r\n/* Elements */\r\nexport { default as Circle } from './elements/Circle.js'\r\nexport { default as ClipPath } from './elements/ClipPath.js'\r\nexport { default as Container } from './elements/Container.js'\r\nexport { default as Defs } from './elements/Defs.js'\r\nexport { default as Dom } from './elements/Dom.js'\r\nexport { default as Element } from './elements/Element.js'\r\nexport { default as Ellipse } from './elements/Ellipse.js'\r\nexport { default as Gradient } from './elements/Gradient.js'\r\nexport { default as G } from './elements/G.js'\r\nexport { default as A } from './elements/A.js'\r\nexport { default as Image } from './elements/Image.js'\r\nexport { default as Line } from './elements/Line.js'\r\nexport { default as Marker } from './elements/Marker.js'\r\nexport { default as Mask } from './elements/Mask.js'\r\nexport { default as Path } from './elements/Path.js'\r\nexport { default as Pattern } from './elements/Pattern.js'\r\nexport { default as Polygon } from './elements/Polygon.js'\r\nexport { default as Polyline } from './elements/Polyline.js'\r\nexport { default as Rect } from './elements/Rect.js'\r\nexport { default as Shape } from './elements/Shape.js'\r\nexport { default as Stop } from './elements/Stop.js'\r\nexport { default as Style } from './elements/Style.js'\r\nexport { default as Svg } from './elements/Svg.js'\r\nexport { default as Symbol } from './elements/Symbol.js'\r\nexport { default as Text } from './elements/Text.js'\r\nexport { default as TextPath } from './elements/TextPath.js'\r\nexport { default as Tspan } from './elements/Tspan.js'\r\nexport { default as Use } from './elements/Use.js'\r\n\r\nextend([\r\n Svg,\r\n Symbol,\r\n Image,\r\n Pattern,\r\n Marker\r\n], getMethodsFor('viewbox'))\r\n\r\nextend([\r\n Line,\r\n Polyline,\r\n Polygon,\r\n Path\r\n], getMethodsFor('marker'))\r\n\r\nextend(Text, getMethodsFor('Text'))\r\nextend(Path, getMethodsFor('Path'))\r\n\r\nextend(Defs, getMethodsFor('Defs'))\r\n\r\nextend([\r\n Text,\r\n Tspan\r\n], getMethodsFor('Tspan'))\r\n\r\nextend([\r\n Rect,\r\n Ellipse,\r\n Circle,\r\n Gradient\r\n], getMethodsFor('radius'))\r\n\r\nextend(EventTarget, getMethodsFor('EventTarget'))\r\nextend(Dom, getMethodsFor('Dom'))\r\nextend(Element, getMethodsFor('Element'))\r\nextend(Shape, getMethodsFor('Shape'))\r\n// extend(Element, getConstructor('Memory'))\r\nextend(Container, getMethodsFor('Container'))\r\n\r\nextend(Runner, getMethodsFor('Runner'))\r\n\r\nList.extend(getMethodNames())\r\n\r\nregisterMorphableType([\r\n SVGNumber,\r\n Color,\r\n Box,\r\n Matrix,\r\n SVGArray,\r\n PointArray,\r\n PathArray\r\n])\r\n\r\nmakeMorphable()\r\n"],"names":["global","core","require$$0","require$$1","uid","isObject","document","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","cof","IObject","defined","has","hide","aFunction","ctx","redefine","toInteger","min","toIObject","toLength","toAbsoluteIndex","$keys","enumBugKeys","getKeys","IE_PROTO","PROTOTYPE","dPs","create","descriptor","setToStringTag","toObject","$iterCreate","getPrototypeOf","LIBRARY","Iterators","$export","step","addToUnscopables","ITERATOR","wks","$iterators","methods","names","registerMethods","name","m","Array","isArray","_name","addMethodNames","Object","keys","assign","getMethodsFor","getMethodNames","Set","_names","push","fails","map","array","block","i","il","length","result","filter","radians","d","Math","PI","degrees","r","camelCase","s","toLowerCase","replace","g","toUpperCase","unCamelCase","capitalize","charAt","slice","proportionalSize","element","width","height","box","bbox","getOrigin","o","origin","ox","oy","string","trim","x","y","bx","includes","by","ns","xmlns","xlink","svgjs","globals","window","registerWindow","win","doc","Base","elements","root","makeNode","createElementNS","makeInstance","adopter","querySelector","node","innerHTML","firstChild","nodeOrNew","Node","adopt","instance","className","nodeName","mockAdopt","mock","register","asRoot","prototype","getClass","did","eid","assignNewId","children","id","extend","modules","attrCheck","key","method","wrapWithAttrCheck","fn","args","constructor","apply","attr","siblings","parent","position","index","next","prev","forward","p","removeElement","add","isRoot","appendChild","defs","backward","front","back","before","remove","after","insertBefore","insertAfter","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isCss","isBlank","isNumber","isPercent","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","classes","split","hasClass","indexOf","addClass","join","removeClass","c","toggleClass","css","style","val","ret","arguments","cssText","el","forEach","t","cased","test","show","visible","data","a","v","JSON","parse","e","stringify","remember","k","memory","forget","_memory","listenerId","getEvents","n","getEventHolder","events","getEventTarget","clearEvents","on","listener","binding","options","l","bind","bag","_svgjsListenerId","event","ev","addEventListener","off","namespace","removeEventListener","dispatch","Event","dispatchEvent","CustomEvent","detail","cancelable","arrayWithHoles","iterableToArrayLimit","nonIterableRest","DESCRIPTORS","$flags","sixDigitHex","substring","componentHex","component","integer","round","toString","is","object","space","getParameters","b","params","_a","_b","_c","z","_d","h","cieSpace","hueToRgb","q","Color","inputs","init","values","noWhitespace","exec","parseInt","hexParse","Error","components","dToR","cos","sin","yL","xL","zL","ct","mx","nm","rU","gU","bU","pow","bd","color","lab","xyz","r255","g255","b255","rL","gL","bL","xU","yU","zU","lch","sqrt","atan2","hsl","max","isGrey","delta","cmyk","toHex","toRgb","format","rV","gV","bV","toArray","random","mode","isColor","Point","source","base","clone","transform","f","point","screenCTM","inverse","parser","nodes","svg","size","path","parentNode","body","documentElement","addTo","isNulledBox","w","domContains","contains","call","Box","parseFloat","left","top","x2","y2","cx","cy","merge","xMin","Infinity","xMax","yMin","yMax","pts","addOffset","pageXOffset","pageYOffset","isNulled","getBox","cb","retry","getBBox","rbox","getBoundingClientRect","viewbox","closeEnough","threshold","abs","Matrix","fromArray","Element","matrixify","isMatrixLike","matrix","multiplyO","formatTransforms","current","transformer","translateO","rx","ry","lmultiplyO","scaleO","scaleX","scaleY","skewO","skewX","skewY","shearO","shear","rotateO","theta","isFinite","px","py","dx","dy","tx","ty","compose","originX","originY","sx","sy","lam","rotate","translateX","translateY","decompose","determinant","ccw","thetaRad","st","multiply","matrixMultiply","lmultiply","inverseO","det","na","nb","nc","nd","ne","nf","translate","scale","flip","axis","around","flipO","lx","skew","tan","ly","skewXO","skewYO","aroundO","equals","other","comp","valueOf","flipBoth","flipX","flipY","positionX","positionY","relative","relativeX","relativeY","ctm","getCTM","rect","getScreenCTM","subClassArray","Function","baseClass","_constructor","Arr","arr","List","each","fnOrMethodName","concat","reduce","obj","attrs","baseFind","query","querySelectorAll","find","EventTarget","type","j","defaultPrevented","fire","noop","timeline","duration","ease","delay","fill","stroke","opacity","offset","SVGArray","toSet","SVGNumber","value","unit","isNaN","match","toJSON","plus","number","minus","times","divide","hooks","registerAttrHook","attributes","nodeValue","last","curr","removeAttribute","getAttribute","defaults","_val","hook","leading","setAttributeNS","setAttribute","rebuild","Dom","childNodes","put","clear","hasChildNodes","removeChild","lastChild","_defs","writeDataToDom","cloneNode","deep","first","get","matches","selector","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","SVGElement","putIn","replaceChild","precision","factor","newAttrs","svgOrFn","outerHTML","well","len","fragment","_this","createDocumentFragment","firstElementChild","words","text","textContent","Svg","dom","hasAttribute","setData","center","inside","move","parents","until","sugar","prefix","extension","mat","angle","direction","directionString","dmove","radius","_element","getTotalLength","pointAt","getPointAtLength","font","ax","ay","amove","defineProperty","untransform","str","kv","reverse","toParent","pCtm","toRoot","decomposed","cleanRelative","Shape","Circle","circle","Container","flatten","ungroup","Defs","Ellipse","circled","ellipse","Stop","update","from","fx","fy","x1","y1","to","Gradient","stop","url","targets","gradiented","gradient","Pattern","pattern","patternUnits","Image","load","callback","img","src","image","PointArray","toLine","at","pos","destination","points","pop","maxX","maxY","minX","minY","MorphArray","Line","plot","pointed","line","Marker","ref","marker","makeSetterGetter","easing","bezier","steps","stepPosition","jumps","beforeFlag","floor","jumping","Stepper","done","Ease","Controller","stepper","target","dt","recalculate","_duration","overshoot","_overshoot","eps","pi","os","log","zeta","wn","Spring","velocity","acceleration","newPosition","PID","windup","integral","error","P","I","D","PathArray","pathRegReplace","arrayToString","pathHandlers","M","p0","L","H","V","C","S","Q","T","Z","A","mlhvqtcsaz","jl","equalCommands","pathArray","morph","sourceArray","destinationArray","paramCnt","Morphable","_stepper","_from","_to","_type","_context","_morphObj","_set","NonMorphable","morphableTypes","ObjectBag","complete","TransformBag","objOrArr","entries","sort","registerMorphableType","makeMorphable","Path","_array","Polygon","polygon","poly","Polyline","polyline","Rect","Queue","_first","_last","item","shift","Animator","nextDraw","frames","timeouts","timer","performance","Date","frame","run","requestAnimationFrame","_draw","transform_frame","timeout","time","now","cancelFrame","clearTimeout","nextTimeout","lastTimeout","nextFrame","lastFrame","makeSchedule","runnerInfo","start","runner","end","defaultSource","Timeline","timeSource","_timeSource","_startTime","_speed","_persist","_nextFrame","_paused","_runners","_order","_time","_lastSourceTime","_lastStepTime","_step","schedule","when","absoluteStartTime","endTime","getEndTime","unschedule","persist","updateTime","_continue","splice","lastRunnerInfo","lastDuration","lastStartTime","active","play","pause","finish","speed","yes","currentSpeed","positive","seek","dtOrForever","immediateStep","dtSource","dtTime","runnersLeft","dtToStart","reset","finished","_timeline","Runner","_queue","_isDeclarative","_history","enabled","_lastTime","_reseted","transformId","_haveReversed","_reverse","_loopsDone","_swing","_wait","_times","_prepareRunner","animate","sanitise","loop","swing","wait","queue","initFn","runFn","retargetFn","isTransform","initialiser","retarget","initialised","during","loops","loopDuration","loopsDone","relativeTime","whole","partial","swinging","backwards","uncliped","clipped","swingForward","forwards","progress","running","_lastPosition","justStarted","justFinished","declarative","_initialise","converged","_run","_rememberMorpher","morpher","caller","_tryRetarget","needsIt","positionOrDt","allfinished","addTransform","clearTransform","clearTransformsFromQueue","FakeRunner","mergeWith","getRunnerTransform","mergeTransforms","runners","_transformationRunners","netTransform","_frameId","RunnerArray","ids","leftSibling","getByID","lastRunner","edit","newRunner","clearBefore","deleteCnt","frameId","_clearTransformRunnersBefore","currentRunner","_currentTransform","addRunner","styleAttr","zoom","level","affine","isMatrix","currentAngle","startTransform","setup","undefined","rTarget","rCurrent","possibilities","distances","shortest","affineParameters","newTransforms","_queueNumber","_queueNumberDelta","newTo","_queueObject","version","getElementsByTagName","nested","Symbol","symbol","plain","_build","createTextNode","getComputedTextLength","Text","_rebuild","firstLine","nodeType","newLined","build","tspan","newLine","self","blankLineOffset","fontSize","getComputedStyle","getPropertyValue","textable","Tspan","ClipPath","unclip","clip","clipWith","clipper","G","group","link","linkTo","Mask","unmask","mask","maskWith","masker","cssRule","rule","Style","addText","fontFamily","fontface","TextPath","track","textPath","txt","Use","file","use","SVG"],"mappings":";;;;;;;;;;;;;;;AAAA,IAAI,IAAI,GAAG,cAAc,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;AACjD,IAAI,OAAO,GAAG,IAAI,QAAQ,EAAE,GAAG,GAAG,IAAI,CAAC;;;;;;ACAvC,IAAI,MAAM,GAAG,cAAc,GAAG,OAAO,MAAM,IAAI,WAAW,IAAI,MAAM,CAAC,IAAI,IAAI,IAAI;IAC7E,MAAM,GAAG,OAAO,IAAI,IAAI,WAAW,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,GAAG,IAAI;;IAE/D,QAAQ,CAAC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AACid,SAAD,EAAYtiB,aAAa,CAAC,WAAD,CAAzB,CAAN;AAEAqF,MAAM,CAACqqB,MAAD,EAAS1vB,aAAa,CAAC,QAAD,CAAtB,CAAN;AAEAqa,IAAI,CAAChV,MAAL,CAAYpF,cAAc,EAA1B;AAEAkqB,qBAAqB,CAAC,CACpBnO,SADoB,EAEpBhO,KAFoB,EAGpB6E,GAHoB,EAIpB6B,MAJoB,EAKpBoH,QALoB,EAMpBsI,UANoB,EAOpBwD,SAPoB,CAAD,CAArB;AAUAwC,aAAa;;;;"} \ No newline at end of file
diff --git a/dist/svg.min.js b/dist/svg.min.js
index 04af364..c5eada1 100644
--- a/dist/svg.min.js
+++ b/dist/svg.min.js
@@ -1,3 +1,3 @@
/*! @svgdotjs/svg.js v3.0.0 MIT*/;
-var SVG=function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var m=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),y=t(function(t){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)}),g=(y.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),p=function(t){if(!g(t))throw TypeError(t+" is not an object!");return t},w=function(t){try{return!!t()}catch(t){return!0}},o=!w(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),e=m.document,n=g(e)&&g(e.createElement),r=function(t){return n?e.createElement(t):{}},i=!o&&!w(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),s=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},u=Object.defineProperty,a={f:o?Object.defineProperty:function(t,e,n){if(p(t),e=s(e,!0),p(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=o?function(t,e,n){return a.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},h={}.hasOwnProperty,l=function(t,e){return h.call(t,e)},c=0,f=Math.random(),v=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++c+f).toString(36))},O=t(function(t){var s=v("src"),e="toString",n=Function[e],o=(""+n).split(e);y.inspectSource=function(t){return n.call(t)},(t.exports=function(t,e,n,r){var i="function"==typeof n;i&&(l(n,"name")||x(n,"name",e)),t[e]!==n&&(i&&(l(n,s)||x(n,s,t[e]?""+t[e]:o.join(String(e)))),t===m?t[e]=n:r?t[e]?t[e]=n:x(t,e,n):(delete t[e],x(t,e,n)))})(Function.prototype,e,function(){return"function"==typeof this&&this[s]||n.call(this)})}),d=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},b=function(r,i,t){if(d(r),void 0===i)return r;switch(t){case 1:return function(t){return r.call(i,t)};case 2:return function(t,e){return r.call(i,t,e)};case 3:return function(t,e,n){return r.call(i,t,e,n)}}return function(){return r.apply(i,arguments)}},_="prototype",S=function(t,e,n){var r,i,s,o,u=t&S.F,a=t&S.G,h=t&S.S,l=t&S.P,c=t&S.B,f=a?m:h?m[e]||(m[e]={}):(m[e]||{})[_],v=a?y:y[e]||(y[e]={}),d=v[_]||(v[_]={});for(r in a&&(n=e),n)s=((i=!u&&f&&void 0!==f[r])?f:n)[r],o=c&&i?b(s,m):l&&"function"==typeof s?b(Function.call,s):s,f&&O(f,r,s,t&S.U),v[r]!=s&&x(v,r,o),l&&d[r]!=s&&(d[r]=s)};m.core=y,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128;var j=S,M={}.toString,E=function(t){return M.call(t).slice(8,-1)},T=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==E(t)?t.split(""):Object(t)},C=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},P=function(t){return T(C(t))},N=Math.ceil,L=Math.floor,D=function(t){return isNaN(t=+t)?0:(0<t?L:N)(t)},F=Math.min,R=function(t){return 0<t?F(D(t),9007199254740991):0},z=Math.max,I=Math.min,q=function(h){return function(t,e,n){var r,i,s,o=P(t),u=R(o.length),a=(i=u,(r=D(r=n))<0?z(r+i,0):I(r,i));if(h&&e!=e){for(;a<u;)if((s=o[a++])!=s)return!0}else for(;a<u;a++)if((h||a in o)&&o[a]===e)return h||a||0;return!h&&-1}},Y=t(function(t){var e="__core-js_shared__",n=m[e]||(m[e]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:y.version,mode:"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),X=Y("keys"),H=function(t){return X[t]||(X[t]=v(t))},B=q(!1),V=H("IE_PROTO"),W=function(t,e){var n,r=P(t),i=0,s=[];for(n in r)n!=V&&l(r,n)&&s.push(n);for(;e.length>i;)l(r,n=e[i++])&&(~B(s,n)||s.push(n));return s},Q="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),U=Object.keys||function(t){return W(t,Q)},J={f:Object.getOwnPropertySymbols},$={f:{}.propertyIsEnumerable},K=function(t){return Object(C(t))},Z=Object.assign,tt=!Z||w(function(){var A={},e={},t=Symbol(),n="abcdefghijklmnopqrst";return A[t]=7,n.split("").forEach(function(t){e[t]=t}),7!=Z({},A)[t]||Object.keys(Z({},e)).join("")!=n})?function(t,e){for(var n=K(t),r=arguments.length,i=1,s=J.f,o=$.f;i<r;)for(var u,a=T(arguments[i++]),h=s?U(a).concat(s(a)):U(a),l=h.length,c=0;c<l;)o.call(a,u=h[c++])&&(n[u]=a[u]);return n}:Z;j(j.S+j.F,"Object",{assign:tt});var et=t(function(t){var e=Y("wks"),Symbol=m.Symbol,n="function"==typeof Symbol;(t.exports=function(t){return e[t]||(e[t]=n&&Symbol[t]||(n?Symbol:v)("Symbol."+t))}).store=e}),nt=et("unscopables"),rt=Array.prototype;null==rt[nt]&&x(rt,nt,{});var it=function(t){rt[nt][t]=!0},st=function(t,e){return{value:e,done:!!t}},ot={},ut=o?Object.defineProperties:function(t,e){p(t);for(var n,r=U(e),i=r.length,s=0;s<i;)a.f(t,n=r[s++],e[n]);return t},at=m.document,ht=at&&at.documentElement,lt=H("IE_PROTO"),ct=function(){},ft="prototype",vt=function(){var t,e=r("iframe"),n=Q.length;for(e.style.display="none",ht.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),vt=t.F;n--;)delete vt[ft][Q[n]];return vt()},dt=Object.create||function(t,e){var n;return null!==t?(ct[ft]=p(t),n=new ct,ct[ft]=null,n[lt]=t):n=vt(),void 0===e?n:ut(n,e)},yt=a.f,pt=et("toStringTag"),mt=function(t,e,n){t&&!l(t=n?t:t.prototype,pt)&&yt(t,pt,{configurable:!0,value:e})},gt={};x(gt,et("iterator"),function(){return this});var wt=H("IE_PROTO"),bt=Object.prototype,_t=Object.getPrototypeOf||function(t){return t=K(t),l(t,wt)?t[wt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?bt:null},kt=et("iterator"),xt=!([].keys&&"next"in[].keys()),Ot="values",St=function(){return this},At=function(t,e,n,r,i,s,o){var u,a,h;a=e,h=r,(u=n).prototype=dt(gt,{next:k(1,h)}),mt(u,a+" Iterator");var l,c,f,v=function(t){if(!xt&&t in m)return m[t];switch(t){case"keys":case Ot:return function(){return new n(this,t)}}return function(){return new n(this,t)}},d=e+" Iterator",y=i==Ot,p=!1,m=t.prototype,g=m[kt]||m["@@iterator"]||i&&m[i],w=g||v(i),b=i?y?v("entries"):w:void 0,_="Array"==e&&m.entries||g;if(_&&(f=_t(_.call(new t)))!==Object.prototype&&f.next&&(mt(f,d,!0),"function"!=typeof f[kt]&&x(f,kt,St)),y&&g&&g.name!==Ot&&(p=!0,w=function(){return g.call(this)}),(xt||p||!m[kt])&&x(m,kt,w),ot[e]=w,ot[d]=St,i)if(l={values:y?w:v(Ot),keys:s?w:v("keys"),entries:b},o)for(c in l)c in m||O(m,c,l[c]);else j(j.P+j.F*(xt||p),e,l);return l},jt=At(Array,"Array",function(t,e){this._t=P(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,st(1)):st(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ot.Arguments=ot.Array,it("keys"),it("values"),it("entries");for(var Mt=et("iterator"),Et=et("toStringTag"),Tt=ot.Array,Ct={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Pt=U(Ct),Nt=0;Nt<Pt.length;Nt++){var Lt,Dt=Pt[Nt],Ft=Ct[Dt],Rt=m[Dt],zt=Rt&&Rt.prototype;if(zt&&(zt[Mt]||x(zt,Mt,Tt),zt[Et]||x(zt,Et,Dt),ot[Dt]=Tt,Ft))for(Lt in jt)zt[Lt]||O(zt,Lt,jt[Lt],!0)}var It,qt,Yt,Xt;It="keys",qt=function(){return function(t){return U(K(t))}},Yt=(y.Object||{})[It]||Object[It],(Xt={})[It]=qt(Yt),j(j.S+j.F*w(function(){Yt(1)}),"Object",Xt);var Gt=a.f,Ht=Function.prototype,Bt=/^\s*function ([^ (]*)/;function Vt(t){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"===Vt(Symbol.iterator)?function(t){return Vt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Vt(t)})(t)}"name"in Ht||o&&Gt(Ht,"name",{configurable:!0,get:function(){try{return(""+this).match(Bt)[1]}catch(t){return""}}});var Qt,Ut=(Qt=!0,function(t,e){var n,r,i=String(C(t)),s=D(e),o=i.length;return s<0||o<=s?Qt?"":void 0:(n=i.charCodeAt(s))<55296||56319<n||s+1===o||(r=i.charCodeAt(s+1))<56320||57343<r?Qt?i.charAt(s):n:Qt?i.slice(s,s+2):r-56320+(n-55296<<10)+65536});At(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Ut(e,n),this._i+=t.length,{value:t,done:!1})});var Jt=function(t,e,n){for(var r in e)O(t,r,e[r],n);return t},$t=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Kt=function(e,t,n,r){try{return r?t(p(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&p(i.call(e)),t}},Zt=et("iterator"),te=Array.prototype,ee=et("toStringTag"),ne="Arguments"==E(function(){return arguments}()),re=et("iterator"),ie=y.getIteratorMethod=function(t){if(null!=t)return t[re]||t["@@iterator"]||ot[(e=t,void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(n=Object(e),ee))?r:ne?E(n):"Object"==(i=E(n))&&"function"==typeof n.callee?"Arguments":i)];var e,n,r,i},se=t(function(t){var v={},d={},e=t.exports=function(t,e,n,r,i){var s,o,u,a,h,l=i?function(){return t}:ie(t),c=b(n,r,e?2:1),f=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||ot.Array!==h&&te[Zt]!==h){for(u=l.call(t);!(o=u.next()).done;)if((a=Kt(u,c,o.value,e))===v||a===d)return a}else for(s=R(t.length);f<s;f++)if((a=e?c(p(o=t[f])[0],o[1]):c(t[f]))===v||a===d)return a};e.BREAK=v,e.RETURN=d}),oe=et("species"),ue=t(function(t){var n=v("meta"),e=a.f,r=0,i=Object.isExtensible||function(){return!0},s=!w(function(){return i(Object.preventExtensions({}))}),o=function(t){e(t,n,{value:{i:"O"+ ++r,w:{}}})},u=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!g(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,n)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[n].i},getWeak:function(t,e){if(!l(t,n)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[n].w},onFreeze:function(t){return s&&u.NEED&&i(t)&&!l(t,n)&&o(t),t}}}),ae=(ue.KEY,ue.NEED,ue.fastKey,ue.getWeak,ue.onFreeze,function(t,e){if(!g(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),he=a.f,le=ue.fastKey,ce=o?"_s":"size",fe=function(t,e){var n,r=le(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},ve={getConstructor:function(t,s,n,r){var i=t(function(t,e){$t(t,i,s,"_i"),t._t=s,t._i=dt(null),t._f=void 0,t._l=void 0,t[ce]=0,null!=e&&se(e,n,t[r],t)});return Jt(i.prototype,{clear:function(){for(var t=ae(this,s),e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[ce]=0},delete:function(t){var e=ae(this,s),n=fe(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[ce]--}return!!n},forEach:function(t){ae(this,s);for(var e,n=b(t,1<arguments.length?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!fe(ae(this,s),t)}}),o&&he(i.prototype,"size",{get:function(){return ae(this,s)[ce]}}),i},def:function(t,e,n){var r,i,s=fe(t,e);return s?s.v=n:(t._l=s={i:i=le(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[ce]++,"F"!==i&&(t._i[i]=s)),t},getEntry:fe,setStrong:function(t,n,e){var r;At(t,n,function(t,e){this._t=ae(t,n),this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?st(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,st(1))},e?"entries":"values",!e,!0),r=m[n],o&&r&&!r[oe]&&a.f(r,oe,{configurable:!0,get:function(){return this}})}},de=et("iterator"),ye=!1;try{[7][de]().return=function(){ye=!0}}catch(t){}var pe=Object.getOwnPropertyDescriptor,me={f:o?pe:function(t,e){if(t=P(t),e=s(e,!0),i)try{return pe(t,e)}catch(t){}if(l(t,e))return k(!$.f.call(t,e),t[e])}},ge=function(t,e){if(p(t),!g(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},we={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=b(Function.call,me.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return ge(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:ge}.set;!function(u,t,e,n,a,r){var h=m[u],l=h,c=a?"set":"add",i=l&&l.prototype,s={},o=function(t){var n=i[t];O(i,t,"delete"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return r&&!g(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof l&&(r||i.forEach&&!w(function(){(new l).entries().next()}))){var f=new l,v=f[c](r?{}:-0,1)!=f,d=w(function(){f.has(1)}),y=function(t,e){if(!e&&!ye)return!1;var n=!1;try{var r=[7],i=r[de]();i.next=function(){return{done:n=!0}},r[de]=function(){return i},t(r)}catch(t){}return n}(function(t){new l(t)}),p=!r&&w(function(){for(var t=new l,e=5;e--;)t[c](e,e);return!t.has(-0)});y||(((l=t(function(t,e){$t(t,l,u);var n,r,i,s,o=(n=new h,r=l,(s=t.constructor)!==r&&"function"==typeof s&&(i=s.prototype)!==r.prototype&&g(i)&&we&&we(n,i),n);return null!=e&&se(e,a,o[c],o),o})).prototype=i).constructor=l),(d||p)&&(o("delete"),o("has"),a&&o("get")),(p||v)&&o(c),r&&i.clear&&delete i.clear}else l=n.getConstructor(t,u,a,c),Jt(l.prototype,e),ue.NEED=!0;mt(l,u),s[u]=l,j(j.G+j.W+j.F*(l!=h),s),r||n.setStrong(l,u,a)}("Set",function(t){return function(){return t(this,0<arguments.length?arguments[0]:void 0)}},{add:function(t){return ve.def(ae(this,"Set"),t=0===t?0:t,t)}},ve);function be(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var _e={f:et},ke=a.f,xe=function(t){var e=y.Symbol||(y.Symbol=m.Symbol||{});"_"==t.charAt(0)||t in e||ke(e,t,{value:_e.f(t)})};xe("asyncIterator");var Oe=Array.isArray||function(t){return"Array"==E(t)},Se=Q.concat("length","prototype"),Ae={f:Object.getOwnPropertyNames||function(t){return W(t,Se)}},je=Ae.f,Me={}.toString,Ee="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Te={f:function(t){return Ee&&"[object Window]"==Me.call(t)?function(t){try{return je(t)}catch(t){return Ee.slice()}}(t):je(P(t))}},Ce=ue.KEY,Pe=me.f,Ne=a.f,Le=Te.f,De=m.Symbol,Fe=m.JSON,Re=Fe&&Fe.stringify,ze="prototype",Ie=et("_hidden"),qe=et("toPrimitive"),Ye={}.propertyIsEnumerable,Xe=Y("symbol-registry"),Ge=Y("symbols"),He=Y("op-symbols"),Be=Object[ze],Ve="function"==typeof De,We=m.QObject,Qe=!We||!We[ze]||!We[ze].findChild,Ue=o&&w(function(){return 7!=dt(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Pe(Be,e);r&&delete Be[e],Ne(t,e,n),r&&t!==Be&&Ne(Be,e,r)}:Ne,Je=function(t){var e=Ge[t]=dt(De[ze]);return e._k=t,e},$e=Ve&&"symbol"==typeof De.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof De},Ke=function(t,e,n){return t===Be&&Ke(He,e,n),p(t),e=s(e,!0),p(n),l(Ge,e)?(n.enumerable?(l(t,Ie)&&t[Ie][e]&&(t[Ie][e]=!1),n=dt(n,{enumerable:k(0,!1)})):(l(t,Ie)||Ne(t,Ie,k(1,{})),t[Ie][e]=!0),Ue(t,e,n)):Ne(t,e,n)},Ze=function(t,e){p(t);for(var n,r=function(t){var e=U(t),n=J.f;if(n)for(var r,i=n(t),s=$.f,o=0;i.length>o;)s.call(t,r=i[o++])&&e.push(r);return e}(e=P(e)),i=0,s=r.length;i<s;)Ke(t,n=r[i++],e[n]);return t},tn=function(t){var e=Ye.call(this,t=s(t,!0));return!(this===Be&&l(Ge,t)&&!l(He,t))&&(!(e||!l(this,t)||!l(Ge,t)||l(this,Ie)&&this[Ie][t])||e)},en=function(t,e){if(t=P(t),e=s(e,!0),t!==Be||!l(Ge,e)||l(He,e)){var n=Pe(t,e);return!n||!l(Ge,e)||l(t,Ie)&&t[Ie][e]||(n.enumerable=!0),n}},nn=function(t){for(var e,n=Le(P(t)),r=[],i=0;n.length>i;)l(Ge,e=n[i++])||e==Ie||e==Ce||r.push(e);return r},rn=function(t){for(var e,n=t===Be,r=Le(n?He:P(t)),i=[],s=0;r.length>s;)!l(Ge,e=r[s++])||n&&!l(Be,e)||i.push(Ge[e]);return i};Ve||(O((De=function(){if(this instanceof De)throw TypeError("Symbol is not a constructor!");var e=v(0<arguments.length?arguments[0]:void 0),n=function(t){this===Be&&n.call(He,t),l(this,Ie)&&l(this[Ie],e)&&(this[Ie][e]=!1),Ue(this,e,k(1,t))};return o&&Qe&&Ue(Be,e,{configurable:!0,set:n}),Je(e)})[ze],"toString",function(){return this._k}),me.f=en,a.f=Ke,Ae.f=Te.f=nn,$.f=tn,J.f=rn,o&&O(Be,"propertyIsEnumerable",tn,!0),_e.f=function(t){return Je(et(t))}),j(j.G+j.W+j.F*!Ve,{Symbol:De});for(var sn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),on=0;sn.length>on;)et(sn[on++]);for(var un=U(et.store),an=0;un.length>an;)xe(un[an++]);j(j.S+j.F*!Ve,"Symbol",{for:function(t){return l(Xe,t+="")?Xe[t]:Xe[t]=De(t)},keyFor:function(t){if(!$e(t))throw TypeError(t+" is not a symbol!");for(var e in Xe)if(Xe[e]===t)return e},useSetter:function(){Qe=!0},useSimple:function(){Qe=!1}}),j(j.S+j.F*!Ve,"Object",{create:function(t,e){return void 0===e?dt(t):Ze(dt(t),e)},defineProperty:Ke,defineProperties:Ze,getOwnPropertyDescriptor:en,getOwnPropertyNames:nn,getOwnPropertySymbols:rn}),Fe&&j(j.S+j.F*(!Ve||w(function(){var t=De();return"[null]"!=Re([t])||"{}"!=Re({a:t})||"{}"!=Re(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!$e(t))return Oe(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$e(e))return e}),r[1]=e,Re.apply(Fe,r)}}),De[ze][qe]||x(De[ze],qe,De[ze].valueOf),mt(De,"Symbol"),mt(Math,"Math",!0),mt(m.JSON,"JSON",!0);var hn={},ln=[];function cn(t,e){if(Array.isArray(t)){var n=!0,r=!1,i=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done);n=!0){cn(s.value,e)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}else if("object"!==Wt(t))vn(Object.keys(e)),hn[t]=Object.assign(hn[t]||{},e);else for(var u in t)cn(u,t[u])}function fn(t){return hn[t]||{}}function vn(t){ln.push.apply(ln,be(t))}var dn=q(!0);j(j.P,"Array",{includes:function(t){return dn(this,t,1<arguments.length?arguments[1]:void 0)}}),it("includes");var yn=et("match"),pn=function(t){var e;return g(t)&&(void 0!==(e=t[yn])?!!e:"RegExp"==E(t))},mn=et("match"),gn="includes";j(j.P+j.F*function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[mn]=!1,!"/./"[e](n)}catch(t){}}return!0}(gn),"String",{includes:function(t){return!!~function(t,e,n){if(pn(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(C(t))}(this,t,gn).indexOf(t,1<arguments.length?arguments[1]:void 0)}});var wn=function(e,t,n){var r=et(e),i=n(C,r,""[e]),s=i[0],o=i[1];w(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})&&(O(String.prototype,e,s),x(RegExp.prototype,r,2==t?function(t,e){return o.call(t,this,e)}:function(t){return o.call(t,this)}))};function bn(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function _n(t){return t%360*Math.PI/180}function kn(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function xn(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()})}function On(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Sn(t,e,n){if(null==e||null==n){var r=t.bbox();null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)}return{width:e,height:n}}function An(t,e){var n,r,i=t.origin;if("string"==typeof i||null==i){var s=(i||"center").toLowerCase().trim(),o=e.bbox(),u=o.height,a=o.width,h=o.x,l=o.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+u:l+u/2;n=null!=t.ox?t.ox:c,r=null!=t.oy?t.oy:f}else n=i[0],r=i[1];return[n,r]}wn("replace",2,function(i,s,o){return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var jn=Object.freeze({map:bn,filter:function(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i},radians:_n,degrees:function(t){return 180*t/Math.PI%360},camelCase:kn,unCamelCase:xn,capitalize:On,proportionalSize:Sn,getOrigin:An}),Mn="http://www.w3.org/2000/svg",En="http://www.w3.org/2000/xmlns/",Tn="http://www.w3.org/1999/xlink",Cn="http://svgjs.com/svgjs",Pn=Object.freeze({ns:Mn,xmlns:En,xlink:Tn,svgjs:Cn}),Nn={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function Ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Dn=function t(){Ln(this,t)},Fn={},Rn="___SYMBOL___ROOT___";function zn(t){return Nn.document.createElementNS(Mn,t)}function In(t){if(t instanceof Dn)return t;if("object"===Wt(t))return Xn(t);if(null==t)return new Fn[Rn];if("string"==typeof t&&"<"!==t.charAt(0))return Xn(Nn.document.querySelector(t));var e=zn("svg");return e.innerHTML=t,t=Xn(e.firstChild)}function qn(t,e){return e instanceof Nn.window.Node?e:zn(t)}function Yn(t){if(!t)return null;if(t.instance instanceof Dn)return t.instance;var e=On(t.nodeName);return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Fn[e]||(e="Dom"),new Fn[e](t)}var Xn=Yn;function Gn(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.name,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Fn[e]=t,n&&(Fn[Rn]=t),vn(Object.keys(t.prototype)),t}function Hn(t){return Fn[t]}var Bn=1e3;function Vn(t){return"Svgjs"+On(t)+Bn++}function Wn(t){for(var e=t.children.length-1;0<=e;e--)Wn(t.children[e]);return t.id?Yn(t).id(Vn(t.nodeName)):Yn(t)}function Qn(t,e,n){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(r in e){var s=e[r];n&&(s=Un(e[r])),t[i].prototype[r]=s}}function Un(i){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[e.length-1];return!r||r.constructor!==Object||r instanceof Array?i.apply(this,e):i.apply(this,e.slice(0,-1)).attr(r)}}cn("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),"function"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0<t&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),"function"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return 0<this.position()&&this.parent().removeElement(this).add(this,0),this},before:function(t){(t=In(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=In(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){(t=In(t)).before(this)},insertAfter:function(t){(t=In(t)).after(this)}}),wn("split",2,function(i,s,o){var v=pn,d=o,y=[].push,t="split",p="length",m="lastIndex";if("c"=="abbc"[t](/(b)*/)[1]||4!="test"[t](/(?:)/,-1)[p]||2!="ab"[t](/(?:ab)*/)[p]||4!="."[t](/(.?)(.?)/)[p]||1<"."[t](/()()/)[p]||""[t](/.?/)[p]){var g=void 0===/()??/.exec("")[1];o=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!v(t))return d.call(n,t,e);var r,i,s,o,u,a=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,c=void 0===e?4294967295:e>>>0,f=new RegExp(t.source,h+"g");for(g||(r=new RegExp("^"+f.source+"$(?!\\s)",h));(i=f.exec(n))&&!(l<(s=i.index+i[0][p])&&(a.push(n.slice(l,i.index)),!g&&1<i[p]&&i[0].replace(r,function(){for(u=1;u<arguments[p]-2;u++)void 0===arguments[u]&&(i[u]=void 0)}),1<i[p]&&i.index<n[p]&&y.apply(a,i.slice(1)),o=i[0][p],l=s,a[p]>=c));)f[m]===i.index&&f[m]++;return l===n[p]?!o&&f.test("")||a.push(""):a.push(n.slice(l)),a[p]>c?a.slice(0,c):a}}else"0"[t](void 0,0)[p]&&(o=function(t,e){return void 0===t&&0===e?[]:d.call(this,t,e)});return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var Jn=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,$n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Kn=/rgb\((\d+),(\d+),(\d+)\)/,Zn=/(#[a-z0-9\-_]+)/i,tr=/\)\s*,?\s*/,er=/\s/g,nr=/^#[a-f0-9]{3,6}$/i,rr=/^rgb\(/,ir=/^(\s+)?$/,sr=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,or=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,ur=/[\s,]+/,ar=/([^e])-/gi,hr=/[MLHVCSQTAZ]/gi,lr=/[MLHVCSQTAZ]/i,cr=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,fr=/\./g,vr=Object.freeze({numberAndUnit:Jn,hex:$n,rgb:Kn,reference:Zn,transforms:tr,whitespace:er,isHex:nr,isRgb:rr,isCss:/[^:]+:[^;]+;?/,isBlank:ir,isNumber:sr,isPercent:/^-?[\d.]+%$/,isImage:or,delimiter:ur,hyphen:ar,pathLetters:hr,isPathLetter:lr,numbersWithDots:cr,dots:fr});cn("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(ur)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter(function(t){return t!==e}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),cn("Dom",{css:function(t,e){var n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){var e=t.split(/\s*:\s*/);n[e[0]]=e[1]}),n;if(arguments.length<2){if(Array.isArray(t)){var r=!0,i=!1,s=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done);r=!0){var a=kn(o.value);n[a]=this.node.style[a]}}catch(t){i=!0,s=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}return n}if("string"==typeof t)return this.node.style[kn(t)];if("object"===Wt(t))for(var h in t)this.node.style[kn(h)]=null==t[h]||ir.test(t[h])?"":t[h]}return 2===arguments.length&&(this.node.style[kn(t)]=null==e||ir.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),cn("Dom",{data:function(e,t,n){if("object"===Wt(e))for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"==typeof t||"number"==typeof t?t:JSON.stringify(t));return this}}),cn("Dom",{remember:function(t,e){if("object"===Wt(t))for(var n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;0<=t;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var dr=0;function yr(t){var e=In(t).getEventHolder();return e.events||(e.events={}),e.events}function pr(t){return In(t).getEventTarget()}function mr(t,e,r,n,i){var s=r.bind(n||t),o=yr(t),u=pr(t);e=Array.isArray(e)?e:e.split(ur),r._svgjsListenerId||(r._svgjsListenerId=++dr),e.forEach(function(t){var e=t.split(".")[0],n=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][n]=o[e][n]||{},o[e][n][r._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)})}function gr(o,t,u,a){var h=yr(o),l=pr(o);("function"!=typeof u||(u=u._svgjsListenerId))&&(t=Array.isArray(t)?t:(t||"").split(ur)).forEach(function(t){var e,n,r,i=t&&t.split(".")[0],s=t&&t.split(".")[1];if(u)h[i]&&h[i][s||"*"]&&(l.removeEventListener(i,h[i][s||"*"][u],a||!1),delete h[i][s||"*"][u]);else if(i&&s){if(h[i]&&h[i][s]){for(n in h[i][s])gr(l,[i,s].join("."),n);delete h[i][s]}}else if(s)for(t in h)for(e in h[t])s===e&&gr(l,[t,s].join("."));else if(i){if(h[i]){for(e in h[i])gr(l,[i,e].join("."));delete h[i]}}else{for(t in h)gr(l,t);(r=In(o).getEventHolder()).events&&(r.events={})}})}function wr(t,e,n){var r=pr(t);return e instanceof Nn.window.Event||(e=new Nn.window.CustomEvent(e,{detail:n,cancelable:!0})),r.dispatchEvent(e),e}function br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function _r(t,e,n){return e&&br(t.prototype,e),n&&br(t,n),t}var kr=function(){var t=p(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};o&&"g"!=/./g.flags&&a.f(RegExp.prototype,"flags",{configurable:!0,get:kr});var xr="toString",Or=/./[xr],Sr=function(t){O(RegExp.prototype,xr,t,!0)};function Ar(t){var e=t.toString(16);return 1===e.length?"0"+e:e}w(function(){return"/a/b"!=Or.call({source:"a",flags:"b"})})?Sr(function(){var t=p(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?kr.call(t):void 0)}):Or.name!=xr&&Sr(function(){return Or.call(this)});var jr=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t,e,n){var r,i;if(this.r=0,this.g=0,this.b=0,t)return"string"==typeof t?rr.test(t)?(r=Kn.exec(t.replace(er,"")),this.r=parseInt(r[1]),this.g=parseInt(r[2]),this.b=parseInt(r[3])):nr.test(t)&&(r=$n.exec(4===(i=t).length?["#",i.substring(1,2),i.substring(1,2),i.substring(2,3),i.substring(2,3),i.substring(3,4),i.substring(3,4)].join(""):i),this.r=parseInt(r[1],16),this.g=parseInt(r[2],16),this.b=parseInt(r[3],16)):Array.isArray(t)?(this.r=t[0],this.g=t[1],this.b=t[2]):"object"===Wt(t)?(this.r=t.r,this.g=t.g,this.b=t.b):3===arguments.length&&(this.r=t,this.g=e,this.b=n),this}},{key:"toString",value:function(){return this.toHex()}},{key:"toArray",value:function(){return[this.r,this.g,this.b]}},{key:"toHex",value:function(){return"#"+Ar(Math.round(this.r))+Ar(Math.round(this.g))+Ar(Math.round(this.b))}},{key:"toRgb",value:function(){return"rgb("+[this.r,this.g,this.b].join()+")"}},{key:"brightness",value:function(){return this.r/255*.3+this.g/255*.59+this.b/255*.11}}],[{key:"test",value:function(t){return t+="",nr.test(t)||rr.test(t)}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"isColor",value:function(t){return this.isRgb(t)||this.test(t)}}]),t}();function Mr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Er(t,e){return!e||"object"!==Wt(e)&&"function"!=typeof e?Mr(t):e}function Tr(t){return(Tr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Cr(t,e,n){return(Cr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Tr(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Pr(t,e){return(Pr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Nr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Pr(t,e)}wn("match",1,function(r,i,t){return[function(t){var e=r(this),n=null==t?void 0:t[i];return void 0!==n?n.call(t,e):new RegExp(t)[i](String(e))},t]});var Lr=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return _r(e,[{key:"init",value:function(t,e){var n,r=0,i=0;return n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===Wt(t)?{x:t.x,y:t.y}:{x:t,y:e},this.x=null==n.x?r:n.x,this.y=null==n.y?i:n.y,this}},{key:"clone",value:function(){return new e(this)}},{key:"transform",value:function(t){return new e(t.a*this.x+t.c*this.y+t.e,t.b*this.x+t.d*this.y+t.f)}},{key:"toArray",value:function(){return[this.x,this.y]}}]),e}();function Dr(){if(!Dr.nodes){var t=In().size(2,0);t.node.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";");var e=t.path().node;Dr.nodes={svg:t,path:e}}if(!Dr.nodes.svg.node.parentNode){var n=Nn.document.body||Nn.document.documentElement;Dr.nodes.svg.addTo(n)}return Dr.nodes}function Fr(t){return!(t.w||t.h||t.x||t.y)}var Rr=function(){function o(){Ln(this,o),this.init.apply(this,arguments)}return _r(o,[{key:"init",value:function(t){return t="string"==typeof t?t.split(ur).map(parseFloat):Array.isArray(t)?t:"object"===Wt(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}},{key:"merge",value:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y);return new o(e,n,Math.max(this.x+this.width,t.x+t.width)-e,Math.max(this.y+this.height,t.y+t.height)-n)}},{key:"transform",value:function(e){var n=1/0,r=-1/0,i=1/0,s=-1/0;return[new Lr(this.x,this.y),new Lr(this.x2,this.y),new Lr(this.x,this.y2),new Lr(this.x2,this.y2)].forEach(function(t){t=t.transform(e),n=Math.min(n,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),s=Math.max(s,t.y)}),new o(n,i,r-n,s-i)}},{key:"addOffset",value:function(){return this.x+=Nn.window.pageXOffset,this.y+=Nn.window.pageYOffset,this}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}},{key:"isNulled",value:function(){return Fr(this)}}]),o}();function zr(t,e){var n,r;try{if(Fr(n=t(this.node))&&(r=this.node,!(Nn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===document}).call(Nn.document.documentElement,r)))throw new Error("Element not in the dom")}catch(t){n=e(this)}return n}function Ir(t,e,n){return Math.abs(e-t)<(n||1e-6)}cn({viewbox:{viewbox:function(t,e,n,r){return null==t?new Rr(this.attr("viewBox")):this.attr("viewBox",new Rr(t,e,n,r))}}});var qr=function(){function h(){Ln(this,h),this.init.apply(this,arguments)}return _r(h,[{key:"init",value:function(t){var e=h.fromArray([1,0,0,1,0,0]);return t=t instanceof Element?t.matrixify():"string"==typeof t?h.fromArray(t.split(ur).map(parseFloat)):Array.isArray(t)?h.fromArray(t):"object"===Wt(t)&&h.isMatrixLike(t)?t:"object"===Wt(t)?(new h).transform(t):6===arguments.length?h.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}},{key:"clone",value:function(){return new h(this)}},{key:"transform",value:function(t){if(h.isMatrixLike(t))return new h(t).multiplyO(this);var e=h.formatTransforms(t),n=new Lr(e.ox,e.oy).transform(this),r=n.x,i=n.y,s=(new h).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-r,-i).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(r,i);if(isFinite(e.px)||isFinite(e.py)){var o=new Lr(r,i).transform(s),u=e.px?e.px-o.x:0,a=e.py?e.py-o.y:0;s.translateO(u,a)}return s.translateO(e.tx,e.ty),s}},{key:"compose",value:function(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,n=t.originY||0,r=t.scaleX||1,i=t.scaleY||1,s=t.shear||0,o=t.rotate||0,u=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(r,i).shearO(s).rotateO(o).translateO(u,a).lmultiplyO(this).translateO(e,n)}},{key:"decompose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=0<a?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,v=Math.cos(c),d=Math.sin(c),y=(n*i+r*s)/a,p=i*l/(y*n-r)||s*l/(y*r+n);return{scaleX:l,scaleY:p,shear:y,rotate:f,translateX:o-t+t*v*l+e*(y*v*l-d*p),translateY:u-e+t*d*l+e*(y*d*l+v*p),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(this,e,this)}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(e,this,this)}},{key:"inverseO",value:function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);var u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"scale",value:function(t,e,n,r){var i;return(i=this.clone()).scaleO.apply(i,arguments)}},{key:"scaleO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t);var i=this.a,s=this.b,o=this.c,u=this.d,a=this.e,h=this.f;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}},{key:"rotate",value:function(t,e,n){return this.clone().rotateO(t,e,n)}},{key:"rotateO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;t=_n(t);var r=Math.cos(t),i=Math.sin(t),s=this.a,o=this.b,u=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"shear",value:function(t,e,n){return this.clone().shearO(t,e,n)}},{key:"shearO",value:function(t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f;return this.a=n+r*t,this.c=i+s*t,this.e=o+u*t-e*t,this}},{key:"skew",value:function(t,e,n,r){var i;return(i=this.clone()).skewO.apply(i,arguments)}},{key:"skewO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t),t=_n(t),e=_n(e);var i=Math.tan(t),s=Math.tan(e),o=this.a,u=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}},{key:"skewX",value:function(t,e,n){return this.skew(t,0,e,n)}},{key:"skewXO",value:function(t,e,n){return this.skewO(t,0,e,n)}},{key:"skewY",value:function(t,e,n){return this.skew(0,t,e,n)}},{key:"skewYO",value:function(t,e,n){return this.skewO(0,t,e,n)}},{key:"aroundO",value:function(t,e,n){var r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}},{key:"around",value:function(t,e,n){return this.clone().aroundO(t,e,n)}},{key:"equals",value:function(t){var e=new h(t);return Ir(this.a,e.a)&&Ir(this.b,e.b)&&Ir(this.c,e.c)&&Ir(this.d,e.d)&&Ir(this.e,e.e)&&Ir(this.f,e.f)}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],[{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new Lr(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,v=new Lr(t.position||t.px||t.positionX,t.py||t.positionY),d=v.x,y=v.y,p=new Lr(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new Lr(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:w.x,ry:w.y,tx:m,ty:g,ox:c,oy:f,px:d,py:y}}},{key:"matrixMultiply",value:function(t,e,n){var r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}}]),h}();var Yr=function(){try{return Function("name","baseClass","_constructor",["baseClass = baseClass || Array","return {"," [name]: class extends baseClass {"," constructor (...args) {"," super(...args)"," _constructor && _constructor.apply(this, args)"," }"," }","}[name]"].join("\n"))}catch(t){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Array,n=2<arguments.length?arguments[2]:void 0,r=function(){e.apply(this,arguments),n&&n.apply(this,arguments)};return((r.prototype=Object.create(e.prototype)).constructor=r).prototype.map=function(t){var e=new r;return e.push.apply(e,Array.prototype.map.call(this,t)),e},r}}}(),Xr=Yr("List",Array,function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if("number"==typeof t)return this;this.length=0,this.push.apply(this,be(t))});function Gr(t,e){return new Xr(bn((e||Nn.document).querySelectorAll(t),function(t){return Yn(t)}))}Qn(Xr,{each:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"!=typeof e?this.map(function(t){return t[e].apply(t,n)}):(this.forEach(function(t){e.call(t,t)}),this)},toArray:function(){return Array.prototype.concat.apply([],this)}}),Xr.extend=function(t){t=t.reduce(function(t,r){return t[r]=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.each.apply(this,[r].concat(e))},t},{}),Qn(Xr,t)};var Hr=function(t){function r(){var t,e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).events,n=void 0===e?{}:e;return Ln(this,r),(t=Er(this,Tr(r).call(this))).events=n,t}return Nr(r,Dn),_r(r,[{key:"addEventListener",value:function(){}},{key:"dispatch",value:function(t,e){return wr(this,t,e)}},{key:"dispatchEvent",value:function(t){var e=this.getEventHolder().events;if(!e)return!0;var n=e[t.type];for(var r in n)for(var i in n[r])n[r][i](t);return!t.defaultPrevented}},{key:"fire",value:function(t,e){return this.dispatch(t,e),this}},{key:"getEventHolder",value:function(){return this}},{key:"getEventTarget",value:function(){return this}},{key:"off",value:function(t,e){return gr(this,t,e),this}},{key:"on",value:function(t,e,n,r){return mr(this,t,e,n,r),this}},{key:"removeEventListener",value:function(){}}]),r}();function Br(){}var Vr={duration:400,ease:">",delay:0},Wr={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"},Qr=Object.freeze({noop:Br,timeline:Vr,attrs:Wr}),Ur=Yr("SVGArray",Array,function(t){this.init(t)});Qn(Ur,{init:function(t){return"number"==typeof t||(this.length=0,this.push.apply(this,be(this.parse(t)))),this},toArray:function(){return Array.prototype.concat.apply([],this)},toString:function(){return this.join(" ")},valueOf:function(){var t=[];return t.push.apply(t,be(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(ur).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var Jr=function(){function n(){Ln(this,n),this.init.apply(this,arguments)}return _r(n,[{key:"init",value:function(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(Jn))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit),this}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"valueOf",value:function(){return this.value}},{key:"plus",value:function(t){return new n(this+(t=new n(t)),this.unit||t.unit)}},{key:"minus",value:function(t){return new n(this-(t=new n(t)),this.unit||t.unit)}},{key:"times",value:function(t){return new n(this*(t=new n(t)),this.unit||t.unit)}},{key:"divide",value:function(t){return new n(this/(t=new n(t)),this.unit||t.unit)}}]),n}(),$r=[];var Dom=function(t){function Dom(t,e){var n;return Ln(this,Dom),(n=Er(this,Tr(Dom).call(this,t))).node=t,n.type=t.nodeName,e&&t!==e&&n.attr(e),n}return Nr(Dom,Hr),_r(Dom,[{key:"add",value:function(t,e){return t=In(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"addTo",value:function(t){return In(t).put(this)}},{key:"children",value:function(){return new Xr(bn(this.node.children,function(t){return Yn(t)}))}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}},{key:"clone",value:function(){return this.writeDataToDom(),Wn(this.node.cloneNode(!0))}},{key:"each",value:function(t,e){var n,r,i=this.children();for(n=0,r=i.length;n<r;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}},{key:"element",value:function(t){return this.put(new Dom(zn(t)))}},{key:"first",value:function(){return Yn(this.node.firstChild)}},{key:"get",value:function(t){return Yn(this.node.childNodes[t])}},{key:"getEventHolder",value:function(){return this.node}},{key:"getEventTarget",value:function(){return this.node}},{key:"has",value:function(t){return 0<=this.index(t)}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=Vn(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return Yn(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node;return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=Yn(e.node.parentNode),!t)return e;for(;e&&e.node instanceof Nn.window.SVGElement;){if("string"==typeof t?e.matches(t):e instanceof t)return e;e=Yn(e.node.parentNode)}}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"putIn",value:function(t){return In(t).add(this)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=In(t),this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:2,e=1<arguments.length?arguments[1]:void 0,n=Math.pow(10,t),r=this.attr();e||(e=Object.keys(r));var i={};return e.forEach(function(t){i[t]=Math.round(r[t]*n)/n}),this.attr(i),this}},{key:"toString",value:function(){return this.id()}},{key:"svg",value:function(n,t){var e,r,i;if(!1===n&&(t=!1,n=null),null==n||"function"==typeof n){t=null==t||t,this.writeDataToDom();var s=this;if(null!=n){if(s=Yn(s.node.cloneNode(!0)),t){var o=n(s);if(s=o||s,!1===o)return""}s.each(function(){var t=n(this),e=t||this;!1===t?this.remove():t&&this!==e&&this.replace(e)},!0)}return t?s.node.outerHTML:s.node.innerHTML}for(t=null!=t&&t,e=Nn.document.createElementNS(Mn,"svg"),i=Nn.document.createDocumentFragment(),e.innerHTML=n,r=e.children.length;r--;)i.appendChild(e.firstElementChild);var u=this.parent();return t?this.replace(i)&&u:this.add(i)}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"writeDataToDom",value:function(){return this.each(function(){this.writeDataToDom()}),this}}]),Dom}();Qn(Dom,{attr:function(n,t,e){var r=this;if(null==n){n={},t=this.node.attributes;var i=!0,s=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(i=(u=a.next()).done);i=!0){var h=u.value;n[h.nodeName]=sr.test(h.nodeValue)?parseFloat(h.nodeValue):h.nodeValue}}catch(t){s=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(s)throw o}}return n}if(n instanceof Array)return n.reduce(function(t,e){return t[e]=r.attr(e),t},{});if("object"===Wt(n))for(t in n)this.attr(t,n[t]);else if(null===t)this.node.removeAttribute(n);else{if(null==t)return null==(t=this.node.getAttribute(n))?Wr[n]:sr.test(t)?parseFloat(t):t;"number"==typeof(t=$r.reduce(function(t,e){return e(n,t,r)},t))?t=new Jr(t):jr.isColor(t)?t=new jr(t):t.constructor===Array&&(t=new Ur(t)),"leading"===n?this.leading&&this.leading(t):"string"==typeof e?this.node.setAttributeNS(e,n,t.toString()):this.node.setAttribute(n,t.toString()),!this.rebuild||"font-size"!==n&&"x"!==n||this.rebuild()}return this},find:function(t){return Gr(t,this.node)}}),Gn(Dom);var Svg=Hn(Rn),Element=function(t){function Element(t,e){var n;return Ln(this,Element),(n=Er(this,Tr(Element).call(this,t,e))).dom={},n.node.instance=Mr(Mr(n)),t.hasAttribute("svgjs:data")&&n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n}return Nr(Element,Dom),_r(Element,[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){return this.root().defs()}},{key:"root",value:function(){var t=this.parent(Svg);return t&&t.root()}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"inside",value:function(t,e){var n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Nn.document;t=In(t);for(var e=new Xr,n=this;(n=n.parent())&&n.node!==t.node&&n.node!==Nn.document;)e.push(n);return e}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=t.match(Zn);return e?In(e[1]):null}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.width(new Jr(n.width)).height(new Jr(n.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),Cr(Tr(Element.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}]),Element}();Qn(Element,{bbox:function(){return new Rr(zr.call(this,function(t){return t.getBBox()},function(e){try{var t=e.clone().addTo(Dr().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw new Error('Getting bbox of element "'+e.node.nodeName+'" is not possible')}}))},rbox:function(t){var e=new Rr(zr.call(this,function(t){return t.getBoundingClientRect()},function(t){throw new Error('Getting rbox of element "'+t.node.nodeName+'" is not possible')}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()},point:function(t,e){return new Lr(t,e).transform(this.screenCTM().inverse())},ctm:function(){return new qr(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new qr(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new qr(e)}}),Gn(Element);var Kr={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};function Zr(i){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},e=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),e.forEach(function(t){var e,n,r;e=i,r=s[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return i}function ti(t){return this.attr("rx",t)}function ei(t){return this.attr("ry",t)}function ni(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function ri(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ii(t){return null==t?this.attr("cx"):this.attr("cx",t)}function si(t){return null==t?this.attr("cy"):this.attr("cy",t)}function oi(t){return null==t?2*this.rx():this.rx(new Jr(t).divide(2))}function ui(t){return null==t?2*this.ry():this.ry(new Jr(t).divide(2))}["fill","stroke"].forEach(function(e){var n,t={};t[e]=function(t){if(void 0===t)return this.attr(e);if("string"==typeof t||jr.isRgb(t)||t instanceof Element)this.attr(e,t);else for(n=Kr[e].length-1;0<=n;n--)null!=t[Kr[e][n]]&&this.attr(Kr.prefix(e,Kr[e][n]),t[Kr[e][n]]);return this},cn(["Shape","Runner"],t)}),cn(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new qr(this):this.attr("transform",new qr(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var n="string"==typeof t?t:(isFinite(t),"both"),r="both"===t&&isFinite(e)?[e,e]:"x"===t?[e,0]:"y"===t?[0,e]:isFinite(t)?[t,t]:[0,0];this.transform({flip:n,origin:r},!0)},opacity:function(t){return this.attr("opacity",t)},dmove:function(t,e){return this.dx(t).dy(e)}}),cn("Element",{dx:function(t){return this.x(new Jr(t).plus(this.x()))},dy:function(t){return this.y(new Jr(t).plus(this.y()))}}),cn("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new Jr(t)):this.rx(t).ry(null==e?t:e)}}),cn("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Lr(this.node.getPointAtLength(t))}}),cn(["Element","Runner"],{font:function(t,e){if("object"===Wt(t))for(e in t)this.font(e,t[e]);return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),cn("Text",{ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},amove:function(t,e){return this.ax(t).ay(e)}}),cn("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?gr(this,e):mr(this,e,t),this},t},{})),cn("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(tr).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(ur).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(qr.fromArray(e[1])):t[e[0]].apply(t,e[1])},new qr)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toRoot:function(){return this.toParent(this.root())},transform:function(t,e){if(null==t||"string"==typeof t){var n=new qr(this).decompose();return n[t]||n}qr.isMatrixLike(t)||(t=Zr({},t,{origin:An(t,this)}));var r=new qr(!0===e?this:e||!1).transform(t);return this.attr("transform",r)}});var ai=Object.freeze({rx:ti,ry:ei,x:ni,y:ri,cx:ii,cy:si,width:oi,height:ui}),Shape=function(t){function Shape(){return Ln(this,Shape),Er(this,Tr(Shape).apply(this,arguments))}return Nr(Shape,Element),Shape}();Gn(Shape);var Circle=function(t){function Circle(t){return Ln(this,Circle),Er(this,Tr(Circle).call(this,qn("circle",t),t))}return Nr(Circle,Shape),_r(Circle,[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new Jr(t).divide(2))}}]),Circle}();Qn(Circle,{x:ni,y:ri,cx:ii,cy:si,width:oi,height:ui}),cn({Element:{circle:Un(function(t){return this.put(new Circle).size(t).move(0,0)})}}),Gn(Circle);var Container=function(t){function Container(){return Ln(this,Container),Er(this,Tr(Container).apply(this,arguments))}return Nr(Container,Element),_r(Container,[{key:"flatten",value:function(t){return this.each(function(){return this instanceof Container?this.flatten(t).ungroup(t):this.toParent(t)}),this.node.firstElementChild||this.remove(),this}},{key:"ungroup",value:function(t){return t=t||this.parent(),this.each(function(){return this.toParent(t)}),this.remove(),this}}]),Container}();Gn(Container);var Defs=function(t){function Defs(t){return Ln(this,Defs),Er(this,Tr(Defs).call(this,qn("defs",t),t))}return Nr(Defs,Container),_r(Defs,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),Defs}();Gn(Defs);var Ellipse=function(t){function Ellipse(t){return Ln(this,Ellipse),Er(this,Tr(Ellipse).call(this,qn("ellipse",t),t))}return Nr(Ellipse,Shape),_r(Ellipse,[{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.rx(new Jr(n.width).divide(2)).ry(new Jr(n.height).divide(2))}}]),Ellipse}();Qn(Ellipse,ai),cn("Container",{ellipse:Un(function(t,e){return this.put(new Ellipse).size(t,e).move(0,0)})}),Gn(Ellipse);var Stop=function(t){function Stop(t){return Ln(this,Stop),Er(this,Tr(Stop).call(this,qn("stop",t),t))}return Nr(Stop,Element),_r(Stop,[{key:"update",value:function(t){return("number"==typeof t||t instanceof Jr)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Jr(t.offset)),this}}]),Stop}();function hi(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Jr(t),fy:new Jr(e)}):this.attr({x1:new Jr(t),y1:new Jr(e)})}function li(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Jr(t),cy:new Jr(e)}):this.attr({x2:new Jr(t),y2:new Jr(e)})}Gn(Stop);var ci=Object.freeze({from:hi,to:li}),Gradient=function(t){function Gradient(t,e){return Ln(this,Gradient),Er(this,Tr(Gradient).call(this,qn(t+"Gradient","string"==typeof t?null:t),e))}return Nr(Gradient,Container),_r(Gradient,[{key:"stop",value:function(t,e,n){return this.put(new Stop).update(t,e,n)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="gradientTransform"),Cr(Tr(Gradient.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Gr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Rr}}]),Gradient}();Qn(Gradient,ci),cn({Container:{gradient:Un(function(t,e){return this.defs().gradient(t,e)})},Defs:{gradient:Un(function(t,e){return this.put(new Gradient(t)).update(e)})}}),Gn(Gradient);var Pattern=function(t){function Pattern(t){return Ln(this,Pattern),Er(this,Tr(Pattern).call(this,qn("pattern",t),t))}return Nr(Pattern,Container),_r(Pattern,[{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="patternTransform"),Cr(Tr(Pattern.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Gr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Rr}}]),Pattern}();cn({Container:{pattern:function(){var t;return(t=this.defs()).pattern.apply(t,arguments)}},Defs:{pattern:Un(function(t,e,n){return this.put(new Pattern).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),Gn(Pattern);var fi,Image=function(t){function Image(t){return Ln(this,Image),Er(this,Tr(Image).call(this,qn("image",t),t))}return Nr(Image,Shape),_r(Image,[{key:"load",value:function(t,n){if(!t)return this;var r=new Nn.window.Image;return mr(r,"load",function(t){var e=this.parent(Pattern);0===this.width()&&0===this.height()&&this.size(r.width,r.height),e instanceof Pattern&&0===e.width()&&0===e.height()&&e.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)},this),mr(r,"load error",function(){gr(r)}),this.attr("href",r.src=t,Tn)}}]),Image}();fi=function(t,e,n){return"fill"!==t&&"stroke"!==t||or.test(e)&&(e=n.root().defs().image(e)),e instanceof Image&&(e=n.root().defs().pattern(0,0,function(t){t.add(e)})),e},$r.push(fi),cn({Container:{image:Un(function(t,e){return this.put(new Image).size(0,0).load(t,e)})}}),Gn(Image);var vi=Yr("PointArray",Ur);Qn(vi,{toString:function(){for(var t=0,e=this.length,n=[];t<e;t++)n.push(this[t].join(","));return n.join(" ")},toLine:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,n=this.length,r=[];e<n;e++)r.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new vi(r)},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[0,0]],e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(ur).map(parseFloat);t.length%2!=0&&t.pop();for(var n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r=this.length-1;0<=r;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this},size:function(t,e){var n,r=this.bbox();for(n=this.length-1;0<=n;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this},bbox:function(){var e=-1/0,n=-1/0,r=1/0,i=1/0;return this.forEach(function(t){e=Math.max(t[0],e),n=Math.max(t[1],n),r=Math.min(t[0],r),i=Math.min(t[1],i)}),{x:r,y:i,width:e-r,height:n-i}}});var di=vi;var yi=Object.freeze({MorphArray:di,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),Line=function(t){function Line(t){return Ln(this,Line),Er(this,Tr(Line).call(this,qn("line",t),t))}return Nr(Line,Shape),_r(Line,[{key:"array",value:function(){return new vi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"plot",value:function(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new vi(t).toLine(),this.attr(t))}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),Line}();Qn(Line,yi),cn({Container:{line:Un(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Line.prototype.plot.apply(this.put(new Line),null!=e[0]?e:[0,0,0,0])})}}),Gn(Line);var Marker=function(t){function Marker(t){return Ln(this,Marker),Er(this,Tr(Marker).call(this,qn("marker",t),t))}return Nr(Marker,Container),_r(Marker,[{key:"width",value:function(t){return this.attr("markerWidth",t)}},{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),Marker}();cn({Container:{marker:function(){var t;return(t=this.defs()).marker.apply(t,arguments)}},Defs:{marker:Un(function(t,e,n){return this.put(new Marker).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker:function(t,e,n,r){var i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=e instanceof Marker?e:this.defs().marker(e,n,r),this.attr(i,t)}}}),Gn(Marker);var pi,mi,gi=[].sort,wi=[1,2,3];function bi(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}j(j.P+j.F*(w(function(){wi.sort(void 0)})||!w(function(){wi.sort(null)})||!((pi=gi)&&w(function(){mi?pi.call(null,function(){},1):pi.call(null)}))),"Array",{sort:function(t){return void 0===t?gi.call(K(this)):gi.call(K(this),d(t))}});var _i={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(e,n,r,i){return function(t){return t<0?0<e?n/e*t:0<r?i/r*t:0:1<t?r<1?(1-i)/(1-r)*t+(i-r)/(1-r):e<1?(1-n)/(1-e)*t+(n-e)/(1-e):1:3*t*Math.pow(1-t,2)*n+3*Math.pow(t,2)*(1-t)*i+Math.pow(t,3)}},steps:function(i){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"end";s=s.split("-").reverse()[0];var o=i;return"none"===s?--o:"both"===s&&++o,function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=Math.floor(t*i),r=t*n%1==0;return"start"!==s&&"both"!==s||++n,e&&r&&--n,0<=t&&n<0&&(n=0),t<=1&&o<n&&(n=o),n/o}}},ki=function(){function t(){Ln(this,t)}return _r(t,[{key:"done",value:function(){return!1}}]),t}(),xi=function(t){function n(t){var e;return Ln(this,n),(e=Er(this,Tr(n).call(this))).ease=_i[t||Vr.ease]||t,e}return Nr(n,ki),_r(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),Oi=function(t){function n(t){var e;return Ln(this,n),(e=Er(this,Tr(n).call(this))).stepper=t,e}return Nr(n,ki),_r(n,[{key:"step",value:function(t,e,n,r){return this.stepper(t,e,n,r)}},{key:"done",value:function(t){return t.done}}]),n}();function Si(){var t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}var Ai=function(t){function r(t,e){var n;return Ln(this,r),(n=Er(this,Tr(r).call(this))).duration(t||500).overshoot(e||0),n}return Nr(r,Oi),_r(r,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;100<n&&(n=16),n/=1e3;var i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}}]),r}();Qn(Ai,{duration:bi("_duration",Si),overshoot:bi("_overshoot",Si)});var ji=function(t){function s(t,e,n,r){var i;return Ln(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,r=null==r?1e3:r,(i=Er(this,Tr(s).call(this))).p(t).i(e).d(n).windup(r),i}return Nr(s,Oi),_r(s,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;var i=e-t,s=(r.integral||0)+i*n,o=(i-(r.error||0))/n,u=this.windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}}]),s}();Qn(ji,{windup:bi("windup"),p:bi("P"),i:bi("I"),d:bi("D")});var Mi=Yr("PathArray",Ur);function Ei(t,e,n,r){return n+r.replace(fr," .")}for(var Ti={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ci="mlhvqtcsaz".split(""),Pi=0,Ni=Ci.length;Pi<Ni;++Pi)Ti[Ci[Pi]]=function(s){return function(t,e,n){if("H"===s)t[0]=t[0]+e.x;else if("V"===s)t[0]=t[0]+e.y;else if("A"===s)t[5]=t[5]+e.x,t[6]=t[6]+e.y;else for(var r=0,i=t.length;r<i;++r)t[r]=t[r]+(r%2?e.y:e.x);return Ti[s](t,e,n)}}(Ci[Pi].toUpperCase());Qn(Mi,{toString:function(){return function(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e][0],null!=t[e][1]&&(r+=t[e][1],null!=t[e][2]&&(r+=" ",r+=t[e][2],null!=t[e][3]&&(r+=" ",r+=t[e][3],r+=" ",r+=t[e][4],null!=t[e][5]&&(r+=" ",r+=t[e][5],r+=" ",r+=t[e][6],null!=t[e][7]&&(r+=" ",r+=t[e][7])))));return r+" "}(this)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r,i=this.length-1;0<=i;i--)"M"===(r=this[i][0])||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this},size:function(t,e){var n,r,i=this.bbox();for(n=this.length-1;0<=n;n--)"M"===(r=this[n][0])||"L"===r||"T"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y):"H"===r?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===r?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===r||"S"===r||"Q"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y,this[n][3]=(this[n][3]-i.x)*t/i.width+i.x,this[n][4]=(this[n][4]-i.y)*e/i.height+i.y,"C"===r&&(this[n][5]=(this[n][5]-i.x)*t/i.width+i.x,this[n][6]=(this[n][6]-i.y)*e/i.height+i.y)):"A"===r&&(this[n][1]=this[n][1]*t/i.width,this[n][2]=this[n][2]*e/i.height,this[n][6]=(this[n][6]-i.x)*t/i.width+i.x,this[n][7]=(this[n][7]-i.y)*e/i.height+i.y);return this},equalCommands:function(t){var e,n,r;for(t=new Mi(t),r=this.length===t.length,e=0,n=this.length;r&&e<n;e++)r=this[e][0]===t[e][0];return r},morph:function(t){return t=new Mi(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,n,r,i,s=this,o=this.destination.value,u=[],a=new Mi;for(e=0,n=s.length;e<n;e++){for(u[e]=[s[e][0]],r=1,i=s[e].length;r<i;r++)u[e][r]=s[e][r]+(o[e][r]-s[e][r])*t;"A"===u[e][0]&&(u[e][4]=+(0!==u[e][4]),u[e][5]=+(0!==u[e][5]))}return a.value=u,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof Mi)return e;var n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(cr,Ei).replace(hr," $& ").replace(ar,"$1 -").trim().split(ur):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var r=[],i=new Lr,s=new Lr,o=0,u=e.length;lr.test(e[o])?(t=e[o],++o):"M"===t?t="L":"m"===t&&(t="l"),r.push(Ti[t].call(null,e.slice(o,o+=n[t.toUpperCase()]).map(parseFloat),i,s)),o<u;);return r},bbox:function(){return Dr().path.setAttribute("d",this.toString()),Dr.nodes.path.getBBox()}});var Li=function(){function e(t){Ln(this,e),this._stepper=t||new xi("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return _r(e,[{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){if(!this._type){var e=Wt(t);"number"===e?this.type(Jr):"string"===e?jr.isColor(t)?this.type(jr):ur.test(t)?this.type(hr.test(t)?Mi:Ur):Jn.test(t)?this.type(Jr):this.type(Di):-1<zi.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(Ur):"object"===e?this.type(Ri):this.type(Di)}var n=new this._type(t).toArray();return this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object),n}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}},{key:"at",value:function(n){var r=this;return this._morphObj.fromArray(this._from.map(function(t,e){return r._stepper.step(t,r._to[e],n,r._context[e],r._context)}))}}]),e}(),Di=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"valueOf",value:function(){return this.value}},{key:"toArray",value:function(){return[this.value]}}]),t}(),Fi=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return _r(e,[{key:"init",value:function(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),e}();Fi.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var Ri=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return _r(t,[{key:"init",value:function(t){if(this.values=[],!Array.isArray(t)){t=t||{};var e=[];for(var n in t)e.push([n,t[n]]);return e.sort(function(t,e){return t[0]-e[0]}),this.values=e.reduce(function(t,e){return t.concat(e)},[]),this}this.values=t}},{key:"valueOf",value:function(){for(var t={},e=this.values,n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}},{key:"toArray",value:function(){return this.values}}]),t}(),zi=[Di,Fi,Ri];function Ii(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];zi.push.apply(zi,be([].concat(t)))}function qi(){Qn(zi,{to:function(t){return(new Li).type(this.constructor).from(this.valueOf()).to(t)},fromArray:function(t){return this.init(t),this}})}var Path=function(t){function Path(t){return Ln(this,Path),Er(this,Tr(Path).call(this,qn("path",t),t))}return Nr(Path,Shape),_r(Path,[{key:"array",value:function(){return this._array||(this._array=new Mi(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Mi(t))}},{key:"clear",value:function(){return delete this._array,this}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"targets",value:function(){return Gr('svg textpath [href*="'+this.id()+'"]')}}]),Path}();Path.prototype.MorphArray=Mi,cn({Container:{path:Un(function(t){return this.put(new Path).plot(t||new Mi)})}}),Gn(Path);var Yi=Object.freeze({array:function(){return this._array||(this._array=new vi(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new vi(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var n=Sn(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}}),Polygon=function(t){function Polygon(t){return Ln(this,Polygon),Er(this,Tr(Polygon).call(this,qn("polygon",t),t))}return Nr(Polygon,Shape),Polygon}();cn({Container:{polygon:Un(function(t){return this.put(new Polygon).plot(t||new vi)})}}),Qn(Polygon,yi),Qn(Polygon,Yi),Gn(Polygon);var Polyline=function(t){function Polyline(t){return Ln(this,Polyline),Er(this,Tr(Polyline).call(this,qn("polyline",t),t))}return Nr(Polyline,Shape),Polyline}();cn({Container:{polyline:Un(function(t){return this.put(new Polyline).plot(t||new vi)})}}),Qn(Polyline,yi),Qn(Polyline,Yi),Gn(Polyline);var Rect=function(t){function Rect(t){return Ln(this,Rect),Er(this,Tr(Rect).call(this,qn("rect",t),t))}return Nr(Rect,Shape),Rect}();Qn(Rect,{rx:ti,ry:ei}),cn({Container:{rect:Un(function(t,e){return this.put(new Rect).size(t,e)})}}),Gn(Rect);var Xi=function(){function t(){Ln(this,t),this._first=null,this._last=null}return _r(t,[{key:"push",value:function(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}},{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}]),t}(),Gi={nextDraw:null,frames:new Xi,timeouts:new Xi,timer:function(){return Nn.window.performance||Nn.window.Date},transforms:[],frame:function(t){var e=Gi.frames.push({run:t});return null===Gi.nextDraw&&(Gi.nextDraw=Nn.window.requestAnimationFrame(Gi._draw)),e},transform_frame:function(t,e){Gi.transforms[e]=t},timeout:function(t,e){e=e||0;var n=Gi.timer().now()+e,r=Gi.timeouts.push({run:t,time:n});return null===Gi.nextDraw&&(Gi.nextDraw=Nn.window.requestAnimationFrame(Gi._draw)),r},cancelFrame:function(t){null!=t&&Gi.frames.remove(t)},clearTimeout:function(t){null!=t&&Gi.timeouts.remove(t)},_draw:function(t){for(var e=null,n=Gi.timeouts.last();(e=Gi.timeouts.shift())&&(t>=e.time?e.run():Gi.timeouts.push(e),e!==n););for(var r=null,i=Gi.frames.last();r!==i&&(r=Gi.frames.shift());)r.run();Gi.transforms.forEach(function(t){t()}),Gi.nextDraw=Gi.timeouts.first()||Gi.frames.first()?Nn.window.requestAnimationFrame(Gi._draw):null}},Hi=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Bi=function(){var t=Nn.window;return(t.performance||t.Date).now()},Vi=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Bi;return Ln(this,n),(t=Er(this,Tr(n).call(this)))._timeSource=e,t._startTime=0,t._speed=1,t._persist=0,t._nextFrame=null,t._paused=!0,t._runners=[],t._order=[],t._time=0,t._lastSourceTime=0,t._lastStepTime=0,t._step=t._step.bind(Mr(Mr(t))),t}return Nr(n,Hr),_r(n,[{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(Hi).sort(function(t,e){return t.runner.id-e.runner.id});var r=0,i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else{if("relative"!==n)throw new Error('Invalid value for the "when" parameter');var s=this._runners[t.id];s&&(r=s.start+e,e=0)}return t.unschedule(),t.timeline(this),this._runners[t.id]={persist:this.persist(),runner:t,start:r+e},this._order.push(t.id),this.updateTime()._continue(),this}},{key:"unschedule",value:function(t){var e=this._order.indexOf(t.id);return e<0||(delete this._runners[t.id],this._order.splice(e,1),t.timeline(null)),this}},{key:"getEndTime",value:function(){var t=this._runners[this._order[this._order.length-1]],e=t?t.runner.duration():0;return(t?t.start:0)+e}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"finish",value:function(){return this.time(this.getEndTime()+1),this.pause()}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var n=Math.abs(e);return this.speed(t?n:-n)}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"_step",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),n=e-this._lastSourceTime;t&&(n=0);var r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var i=!1,s=0,o=this._order.length;s<o;s++){var u=this._runners[this._order[s]],a=u.runner,h=r,l=this._time-u.start;if(l<=0)i=!0,a.reset();else if(l<h&&(h=l),a.active())if(a.step(h).done){if(!0!==u.persist){a.duration()-a.time()+this._time+this._persist<this._time&&(delete this._runners[this._order[s]],this._order.splice(s--,1)&&--o,a.timeline(null))}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._order.length&&this._speed<0&&0<this._time?this._continue():(this.fire("finished"),this.pause()),this}},{key:"_continue",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return Gi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._step(!0):(this._paused||(this._nextFrame=Gi.frame(this._step)),this)}},{key:"active",value:function(){return!!this._nextFrame}}]),n}();cn({Element:{timeline:function(){return this._timeline=this._timeline||new Vi,this._timeline}}});var Wi=function(t){function s(t){var e;return Ln(this,s),(e=Er(this,Tr(s).call(this))).id=s.id++,t="function"==typeof(t=null==t?Vr.duration:t)?new Oi(t):t,e._element=null,e._timeline=null,e.done=!1,e._queue=[],e._duration="number"==typeof t&&t,e._isDeclarative=t instanceof Oi,e._stepper=e._isDeclarative?t:new xi,e._history={},e.enabled=!0,e._time=0,e._lastTime=0,e._reseted=!0,e.transforms=new qr,e.transformId=1,e._haveReversed=!1,e._reverse=!1,e._loopsDone=0,e._swing=!1,e._wait=0,e._times=1,e}return Nr(s,Hr),_r(s,[{key:"element",value:function(t){return null==t?this._element:((this._element=t)._prepareRunner(),this)}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"animate",value:function(t,e,n){var r=s.sanitise(t,e,n),i=new s(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(e,n)}},{key:"schedule",value:function(t,e,n){if(t instanceof Vi||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"loop",value:function(t,e,n){return"object"===Wt(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,this}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"queue",value:function(t,e,n,r){return this._queue.push({initialiser:t||Br,runner:e||Br,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"after",value:function(t){return this.on("finish",t)}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var n=Math.floor(this._time/e),r=(this._time-n*e)/this._duration;return Math.min(n+r,this._times)}var i=t%1,s=e*Math.floor(t)+this._duration*i;return this.time(s)}},{key:"position",value:function(t){var e,n=this._time,i=this._duration,s=this._wait,r=this._times,o=this._swing,u=this._reverse;if(null==t){var a=function(t){var e=o*Math.floor(t%(2*(s+i))/(s+i)),n=e&&!u||!e&&u,r=Math.pow(-1,n)*(t%(s+i))/i+n;return Math.max(Math.min(r,1),0)},h=r*(s+i)-s;return e=n<=0?Math.round(a(1e-5)):n<h?a(n):Math.round(a(h-1e-5)),e}var l=Math.floor(this.loops()),c=o&&l%2==0;return e=l+(c&&!u||u&&c?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),n=this._lastPosition!==e&&0<=this._time;this._lastPosition=e;var r=this.duration(),i=this._lastTime<=0&&0<this._time,s=this._lastTime<this._time&&this.time>r;this._lastTime=this._time,i&&this.fire("start",this);var o=this._isDeclarative;if(this.done=!o&&!s&&this._time>=r,this._reseted=!1,n||o){this._initialise(n),this.transforms=new qr;var u=this._run(o?t:e);this.fire("step",this)}return this.done=this.done||u&&o,this.done&&this.fire("finish",this),this}},{key:"reset",value:function(){return this._reseted||(this.loops(0),this._reseted=!0),this}},{key:"finish",value:function(){return this.step(1/0)}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"ease",value:function(t){return this._stepper=new xi(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]}}},{key:"_tryRetarget",value:function(t,e){if(this._history[t]){if(!this._history[t].caller.initialised){var n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget(e):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var r=this.timeline();return r&&r._continue(),!0}return!1}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,n=this._queue.length;e<n;++e){var r=this._queue[e],i=this._isDeclarative||!r.initialised&&t;t=!r.finished,i&&t&&(r.initialiser.call(this),r.initialised=!0)}}},{key:"_run",value:function(t){for(var e=!0,n=0,r=this._queue.length;n<r;++n){var i=this._queue[n],s=i.runner.call(this,t);i.finished=i.finished||!0===s,e=e&&i.finished}return e}},{key:"addTransform",value:function(t,e){return this.transforms.lmultiplyO(t),this}},{key:"clearTransform",value:function(){return this.transforms=new qr,this}},{key:"clearTransformsFromQueue",value:function(){this.done||(this._queue=this._queue.filter(function(t){return!t.isTransform}))}}],[{key:"sanitise",value:function(t,e,n){var r=1,i=!1,s=0;return e=e||Vr.delay,n=n||"last","object"!==Wt(t=t||Vr.duration)||t instanceof ki||(e=t.delay||e,n=t.when||n,i=t.swing||i,r=t.times||r,s=t.wait||s,t=t.duration||Vr.duration),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}}]),s}();Wi.id=0;var Qi=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new qr,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];Ln(this,r),this.transforms=t,this.id=e,this.done=n}return _r(r,[{key:"clearTransformsFromQueue",value:function(){}}]),r}();Qn([Wi,Qi],{mergeWith:function(t){return new Qi(t.transforms.lmultiply(this.transforms),t.id)}});var Ui=function(t,e){return t.lmultiplyO(e)},Ji=function(t){return t.transforms};var $i=function(){function t(){Ln(this,t),this.runners=[],this.ids=[]}return _r(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var n=t.id+1,e=this.ids.reduce(function(t,e){return t<e&&e<n?e:t},0),r=this.ids.indexOf(e)+1;return this.ids.splice(r,0,n),this.runners.splice(r,0,t),this}}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}},{key:"merge",value:function(){var n=this,r=null;return this.runners.forEach(function(t,e){r&&t.done&&r.done&&(n.remove(t.id),n.edit(r.id,t.mergeWith(r))),r=t}),this}},{key:"edit",value:function(t,e){var n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t),this.runners.splice(n,1,e),this}},{key:"length",value:function(){return this.ids.length}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Qi).forEach(function(t){return t.clearTransformsFromQueue()}),this}}]),t}(),Ki=0;cn({Element:{animate:function(t,e,n){var r=Wi.sanitise(t,e,n),i=this.timeline();return new Wi(r.duration).loop(r).element(this).timeline(i.play()).schedule(e,n)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(e){return this._transformationRunners.runners.filter(function(t){return t.id<=e.id}).map(Ji).reduce(Ui,new qr)},addRunner:function(t){this._transformationRunners.add(t),Gi.transform_frame(function(){var t=this._transformationRunners.runners.map(Ji).reduce(Ui,new qr);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this),this._frameId)},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new $i).add(new Qi(new qr(this))),this._frameId=Ki++)}}}),Qn(Wi,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(e,n,t){if("object"===Wt(n))for(var r in t)this.styleAttr(e,r,t[r]);var i=new Li(this._stepper).to(t);return this.queue(function(){i=i.from(this.element()[e](n))},function(t){return this.element()[e](n,i.at(t)),i.done()}),this},zoom:function(t,e){var n=new Li(this._stepper).to(new Jr(t));return this.queue(function(){n=n.from(this.zoom())},function(t){return this.element().zoom(n.at(t),e),n.done()}),this},transform:function(v,d,y){if(d=v.relative||d,this._isDeclarative&&!d&&this._tryRetarget("transform",v))return this;var p=qr.isMatrixLike(v);y=null!=v.affine?v.affine:null!=y?y:!p;var m,g,w,b,_,k=new Li(this._stepper).type(y?Fi:qr);return this.queue(function(){g=g||this.element(),m=m||An(v,g),_=new qr(d?void 0:g),g.addRunner(this),d||g._clearTransformRunnersBefore(this)},function(t){d||this.clearTransform();var e=new Lr(m).transform(g._currentTransform(this)),n=e.x,r=e.y,i=new qr(Zr({},v,{origin:[n,r]})),s=this._isDeclarative&&w?w:_;if(y){i=i.decompose(n,r),s=s.decompose(n,r);var o=i.rotate,u=s.rotate,a=[o-360,o,o+360],h=a.map(function(t){return Math.abs(t-u)}),l=Math.min.apply(Math,be(h)),c=h.indexOf(l);i.rotate=a[c]}d&&(p||(i.rotate=v.rotate||0),this._isDeclarative&&b&&(s.rotate=b)),k.from(s),k.to(i);var f=k.at(t);return b=f.rotate,w=new qr(f),this.addTransform(w),k.done()},function(t){(t.origin||"center").toString()!==(v.origin||"center").toString()&&(m=An(v,g)),v=Zr({},t,{origin:m})},!0),this._isDeclarative&&this._rememberMorpher("transform",k),this},x:function(t,e){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},dx:function(t){return this._queueNumberDelta("x",t)},dy:function(t){return this._queueNumberDelta("y",t)},_queueNumberDelta:function(e,t){if(t=new Jr(t),this._tryRetarget(e,t))return this;var n=new Li(this._stepper).to(t),r=null;return this.queue(function(){r=this.element()[e](),n.from(r),n.to(r+t)},function(t){return this.element()[e](n.at(t)),n.done()},function(t){n.to(r+new Jr(t))}),this._rememberMorpher(e,n),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new Li(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber:function(t,e){return this._queueObject(t,new Jr(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);var i=this._element.MorphArray().to(t);return this.queue(function(){i.from(this._element.array())},function(t){this._element.plot(i.at(t))}),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,r){return this._queueObject("viewbox",new Rr(t,e,n,r))},update:function(t){return"object"!==Wt(t)?this.update({offset:t,color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Qn(Wi,{rx:ti,ry:ei,from:hi,to:li});var Zi=function(t){function Svg(t){var e;return Ln(this,Svg),(e=Er(this,Tr(Svg).call(this,qn("svg",t),t))).namespace(),e}return Nr(Svg,Container),_r(Svg,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof Nn.window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"root",value:function(){return this.isRoot()?this:Cr(Tr(Svg.prototype),"root",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:Mn,version:"1.1"}).attr("xmlns:xlink",Tn,En).attr("xmlns:svgjs",Cn,En):this.root().namespace()}},{key:"defs",value:function(){return this.isRoot()?Yn(this.node.getElementsByTagName("defs")[0])||this.put(new Defs):this.root().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:Yn(this.node.parentNode):Cr(Tr(Svg.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}}]),Svg}();cn({Container:{nested:Un(function(){return this.put(new Zi)})}}),Gn(Zi,"Svg",!0);var ts=function(t){function e(t){return Ln(this,e),Er(this,Tr(e).call(this,qn("symbol",t),t))}return Nr(e,Container),e}();cn({Container:{symbol:Un(function(){return this.put(new ts)})}}),Gn(ts);var es=Object.freeze({plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Nn.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}}),Text=function(t){function Text(t){var e;return Ln(this,Text),(e=Er(this,Tr(Text).call(this,qn("text",t),t))).dom.leading=new Jr(1.3),e._rebuild=!0,e._build=!1,e.attr("font-family",Wr["font-family"]),e}return Nr(Text,Shape),_r(Text,[{key:"x",value:function(t){return null==t?this.attr("x"):this.attr("x",t)}},{key:"y",value:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)}},{key:"cx",value:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)}},{key:"cy",value:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,n=0;t="";for(var r=0,i=e.length;r<i;++r)"textPath"!==e[r].nodeName?(r!==n&&3!==e[r].nodeType&&!0===Yn(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent):0===r&&(n=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var s=0,o=(t=t.split("\n")).length;s<o;s++)this.tspan(t[s]).newLine();return this.build(!1).rebuild()}},{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new Jr(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var n=this,r=0,i=this.dom.leading;this.each(function(){var t=Nn.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=i*new Jr(t);this.dom.newLined&&(this.attr("x",n.attr("x")),"\n"===this.text()?r+=e:(this.attr("dy",e+r),r=0))}),this.fire("rebuild")}return this}},{key:"build",value:function(t){return this._build=!!t,this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new Jr(t.leading||1.3),this}}]),Text}();Qn(Text,es),cn({Container:{text:Un(function(t){return this.put(new Text).text(t)}),plain:Un(function(t){return this.put(new Text).plain(t)})}}),Gn(Text);var Tspan=function(t){function Tspan(t){return Ln(this,Tspan),Er(this,Tr(Tspan).call(this,qn("tspan",t),t))}return Nr(Tspan,Text),_r(Tspan,[{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)}},{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){var t=this.parent(Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}]),Tspan}();Qn(Tspan,es),cn({Tspan:{tspan:Un(function(t){var e=new Tspan;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)})}}),Gn(Tspan);var ClipPath=function(t){function ClipPath(t){return Ln(this,ClipPath),Er(this,Tr(ClipPath).call(this,qn("clipPath",t),t))}return Nr(ClipPath,Container),_r(ClipPath,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),Cr(Tr(ClipPath.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Gr('svg [clip-path*="'+this.id()+'"]')}}]),ClipPath}();cn({Container:{clip:Un(function(){return this.defs().put(new ClipPath)})},Element:{clipWith:function(t){var e=t instanceof ClipPath?t:this.parent().clip().add(t);return this.attr("clip-path",'url("#'+e.id()+'")')},unclip:function(){return this.attr("clip-path",null)},clipper:function(){return this.reference("clip-path")}}}),Gn(ClipPath);var G=function(t){function G(t){return Ln(this,G),Er(this,Tr(G).call(this,qn("g",t),t))}return Nr(G,Container),G}();cn({Element:{group:Un(function(){return this.put(new G)})}}),Gn(G);var A=function(t){function A(t){return Ln(this,A),Er(this,Tr(A).call(this,qn("a",t),t))}return Nr(A,Container),_r(A,[{key:"to",value:function(t){return this.attr("href",t,Tn)}},{key:"target",value:function(t){return this.attr("target",t)}}]),A}();cn({Container:{link:Un(function(t){return this.put(new A).to(t)})},Element:{linkTo:function(t){var e=new A;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),Gn(A);var Mask=function(t){function Mask(t){return Ln(this,Mask),Er(this,Tr(Mask).call(this,qn("mask",t),t))}return Nr(Mask,Container),_r(Mask,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),Cr(Tr(Mask.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Gr('svg [mask*="'+this.id()+'"]')}}]),Mask}();cn({Container:{mask:Un(function(){return this.defs().put(new Mask)})},Element:{maskWith:function(t){var e=t instanceof Mask?t:this.parent().mask().add(t);return this.attr("mask",'url("#'+e.id()+'")')},unmask:function(){return this.attr("mask",null)},masker:function(){return this.reference("mask")}}}),Gn(Mask);var Style=function(t){function Style(t){return Ln(this,Style),Er(this,Tr(Style).call(this,qn("style",t),t))}return Nr(Style,Element),_r(Style,[{key:"addText",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",Zr({fontFamily:t,src:e},n))}},{key:"rule",value:function(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;var n=t+"{";for(var r in e)n+=xn(r)+":"+e[r]+";";return n+="}"}(t,e))}}]),Style}();cn("Dom",{style:Un(function(t,e){return this.put(new Style).rule(t,e)}),fontface:Un(function(t,e,n){return this.put(new Style).font(t,e,n)})}),Gn(Style);var ns,rs,is,ss,os,us,as,hs,ls,cs=et("species"),fs=(is=1==(ns=5),ss=2==ns,os=3==ns,us=4==ns,as=6==ns,hs=5==ns||as,ls=rs||function(t,e){return Oe(n=t)&&("function"!=typeof(r=n.constructor)||r!==Array&&!Oe(r.prototype)||(r=void 0),g(r)&&null===(r=r[cs])&&(r=void 0)),new(void 0===r?Array:r)(e);var n,r},function(t,e,n){for(var r,i,s=K(t),o=T(s),u=b(e,n,3),a=R(o.length),h=0,l=is?ls(t,a):ss?ls(t,0):void 0;h<a;h++)if((hs||h in o)&&(i=u(r=o[h],h,s),ns))if(is)l[h]=i;else if(i)switch(ns){case 3:return!0;case 5:return r;case 6:return h;case 2:l.push(r)}else if(us)return!1;return as?-1:os||us?us:l}),vs="find",ds=!0;vs in[]&&Array(1)[vs](function(){ds=!1}),j(j.P+j.F*ds,"Array",{find:function(t){return fs(this,t,1<arguments.length?arguments[1]:void 0)}}),it(vs);var TextPath=function(t){function TextPath(t){return Ln(this,TextPath),Er(this,Tr(TextPath).call(this,qn("textPath",t),t))}return Nr(TextPath,Text),_r(TextPath,[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),n=null;return e&&(n=e.plot(t)),null==t?n:this}},{key:"track",value:function(){return this.reference("href")}}]),TextPath}();cn({Container:{textPath:Un(function(t,e){return this.defs().path(e).text(t).addTo(this)})},Text:{path:Un(function(t){var e=new TextPath;return t instanceof Path||(t=this.root().defs().path(t)),e.attr("href","#"+t,Tn),this.put(e)}),textPath:function(){return this.find("textPath")[0]}},Path:{text:Un(function(t){if(t instanceof Text){var e=t.text();return t.clear().path(this).text(e)}return this.parent().put(new Text).path(this).text(t)}),targets:function(){return Gr('svg [href*="'+this.id()+'"]')}}}),TextPath.prototype.MorphArray=Mi,Gn(TextPath);var Use=function(t){function Use(t){return Ln(this,Use),Er(this,Tr(Use).call(this,qn("use",t),t))}return Nr(Use,Shape),_r(Use,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,Tn)}}]),Use}();cn({Container:{use:Un(function(t,e){return this.put(new Use).element(t,e)})}}),Gn(Use);var ys=In;Qn([Zi,ts,Image,Pattern,Marker],fn("viewbox")),Qn([Line,Polyline,Polygon,Path],fn("marker")),Qn(Text,fn("Text")),Qn(Path,fn("Path")),Qn(Defs,fn("Defs")),Qn([Text,Tspan],fn("Tspan")),Qn([Rect,Ellipse,Circle,Gradient],fn("radius")),Qn(Hr,fn("EventTarget")),Qn(Dom,fn("Dom")),Qn(Element,fn("Element")),Qn(Shape,fn("Shape")),Qn(Container,fn("Container")),Qn(Wi,fn("Runner")),Xr.extend(be(new Set(ln))),Ii([Jr,jr,Rr,qr,Ur,vi,Mi]),qi();var ps=Object.freeze({Morphable:Li,registerMorphableType:Ii,makeMorphable:qi,TransformBag:Fi,ObjectBag:Ri,NonMorphable:Di,defaults:Qr,utils:jn,namespaces:Pn,regex:vr,SVG:ys,parser:Dr,find:Gr,registerWindow:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;Nn.window=t,Nn.document=e},Animator:Gi,Controller:Oi,Ease:xi,PID:ji,Spring:Ai,easing:_i,Queue:Xi,Runner:Wi,Timeline:Vi,Array:Ur,Box:Rr,Color:jr,EventTarget:Hr,Matrix:qr,Number:Jr,PathArray:Mi,Point:Lr,PointArray:vi,List:Xr,Circle:Circle,ClipPath:ClipPath,Container:Container,Defs:Defs,Dom:Dom,Element:Element,Ellipse:Ellipse,Gradient:Gradient,G:G,A:A,Image:Image,Line:Line,Marker:Marker,Mask:Mask,Path:Path,Pattern:Pattern,Polygon:Polygon,Polyline:Polyline,Rect:Rect,Shape:Shape,Stop:Stop,Style:Style,Svg:Zi,Symbol:ts,Text:Text,TextPath:TextPath,Tspan:Tspan,Use:Use,on:mr,off:gr,dispatch:wr,root:Rn,makeNode:zn,makeInstance:In,nodeOrNew:qn,adopt:Yn,mockAdopt:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Yn;Xn=t},register:Gn,getClass:Hn,eid:Vn,assignNewId:Wn,extend:Qn,wrapWithAttrCheck:Un});function ms(t){return In(t)}return Object.assign(ms,ps),ms}();
+var SVG=function(){"use strict";function t(t,e){return t(e={exports:{}},e.exports),e.exports}var m=t(function(t){var e=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=e)}),d=t(function(t){var e=t.exports={version:"2.5.7"};"number"==typeof __e&&(__e=e)}),g=(d.version,function(t){return"object"==typeof t?null!==t:"function"==typeof t}),p=function(t){if(!g(t))throw TypeError(t+" is not an object!");return t},w=function(t){try{return!!t()}catch(t){return!0}},o=!w(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}),e=m.document,n=g(e)&&g(e.createElement),r=function(t){return n?e.createElement(t):{}},i=!o&&!w(function(){return 7!=Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}),s=function(t,e){if(!g(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!g(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!g(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")},u=Object.defineProperty,a={f:o?Object.defineProperty:function(t,e,n){if(p(t),e=s(e,!0),p(n),i)try{return u(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},k=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}},x=o?function(t,e,n){return a.f(t,e,k(1,n))}:function(t,e,n){return t[e]=n,t},h={}.hasOwnProperty,l=function(t,e){return h.call(t,e)},c=0,f=Math.random(),v=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++c+f).toString(36))},O=t(function(t){var s=v("src"),e="toString",n=Function[e],o=(""+n).split(e);d.inspectSource=function(t){return n.call(t)},(t.exports=function(t,e,n,r){var i="function"==typeof n;i&&(l(n,"name")||x(n,"name",e)),t[e]!==n&&(i&&(l(n,s)||x(n,s,t[e]?""+t[e]:o.join(String(e)))),t===m?t[e]=n:r?t[e]?t[e]=n:x(t,e,n):(delete t[e],x(t,e,n)))})(Function.prototype,e,function(){return"function"==typeof this&&this[s]||n.call(this)})}),y=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t},_=function(r,i,t){if(y(r),void 0===i)return r;switch(t){case 1:return function(t){return r.call(i,t)};case 2:return function(t,e){return r.call(i,t,e)};case 3:return function(t,e,n){return r.call(i,t,e,n)}}return function(){return r.apply(i,arguments)}},b="prototype",S=function(t,e,n){var r,i,s,o,u=t&S.F,a=t&S.G,h=t&S.S,l=t&S.P,c=t&S.B,f=a?m:h?m[e]||(m[e]={}):(m[e]||{})[b],v=a?d:d[e]||(d[e]={}),y=v[b]||(v[b]={});for(r in a&&(n=e),n)s=((i=!u&&f&&void 0!==f[r])?f:n)[r],o=c&&i?_(s,m):l&&"function"==typeof s?_(Function.call,s):s,f&&O(f,r,s,t&S.U),v[r]!=s&&x(v,r,o),l&&y[r]!=s&&(y[r]=s)};m.core=d,S.F=1,S.G=2,S.S=4,S.P=8,S.B=16,S.W=32,S.U=64,S.R=128;var M=S,j={}.toString,E=function(t){return j.call(t).slice(8,-1)},T=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==E(t)?t.split(""):Object(t)},C=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t},P=function(t){return T(C(t))},N=Math.ceil,L=Math.floor,D=function(t){return isNaN(t=+t)?0:(0<t?L:N)(t)},F=Math.min,R=function(t){return 0<t?F(D(t),9007199254740991):0},z=Math.max,q=Math.min,I=function(h){return function(t,e,n){var r,i,s,o=P(t),u=R(o.length),a=(i=u,(r=D(r=n))<0?z(r+i,0):q(r,i));if(h&&e!=e){for(;a<u;)if((s=o[a++])!=s)return!0}else for(;a<u;a++)if((h||a in o)&&o[a]===e)return h||a||0;return!h&&-1}},Y=t(function(t){var e="__core-js_shared__",n=m[e]||(m[e]={});(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:d.version,mode:"global",copyright:"© 2018 Denis Pushkarev (zloirock.ru)"})}),X=Y("keys"),H=function(t){return X[t]||(X[t]=v(t))},B=I(!1),V=H("IE_PROTO"),W=function(t,e){var n,r=P(t),i=0,s=[];for(n in r)n!=V&&l(r,n)&&s.push(n);for(;e.length>i;)l(r,n=e[i++])&&(~B(s,n)||s.push(n));return s},U="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),Q=Object.keys||function(t){return W(t,U)},J={f:Object.getOwnPropertySymbols},$={f:{}.propertyIsEnumerable},K=function(t){return Object(C(t))},Z=Object.assign,tt=!Z||w(function(){var A={},e={},t=Symbol(),n="abcdefghijklmnopqrst";return A[t]=7,n.split("").forEach(function(t){e[t]=t}),7!=Z({},A)[t]||Object.keys(Z({},e)).join("")!=n})?function(t,e){for(var n=K(t),r=arguments.length,i=1,s=J.f,o=$.f;i<r;)for(var u,a=T(arguments[i++]),h=s?Q(a).concat(s(a)):Q(a),l=h.length,c=0;c<l;)o.call(a,u=h[c++])&&(n[u]=a[u]);return n}:Z;M(M.S+M.F,"Object",{assign:tt});var et=t(function(t){var e=Y("wks"),Symbol=m.Symbol,n="function"==typeof Symbol;(t.exports=function(t){return e[t]||(e[t]=n&&Symbol[t]||(n?Symbol:v)("Symbol."+t))}).store=e}),nt=et("unscopables"),rt=Array.prototype;null==rt[nt]&&x(rt,nt,{});var it=function(t){rt[nt][t]=!0},st=function(t,e){return{value:e,done:!!t}},ot={},ut=o?Object.defineProperties:function(t,e){p(t);for(var n,r=Q(e),i=r.length,s=0;s<i;)a.f(t,n=r[s++],e[n]);return t},at=m.document,ht=at&&at.documentElement,lt=H("IE_PROTO"),ct=function(){},ft="prototype",vt=function(){var t,e=r("iframe"),n=U.length;for(e.style.display="none",ht.appendChild(e),e.src="javascript:",(t=e.contentWindow.document).open(),t.write("<script>document.F=Object<\/script>"),t.close(),vt=t.F;n--;)delete vt[ft][U[n]];return vt()},yt=Object.create||function(t,e){var n;return null!==t?(ct[ft]=p(t),n=new ct,ct[ft]=null,n[lt]=t):n=vt(),void 0===e?n:ut(n,e)},dt=a.f,pt=et("toStringTag"),mt=function(t,e,n){t&&!l(t=n?t:t.prototype,pt)&&dt(t,pt,{configurable:!0,value:e})},gt={};x(gt,et("iterator"),function(){return this});var wt=H("IE_PROTO"),_t=Object.prototype,bt=Object.getPrototypeOf||function(t){return t=K(t),l(t,wt)?t[wt]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?_t:null},kt=et("iterator"),xt=!([].keys&&"next"in[].keys()),Ot="values",St=function(){return this},Mt=function(t,e,n,r,i,s,o){var u,a,h;a=e,h=r,(u=n).prototype=yt(gt,{next:k(1,h)}),mt(u,a+" Iterator");var l,c,f,v=function(t){if(!xt&&t in m)return m[t];switch(t){case"keys":case Ot:return function(){return new n(this,t)}}return function(){return new n(this,t)}},y=e+" Iterator",d=i==Ot,p=!1,m=t.prototype,g=m[kt]||m["@@iterator"]||i&&m[i],w=g||v(i),_=i?d?v("entries"):w:void 0,b="Array"==e&&m.entries||g;if(b&&(f=bt(b.call(new t)))!==Object.prototype&&f.next&&(mt(f,y,!0),"function"!=typeof f[kt]&&x(f,kt,St)),d&&g&&g.name!==Ot&&(p=!0,w=function(){return g.call(this)}),(xt||p||!m[kt])&&x(m,kt,w),ot[e]=w,ot[y]=St,i)if(l={values:d?w:v(Ot),keys:s?w:v("keys"),entries:_},o)for(c in l)c in m||O(m,c,l[c]);else M(M.P+M.F*(xt||p),e,l);return l},At=Mt(Array,"Array",function(t,e){this._t=P(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,st(1)):st(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])},"values");ot.Arguments=ot.Array,it("keys"),it("values"),it("entries");for(var jt=et("iterator"),Et=et("toStringTag"),Tt=ot.Array,Ct={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},Pt=Q(Ct),Nt=0;Nt<Pt.length;Nt++){var Lt,Dt=Pt[Nt],Ft=Ct[Dt],Rt=m[Dt],zt=Rt&&Rt.prototype;if(zt&&(zt[jt]||x(zt,jt,Tt),zt[Et]||x(zt,Et,Dt),ot[Dt]=Tt,Ft))for(Lt in At)zt[Lt]||O(zt,Lt,At[Lt],!0)}var qt,It,Yt,Xt;qt="keys",It=function(){return function(t){return Q(K(t))}},Yt=(d.Object||{})[qt]||Object[qt],(Xt={})[qt]=It(Yt),M(M.S+M.F*w(function(){Yt(1)}),"Object",Xt);var Gt=a.f,Ht=Function.prototype,Bt=/^\s*function ([^ (]*)/;function Vt(t){return(Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Wt(t){return(Wt="function"==typeof Symbol&&"symbol"===Vt(Symbol.iterator)?function(t){return Vt(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":Vt(t)})(t)}"name"in Ht||o&&Gt(Ht,"name",{configurable:!0,get:function(){try{return(""+this).match(Bt)[1]}catch(t){return""}}});var Ut,Qt=(Ut=!0,function(t,e){var n,r,i=String(C(t)),s=D(e),o=i.length;return s<0||o<=s?Ut?"":void 0:(n=i.charCodeAt(s))<55296||56319<n||s+1===o||(r=i.charCodeAt(s+1))<56320||57343<r?Ut?i.charAt(s):n:Ut?i.slice(s,s+2):r-56320+(n-55296<<10)+65536});Mt(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=Qt(e,n),this._i+=t.length,{value:t,done:!1})});var Jt=function(t,e,n){for(var r in e)O(t,r,e[r],n);return t},$t=function(t,e,n,r){if(!(t instanceof e)||void 0!==r&&r in t)throw TypeError(n+": incorrect invocation!");return t},Kt=function(e,t,n,r){try{return r?t(p(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&p(i.call(e)),t}},Zt=et("iterator"),te=Array.prototype,ee=et("toStringTag"),ne="Arguments"==E(function(){return arguments}()),re=et("iterator"),ie=d.getIteratorMethod=function(t){if(null!=t)return t[re]||t["@@iterator"]||ot[(e=t,void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(t,e){try{return t[e]}catch(t){}}(n=Object(e),ee))?r:ne?E(n):"Object"==(i=E(n))&&"function"==typeof n.callee?"Arguments":i)];var e,n,r,i},se=t(function(t){var v={},y={},e=t.exports=function(t,e,n,r,i){var s,o,u,a,h,l=i?function(){return t}:ie(t),c=_(n,r,e?2:1),f=0;if("function"!=typeof l)throw TypeError(t+" is not iterable!");if(void 0===(h=l)||ot.Array!==h&&te[Zt]!==h){for(u=l.call(t);!(o=u.next()).done;)if((a=Kt(u,c,o.value,e))===v||a===y)return a}else for(s=R(t.length);f<s;f++)if((a=e?c(p(o=t[f])[0],o[1]):c(t[f]))===v||a===y)return a};e.BREAK=v,e.RETURN=y}),oe=et("species"),ue=t(function(t){var n=v("meta"),e=a.f,r=0,i=Object.isExtensible||function(){return!0},s=!w(function(){return i(Object.preventExtensions({}))}),o=function(t){e(t,n,{value:{i:"O"+ ++r,w:{}}})},u=t.exports={KEY:n,NEED:!1,fastKey:function(t,e){if(!g(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!l(t,n)){if(!i(t))return"F";if(!e)return"E";o(t)}return t[n].i},getWeak:function(t,e){if(!l(t,n)){if(!i(t))return!0;if(!e)return!1;o(t)}return t[n].w},onFreeze:function(t){return s&&u.NEED&&i(t)&&!l(t,n)&&o(t),t}}}),ae=(ue.KEY,ue.NEED,ue.fastKey,ue.getWeak,ue.onFreeze,function(t,e){if(!g(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}),he=a.f,le=ue.fastKey,ce=o?"_s":"size",fe=function(t,e){var n,r=le(e);if("F"!==r)return t._i[r];for(n=t._f;n;n=n.n)if(n.k==e)return n},ve={getConstructor:function(t,s,n,r){var i=t(function(t,e){$t(t,i,s,"_i"),t._t=s,t._i=yt(null),t._f=void 0,t._l=void 0,t[ce]=0,null!=e&&se(e,n,t[r],t)});return Jt(i.prototype,{clear:function(){for(var t=ae(this,s),e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[ce]=0},delete:function(t){var e=ae(this,s),n=fe(e,t);if(n){var r=n.n,i=n.p;delete e._i[n.i],n.r=!0,i&&(i.n=r),r&&(r.p=i),e._f==n&&(e._f=r),e._l==n&&(e._l=i),e[ce]--}return!!n},forEach:function(t){ae(this,s);for(var e,n=_(t,1<arguments.length?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!fe(ae(this,s),t)}}),o&&he(i.prototype,"size",{get:function(){return ae(this,s)[ce]}}),i},def:function(t,e,n){var r,i,s=fe(t,e);return s?s.v=n:(t._l=s={i:i=le(e,!0),k:e,v:n,p:r=t._l,n:void 0,r:!1},t._f||(t._f=s),r&&(r.n=s),t[ce]++,"F"!==i&&(t._i[i]=s)),t},getEntry:fe,setStrong:function(t,n,e){var r;Mt(t,n,function(t,e){this._t=ae(t,n),this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?st(0,"keys"==e?n.k:"values"==e?n.v:[n.k,n.v]):(t._t=void 0,st(1))},e?"entries":"values",!e,!0),r=m[n],o&&r&&!r[oe]&&a.f(r,oe,{configurable:!0,get:function(){return this}})}},ye=et("iterator"),de=!1;try{[7][ye]().return=function(){de=!0}}catch(t){}var pe=Object.getOwnPropertyDescriptor,me={f:o?pe:function(t,e){if(t=P(t),e=s(e,!0),i)try{return pe(t,e)}catch(t){}if(l(t,e))return k(!$.f.call(t,e),t[e])}},ge=function(t,e){if(p(t),!g(e)&&null!==e)throw TypeError(e+": can't set as prototype!")},we={set:Object.setPrototypeOf||("__proto__"in{}?function(t,n,r){try{(r=_(Function.call,me.f(Object.prototype,"__proto__").set,2))(t,[]),n=!(t instanceof Array)}catch(t){n=!0}return function(t,e){return ge(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:ge}.set;!function(u,t,e,n,a,r){var h=m[u],l=h,c=a?"set":"add",i=l&&l.prototype,s={},o=function(t){var n=i[t];O(i,t,"delete"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"has"==t?function(t){return!(r&&!g(t))&&n.call(this,0===t?0:t)}:"get"==t?function(t){return r&&!g(t)?void 0:n.call(this,0===t?0:t)}:"add"==t?function(t){return n.call(this,0===t?0:t),this}:function(t,e){return n.call(this,0===t?0:t,e),this})};if("function"==typeof l&&(r||i.forEach&&!w(function(){(new l).entries().next()}))){var f=new l,v=f[c](r?{}:-0,1)!=f,y=w(function(){f.has(1)}),d=function(t,e){if(!e&&!de)return!1;var n=!1;try{var r=[7],i=r[ye]();i.next=function(){return{done:n=!0}},r[ye]=function(){return i},t(r)}catch(t){}return n}(function(t){new l(t)}),p=!r&&w(function(){for(var t=new l,e=5;e--;)t[c](e,e);return!t.has(-0)});d||(((l=t(function(t,e){$t(t,l,u);var n,r,i,s,o=(n=new h,r=l,(s=t.constructor)!==r&&"function"==typeof s&&(i=s.prototype)!==r.prototype&&g(i)&&we&&we(n,i),n);return null!=e&&se(e,a,o[c],o),o})).prototype=i).constructor=l),(y||p)&&(o("delete"),o("has"),a&&o("get")),(p||v)&&o(c),r&&i.clear&&delete i.clear}else l=n.getConstructor(t,u,a,c),Jt(l.prototype,e),ue.NEED=!0;mt(l,u),s[u]=l,M(M.G+M.W+M.F*(l!=h),s),r||n.setStrong(l,u,a)}("Set",function(t){return function(){return t(this,0<arguments.length?arguments[0]:void 0)}},{add:function(t){return ve.def(ae(this,"Set"),t=0===t?0:t,t)}},ve);function _e(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var be={f:et},ke=a.f,xe=function(t){var e=d.Symbol||(d.Symbol=m.Symbol||{});"_"==t.charAt(0)||t in e||ke(e,t,{value:be.f(t)})};xe("asyncIterator");var Oe=Array.isArray||function(t){return"Array"==E(t)},Se=U.concat("length","prototype"),Me={f:Object.getOwnPropertyNames||function(t){return W(t,Se)}},Ae=Me.f,je={}.toString,Ee="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],Te={f:function(t){return Ee&&"[object Window]"==je.call(t)?function(t){try{return Ae(t)}catch(t){return Ee.slice()}}(t):Ae(P(t))}},Ce=ue.KEY,Pe=me.f,Ne=a.f,Le=Te.f,De=m.Symbol,Fe=m.JSON,Re=Fe&&Fe.stringify,ze="prototype",qe=et("_hidden"),Ie=et("toPrimitive"),Ye={}.propertyIsEnumerable,Xe=Y("symbol-registry"),Ge=Y("symbols"),He=Y("op-symbols"),Be=Object[ze],Ve="function"==typeof De,We=m.QObject,Ue=!We||!We[ze]||!We[ze].findChild,Qe=o&&w(function(){return 7!=yt(Ne({},"a",{get:function(){return Ne(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=Pe(Be,e);r&&delete Be[e],Ne(t,e,n),r&&t!==Be&&Ne(Be,e,r)}:Ne,Je=function(t){var e=Ge[t]=yt(De[ze]);return e._k=t,e},$e=Ve&&"symbol"==typeof De.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof De},Ke=function(t,e,n){return t===Be&&Ke(He,e,n),p(t),e=s(e,!0),p(n),l(Ge,e)?(n.enumerable?(l(t,qe)&&t[qe][e]&&(t[qe][e]=!1),n=yt(n,{enumerable:k(0,!1)})):(l(t,qe)||Ne(t,qe,k(1,{})),t[qe][e]=!0),Qe(t,e,n)):Ne(t,e,n)},Ze=function(t,e){p(t);for(var n,r=function(t){var e=Q(t),n=J.f;if(n)for(var r,i=n(t),s=$.f,o=0;i.length>o;)s.call(t,r=i[o++])&&e.push(r);return e}(e=P(e)),i=0,s=r.length;i<s;)Ke(t,n=r[i++],e[n]);return t},tn=function(t){var e=Ye.call(this,t=s(t,!0));return!(this===Be&&l(Ge,t)&&!l(He,t))&&(!(e||!l(this,t)||!l(Ge,t)||l(this,qe)&&this[qe][t])||e)},en=function(t,e){if(t=P(t),e=s(e,!0),t!==Be||!l(Ge,e)||l(He,e)){var n=Pe(t,e);return!n||!l(Ge,e)||l(t,qe)&&t[qe][e]||(n.enumerable=!0),n}},nn=function(t){for(var e,n=Le(P(t)),r=[],i=0;n.length>i;)l(Ge,e=n[i++])||e==qe||e==Ce||r.push(e);return r},rn=function(t){for(var e,n=t===Be,r=Le(n?He:P(t)),i=[],s=0;r.length>s;)!l(Ge,e=r[s++])||n&&!l(Be,e)||i.push(Ge[e]);return i};Ve||(O((De=function(){if(this instanceof De)throw TypeError("Symbol is not a constructor!");var e=v(0<arguments.length?arguments[0]:void 0),n=function(t){this===Be&&n.call(He,t),l(this,qe)&&l(this[qe],e)&&(this[qe][e]=!1),Qe(this,e,k(1,t))};return o&&Ue&&Qe(Be,e,{configurable:!0,set:n}),Je(e)})[ze],"toString",function(){return this._k}),me.f=en,a.f=Ke,Me.f=Te.f=nn,$.f=tn,J.f=rn,o&&O(Be,"propertyIsEnumerable",tn,!0),be.f=function(t){return Je(et(t))}),M(M.G+M.W+M.F*!Ve,{Symbol:De});for(var sn="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),on=0;sn.length>on;)et(sn[on++]);for(var un=Q(et.store),an=0;un.length>an;)xe(un[an++]);M(M.S+M.F*!Ve,"Symbol",{for:function(t){return l(Xe,t+="")?Xe[t]:Xe[t]=De(t)},keyFor:function(t){if(!$e(t))throw TypeError(t+" is not a symbol!");for(var e in Xe)if(Xe[e]===t)return e},useSetter:function(){Ue=!0},useSimple:function(){Ue=!1}}),M(M.S+M.F*!Ve,"Object",{create:function(t,e){return void 0===e?yt(t):Ze(yt(t),e)},defineProperty:Ke,defineProperties:Ze,getOwnPropertyDescriptor:en,getOwnPropertyNames:nn,getOwnPropertySymbols:rn}),Fe&&M(M.S+M.F*(!Ve||w(function(){var t=De();return"[null]"!=Re([t])||"{}"!=Re({a:t})||"{}"!=Re(Object(t))})),"JSON",{stringify:function(t){for(var e,n,r=[t],i=1;arguments.length>i;)r.push(arguments[i++]);if(n=e=r[1],(g(e)||void 0!==t)&&!$e(t))return Oe(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!$e(e))return e}),r[1]=e,Re.apply(Fe,r)}}),De[ze][Ie]||x(De[ze],Ie,De[ze].valueOf),mt(De,"Symbol"),mt(Math,"Math",!0),mt(m.JSON,"JSON",!0);var hn={},ln=[];function cn(t,e){if(Array.isArray(t)){var n=!0,r=!1,i=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done);n=!0){cn(s.value,e)}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}}else if("object"!==Wt(t))vn(Object.keys(e)),hn[t]=Object.assign(hn[t]||{},e);else for(var u in t)cn(u,t[u])}function fn(t){return hn[t]||{}}function vn(t){ln.push.apply(ln,_e(t))}var yn=I(!0);M(M.P,"Array",{includes:function(t){return yn(this,t,1<arguments.length?arguments[1]:void 0)}}),it("includes");var dn=et("match"),pn=function(t){var e;return g(t)&&(void 0!==(e=t[dn])?!!e:"RegExp"==E(t))},mn=et("match"),gn="includes";M(M.P+M.F*function(e){var n=/./;try{"/./"[e](n)}catch(t){try{return n[mn]=!1,!"/./"[e](n)}catch(t){}}return!0}(gn),"String",{includes:function(t){return!!~function(t,e,n){if(pn(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(C(t))}(this,t,gn).indexOf(t,1<arguments.length?arguments[1]:void 0)}});var wn=function(e,t,n){var r=et(e),i=n(C,r,""[e]),s=i[0],o=i[1];w(function(){var t={};return t[r]=function(){return 7},7!=""[e](t)})&&(O(String.prototype,e,s),x(RegExp.prototype,r,2==t?function(t,e){return o.call(t,this,e)}:function(t){return o.call(t,this)}))};function _n(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function bn(t){return t%360*Math.PI/180}function kn(t){return t.toLowerCase().replace(/-(.)/g,function(t,e){return e.toUpperCase()})}function xn(t){return t.replace(/([A-Z])/g,function(t,e){return"-"+e.toLowerCase()})}function On(t){return t.charAt(0).toUpperCase()+t.slice(1)}function Sn(t,e,n){if(null==e||null==n){var r=t.bbox();null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)}return{width:e,height:n}}function Mn(t,e){var n,r,i=t.origin;if("string"==typeof i||null==i){var s=(i||"center").toLowerCase().trim(),o=e.bbox(),u=o.height,a=o.width,h=o.x,l=o.y,c=s.includes("left")?h:s.includes("right")?h+a:h+a/2,f=s.includes("top")?l:s.includes("bottom")?l+u:l+u/2;n=null!=t.ox?t.ox:c,r=null!=t.oy?t.oy:f}else n=i[0],r=i[1];return[n,r]}wn("replace",2,function(i,s,o){return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var An=Object.freeze({map:_n,filter:function(t,e){var n,r=t.length,i=[];for(n=0;n<r;n++)e(t[n])&&i.push(t[n]);return i},radians:bn,degrees:function(t){return 180*t/Math.PI%360},camelCase:kn,unCamelCase:xn,capitalize:On,proportionalSize:Sn,getOrigin:Mn}),jn="http://www.w3.org/2000/svg",En="http://www.w3.org/2000/xmlns/",Tn="http://www.w3.org/1999/xlink",Cn="http://svgjs.com/svgjs",Pn=Object.freeze({ns:jn,xmlns:En,xlink:Tn,svgjs:Cn}),Nn={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};function Ln(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Dn=function t(){Ln(this,t)},Fn={},Rn="___SYMBOL___ROOT___";function zn(t){return Nn.document.createElementNS(jn,t)}function qn(t){if(t instanceof Dn)return t;if("object"===Wt(t))return Xn(t);if(null==t)return new Fn[Rn];if("string"==typeof t&&"<"!==t.charAt(0))return Xn(Nn.document.querySelector(t));var e=zn("svg");return e.innerHTML=t,t=Xn(e.firstChild)}function In(t,e){return e instanceof Nn.window.Node?e:zn(t)}function Yn(t){if(!t)return null;if(t.instance instanceof Dn)return t.instance;var e=On(t.nodeName);return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":Fn[e]||(e="Dom"),new Fn[e](t)}var Xn=Yn;function Gn(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t.name,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2];return Fn[e]=t,n&&(Fn[Rn]=t),vn(Object.keys(t.prototype)),t}function Hn(t){return Fn[t]}var Bn=1e3;function Vn(t){return"Svgjs"+On(t)+Bn++}function Wn(t){for(var e=t.children.length-1;0<=e;e--)Wn(t.children[e]);return t.id?Yn(t).id(Vn(t.nodeName)):Yn(t)}function Un(t,e,n){var r,i;for(i=(t=Array.isArray(t)?t:[t]).length-1;0<=i;i--)for(r in e){var s=e[r];n&&(s=Qn(e[r])),t[i].prototype[r]=s}}function Qn(i){return function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e[e.length-1];return!r||r.constructor!==Object||r instanceof Array?i.apply(this,e):i.apply(this,e.slice(0,-1)).attr(r)}}cn("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){var t=this.position()+1,e=this.parent();return e.removeElement(this).add(this,t),"function"==typeof e.isRoot&&e.isRoot()&&e.node.appendChild(e.defs().node),this},backward:function(){var t=this.position();return 0<t&&this.parent().removeElement(this).add(this,t-1),this},front:function(){var t=this.parent();return t.node.appendChild(this.node),"function"==typeof t.isRoot&&t.isRoot()&&t.node.appendChild(t.defs().node),this},back:function(){return 0<this.position()&&this.parent().removeElement(this).add(this,0),this},before:function(t){(t=qn(t)).remove();var e=this.position();return this.parent().add(t,e),this},after:function(t){(t=qn(t)).remove();var e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){(t=qn(t)).before(this)},insertAfter:function(t){(t=qn(t)).after(this)}}),wn("split",2,function(i,s,o){var v=pn,y=o,d=[].push,t="split",p="length",m="lastIndex";if("c"=="abbc"[t](/(b)*/)[1]||4!="test"[t](/(?:)/,-1)[p]||2!="ab"[t](/(?:ab)*/)[p]||4!="."[t](/(.?)(.?)/)[p]||1<"."[t](/()()/)[p]||""[t](/.?/)[p]){var g=void 0===/()??/.exec("")[1];o=function(t,e){var n=String(this);if(void 0===t&&0===e)return[];if(!v(t))return y.call(n,t,e);var r,i,s,o,u,a=[],h=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,c=void 0===e?4294967295:e>>>0,f=new RegExp(t.source,h+"g");for(g||(r=new RegExp("^"+f.source+"$(?!\\s)",h));(i=f.exec(n))&&!(l<(s=i.index+i[0][p])&&(a.push(n.slice(l,i.index)),!g&&1<i[p]&&i[0].replace(r,function(){for(u=1;u<arguments[p]-2;u++)void 0===arguments[u]&&(i[u]=void 0)}),1<i[p]&&i.index<n[p]&&d.apply(a,i.slice(1)),o=i[0][p],l=s,a[p]>=c));)f[m]===i.index&&f[m]++;return l===n[p]?!o&&f.test("")||a.push(""):a.push(n.slice(l)),a[p]>c?a.slice(0,c):a}}else"0"[t](void 0,0)[p]&&(o=function(t,e){return void 0===t&&0===e?[]:y.call(this,t,e)});return[function(t,e){var n=i(this),r=null==t?void 0:t[s];return void 0!==r?r.call(t,n,e):o.call(String(n),t,e)},o]});var Jn=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,$n=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Kn=/rgb\((\d+),(\d+),(\d+)\)/,Zn=/(#[a-z0-9\-_]+)/i,tr=/\)\s*,?\s*/,er=/\s/g,nr=/^#[a-f0-9]{3,6}$/i,rr=/^rgb\(/,ir=/^(\s+)?$/,sr=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,or=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,ur=/[\s,]+/,ar=/([^e])-/gi,hr=/[MLHVCSQTAZ]/gi,lr=/[MLHVCSQTAZ]/i,cr=/((\d?\.\d+(?:e[+-]?\d+)?)((?:\.\d+(?:e[+-]?\d+)?)+))+/gi,fr=/\./g,vr=Object.freeze({numberAndUnit:Jn,hex:$n,rgb:Kn,reference:Zn,transforms:tr,whitespace:er,isHex:nr,isRgb:rr,isCss:/[^:]+:[^;]+;?/,isBlank:ir,isNumber:sr,isPercent:/^-?[\d.]+%$/,isImage:or,delimiter:ur,hyphen:ar,pathLetters:hr,isPathLetter:lr,numbersWithDots:cr,dots:fr});cn("Dom",{classes:function(){var t=this.attr("class");return null==t?[]:t.trim().split(ur)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){var e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(e){return this.hasClass(e)&&this.attr("class",this.classes().filter(function(t){return t!==e}).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),cn("Dom",{css:function(t,e){var n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter(function(t){return!!t.length}).forEach(function(t){var e=t.split(/\s*:\s*/);n[e[0]]=e[1]}),n;if(arguments.length<2){if(Array.isArray(t)){var r=!0,i=!1,s=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done);r=!0){var a=kn(o.value);n[a]=this.node.style[a]}}catch(t){i=!0,s=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}return n}if("string"==typeof t)return this.node.style[kn(t)];if("object"===Wt(t))for(var h in t)this.node.style[kn(h)]=null==t[h]||ir.test(t[h])?"":t[h]}return 2===arguments.length&&(this.node.style[kn(t)]=null==e||ir.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),cn("Dom",{data:function(e,t,n){if("object"===Wt(e))for(t in e)this.data(t,e[t]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+e))}catch(t){return this.attr("data-"+e)}else this.attr("data-"+e,null===t?null:!0===n||"string"==typeof t||"number"==typeof t?t:JSON.stringify(t));return this}}),cn("Dom",{remember:function(t,e){if("object"===Wt(t))for(var n in t)this.remember(n,t[n]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(var t=arguments.length-1;0<=t;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});var yr=0;function dr(t){var e=qn(t).getEventHolder();return e.events||(e.events={}),e.events}function pr(t){return qn(t).getEventTarget()}function mr(t,e,r,n,i){var s=r.bind(n||t),o=dr(t),u=pr(t);e=Array.isArray(e)?e:e.split(ur),r._svgjsListenerId||(r._svgjsListenerId=++yr),e.forEach(function(t){var e=t.split(".")[0],n=t.split(".")[1]||"*";o[e]=o[e]||{},o[e][n]=o[e][n]||{},o[e][n][r._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)})}function gr(o,t,u,a){var h=dr(o),l=pr(o);("function"!=typeof u||(u=u._svgjsListenerId))&&(t=Array.isArray(t)?t:(t||"").split(ur)).forEach(function(t){var e,n,r,i=t&&t.split(".")[0],s=t&&t.split(".")[1];if(u)h[i]&&h[i][s||"*"]&&(l.removeEventListener(i,h[i][s||"*"][u],a||!1),delete h[i][s||"*"][u]);else if(i&&s){if(h[i]&&h[i][s]){for(n in h[i][s])gr(l,[i,s].join("."),n);delete h[i][s]}}else if(s)for(t in h)for(e in h[t])s===e&&gr(l,[t,s].join("."));else if(i){if(h[i]){for(e in h[i])gr(l,[i,e].join("."));delete h[i]}}else{for(t in h)gr(l,t);(r=qn(o).getEventHolder()).events&&(r.events={})}})}function wr(t,e,n){var r=pr(t);return e instanceof Nn.window.Event||(e=new Nn.window.CustomEvent(e,{detail:n,cancelable:!0})),r.dispatchEvent(e),e}function _r(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=[],r=!0,i=!1,s=void 0;try{for(var o,u=t[Symbol.iterator]();!(r=(o=u.next()).done)&&(n.push(o.value),!e||n.length!==e);r=!0);}catch(t){i=!0,s=t}finally{try{r||null==u.return||u.return()}finally{if(i)throw s}}return n}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function br(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function kr(t,e,n){return e&&br(t.prototype,e),n&&br(t,n),t}var xr=function(){var t=p(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e};o&&"g"!=/./g.flags&&a.f(RegExp.prototype,"flags",{configurable:!0,get:xr});var Or="toString",Sr=/./[Or],Mr=function(t){O(RegExp.prototype,Or,t,!0)};function Ar(t){var e=Math.round(t).toString(16);return 1===e.length?"0"+e:e}function jr(t,e){var n=!0,r=!1,i=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done);n=!0){if(null==t[s.value])return!1}}catch(t){r=!0,i=t}finally{try{n||null==o.return||o.return()}finally{if(r)throw i}}return!0}function Er(t,e,n){return n<0&&(n+=1),1<n&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}w(function(){return"/a/b"!=Sr.call({source:"a",flags:"b"})})?Mr(function(){var t=p(this);return"/".concat(t.source,"/","flags"in t?t.flags:!o&&t instanceof RegExp?xr.call(t):void 0)}):Sr.name!=Or&&Mr(function(){return Sr.call(this)});var Tr=function(){function T(){Ln(this,T),this.init.apply(this,arguments)}return kr(T,[{key:"init",value:function(){var t,e,n,r,i=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,u=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0,a=4<arguments.length&&void 0!==arguments[4]?arguments[4]:"rgb";if(this.space)for(var h in this.space)delete this[this.space[h]];if("number"==typeof i)a="string"==typeof u?u:a,u="string"==typeof u?0:u,Object.assign(this,{_a:i,_b:s,_c:o,_d:u,space:a});else if(i instanceof Array)this.space=s||("string"==typeof i[3]?i[3]:i[4])||"rgb",Object.assign(this,{_a:i[0],_b:i[1],_c:i[2],_d:i[3]||0});else if(i instanceof Object){var l=(n=s,(r=jr(e=i,"rgb")?{_a:e.r,_b:e.g,_c:e.b,space:"rgb"}:jr(e,"xyz")?{_a:e.x,_b:e.y,_c:e.z,_d:0,space:"xyz"}:jr(e,"hsl")?{_a:e.h,_b:e.s,_c:e.l,_d:0,space:"hsl"}:jr(e,"lab")?{_a:e.l,_b:e.a,_c:e.b,_d:0,space:"lab"}:jr(e,"lch")?{_a:e.l,_b:e.c,_c:e.h,_d:0,space:"lch"}:jr(e,"cmyk")?{_a:e.c,_b:e.m,_c:e.y,_d:e.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"}).space=n||r.space,r);Object.assign(this,l)}else if("string"==typeof i)if(rr.test(i)){var c=i.replace(er,""),f=_r(Kn.exec(c).slice(1,4).map(function(t){return parseInt(t)}),3),v=f[0],y=f[1],d=f[2];Object.assign(this,{_a:v,_b:y,_c:d,_d:0,space:"rgb"})}else{if(!nr.test(i))throw Error("Unsupported string format, can't construct Color");var p=_r($n.exec((t=i,4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t)).map(function(t){return parseInt(t,16)}),4),m=p[1],g=p[2],w=p[3];Object.assign(this,{_a:m,_b:g,_c:w,_d:0,space:"rgb"})}var _=this._a,b=this._b,k=this._c,x=this._d,O="rgb"===this.space?{r:_,g:b,b:k}:"xyz"===this.space?{x:_,y:b,z:k}:"hsl"===this.space?{h:_,s:b,l:k}:"lab"===this.space?{l:_,a:b,b:k}:"lch"===this.space?{l:_,c:b,h:k}:"cmyk"===this.space?{c:_,m:b,y:k,k:x}:{};Object.assign(this,O)}},{key:"rgb",value:function(){if("rgb"===this.space)return this;if("lab"===(O=this.space)||"xyz"===O||"lch"===O){var t=this.x,e=this.y,n=this.z;if("lab"===this.space||"lch"===this.space){var r=this.l,i=this.a,s=this.b;if("lch"===this.space){var o=this.c,u=this.h,a=Math.PI/180;i=o*Math.cos(a*u),s=o*Math.sin(a*u)}var h=(r+16)/116,l=i/500+h,c=h-s/200,f=16/116,v=.008856;t=.95047*(Math.pow(l,3)>v?Math.pow(l,3):(l-f)/7.787),e=1*(Math.pow(h,3)>v?Math.pow(h,3):(h-f)/7.787),n=1.08883*(Math.pow(c,3)>v?Math.pow(c,3):(c-f)/7.787)}var y=3.2406*t+-1.5372*e+-.4986*n,d=-.9689*t+1.8758*e+.0415*n,p=.0557*t+-.204*e+1.057*n,m=Math.pow,g=.0031308;return new T(255*(g<y?1.055*m(y,1/2.4)-.055:12.92*y),255*(g<d?1.055*m(d,1/2.4)-.055:12.92*d),255*(g<p?1.055*m(p,1/2.4)-.055:12.92*p))}if("hsl"===this.space){var w=this.h,_=this.s,b=this.l;if(w/=360,b/=100,0===(_/=100))return new T(b*=255,b,b);var k=b<.5?b*(1+_):b+_-b*_,x=2*b-k;return new T(255*Er(x,k,w+1/3),255*Er(x,k,w),255*Er(x,k,w-1/3))}if("cmyk"!==this.space)return this;var O,S=this.c,M=this.m,j=this.y,E=this.k;return new T(255*(1-Math.min(1,S*(1-E)+E)),255*(1-Math.min(1,M*(1-E)+E)),255*(1-Math.min(1,j*(1-E)+E)))}},{key:"lab",value:function(){var t=this.xyz(),e=t.x,n=t.y;return new T(116*n-16,500*(e-n),200*(n-t.z),"lab")}},{key:"xyz",value:function(){var t=this.rgb(),e=_r([t._a,t._b,t._c].map(function(t){return t/255}),3),n=e[0],r=e[1],i=e[2],s=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92,o=.04045<r?Math.pow((r+.055)/1.055,2.4):r/12.92,u=.04045<i?Math.pow((i+.055)/1.055,2.4):i/12.92,a=(.4124*s+.3576*o+.1805*u)/.95047,h=(.2126*s+.7152*o+.0722*u)/1,l=(.0193*s+.1192*o+.9505*u)/1.08883;return new T(.008856<a?Math.pow(a,1/3):7.787*a+16/116,.008856<h?Math.pow(h,1/3):7.787*h+16/116,.008856<l?Math.pow(l,1/3):7.787*l+16/116,"xyz")}},{key:"lch",value:function(){var t=this.lab(),e=t.l,n=t.a,r=t.b,i=Math.sqrt(Math.pow(n,2)+Math.pow(r,2)),s=180*Math.atan2(r,n)/Math.PI;return s<0&&(s=360-(s*=-1)),new T(e,i,s,"lch")}},{key:"hsl",value:function(){var t=this.rgb(),e=_r([t._a,t._b,t._c].map(function(t){return t/255}),3),n=e[0],r=e[1],i=e[2],s=Math.max(n,r,i),o=Math.min(n,r,i),u=(s+o)/2,a=s===o,h=s-o;return new T(360*(a?0:s===n?((r-i)/h+(r<i?6:0))/6:s===r?((i-n)/h+2)/6:s===i?((n-r)/h+4)/6:0),100*(a?0:.5<u?h/(2-s-o):h/(s+o)),100*u,"hsl")}},{key:"cmyk",value:function(){var t=this.rgb(),e=_r([t._a,t._b,t._c].map(function(t){return t/255}),3),n=e[0],r=e[1],i=e[2],s=Math.min(1-n,1-r,1-i);return 1===s?new T(0,0,0,1,"cmyk"):new T((1-n-s)/(1-s),(1-r-s)/(1-s),(1-i-s)/(1-s),s,"cmyk")}},{key:"toHex",value:function(){var t=this.rgb(),e=_r([t._a,t._b,t._c].map(Ar),3),n=e[0],r=e[1],i=e[2];return"#".concat(n).concat(r).concat(i)}},{key:"toString",value:function(){return this.toHex()}},{key:"toRgb",value:function(){var t=this.rgb(),e=t.r,n=t.g,r=t.b,i=Math.max,s=Math.min,o=Math.round,u=_r([e,n,r].map(function(t){return i(0,s(o(t),255))}),3),a=u[0],h=u[1],l=u[2];return"rgb(".concat(a,",").concat(h,",").concat(l,")")}},{key:"toArray",value:function(){return[this._a,this._b,this._c,this._d,this.space]}}],[{key:"random",value:function(){}},{key:"test",value:function(t){return t+="",nr.test(t)||rr.test(t)}},{key:"isRgb",value:function(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}},{key:"isColor",value:function(t){return this.isRgb(t)||this.test(t)}}]),T}();function Cr(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pr(t,e){return!e||"object"!==Wt(e)&&"function"!=typeof e?Cr(t):e}function Nr(t){return(Nr=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function Lr(t,e,n){return(Lr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Nr(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function Dr(t,e){return(Dr=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Fr(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dr(t,e)}wn("match",1,function(r,i,t){return[function(t){var e=r(this),n=null==t?void 0:t[i];return void 0!==n?n.call(t,e):new RegExp(t)[i](String(e))},t]});var Rr=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return kr(e,[{key:"init",value:function(t,e){var n,r=0,i=0;return n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"===Wt(t)?{x:t.x,y:t.y}:{x:t,y:e},this.x=null==n.x?r:n.x,this.y=null==n.y?i:n.y,this}},{key:"clone",value:function(){return new e(this)}},{key:"transform",value:function(t){return new e(t.a*this.x+t.c*this.y+t.e,t.b*this.x+t.d*this.y+t.f)}},{key:"toArray",value:function(){return[this.x,this.y]}}]),e}();function zr(){if(!zr.nodes){var t=qn().size(2,0);t.node.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";");var e=t.path().node;zr.nodes={svg:t,path:e}}if(!zr.nodes.svg.node.parentNode){var n=Nn.document.body||Nn.document.documentElement;zr.nodes.svg.addTo(n)}return zr.nodes}function qr(t){return!(t.w||t.h||t.x||t.y)}var Ir=function(){function o(){Ln(this,o),this.init.apply(this,arguments)}return kr(o,[{key:"init",value:function(t){return t="string"==typeof t?t.split(ur).map(parseFloat):Array.isArray(t)?t:"object"===Wt(t)?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}},{key:"merge",value:function(t){var e=Math.min(this.x,t.x),n=Math.min(this.y,t.y);return new o(e,n,Math.max(this.x+this.width,t.x+t.width)-e,Math.max(this.y+this.height,t.y+t.height)-n)}},{key:"transform",value:function(e){var n=1/0,r=-1/0,i=1/0,s=-1/0;return[new Rr(this.x,this.y),new Rr(this.x2,this.y),new Rr(this.x,this.y2),new Rr(this.x2,this.y2)].forEach(function(t){t=t.transform(e),n=Math.min(n,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),s=Math.max(s,t.y)}),new o(n,i,r-n,s-i)}},{key:"addOffset",value:function(){return this.x+=Nn.window.pageXOffset,this.y+=Nn.window.pageYOffset,this}},{key:"toString",value:function(){return this.x+" "+this.y+" "+this.width+" "+this.height}},{key:"toArray",value:function(){return[this.x,this.y,this.width,this.height]}},{key:"isNulled",value:function(){return qr(this)}}]),o}();function Yr(t,e){var n,r;try{if(qr(n=t(this.node))&&(r=this.node,!(Nn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===document}).call(Nn.document.documentElement,r)))throw new Error("Element not in the dom")}catch(t){n=e(this)}return n}function Xr(t,e,n){return Math.abs(e-t)<(n||1e-6)}cn({viewbox:{viewbox:function(t,e,n,r){return null==t?new Ir(this.attr("viewBox")):this.attr("viewBox",new Ir(t,e,n,r))}}});var Gr=function(){function h(){Ln(this,h),this.init.apply(this,arguments)}return kr(h,[{key:"init",value:function(t){var e=h.fromArray([1,0,0,1,0,0]);return t=t instanceof Element?t.matrixify():"string"==typeof t?h.fromArray(t.split(ur).map(parseFloat)):Array.isArray(t)?h.fromArray(t):"object"===Wt(t)&&h.isMatrixLike(t)?t:"object"===Wt(t)?(new h).transform(t):6===arguments.length?h.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}},{key:"clone",value:function(){return new h(this)}},{key:"transform",value:function(t){if(h.isMatrixLike(t))return new h(t).multiplyO(this);var e=h.formatTransforms(t),n=new Rr(e.ox,e.oy).transform(this),r=n.x,i=n.y,s=(new h).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-r,-i).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(r,i);if(isFinite(e.px)||isFinite(e.py)){var o=new Rr(r,i).transform(s),u=e.px?e.px-o.x:0,a=e.py?e.py-o.y:0;s.translateO(u,a)}return s.translateO(e.tx,e.ty),s}},{key:"compose",value:function(t){t.origin&&(t.originX=t.origin[0],t.originY=t.origin[1]);var e=t.originX||0,n=t.originY||0,r=t.scaleX||1,i=t.scaleY||1,s=t.shear||0,o=t.rotate||0,u=t.translateX||0,a=t.translateY||0;return(new h).translateO(-e,-n).scaleO(r,i).shearO(s).rotateO(o).translateO(u,a).lmultiplyO(this).translateO(e,n)}},{key:"decompose",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:0,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f,a=n*s-r*i,h=0<a?1:-1,l=h*Math.sqrt(n*n+r*r),c=Math.atan2(h*r,h*n),f=180/Math.PI*c,v=Math.cos(c),y=Math.sin(c),d=(n*i+r*s)/a,p=i*l/(d*n-r)||s*l/(d*r+n);return{scaleX:l,scaleY:p,shear:d,rotate:f,translateX:o-t+t*v*l+e*(d*v*l-y*p),translateY:u-e+t*y*l+e*(d*y*l+v*p),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}},{key:"multiply",value:function(t){return this.clone().multiplyO(t)}},{key:"multiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(this,e,this)}},{key:"lmultiply",value:function(t){return this.clone().lmultiplyO(t)}},{key:"lmultiplyO",value:function(t){var e=t instanceof h?t:new h(t);return h.matrixMultiply(e,this,this)}},{key:"inverseO",value:function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);var u=r/o,a=-e/o,h=-n/o,l=t/o,c=-(u*i+h*s),f=-(a*i+l*s);return this.a=u,this.b=a,this.c=h,this.d=l,this.e=c,this.f=f,this}},{key:"inverse",value:function(){return this.clone().inverseO()}},{key:"translate",value:function(t,e){return this.clone().translateO(t,e)}},{key:"translateO",value:function(t,e){return this.e+=t||0,this.f+=e||0,this}},{key:"scale",value:function(t,e,n,r){var i;return(i=this.clone()).scaleO.apply(i,arguments)}},{key:"scaleO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t);var i=this.a,s=this.b,o=this.c,u=this.d,a=this.e,h=this.f;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=u*e,this.e=a*t-n*t+n,this.f=h*e-r*e+r,this}},{key:"rotate",value:function(t,e,n){return this.clone().rotateO(t,e,n)}},{key:"rotateO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0;t=bn(t);var r=Math.cos(t),i=Math.sin(t),s=this.a,o=this.b,u=this.c,a=this.d,h=this.e,l=this.f;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=h*r-l*i+n*i-e*r+e,this.f=l*r+h*i-e*i-n*r+n,this}},{key:"flip",value:function(t,e){return this.clone().flipO(t,e)}},{key:"flipO",value:function(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}},{key:"shear",value:function(t,e,n){return this.clone().shearO(t,e,n)}},{key:"shearO",value:function(t){var e=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,u=this.f;return this.a=n+r*t,this.c=i+s*t,this.e=o+u*t-e*t,this}},{key:"skew",value:function(t,e,n,r){var i;return(i=this.clone()).skewO.apply(i,arguments)}},{key:"skewO",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:t,n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:0,r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:0;3===arguments.length&&(r=n,n=e,e=t),t=bn(t),e=bn(e);var i=Math.tan(t),s=Math.tan(e),o=this.a,u=this.b,a=this.c,h=this.d,l=this.e,c=this.f;return this.a=o+u*i,this.b=u+o*s,this.c=a+h*i,this.d=h+a*s,this.e=l+c*i-r*i,this.f=c+l*s-n*s,this}},{key:"skewX",value:function(t,e,n){return this.skew(t,0,e,n)}},{key:"skewXO",value:function(t,e,n){return this.skewO(t,0,e,n)}},{key:"skewY",value:function(t,e,n){return this.skew(0,t,e,n)}},{key:"skewYO",value:function(t,e,n){return this.skewO(0,t,e,n)}},{key:"aroundO",value:function(t,e,n){var r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}},{key:"around",value:function(t,e,n){return this.clone().aroundO(t,e,n)}},{key:"equals",value:function(t){var e=new h(t);return Xr(this.a,e.a)&&Xr(this.b,e.b)&&Xr(this.c,e.c)&&Xr(this.d,e.d)&&Xr(this.e,e.e)&&Xr(this.f,e.f)}},{key:"toString",value:function(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}},{key:"toArray",value:function(){return[this.a,this.b,this.c,this.d,this.e,this.f]}},{key:"valueOf",value:function(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}],[{key:"fromArray",value:function(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}},{key:"isMatrixLike",value:function(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}},{key:"formatTransforms",value:function(t){var e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,h=t.rotate||t.theta||0,l=new Rr(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),c=l.x,f=l.y,v=new Rr(t.position||t.px||t.positionX,t.py||t.positionY),y=v.x,d=v.y,p=new Rr(t.translate||t.tx||t.translateX,t.ty||t.translateY),m=p.x,g=p.y,w=new Rr(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:u,skewX:i,skewY:s,shear:a,theta:h,rx:w.x,ry:w.y,tx:m,ty:g,ox:c,oy:f,px:y,py:d}}},{key:"matrixMultiply",value:function(t,e,n){var r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,u=t.e+t.a*e.e+t.c*e.f,a=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=u,n.f=a,n}}]),h}();var Hr=function(){try{return Function("name","baseClass","_constructor",["baseClass = baseClass || Array","return {"," [name]: class extends baseClass {"," constructor (...args) {"," super(...args)"," _constructor && _constructor.apply(this, args)"," }"," }","}[name]"].join("\n"))}catch(t){return function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:Array,n=2<arguments.length?arguments[2]:void 0,r=function(){e.apply(this,arguments),n&&n.apply(this,arguments)};return((r.prototype=Object.create(e.prototype)).constructor=r).prototype.map=function(t){var e=new r;return e.push.apply(e,Array.prototype.map.call(this,t)),e},r}}}(),Br=Hr("List",Array,function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];if("number"==typeof t)return this;this.length=0,this.push.apply(this,_e(t))});function Vr(t,e){return new Br(_n((e||Nn.document).querySelectorAll(t),function(t){return Yn(t)}))}Un(Br,{each:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return"function"!=typeof e?this.map(function(t){return t[e].apply(t,n)}):(this.forEach(function(t){e.call(t,t)}),this)},toArray:function(){return Array.prototype.concat.apply([],this)}}),Br.extend=function(t){t=t.reduce(function(t,r){return t[r]=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return this.each.apply(this,[r].concat(e))},t},{}),Un(Br,t)};var Wr=function(t){function r(){var t,e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).events,n=void 0===e?{}:e;return Ln(this,r),(t=Pr(this,Nr(r).call(this))).events=n,t}return Fr(r,Dn),kr(r,[{key:"addEventListener",value:function(){}},{key:"dispatch",value:function(t,e){return wr(this,t,e)}},{key:"dispatchEvent",value:function(t){var e=this.getEventHolder().events;if(!e)return!0;var n=e[t.type];for(var r in n)for(var i in n[r])n[r][i](t);return!t.defaultPrevented}},{key:"fire",value:function(t,e){return this.dispatch(t,e),this}},{key:"getEventHolder",value:function(){return this}},{key:"getEventTarget",value:function(){return this}},{key:"off",value:function(t,e){return gr(this,t,e),this}},{key:"on",value:function(t,e,n,r){return mr(this,t,e,n,r),this}},{key:"removeEventListener",value:function(){}}]),r}();function Ur(){}var Qr={duration:400,ease:">",delay:0},Jr={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","font-size":16,"font-family":"Helvetica, Arial, sans-serif","text-anchor":"start"},$r=Object.freeze({noop:Ur,timeline:Qr,attrs:Jr}),Kr=Hr("SVGArray",Array,function(t){this.init(t)});Un(Kr,{init:function(t){return"number"==typeof t||(this.length=0,this.push.apply(this,_e(this.parse(t)))),this},toArray:function(){return Array.prototype.concat.apply([],this)},toString:function(){return this.join(" ")},valueOf:function(){var t=[];return t.push.apply(t,_e(this)),t},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];return t instanceof Array?t:t.trim().split(ur).map(parseFloat)},clone:function(){return new this.constructor(this)},toSet:function(){return new Set(this)}});var Zr=function(){function n(){Ln(this,n),this.init.apply(this,arguments)}return kr(n,[{key:"init",value:function(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(Jn))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof n&&(this.value=t.valueOf(),this.unit=t.unit),this}},{key:"toString",value:function(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}},{key:"toJSON",value:function(){return this.toString()}},{key:"toArray",value:function(){return[this.value,this.unit]}},{key:"valueOf",value:function(){return this.value}},{key:"plus",value:function(t){return new n(this+(t=new n(t)),this.unit||t.unit)}},{key:"minus",value:function(t){return new n(this-(t=new n(t)),this.unit||t.unit)}},{key:"times",value:function(t){return new n(this*(t=new n(t)),this.unit||t.unit)}},{key:"divide",value:function(t){return new n(this/(t=new n(t)),this.unit||t.unit)}}]),n}(),ti=[];var Dom=function(t){function Dom(t,e){var n;return Ln(this,Dom),(n=Pr(this,Nr(Dom).call(this,t))).node=t,n.type=t.nodeName,e&&t!==e&&n.attr(e),n}return Fr(Dom,Wr),kr(Dom,[{key:"add",value:function(t,e){return t=qn(t),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}},{key:"addTo",value:function(t){return qn(t).put(this)}},{key:"children",value:function(){return new Br(_n(this.node.children,function(t){return Yn(t)}))}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return delete this._defs,this}},{key:"clone",value:function(){return this.writeDataToDom(),Wn(this.node.cloneNode(!0))}},{key:"each",value:function(t,e){var n,r,i=this.children();for(n=0,r=i.length;n<r;n++)t.apply(i[n],[n,i]),e&&i[n].each(t,e);return this}},{key:"element",value:function(t){return this.put(new Dom(zn(t)))}},{key:"first",value:function(){return Yn(this.node.firstChild)}},{key:"get",value:function(t){return Yn(this.node.childNodes[t])}},{key:"getEventHolder",value:function(){return this.node}},{key:"getEventTarget",value:function(){return this.node}},{key:"has",value:function(t){return 0<=this.index(t)}},{key:"id",value:function(t){return void 0!==t||this.node.id||(this.node.id=Vn(this.type)),this.attr("id",t)}},{key:"index",value:function(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}},{key:"last",value:function(){return Yn(this.node.lastChild)}},{key:"matches",value:function(t){var e=this.node;return(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}},{key:"parent",value:function(t){var e=this;if(!e.node.parentNode)return null;if(e=Yn(e.node.parentNode),!t)return e;for(;e&&e.node instanceof Nn.window.SVGElement;){if("string"==typeof t?e.matches(t):e instanceof t)return e;e=Yn(e.node.parentNode)}}},{key:"put",value:function(t,e){return this.add(t,e),t}},{key:"putIn",value:function(t){return qn(t).add(this)}},{key:"remove",value:function(){return this.parent()&&this.parent().removeElement(this),this}},{key:"removeElement",value:function(t){return this.node.removeChild(t.node),this}},{key:"replace",value:function(t){return t=qn(t),this.node.parentNode.replaceChild(t.node,this.node),t}},{key:"round",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:2,e=1<arguments.length?arguments[1]:void 0,n=Math.pow(10,t),r=this.attr();e||(e=Object.keys(r));var i={};return e.forEach(function(t){i[t]=Math.round(r[t]*n)/n}),this.attr(i),this}},{key:"toString",value:function(){return this.id()}},{key:"svg",value:function(n,t){var e,r,i;if(!1===n&&(t=!1,n=null),null==n||"function"==typeof n){t=null==t||t,this.writeDataToDom();var s=this;if(null!=n){if(s=Yn(s.node.cloneNode(!0)),t){var o=n(s);if(s=o||s,!1===o)return""}s.each(function(){var t=n(this),e=t||this;!1===t?this.remove():t&&this!==e&&this.replace(e)},!0)}return t?s.node.outerHTML:s.node.innerHTML}for(t=null!=t&&t,e=Nn.document.createElementNS(jn,"svg"),i=Nn.document.createDocumentFragment(),e.innerHTML=n,r=e.children.length;r--;)i.appendChild(e.firstElementChild);var u=this.parent();return t?this.replace(i)&&u:this.add(i)}},{key:"words",value:function(t){return this.node.textContent=t,this}},{key:"writeDataToDom",value:function(){return this.each(function(){this.writeDataToDom()}),this}}]),Dom}();Un(Dom,{attr:function(n,t,e){var r=this;if(null==n){n={},t=this.node.attributes;var i=!0,s=!1,o=void 0;try{for(var u,a=t[Symbol.iterator]();!(i=(u=a.next()).done);i=!0){var h=u.value;n[h.nodeName]=sr.test(h.nodeValue)?parseFloat(h.nodeValue):h.nodeValue}}catch(t){s=!0,o=t}finally{try{i||null==a.return||a.return()}finally{if(s)throw o}}return n}if(n instanceof Array)return n.reduce(function(t,e){return t[e]=r.attr(e),t},{});if("object"===Wt(n))for(t in n)this.attr(t,n[t]);else if(null===t)this.node.removeAttribute(n);else{if(null==t)return null==(t=this.node.getAttribute(n))?Jr[n]:sr.test(t)?parseFloat(t):t;"number"==typeof(t=ti.reduce(function(t,e){return e(n,t,r)},t))?t=new Zr(t):Tr.isColor(t)?t=new Tr(t):t.constructor===Array&&(t=new Kr(t)),"leading"===n?this.leading&&this.leading(t):"string"==typeof e?this.node.setAttributeNS(e,n,t.toString()):this.node.setAttribute(n,t.toString()),!this.rebuild||"font-size"!==n&&"x"!==n||this.rebuild()}return this},find:function(t){return Vr(t,this.node)}}),Gn(Dom);var Svg=Hn(Rn),Element=function(t){function Element(t,e){var n;return Ln(this,Element),(n=Pr(this,Nr(Element).call(this,t,e))).dom={},n.node.instance=Cr(Cr(n)),t.hasAttribute("svgjs:data")&&n.setData(JSON.parse(t.getAttribute("svgjs:data"))||{}),n}return Fr(Element,Dom),kr(Element,[{key:"center",value:function(t,e){return this.cx(t).cy(e)}},{key:"cx",value:function(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}},{key:"cy",value:function(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}},{key:"defs",value:function(){return this.root().defs()}},{key:"root",value:function(){var t=this.parent(Svg);return t&&t.root()}},{key:"getEventHolder",value:function(){return this}},{key:"height",value:function(t){return this.attr("height",t)}},{key:"inside",value:function(t,e){var n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height}},{key:"move",value:function(t,e){return this.x(t).y(e)}},{key:"parents",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Nn.document;t=qn(t);for(var e=new Br,n=this;(n=n.parent())&&n.node!==t.node&&n.node!==Nn.document;)e.push(n);return e}},{key:"reference",value:function(t){if(!(t=this.attr(t)))return null;var e=t.match(Zn);return e?qn(e[1]):null}},{key:"setData",value:function(t){return this.dom=t,this}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.width(new Zr(n.width)).height(new Zr(n.height))}},{key:"width",value:function(t){return this.attr("width",t)}},{key:"writeDataToDom",value:function(){return this.node.removeAttribute("svgjs:data"),Object.keys(this.dom).length&&this.node.setAttribute("svgjs:data",JSON.stringify(this.dom)),Lr(Nr(Element.prototype),"writeDataToDom",this).call(this)}},{key:"x",value:function(t){return this.attr("x",t)}},{key:"y",value:function(t){return this.attr("y",t)}}]),Element}();Un(Element,{bbox:function(){return new Ir(Yr.call(this,function(t){return t.getBBox()},function(e){try{var t=e.clone().addTo(zr().svg).show(),n=t.node.getBBox();return t.remove(),n}catch(t){throw new Error('Getting bbox of element "'+e.node.nodeName+'" is not possible')}}))},rbox:function(t){var e=new Ir(Yr.call(this,function(t){return t.getBoundingClientRect()},function(t){throw new Error('Getting rbox of element "'+t.node.nodeName+'" is not possible')}));return t?e.transform(t.screenCTM().inverse()):e.addOffset()},point:function(t,e){return new Rr(t,e).transform(this.screenCTM().inverse())},ctm:function(){return new Gr(this.node.getCTM())},screenCTM:function(){if("function"!=typeof this.isRoot||this.isRoot())return new Gr(this.node.getScreenCTM());var t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Gr(e)}}),Gn(Element);var ei={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};function ni(i){for(var t=1;t<arguments.length;t++){var s=null!=arguments[t]?arguments[t]:{},e=Object.keys(s);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(s).filter(function(t){return Object.getOwnPropertyDescriptor(s,t).enumerable}))),e.forEach(function(t){var e,n,r;e=i,r=s[n=t],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return i}function ri(t){return this.attr("rx",t)}function ii(t){return this.attr("ry",t)}function si(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function oi(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function ui(t){return null==t?this.attr("cx"):this.attr("cx",t)}function ai(t){return null==t?this.attr("cy"):this.attr("cy",t)}function hi(t){return null==t?2*this.rx():this.rx(new Zr(t).divide(2))}function li(t){return null==t?2*this.ry():this.ry(new Zr(t).divide(2))}["fill","stroke"].forEach(function(e){var n,t={};t[e]=function(t){if(void 0===t)return this.attr(e);if("string"==typeof t||t instanceof Tr||Tr.isRgb(t)||t instanceof Element)this.attr(e,t);else for(n=ei[e].length-1;0<=n;n--)null!=t[ei[e][n]]&&this.attr(ei.prefix(e,ei[e][n]),t[ei[e][n]]);return this},cn(["Shape","Runner"],t)}),cn(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new Gr(this):this.attr("transform",new Gr(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t,e){var n="string"==typeof t?t:(isFinite(t),"both"),r="both"===t&&isFinite(e)?[e,e]:"x"===t?[e,0]:"y"===t?[0,e]:isFinite(t)?[t,t]:[0,0];this.transform({flip:n,origin:r},!0)},opacity:function(t){return this.attr("opacity",t)},dmove:function(t,e){return this.dx(t).dy(e)}}),cn("Element",{dx:function(t){return this.x(new Zr(t).plus(this.x()))},dy:function(t){return this.y(new Zr(t).plus(this.y()))}}),cn("radius",{radius:function(t,e){var n=(this._element||this).type;return"radialGradient"===n||"radialGradient"===n?this.attr("r",new Zr(t)):this.rx(t).ry(null==e?t:e)}}),cn("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Rr(this.node.getPointAtLength(t))}}),cn(["Element","Runner"],{font:function(t,e){if("object"===Wt(t))for(e in t)this.font(e,t[e]);return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),cn("Text",{ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},amove:function(t,e){return this.ax(t).ay(e)}}),cn("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel"].reduce(function(t,e){return t[e]=function(t){return null===t?gr(this,e):mr(this,e,t),this},t},{})),cn("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(tr).slice(0,-1).map(function(t){var e=t.trim().split("(");return[e[0],e[1].split(ur).map(function(t){return parseFloat(t)})]}).reverse().reduce(function(t,e){return"matrix"===e[0]?t.lmultiply(Gr.fromArray(e[1])):t[e[0]].apply(t,e[1])},new Gr)},toParent:function(t){if(this===t)return this;var e=this.screenCTM(),n=t.screenCTM().inverse();return this.addTo(t).untransform().transform(n.multiply(e)),this},toRoot:function(){return this.toParent(this.root())},transform:function(t,e){if(null==t||"string"==typeof t){var n=new Gr(this).decompose();return n[t]||n}Gr.isMatrixLike(t)||(t=ni({},t,{origin:Mn(t,this)}));var r=new Gr(!0===e?this:e||!1).transform(t);return this.attr("transform",r)}});var ci=Object.freeze({rx:ri,ry:ii,x:si,y:oi,cx:ui,cy:ai,width:hi,height:li}),Shape=function(t){function Shape(){return Ln(this,Shape),Pr(this,Nr(Shape).apply(this,arguments))}return Fr(Shape,Element),Shape}();Gn(Shape);var Circle=function(t){function Circle(t){return Ln(this,Circle),Pr(this,Nr(Circle).call(this,In("circle",t),t))}return Fr(Circle,Shape),kr(Circle,[{key:"radius",value:function(t){return this.attr("r",t)}},{key:"rx",value:function(t){return this.attr("r",t)}},{key:"ry",value:function(t){return this.rx(t)}},{key:"size",value:function(t){return this.radius(new Zr(t).divide(2))}}]),Circle}();Un(Circle,{x:si,y:oi,cx:ui,cy:ai,width:hi,height:li}),cn({Element:{circle:Qn(function(t){return this.put(new Circle).size(t).move(0,0)})}}),Gn(Circle);var Container=function(t){function Container(){return Ln(this,Container),Pr(this,Nr(Container).apply(this,arguments))}return Fr(Container,Element),kr(Container,[{key:"flatten",value:function(t){return this.each(function(){return this instanceof Container?this.flatten(t).ungroup(t):this.toParent(t)}),this.node.firstElementChild||this.remove(),this}},{key:"ungroup",value:function(t){return t=t||this.parent(),this.each(function(){return this.toParent(t)}),this.remove(),this}}]),Container}();Gn(Container);var Defs=function(t){function Defs(t){return Ln(this,Defs),Pr(this,Nr(Defs).call(this,In("defs",t),t))}return Fr(Defs,Container),kr(Defs,[{key:"flatten",value:function(){return this}},{key:"ungroup",value:function(){return this}}]),Defs}();Gn(Defs);var Ellipse=function(t){function Ellipse(t){return Ln(this,Ellipse),Pr(this,Nr(Ellipse).call(this,In("ellipse",t),t))}return Fr(Ellipse,Shape),kr(Ellipse,[{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.rx(new Zr(n.width).divide(2)).ry(new Zr(n.height).divide(2))}}]),Ellipse}();Un(Ellipse,ci),cn("Container",{ellipse:Qn(function(t,e){return this.put(new Ellipse).size(t,e).move(0,0)})}),Gn(Ellipse);var Stop=function(t){function Stop(t){return Ln(this,Stop),Pr(this,Nr(Stop).call(this,In("stop",t),t))}return Fr(Stop,Element),kr(Stop,[{key:"update",value:function(t){return("number"==typeof t||t instanceof Zr)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Zr(t.offset)),this}}]),Stop}();function fi(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new Zr(t),fy:new Zr(e)}):this.attr({x1:new Zr(t),y1:new Zr(e)})}function vi(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new Zr(t),cy:new Zr(e)}):this.attr({x2:new Zr(t),y2:new Zr(e)})}Gn(Stop);var yi=Object.freeze({from:fi,to:vi}),Gradient=function(t){function Gradient(t,e){return Ln(this,Gradient),Pr(this,Nr(Gradient).call(this,In(t+"Gradient","string"==typeof t?null:t),e))}return Fr(Gradient,Container),kr(Gradient,[{key:"stop",value:function(t,e,n){return this.put(new Stop).update(t,e,n)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="gradientTransform"),Lr(Nr(Gradient.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Vr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Ir}}]),Gradient}();Un(Gradient,yi),cn({Container:{gradient:Qn(function(t,e){return this.defs().gradient(t,e)})},Defs:{gradient:Qn(function(t,e){return this.put(new Gradient(t)).update(e)})}}),Gn(Gradient);var Pattern=function(t){function Pattern(t){return Ln(this,Pattern),Pr(this,Nr(Pattern).call(this,In("pattern",t),t))}return Fr(Pattern,Container),kr(Pattern,[{key:"url",value:function(){return"url(#"+this.id()+")"}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return this.url()}},{key:"attr",value:function(t,e,n){return"transform"===t&&(t="patternTransform"),Lr(Nr(Pattern.prototype),"attr",this).call(this,t,e,n)}},{key:"targets",value:function(){return Vr('svg [fill*="'+this.id()+'"]')}},{key:"bbox",value:function(){return new Ir}}]),Pattern}();cn({Container:{pattern:function(){var t;return(t=this.defs()).pattern.apply(t,arguments)}},Defs:{pattern:Qn(function(t,e,n){return this.put(new Pattern).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})})}}),Gn(Pattern);var di,Image=function(t){function Image(t){return Ln(this,Image),Pr(this,Nr(Image).call(this,In("image",t),t))}return Fr(Image,Shape),kr(Image,[{key:"load",value:function(t,n){if(!t)return this;var r=new Nn.window.Image;return mr(r,"load",function(t){var e=this.parent(Pattern);0===this.width()&&0===this.height()&&this.size(r.width,r.height),e instanceof Pattern&&0===e.width()&&0===e.height()&&e.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)},this),mr(r,"load error",function(){gr(r)}),this.attr("href",r.src=t,Tn)}}]),Image}();di=function(t,e,n){return"fill"!==t&&"stroke"!==t||or.test(e)&&(e=n.root().defs().image(e)),e instanceof Image&&(e=n.root().defs().pattern(0,0,function(t){t.add(e)})),e},ti.push(di),cn({Container:{image:Qn(function(t,e){return this.put(new Image).size(0,0).load(t,e)})}}),Gn(Image);var pi=Hr("PointArray",Kr);Un(pi,{toString:function(){for(var t=0,e=this.length,n=[];t<e;t++)n.push(this[t].join(","));return n.join(" ")},toLine:function(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}},at:function(t){if(!this.destination)return this;for(var e=0,n=this.length,r=[];e<n;e++)r.push([this[e][0]+(this.destination[e][0]-this[e][0])*t,this[e][1]+(this.destination[e][1]-this[e][1])*t]);return new pi(r)},parse:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[[0,0]],e=[];if(t instanceof Array){if(t[0]instanceof Array)return t}else t=t.trim().split(ur).map(parseFloat);t.length%2!=0&&t.pop();for(var n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r=this.length-1;0<=r;r--)this[r]=[this[r][0]+t,this[r][1]+e];return this},size:function(t,e){var n,r=this.bbox();for(n=this.length-1;0<=n;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this},bbox:function(){var e=-1/0,n=-1/0,r=1/0,i=1/0;return this.forEach(function(t){e=Math.max(t[0],e),n=Math.max(t[1],n),r=Math.min(t[0],r),i=Math.min(t[1],i)}),{x:r,y:i,width:e-r,height:n-i}}});var mi=pi;var gi=Object.freeze({MorphArray:mi,x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)},width:function(t){var e=this.bbox();return null==t?e.width:this.size(t,e.height)},height:function(t){var e=this.bbox();return null==t?e.height:this.size(e.width,t)}}),Line=function(t){function Line(t){return Ln(this,Line),Pr(this,Nr(Line).call(this,In("line",t),t))}return Fr(Line,Shape),kr(Line,[{key:"array",value:function(){return new pi([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}},{key:"plot",value:function(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new pi(t).toLine(),this.attr(t))}},{key:"move",value:function(t,e){return this.attr(this.array().move(t,e).toLine())}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}]),Line}();Un(Line,gi),cn({Container:{line:Qn(function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return Line.prototype.plot.apply(this.put(new Line),null!=e[0]?e:[0,0,0,0])})}}),Gn(Line);var Marker=function(t){function Marker(t){return Ln(this,Marker),Pr(this,Nr(Marker).call(this,In("marker",t),t))}return Fr(Marker,Container),kr(Marker,[{key:"width",value:function(t){return this.attr("markerWidth",t)}},{key:"height",value:function(t){return this.attr("markerHeight",t)}},{key:"ref",value:function(t,e){return this.attr("refX",t).attr("refY",e)}},{key:"update",value:function(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}},{key:"toString",value:function(){return"url(#"+this.id()+")"}}]),Marker}();cn({Container:{marker:function(){var t;return(t=this.defs()).marker.apply(t,arguments)}},Defs:{marker:Qn(function(t,e,n){return this.put(new Marker).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)})},marker:{marker:function(t,e,n,r){var i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=e instanceof Marker?e:this.defs().marker(e,n,r),this.attr(i,t)}}}),Gn(Marker);var wi,_i,bi=[].sort,ki=[1,2,3];function xi(e,n){return function(t){return null==t?this[t]:(this[e]=t,n&&n.call(this),this)}}M(M.P+M.F*(w(function(){ki.sort(void 0)})||!w(function(){ki.sort(null)})||!((wi=bi)&&w(function(){_i?wi.call(null,function(){},1):wi.call(null)}))),"Array",{sort:function(t){return void 0===t?bi.call(K(this)):bi.call(K(this),y(t))}});var Oi={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(e,n,r,i){return function(t){return t<0?0<e?n/e*t:0<r?i/r*t:0:1<t?r<1?(1-i)/(1-r)*t+(i-r)/(1-r):e<1?(1-n)/(1-e)*t+(n-e)/(1-e):1:3*t*Math.pow(1-t,2)*n+3*Math.pow(t,2)*(1-t)*i+Math.pow(t,3)}},steps:function(i){var s=1<arguments.length&&void 0!==arguments[1]?arguments[1]:"end";s=s.split("-").reverse()[0];var o=i;return"none"===s?--o:"both"===s&&++o,function(t){var e=1<arguments.length&&void 0!==arguments[1]&&arguments[1],n=Math.floor(t*i),r=t*n%1==0;return"start"!==s&&"both"!==s||++n,e&&r&&--n,0<=t&&n<0&&(n=0),t<=1&&o<n&&(n=o),n/o}}},Si=function(){function t(){Ln(this,t)}return kr(t,[{key:"done",value:function(){return!1}}]),t}(),Mi=function(t){function n(t){var e;return Ln(this,n),(e=Pr(this,Nr(n).call(this))).ease=Oi[t||Qr.ease]||t,e}return Fr(n,Si),kr(n,[{key:"step",value:function(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}]),n}(),Ai=function(t){function n(t){var e;return Ln(this,n),(e=Pr(this,Nr(n).call(this))).stepper=t,e}return Fr(n,Si),kr(n,[{key:"step",value:function(t,e,n,r){return this.stepper(t,e,n,r)}},{key:"done",value:function(t){return t.done}}]),n}();function ji(){var t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}var Ei=function(t){function r(t,e){var n;return Ln(this,r),(n=Pr(this,Nr(r).call(this))).duration(t||500).overshoot(e||0),n}return Fr(r,Ai),kr(r,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;100<n&&(n=16),n/=1e3;var i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}}]),r}();Un(Ei,{duration:xi("_duration",ji),overshoot:xi("_overshoot",ji)});var Ti=function(t){function s(t,e,n,r){var i;return Ln(this,s),t=null==t?.1:t,e=null==e?.01:e,n=null==n?0:n,r=null==r?1e3:r,(i=Pr(this,Nr(s).call(this))).p(t).i(e).d(n).windup(r),i}return Fr(s,Ai),kr(s,[{key:"step",value:function(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;var i=e-t,s=(r.integral||0)+i*n,o=(i-(r.error||0))/n,u=this.windup;return!1!==u&&(s=Math.max(-u,Math.min(s,u))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}}]),s}();Un(Ti,{windup:xi("windup"),p:xi("P"),i:xi("I"),d:xi("D")});var Ci=Hr("PathArray",Kr);function Pi(t,e,n,r){return n+r.replace(fr," .")}for(var Ni={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Li="mlhvqtcsaz".split(""),Di=0,Fi=Li.length;Di<Fi;++Di)Ni[Li[Di]]=function(s){return function(t,e,n){if("H"===s)t[0]=t[0]+e.x;else if("V"===s)t[0]=t[0]+e.y;else if("A"===s)t[5]=t[5]+e.x,t[6]=t[6]+e.y;else for(var r=0,i=t.length;r<i;++r)t[r]=t[r]+(r%2?e.y:e.x);return Ni[s](t,e,n)}}(Li[Di].toUpperCase());Un(Ci,{toString:function(){return function(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e][0],null!=t[e][1]&&(r+=t[e][1],null!=t[e][2]&&(r+=" ",r+=t[e][2],null!=t[e][3]&&(r+=" ",r+=t[e][3],r+=" ",r+=t[e][4],null!=t[e][5]&&(r+=" ",r+=t[e][5],r+=" ",r+=t[e][6],null!=t[e][7]&&(r+=" ",r+=t[e][7])))));return r+" "}(this)},move:function(t,e){var n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(var r,i=this.length-1;0<=i;i--)"M"===(r=this[i][0])||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=e):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=e:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=e,this[i][3]+=t,this[i][4]+=e,"C"===r&&(this[i][5]+=t,this[i][6]+=e)):"A"===r&&(this[i][6]+=t,this[i][7]+=e);return this},size:function(t,e){var n,r,i=this.bbox();for(n=this.length-1;0<=n;n--)"M"===(r=this[n][0])||"L"===r||"T"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y):"H"===r?this[n][1]=(this[n][1]-i.x)*t/i.width+i.x:"V"===r?this[n][1]=(this[n][1]-i.y)*e/i.height+i.y:"C"===r||"S"===r||"Q"===r?(this[n][1]=(this[n][1]-i.x)*t/i.width+i.x,this[n][2]=(this[n][2]-i.y)*e/i.height+i.y,this[n][3]=(this[n][3]-i.x)*t/i.width+i.x,this[n][4]=(this[n][4]-i.y)*e/i.height+i.y,"C"===r&&(this[n][5]=(this[n][5]-i.x)*t/i.width+i.x,this[n][6]=(this[n][6]-i.y)*e/i.height+i.y)):"A"===r&&(this[n][1]=this[n][1]*t/i.width,this[n][2]=this[n][2]*e/i.height,this[n][6]=(this[n][6]-i.x)*t/i.width+i.x,this[n][7]=(this[n][7]-i.y)*e/i.height+i.y);return this},equalCommands:function(t){var e,n,r;for(t=new Ci(t),r=this.length===t.length,e=0,n=this.length;r&&e<n;e++)r=this[e][0]===t[e][0];return r},morph:function(t){return t=new Ci(t),this.equalCommands(t)?this.destination=t:this.destination=null,this},at:function(t){if(!this.destination)return this;var e,n,r,i,s=this,o=this.destination.value,u=[],a=new Ci;for(e=0,n=s.length;e<n;e++){for(u[e]=[s[e][0]],r=1,i=s[e].length;r<i;r++)u[e][r]=s[e][r]+(o[e][r]-s[e][r])*t;"A"===u[e][0]&&(u[e][4]=+(0!==u[e][4]),u[e][5]=+(0!==u[e][5]))}return a.value=u,a},parse:function(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[["M",0,0]];if(e instanceof Ci)return e;var n={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0};e="string"==typeof e?e.replace(cr,Pi).replace(hr," $& ").replace(ar,"$1 -").trim().split(ur):e.reduce(function(t,e){return[].concat.call(t,e)},[]);for(var r=[],i=new Rr,s=new Rr,o=0,u=e.length;lr.test(e[o])?(t=e[o],++o):"M"===t?t="L":"m"===t&&(t="l"),r.push(Ni[t].call(null,e.slice(o,o+=n[t.toUpperCase()]).map(parseFloat),i,s)),o<u;);return r},bbox:function(){return zr().path.setAttribute("d",this.toString()),zr.nodes.path.getBBox()}});var Ri=function(){function e(t){Ln(this,e),this._stepper=t||new Mi("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}return kr(e,[{key:"from",value:function(t){return null==t?this._from:(this._from=this._set(t),this)}},{key:"to",value:function(t){return null==t?this._to:(this._to=this._set(t),this)}},{key:"type",value:function(t){return null==t?this._type:(this._type=t,this)}},{key:"_set",value:function(t){if(!this._type){var e=Wt(t);"number"===e?this.type(Zr):"string"===e?Tr.isColor(t)?this.type(Tr):ur.test(t)?this.type(hr.test(t)?Ci:Kr):Jn.test(t)?this.type(Zr):this.type(zi):-1<Yi.indexOf(t.constructor)?this.type(t.constructor):Array.isArray(t)?this.type(Kr):"object"===e?this.type(Ii):this.type(zi)}var n=new this._type(t);return this._type===Tr&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),n=n.toArray(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object),n}},{key:"stepper",value:function(t){return null==t?this._stepper:(this._stepper=t,this)}},{key:"done",value:function(){return this._context.map(this._stepper.done).reduce(function(t,e){return t&&e},!0)}},{key:"at",value:function(n){var r=this;return this._morphObj.fromArray(this._from.map(function(t,e){return r._stepper.step(t,r._to[e],n,r._context[e],r._context)}))}}]),e}(),zi=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return kr(t,[{key:"init",value:function(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}},{key:"valueOf",value:function(){return this.value}},{key:"toArray",value:function(){return[this.value]}}]),t}(),qi=function(){function e(){Ln(this,e),this.init.apply(this,arguments)}return kr(e,[{key:"init",value:function(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,e.defaults,t),this}},{key:"toArray",value:function(){var t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}]),e}();qi.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};var Ii=function(){function t(){Ln(this,t),this.init.apply(this,arguments)}return kr(t,[{key:"init",value:function(t){if(this.values=[],!Array.isArray(t)){t=t||{};var e=[];for(var n in t)e.push([n,t[n]]);return e.sort(function(t,e){return t[0]-e[0]}),this.values=e.reduce(function(t,e){return t.concat(e)},[]),this}this.values=t}},{key:"valueOf",value:function(){for(var t={},e=this.values,n=0,r=e.length;n<r;n+=2)t[e[n]]=e[n+1];return t}},{key:"toArray",value:function(){return this.values}}]),t}(),Yi=[zi,qi,Ii];function Xi(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[];Yi.push.apply(Yi,_e([].concat(t)))}function Gi(){Un(Yi,{to:function(t){return(new Ri).type(this.constructor).from(this.valueOf()).to(t)},fromArray:function(t){return this.init(t),this}})}var Path=function(t){function Path(t){return Ln(this,Path),Pr(this,Nr(Path).call(this,In("path",t),t))}return Fr(Path,Shape),kr(Path,[{key:"array",value:function(){return this._array||(this._array=new Ci(this.attr("d")))}},{key:"plot",value:function(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Ci(t))}},{key:"clear",value:function(){return delete this._array,this}},{key:"move",value:function(t,e){return this.attr("d",this.array().move(t,e))}},{key:"x",value:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}},{key:"y",value:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},{key:"size",value:function(t,e){var n=Sn(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}},{key:"width",value:function(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}},{key:"height",value:function(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}},{key:"targets",value:function(){return Vr('svg textpath [href*="'+this.id()+'"]')}}]),Path}();Path.prototype.MorphArray=Ci,cn({Container:{path:Qn(function(t){return this.put(new Path).plot(t||new Ci)})}}),Gn(Path);var Hi=Object.freeze({array:function(){return this._array||(this._array=new pi(this.attr("points")))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new pi(t))},clear:function(){return delete this._array,this},move:function(t,e){return this.attr("points",this.array().move(t,e))},size:function(t,e){var n=Sn(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}}),Polygon=function(t){function Polygon(t){return Ln(this,Polygon),Pr(this,Nr(Polygon).call(this,In("polygon",t),t))}return Fr(Polygon,Shape),Polygon}();cn({Container:{polygon:Qn(function(t){return this.put(new Polygon).plot(t||new pi)})}}),Un(Polygon,gi),Un(Polygon,Hi),Gn(Polygon);var Polyline=function(t){function Polyline(t){return Ln(this,Polyline),Pr(this,Nr(Polyline).call(this,In("polyline",t),t))}return Fr(Polyline,Shape),Polyline}();cn({Container:{polyline:Qn(function(t){return this.put(new Polyline).plot(t||new pi)})}}),Un(Polyline,gi),Un(Polyline,Hi),Gn(Polyline);var Rect=function(t){function Rect(t){return Ln(this,Rect),Pr(this,Nr(Rect).call(this,In("rect",t),t))}return Fr(Rect,Shape),Rect}();Un(Rect,{rx:ri,ry:ii}),cn({Container:{rect:Qn(function(t,e){return this.put(new Rect).size(t,e)})}}),Gn(Rect);var Bi=function(){function t(){Ln(this,t),this._first=null,this._last=null}return kr(t,[{key:"push",value:function(t){var e=t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}},{key:"shift",value:function(){var t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}},{key:"first",value:function(){return this._first&&this._first.value}},{key:"last",value:function(){return this._last&&this._last.value}},{key:"remove",value:function(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}}]),t}(),Vi={nextDraw:null,frames:new Bi,timeouts:new Bi,timer:function(){return Nn.window.performance||Nn.window.Date},transforms:[],frame:function(t){var e=Vi.frames.push({run:t});return null===Vi.nextDraw&&(Vi.nextDraw=Nn.window.requestAnimationFrame(Vi._draw)),e},transform_frame:function(t,e){Vi.transforms[e]=t},timeout:function(t,e){e=e||0;var n=Vi.timer().now()+e,r=Vi.timeouts.push({run:t,time:n});return null===Vi.nextDraw&&(Vi.nextDraw=Nn.window.requestAnimationFrame(Vi._draw)),r},cancelFrame:function(t){null!=t&&Vi.frames.remove(t)},clearTimeout:function(t){null!=t&&Vi.timeouts.remove(t)},_draw:function(t){for(var e=null,n=Vi.timeouts.last();(e=Vi.timeouts.shift())&&(t>=e.time?e.run():Vi.timeouts.push(e),e!==n););for(var r=null,i=Vi.frames.last();r!==i&&(r=Vi.frames.shift());)r.run();Vi.transforms.forEach(function(t){t()}),Vi.nextDraw=Vi.timeouts.first()||Vi.frames.first()?Nn.window.requestAnimationFrame(Vi._draw):null}},Wi=function(t){var e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ui=function(){var t=Nn.window;return(t.performance||t.Date).now()},Qi=function(t){function n(){var t,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Ui;return Ln(this,n),(t=Pr(this,Nr(n).call(this)))._timeSource=e,t._startTime=0,t._speed=1,t._persist=0,t._nextFrame=null,t._paused=!0,t._runners=[],t._order=[],t._time=0,t._lastSourceTime=0,t._lastStepTime=0,t._step=t._step.bind(Cr(Cr(t))),t}return Fr(n,Wr),kr(n,[{key:"schedule",value:function(t,e,n){if(null==t)return this._runners.map(Wi).sort(function(t,e){return t.runner.id-e.runner.id});var r=0,i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else{if("relative"!==n)throw new Error('Invalid value for the "when" parameter');var s=this._runners[t.id];s&&(r=s.start+e,e=0)}return t.unschedule(),t.timeline(this),this._runners[t.id]={persist:this.persist(),runner:t,start:r+e},this._order.push(t.id),this.updateTime()._continue(),this}},{key:"unschedule",value:function(t){var e=this._order.indexOf(t.id);return e<0||(delete this._runners[t.id],this._order.splice(e,1),t.timeline(null)),this}},{key:"getEndTime",value:function(){var t=this._runners[this._order[this._order.length-1]],e=t?t.runner.duration():0;return(t?t.start:0)+e}},{key:"updateTime",value:function(){return this.active()||(this._lastSourceTime=this._timeSource()),this}},{key:"play",value:function(){return this._paused=!1,this.updateTime()._continue()}},{key:"pause",value:function(){return this._paused=!0,this._continue()}},{key:"stop",value:function(){return this.time(0),this.pause()}},{key:"finish",value:function(){return this.time(this.getEndTime()+1),this.pause()}},{key:"speed",value:function(t){return null==t?this._speed:(this._speed=t,this)}},{key:"reverse",value:function(t){var e=this.speed();if(null==t)return this.speed(-e);var n=Math.abs(e);return this.speed(t?n:-n)}},{key:"seek",value:function(t){return this.time(this._time+t)}},{key:"time",value:function(t){return null==t?this._time:(this._time=t,this._continue(!0))}},{key:"persist",value:function(t){return null==t?this._persist:(this._persist=t,this)}},{key:"source",value:function(t){return null==t?this._timeSource:(this._timeSource=t,this)}},{key:"_step",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],e=this._timeSource(),n=e-this._lastSourceTime;t&&(n=0);var r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(var i=!1,s=0,o=this._order.length;s<o;s++){var u=this._runners[this._order[s]],a=u.runner,h=r,l=this._time-u.start;if(l<=0)i=!0,a.reset();else if(l<h&&(h=l),a.active())if(a.step(h).done){if(!0!==u.persist){a.duration()-a.time()+this._time+this._persist<this._time&&(delete this._runners[this._order[s]],this._order.splice(s--,1)&&--o,a.timeline(null))}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._order.length&&this._speed<0&&0<this._time?this._continue():(this.fire("finished"),this.pause()),this}},{key:"_continue",value:function(){var t=0<arguments.length&&void 0!==arguments[0]&&arguments[0];return Vi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._step(!0):(this._paused||(this._nextFrame=Vi.frame(this._step)),this)}},{key:"active",value:function(){return!!this._nextFrame}}]),n}();cn({Element:{timeline:function(){return this._timeline=this._timeline||new Qi,this._timeline}}});var Ji=function(t){function s(t){var e;return Ln(this,s),(e=Pr(this,Nr(s).call(this))).id=s.id++,t="function"==typeof(t=null==t?Qr.duration:t)?new Ai(t):t,e._element=null,e._timeline=null,e.done=!1,e._queue=[],e._duration="number"==typeof t&&t,e._isDeclarative=t instanceof Ai,e._stepper=e._isDeclarative?t:new Mi,e._history={},e.enabled=!0,e._time=0,e._lastTime=0,e._reseted=!0,e.transforms=new Gr,e.transformId=1,e._haveReversed=!1,e._reverse=!1,e._loopsDone=0,e._swing=!1,e._wait=0,e._times=1,e}return Fr(s,Wr),kr(s,[{key:"element",value:function(t){return null==t?this._element:((this._element=t)._prepareRunner(),this)}},{key:"timeline",value:function(t){return void 0===t?this._timeline:(this._timeline=t,this)}},{key:"animate",value:function(t,e,n){var r=s.sanitise(t,e,n),i=new s(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(e,n)}},{key:"schedule",value:function(t,e,n){if(t instanceof Qi||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}},{key:"unschedule",value:function(){var t=this.timeline();return t&&t.unschedule(this),this}},{key:"loop",value:function(t,e,n){return"object"===Wt(t)&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,this}},{key:"delay",value:function(t){return this.animate(0,t)}},{key:"queue",value:function(t,e,n,r){return this._queue.push({initialiser:t||Ur,runner:e||Ur,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}},{key:"during",value:function(t){return this.queue(null,t)}},{key:"after",value:function(t){return this.on("finish",t)}},{key:"time",value:function(t){if(null==t)return this._time;var e=t-this._time;return this.step(e),this}},{key:"duration",value:function(){return this._times*(this._wait+this._duration)-this._wait}},{key:"loops",value:function(t){var e=this._duration+this._wait;if(null==t){var n=Math.floor(this._time/e),r=(this._time-n*e)/this._duration;return Math.min(n+r,this._times)}var i=t%1,s=e*Math.floor(t)+this._duration*i;return this.time(s)}},{key:"position",value:function(t){var e,n=this._time,i=this._duration,s=this._wait,r=this._times,o=this._swing,u=this._reverse;if(null==t){var a=function(t){var e=o*Math.floor(t%(2*(s+i))/(s+i)),n=e&&!u||!e&&u,r=Math.pow(-1,n)*(t%(s+i))/i+n;return Math.max(Math.min(r,1),0)},h=r*(s+i)-s;return e=n<=0?Math.round(a(1e-5)):n<h?a(n):Math.round(a(h-1e-5)),e}var l=Math.floor(this.loops()),c=o&&l%2==0;return e=l+(c&&!u||u&&c?t:1-t),this.loops(e)}},{key:"progress",value:function(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}},{key:"step",value:function(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;var e=this.position(),n=this._lastPosition!==e&&0<=this._time;this._lastPosition=e;var r=this.duration(),i=this._lastTime<=0&&0<this._time,s=this._lastTime<this._time&&this.time>r;this._lastTime=this._time,i&&this.fire("start",this);var o=this._isDeclarative;if(this.done=!o&&!s&&this._time>=r,this._reseted=!1,n||o){this._initialise(n),this.transforms=new Gr;var u=this._run(o?t:e);this.fire("step",this)}return this.done=this.done||u&&o,this.done&&this.fire("finish",this),this}},{key:"reset",value:function(){return this._reseted||(this.loops(0),this._reseted=!0),this}},{key:"finish",value:function(){return this.step(1/0)}},{key:"reverse",value:function(t){return this._reverse=null==t?!this._reverse:t,this}},{key:"ease",value:function(t){return this._stepper=new Mi(t),this}},{key:"active",value:function(t){return null==t?this.enabled:(this.enabled=t,this)}},{key:"_rememberMorpher",value:function(t,e){this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]}}},{key:"_tryRetarget",value:function(t,e){if(this._history[t]){if(!this._history[t].caller.initialised){var n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget(e):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;var r=this.timeline();return r&&r._continue(),!0}return!1}},{key:"_initialise",value:function(t){if(t||this._isDeclarative)for(var e=0,n=this._queue.length;e<n;++e){var r=this._queue[e],i=this._isDeclarative||!r.initialised&&t;t=!r.finished,i&&t&&(r.initialiser.call(this),r.initialised=!0)}}},{key:"_run",value:function(t){for(var e=!0,n=0,r=this._queue.length;n<r;++n){var i=this._queue[n],s=i.runner.call(this,t);i.finished=i.finished||!0===s,e=e&&i.finished}return e}},{key:"addTransform",value:function(t,e){return this.transforms.lmultiplyO(t),this}},{key:"clearTransform",value:function(){return this.transforms=new Gr,this}},{key:"clearTransformsFromQueue",value:function(){this.done||(this._queue=this._queue.filter(function(t){return!t.isTransform}))}}],[{key:"sanitise",value:function(t,e,n){var r=1,i=!1,s=0;return e=e||Qr.delay,n=n||"last","object"!==Wt(t=t||Qr.duration)||t instanceof Si||(e=t.delay||e,n=t.when||n,i=t.swing||i,r=t.times||r,s=t.wait||s,t=t.duration||Qr.duration),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}}]),s}();Ji.id=0;var $i=function(){function r(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:new Gr,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:-1,n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];Ln(this,r),this.transforms=t,this.id=e,this.done=n}return kr(r,[{key:"clearTransformsFromQueue",value:function(){}}]),r}();Un([Ji,$i],{mergeWith:function(t){return new $i(t.transforms.lmultiply(this.transforms),t.id)}});var Ki=function(t,e){return t.lmultiplyO(e)},Zi=function(t){return t.transforms};var ts=function(){function t(){Ln(this,t),this.runners=[],this.ids=[]}return kr(t,[{key:"add",value:function(t){if(!this.runners.includes(t)){var n=t.id+1,e=this.ids.reduce(function(t,e){return t<e&&e<n?e:t},0),r=this.ids.indexOf(e)+1;return this.ids.splice(r,0,n),this.runners.splice(r,0,t),this}}},{key:"getByID",value:function(t){return this.runners[this.ids.indexOf(t+1)]}},{key:"remove",value:function(t){var e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}},{key:"merge",value:function(){var n=this,r=null;return this.runners.forEach(function(t,e){r&&t.done&&r.done&&(n.remove(t.id),n.edit(r.id,t.mergeWith(r))),r=t}),this}},{key:"edit",value:function(t,e){var n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t),this.runners.splice(n,1,e),this}},{key:"length",value:function(){return this.ids.length}},{key:"clearBefore",value:function(t){var e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new $i).forEach(function(t){return t.clearTransformsFromQueue()}),this}}]),t}(),es=0;cn({Element:{animate:function(t,e,n){var r=Ji.sanitise(t,e,n),i=this.timeline();return new Ji(r.duration).loop(r).element(this).timeline(i.play()).schedule(e,n)},delay:function(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore:function(t){this._transformationRunners.clearBefore(t.id)},_currentTransform:function(e){return this._transformationRunners.runners.filter(function(t){return t.id<=e.id}).map(Zi).reduce(Ki,new Gr)},addRunner:function(t){this._transformationRunners.add(t),Vi.transform_frame(function(){var t=this._transformationRunners.runners.map(Zi).reduce(Ki,new Gr);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}.bind(this),this._frameId)},_prepareRunner:function(){null==this._frameId&&(this._transformationRunners=(new ts).add(new $i(new Gr(this))),this._frameId=es++)}}}),Un(Ji,{attr:function(t,e){return this.styleAttr("attr",t,e)},css:function(t,e){return this.styleAttr("css",t,e)},styleAttr:function(e,n,t){if("object"===Wt(n))for(var r in t)this.styleAttr(e,r,t[r]);var i=new Ri(this._stepper).to(t);return this.queue(function(){i=i.from(this.element()[e](n))},function(t){return this.element()[e](n,i.at(t)),i.done()}),this},zoom:function(t,e){var n=new Ri(this._stepper).to(new Zr(t));return this.queue(function(){n=n.from(this.zoom())},function(t){return this.element().zoom(n.at(t),e),n.done()}),this},transform:function(v,y,d){if(y=v.relative||y,this._isDeclarative&&!y&&this._tryRetarget("transform",v))return this;var p=Gr.isMatrixLike(v);d=null!=v.affine?v.affine:null!=d?d:!p;var m,g,w,_,b,k=new Ri(this._stepper).type(d?qi:Gr);return this.queue(function(){g=g||this.element(),m=m||Mn(v,g),b=new Gr(y?void 0:g),g.addRunner(this),y||g._clearTransformRunnersBefore(this)},function(t){y||this.clearTransform();var e=new Rr(m).transform(g._currentTransform(this)),n=e.x,r=e.y,i=new Gr(ni({},v,{origin:[n,r]})),s=this._isDeclarative&&w?w:b;if(d){i=i.decompose(n,r),s=s.decompose(n,r);var o=i.rotate,u=s.rotate,a=[o-360,o,o+360],h=a.map(function(t){return Math.abs(t-u)}),l=Math.min.apply(Math,_e(h)),c=h.indexOf(l);i.rotate=a[c]}y&&(p||(i.rotate=v.rotate||0),this._isDeclarative&&_&&(s.rotate=_)),k.from(s),k.to(i);var f=k.at(t);return _=f.rotate,w=new Gr(f),this.addTransform(w),k.done()},function(t){(t.origin||"center").toString()!==(v.origin||"center").toString()&&(m=Mn(v,g)),v=ni({},t,{origin:m})},!0),this._isDeclarative&&this._rememberMorpher("transform",k),this},x:function(t,e){return this._queueNumber("x",t)},y:function(t){return this._queueNumber("y",t)},dx:function(t){return this._queueNumberDelta("x",t)},dy:function(t){return this._queueNumberDelta("y",t)},_queueNumberDelta:function(e,t){if(t=new Zr(t),this._tryRetarget(e,t))return this;var n=new Ri(this._stepper).to(t),r=null;return this.queue(function(){r=this.element()[e](),n.from(r),n.to(r+t)},function(t){return this.element()[e](n.at(t)),n.done()},function(t){n.to(r+new Zr(t))}),this._rememberMorpher(e,n),this},_queueObject:function(e,t){if(this._tryRetarget(e,t))return this;var n=new Ri(this._stepper).to(t);return this.queue(function(){n.from(this.element()[e]())},function(t){return this.element()[e](n.at(t)),n.done()}),this._rememberMorpher(e,n),this},_queueNumber:function(t,e){return this._queueObject(t,new Zr(e))},cx:function(t){return this._queueNumber("cx",t)},cy:function(t){return this._queueNumber("cy",t)},move:function(t,e){return this.x(t).y(e)},center:function(t,e){return this.cx(t).cy(e)},size:function(t,e){var n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width:function(t){return this._queueNumber("width",t)},height:function(t){return this._queueNumber("height",t)},plot:function(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);var i=this._element.MorphArray().to(t);return this.queue(function(){i.from(this._element.array())},function(t){this._element.plot(i.at(t))}),this},leading:function(t){return this._queueNumber("leading",t)},viewbox:function(t,e,n,r){return this._queueObject("viewbox",new Ir(t,e,n,r))},update:function(t){return"object"!==Wt(t)?this.update({offset:t,color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Un(Ji,{rx:ri,ry:ii,from:fi,to:vi});var ns=function(t){function Svg(t){var e;return Ln(this,Svg),(e=Pr(this,Nr(Svg).call(this,In("svg",t),t))).namespace(),e}return Fr(Svg,Container),kr(Svg,[{key:"isRoot",value:function(){return!(this.node.parentNode&&this.node.parentNode instanceof Nn.window.SVGElement&&"#document"!==this.node.parentNode.nodeName)}},{key:"root",value:function(){return this.isRoot()?this:Lr(Nr(Svg.prototype),"root",this).call(this)}},{key:"namespace",value:function(){return this.isRoot()?this.attr({xmlns:jn,version:"1.1"}).attr("xmlns:xlink",Tn,En).attr("xmlns:svgjs",Cn,En):this.root().namespace()}},{key:"defs",value:function(){return this.isRoot()?Yn(this.node.getElementsByTagName("defs")[0])||this.put(new Defs):this.root().defs()}},{key:"parent",value:function(t){return this.isRoot()?"#document"===this.node.parentNode.nodeName?null:Yn(this.node.parentNode):Lr(Nr(Svg.prototype),"parent",this).call(this,t)}},{key:"clear",value:function(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}}]),Svg}();cn({Container:{nested:Qn(function(){return this.put(new ns)})}}),Gn(ns,"Svg",!0);var rs=function(t){function e(t){return Ln(this,e),Pr(this,Nr(e).call(this,In("symbol",t),t))}return Fr(e,Container),e}();cn({Container:{symbol:Qn(function(){return this.put(new rs)})}}),Gn(rs);var is=Object.freeze({plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Nn.document.createTextNode(t)),this},length:function(){return this.node.getComputedTextLength()}}),Text=function(t){function Text(t){var e;return Ln(this,Text),(e=Pr(this,Nr(Text).call(this,In("text",t),t))).dom.leading=new Zr(1.3),e._rebuild=!0,e._build=!1,e.attr("font-family",Jr["font-family"]),e}return Fr(Text,Shape),kr(Text,[{key:"x",value:function(t){return null==t?this.attr("x"):this.attr("x",t)}},{key:"y",value:function(t){var e=this.attr("y"),n="number"==typeof e?e-this.bbox().y:0;return null==t?"number"==typeof e?e-n:e:this.attr("y","number"==typeof t?t+n:t)}},{key:"cx",value:function(t){return null==t?this.bbox().cx:this.x(t-this.bbox().width/2)}},{key:"cy",value:function(t){return null==t?this.bbox().cy:this.y(t-this.bbox().height/2)}},{key:"text",value:function(t){if(void 0===t){var e=this.node.childNodes,n=0;t="";for(var r=0,i=e.length;r<i;++r)"textPath"!==e[r].nodeName?(r!==n&&3!==e[r].nodeType&&!0===Yn(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent):0===r&&(n=1);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(var s=0,o=(t=t.split("\n")).length;s<o;s++)this.tspan(t[s]).newLine();return this.build(!1).rebuild()}},{key:"leading",value:function(t){return null==t?this.dom.leading:(this.dom.leading=new Zr(t),this.rebuild())}},{key:"rebuild",value:function(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){var n=this,r=0,i=this.dom.leading;this.each(function(){var t=Nn.window.getComputedStyle(this.node).getPropertyValue("font-size"),e=i*new Zr(t);this.dom.newLined&&(this.attr("x",n.attr("x")),"\n"===this.text()?r+=e:(this.attr("dy",e+r),r=0))}),this.fire("rebuild")}return this}},{key:"build",value:function(t){return this._build=!!t,this}},{key:"setData",value:function(t){return this.dom=t,this.dom.leading=new Zr(t.leading||1.3),this}}]),Text}();Un(Text,is),cn({Container:{text:Qn(function(t){return this.put(new Text).text(t)}),plain:Qn(function(t){return this.put(new Text).plain(t)})}}),Gn(Text);var Tspan=function(t){function Tspan(t){return Ln(this,Tspan),Pr(this,Nr(Tspan).call(this,In("tspan",t),t))}return Fr(Tspan,Text),kr(Tspan,[{key:"text",value:function(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?t.call(this,this):this.plain(t),this)}},{key:"dx",value:function(t){return this.attr("dx",t)}},{key:"dy",value:function(t){return this.attr("dy",t)}},{key:"newLine",value:function(){var t=this.parent(Text);return this.dom.newLined=!0,this.dy(t.dom.leading*t.attr("font-size")).attr("x",t.x())}}]),Tspan}();Un(Tspan,is),cn({Tspan:{tspan:Qn(function(t){var e=new Tspan;return this._build||this.clear(),this.node.appendChild(e.node),e.text(t)})}}),Gn(Tspan);var ClipPath=function(t){function ClipPath(t){return Ln(this,ClipPath),Pr(this,Nr(ClipPath).call(this,In("clipPath",t),t))}return Fr(ClipPath,Container),kr(ClipPath,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unclip()}),Lr(Nr(ClipPath.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Vr('svg [clip-path*="'+this.id()+'"]')}}]),ClipPath}();cn({Container:{clip:Qn(function(){return this.defs().put(new ClipPath)})},Element:{clipWith:function(t){var e=t instanceof ClipPath?t:this.parent().clip().add(t);return this.attr("clip-path",'url("#'+e.id()+'")')},unclip:function(){return this.attr("clip-path",null)},clipper:function(){return this.reference("clip-path")}}}),Gn(ClipPath);var G=function(t){function G(t){return Ln(this,G),Pr(this,Nr(G).call(this,In("g",t),t))}return Fr(G,Container),G}();cn({Element:{group:Qn(function(){return this.put(new G)})}}),Gn(G);var A=function(t){function A(t){return Ln(this,A),Pr(this,Nr(A).call(this,In("a",t),t))}return Fr(A,Container),kr(A,[{key:"to",value:function(t){return this.attr("href",t,Tn)}},{key:"target",value:function(t){return this.attr("target",t)}}]),A}();cn({Container:{link:Qn(function(t){return this.put(new A).to(t)})},Element:{linkTo:function(t){var e=new A;return"function"==typeof t?t.call(e,e):e.to(t),this.parent().put(e).put(this)}}}),Gn(A);var Mask=function(t){function Mask(t){return Ln(this,Mask),Pr(this,Nr(Mask).call(this,In("mask",t),t))}return Fr(Mask,Container),kr(Mask,[{key:"remove",value:function(){return this.targets().forEach(function(t){t.unmask()}),Lr(Nr(Mask.prototype),"remove",this).call(this)}},{key:"targets",value:function(){return Vr('svg [mask*="'+this.id()+'"]')}}]),Mask}();cn({Container:{mask:Qn(function(){return this.defs().put(new Mask)})},Element:{maskWith:function(t){var e=t instanceof Mask?t:this.parent().mask().add(t);return this.attr("mask",'url("#'+e.id()+'")')},unmask:function(){return this.attr("mask",null)},masker:function(){return this.reference("mask")}}}),Gn(Mask);var Style=function(t){function Style(t){return Ln(this,Style),Pr(this,Nr(Style).call(this,In("style",t),t))}return Fr(Style,Element),kr(Style,[{key:"addText",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"";return this.node.textContent+=t,this}},{key:"font",value:function(t,e){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return this.rule("@font-face",ni({fontFamily:t,src:e},n))}},{key:"rule",value:function(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;var n=t+"{";for(var r in e)n+=xn(r)+":"+e[r]+";";return n+="}"}(t,e))}}]),Style}();cn("Dom",{style:Qn(function(t,e){return this.put(new Style).rule(t,e)}),fontface:Qn(function(t,e,n){return this.put(new Style).font(t,e,n)})}),Gn(Style);var ss,os,us,as,hs,ls,cs,fs,vs,ys=et("species"),ds=(us=1==(ss=5),as=2==ss,hs=3==ss,ls=4==ss,cs=6==ss,fs=5==ss||cs,vs=os||function(t,e){return Oe(n=t)&&("function"!=typeof(r=n.constructor)||r!==Array&&!Oe(r.prototype)||(r=void 0),g(r)&&null===(r=r[ys])&&(r=void 0)),new(void 0===r?Array:r)(e);var n,r},function(t,e,n){for(var r,i,s=K(t),o=T(s),u=_(e,n,3),a=R(o.length),h=0,l=us?vs(t,a):as?vs(t,0):void 0;h<a;h++)if((fs||h in o)&&(i=u(r=o[h],h,s),ss))if(us)l[h]=i;else if(i)switch(ss){case 3:return!0;case 5:return r;case 6:return h;case 2:l.push(r)}else if(ls)return!1;return cs?-1:hs||ls?ls:l}),ps="find",ms=!0;ps in[]&&Array(1)[ps](function(){ms=!1}),M(M.P+M.F*ms,"Array",{find:function(t){return ds(this,t,1<arguments.length?arguments[1]:void 0)}}),it(ps);var TextPath=function(t){function TextPath(t){return Ln(this,TextPath),Pr(this,Nr(TextPath).call(this,In("textPath",t),t))}return Fr(TextPath,Text),kr(TextPath,[{key:"array",value:function(){var t=this.track();return t?t.array():null}},{key:"plot",value:function(t){var e=this.track(),n=null;return e&&(n=e.plot(t)),null==t?n:this}},{key:"track",value:function(){return this.reference("href")}}]),TextPath}();cn({Container:{textPath:Qn(function(t,e){return this.defs().path(e).text(t).addTo(this)})},Text:{path:Qn(function(t){var e=new TextPath;return t instanceof Path||(t=this.root().defs().path(t)),e.attr("href","#"+t,Tn),this.put(e)}),textPath:function(){return this.find("textPath")[0]}},Path:{text:Qn(function(t){if(t instanceof Text){var e=t.text();return t.clear().path(this).text(e)}return this.parent().put(new Text).path(this).text(t)}),targets:function(){return Vr('svg [href*="'+this.id()+'"]')}}}),TextPath.prototype.MorphArray=Ci,Gn(TextPath);var Use=function(t){function Use(t){return Ln(this,Use),Pr(this,Nr(Use).call(this,In("use",t),t))}return Fr(Use,Shape),kr(Use,[{key:"element",value:function(t,e){return this.attr("href",(e||"")+"#"+t,Tn)}}]),Use}();cn({Container:{use:Qn(function(t,e){return this.put(new Use).element(t,e)})}}),Gn(Use);var gs=qn;Un([ns,rs,Image,Pattern,Marker],fn("viewbox")),Un([Line,Polyline,Polygon,Path],fn("marker")),Un(Text,fn("Text")),Un(Path,fn("Path")),Un(Defs,fn("Defs")),Un([Text,Tspan],fn("Tspan")),Un([Rect,Ellipse,Circle,Gradient],fn("radius")),Un(Wr,fn("EventTarget")),Un(Dom,fn("Dom")),Un(Element,fn("Element")),Un(Shape,fn("Shape")),Un(Container,fn("Container")),Un(Ji,fn("Runner")),Br.extend(_e(new Set(ln))),Xi([Zr,Tr,Ir,Gr,Kr,pi,Ci]),Gi();var ws=Object.freeze({Morphable:Ri,registerMorphableType:Xi,makeMorphable:Gi,TransformBag:qi,ObjectBag:Ii,NonMorphable:zi,defaults:$r,utils:An,namespaces:Pn,regex:vr,SVG:gs,parser:zr,find:Vr,registerWindow:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null;Nn.window=t,Nn.document=e},Animator:Vi,Controller:Ai,Ease:Mi,PID:Ti,Spring:Ei,easing:Oi,Queue:Bi,Runner:Ji,Timeline:Qi,Array:Kr,Box:Ir,Color:Tr,EventTarget:Wr,Matrix:Gr,Number:Zr,PathArray:Ci,Point:Rr,PointArray:pi,List:Br,Circle:Circle,ClipPath:ClipPath,Container:Container,Defs:Defs,Dom:Dom,Element:Element,Ellipse:Ellipse,Gradient:Gradient,G:G,A:A,Image:Image,Line:Line,Marker:Marker,Mask:Mask,Path:Path,Pattern:Pattern,Polygon:Polygon,Polyline:Polyline,Rect:Rect,Shape:Shape,Stop:Stop,Style:Style,Svg:ns,Symbol:rs,Text:Text,TextPath:TextPath,Tspan:Tspan,Use:Use,on:mr,off:gr,dispatch:wr,root:Rn,makeNode:zn,makeInstance:qn,nodeOrNew:In,adopt:Yn,mockAdopt:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:Yn;Xn=t},register:Gn,getClass:Hn,eid:Vn,assignNewId:Wn,extend:Un,wrapWithAttrCheck:Qn});function _s(t){return qn(t)}return Object.assign(_s,ws),_s}();
//# sourceMappingURL=svg.min.js.map
diff --git a/dist/svg.min.js.map b/dist/svg.min.js.map
index a73d278..5517688 100644
--- a/dist/svg.min.js.map
+++ b/dist/svg.min.js.map
@@ -1 +1 @@
-{"version":3,"file":"svg.min.js","sources":["../node_modules/core-js/modules/_global.js","../node_modules/core-js/modules/_core.js","../node_modules/core-js/modules/_is-object.js","../node_modules/core-js/modules/_an-object.js","../node_modules/core-js/modules/_fails.js","../node_modules/core-js/modules/_descriptors.js","../node_modules/core-js/modules/_dom-create.js","../node_modules/core-js/modules/_ie8-dom-define.js","../node_modules/core-js/modules/_to-primitive.js","../node_modules/core-js/modules/_object-dp.js","../node_modules/core-js/modules/_property-desc.js","../node_modules/core-js/modules/_hide.js","../node_modules/core-js/modules/_has.js","../node_modules/core-js/modules/_uid.js","../node_modules/core-js/modules/_redefine.js","../node_modules/core-js/modules/_a-function.js","../node_modules/core-js/modules/_ctx.js","../node_modules/core-js/modules/_export.js","../node_modules/core-js/modules/_cof.js","../node_modules/core-js/modules/_iobject.js","../node_modules/core-js/modules/_defined.js","../node_modules/core-js/modules/_to-iobject.js","../node_modules/core-js/modules/_to-integer.js","../node_modules/core-js/modules/_to-length.js","../node_modules/core-js/modules/_to-absolute-index.js","../node_modules/core-js/modules/_array-includes.js","../node_modules/core-js/modules/_shared.js","../node_modules/core-js/modules/_shared-key.js","../node_modules/core-js/modules/_object-keys-internal.js","../node_modules/core-js/modules/_enum-bug-keys.js","../node_modules/core-js/modules/_object-keys.js","../node_modules/core-js/modules/_object-gops.js","../node_modules/core-js/modules/_object-pie.js","../node_modules/core-js/modules/_to-object.js","../node_modules/core-js/modules/_object-assign.js","../node_modules/core-js/modules/es6.object.assign.js","../node_modules/core-js/modules/_wks.js","../node_modules/core-js/modules/_add-to-unscopables.js","../node_modules/core-js/modules/_iter-step.js","../node_modules/core-js/modules/_iterators.js","../node_modules/core-js/modules/_object-dps.js","../node_modules/core-js/modules/_html.js","../node_modules/core-js/modules/_object-create.js","../node_modules/core-js/modules/_set-to-string-tag.js","../node_modules/core-js/modules/_iter-create.js","../node_modules/core-js/modules/_object-gpo.js","../node_modules/core-js/modules/_iter-define.js","../node_modules/core-js/modules/es6.array.iterator.js","../node_modules/core-js/modules/web.dom.iterable.js","../node_modules/core-js/modules/_object-sap.js","../node_modules/core-js/modules/es6.object.keys.js","../node_modules/core-js/modules/es6.function.name.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/core-js/modules/_string-at.js","../node_modules/core-js/modules/es6.string.iterator.js","../node_modules/core-js/modules/_redefine-all.js","../node_modules/core-js/modules/_an-instance.js","../node_modules/core-js/modules/_iter-call.js","../node_modules/core-js/modules/_is-array-iter.js","../node_modules/core-js/modules/_classof.js","../node_modules/core-js/modules/core.get-iterator-method.js","../node_modules/core-js/modules/_for-of.js","../node_modules/core-js/modules/_set-species.js","../node_modules/core-js/modules/_meta.js","../node_modules/core-js/modules/_validate-collection.js","../node_modules/core-js/modules/_collection-strong.js","../node_modules/core-js/modules/_iter-detect.js","../node_modules/core-js/modules/_object-gopd.js","../node_modules/core-js/modules/_set-proto.js","../node_modules/core-js/modules/_inherit-if-required.js","../node_modules/core-js/modules/_collection.js","../node_modules/core-js/modules/es6.set.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/core-js/modules/_wks-ext.js","../node_modules/core-js/modules/_wks-define.js","../node_modules/core-js/modules/es7.symbol.async-iterator.js","../node_modules/core-js/modules/_enum-keys.js","../node_modules/core-js/modules/_is-array.js","../node_modules/core-js/modules/_object-gopn.js","../node_modules/core-js/modules/_object-gopn-ext.js","../node_modules/core-js/modules/es6.symbol.js","../src/utils/methods.js","../node_modules/core-js/modules/es7.array.includes.js","../node_modules/core-js/modules/_is-regexp.js","../node_modules/core-js/modules/_fails-is-regexp.js","../node_modules/core-js/modules/es6.string.includes.js","../node_modules/core-js/modules/_string-context.js","../node_modules/core-js/modules/_fix-re-wks.js","../src/utils/utils.js","../node_modules/core-js/modules/es6.regexp.replace.js","../src/modules/core/namespaces.js","../src/utils/window.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../src/types/Base.js","../src/utils/adopter.js","../src/modules/optional/arrange.js","../node_modules/core-js/modules/es6.regexp.split.js","../src/modules/core/regex.js","../src/modules/optional/class.js","../src/modules/optional/css.js","../src/modules/optional/data.js","../src/modules/optional/memory.js","../src/modules/core/event.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/core-js/modules/_flags.js","../node_modules/core-js/modules/es6.regexp.flags.js","../node_modules/core-js/modules/es6.regexp.to-string.js","../src/types/Color.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/get.js","../node_modules/@babel/runtime/helpers/esm/superPropBase.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/core-js/modules/es6.regexp.match.js","../src/types/Point.js","../src/modules/core/parser.js","../src/types/Box.js","../src/types/Matrix.js","../src/types/ArrayPolyfill.js","../src/types/List.js","../src/modules/core/selector.js","../src/types/EventTarget.js","../src/modules/core/defaults.js","../src/types/SVGArray.js","../src/types/SVGNumber.js","../src/modules/core/attr.js","../src/elements/Dom.js","../src/elements/Element.js","../src/modules/optional/sugar.js","../node_modules/@babel/runtime/helpers/esm/objectSpread.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../src/modules/core/circled.js","../src/modules/optional/transform.js","../src/elements/Shape.js","../src/elements/Circle.js","../src/elements/Container.js","../src/elements/Defs.js","../src/elements/Ellipse.js","../src/elements/Stop.js","../src/modules/core/gradiented.js","../src/elements/Gradient.js","../src/elements/Pattern.js","../src/elements/Image.js","../src/types/PointArray.js","../src/modules/core/pointed.js","../src/elements/Line.js","../src/elements/Marker.js","../node_modules/core-js/modules/_strict-method.js","../node_modules/core-js/modules/es6.array.sort.js","../src/animation/Controller.js","../src/types/PathArray.js","../src/animation/Morphable.js","../src/elements/Path.js","../src/modules/core/poly.js","../src/elements/Polygon.js","../src/elements/Polyline.js","../src/elements/Rect.js","../src/animation/Queue.js","../src/animation/Animator.js","../src/animation/Timeline.js","../src/animation/Runner.js","../src/elements/Svg.js","../src/elements/Symbol.js","../src/modules/core/textable.js","../src/elements/Text.js","../src/elements/Tspan.js","../src/elements/ClipPath.js","../src/elements/G.js","../src/elements/A.js","../src/elements/Mask.js","../src/elements/Style.js","../node_modules/core-js/modules/_array-species-constructor.js","../node_modules/core-js/modules/_array-methods.js","../node_modules/core-js/modules/es6.array.find.js","../node_modules/core-js/modules/_array-species-create.js","../src/elements/TextPath.js","../src/elements/Use.js","../src/main.js","../src/svg.js"],"sourcesContent":["// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nexport default function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}","export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}","export default function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}","exports.f = require('./_wks');\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","require('./_wks-define')('asyncIterator');\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","const methods = {}\r\nconst names = []\r\n\r\nexport function registerMethods (name, m) {\r\n if (Array.isArray(name)) {\r\n for (let _name of name) {\r\n registerMethods(_name, m)\r\n }\r\n return\r\n }\r\n\r\n if (typeof name === 'object') {\r\n for (let _name in name) {\r\n registerMethods(_name, name[_name])\r\n }\r\n return\r\n }\r\n\r\n addMethodNames(Object.keys(m))\r\n methods[name] = Object.assign(methods[name] || {}, m)\r\n}\r\n\r\nexport function getMethodsFor (name) {\r\n return methods[name] || {}\r\n}\r\n\r\nexport function getMethodNames () {\r\n return [...new Set(names)]\r\n}\r\n\r\nexport function addMethodNames (_names) {\r\n names.push(..._names)\r\n}\r\n","'use strict';\n// https://github.com/tc39/Array.prototype.includes\nvar $export = require('./_export');\nvar $includes = require('./_array-includes')(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nrequire('./_add-to-unscopables')('includes');\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","var MATCH = require('./_wks')('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./_export');\nvar context = require('./_string-context');\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./_is-regexp');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","// Map function\r\nexport function map (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n result.push(block(array[i]))\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Filter function\r\nexport function filter (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n if (block(array[i])) { result.push(array[i]) }\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Degrees to radians\r\nexport function radians (d) {\r\n return d % 360 * Math.PI / 180\r\n}\r\n\r\n// Radians to degrees\r\nexport function degrees (r) {\r\n return r * 180 / Math.PI % 360\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nexport function camelCase (s) {\r\n return s.toLowerCase().replace(/-(.)/g, function (m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Convert camel cased string to string seperated\r\nexport function unCamelCase (s) {\r\n return s.replace(/([A-Z])/g, function (m, g) {\r\n return '-' + g.toLowerCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nexport function capitalize (s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nexport function proportionalSize (element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null) {\r\n width = box.width / box.height * height\r\n } else if (height == null) {\r\n height = box.height / box.width * width\r\n }\r\n }\r\n\r\n return {\r\n width: width,\r\n height: height\r\n }\r\n}\r\n\r\nexport function getOrigin (o, element) {\r\n // Allow origin or around as the names\r\n let origin = o.origin // o.around == null ? o.origin : o.around\r\n let ox, oy\r\n\r\n // Allow the user to pass a string to rotate around a given point\r\n if (typeof origin === 'string' || origin == null) {\r\n // Get the bounding box of the element with no transformations applied\r\n const string = (origin || 'center').toLowerCase().trim()\r\n const { height, width, x, y } = element.bbox()\r\n\r\n // Calculate the transformed x and y coordinates\r\n let bx = string.includes('left') ? x\r\n : string.includes('right') ? x + width\r\n : x + width / 2\r\n let by = string.includes('top') ? y\r\n : string.includes('bottom') ? y + height\r\n : y + height / 2\r\n\r\n // Set the bounds eg : \"bottom-left\", \"Top right\", \"middle\" etc...\r\n ox = o.ox != null ? o.ox : bx\r\n oy = o.oy != null ? o.oy : by\r\n } else {\r\n ox = origin[0]\r\n oy = origin[1]\r\n }\r\n\r\n // Return the origin as it is if it wasn't a string\r\n return [ ox, oy ]\r\n}\r\n","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","// Default namespaces\r\nexport let ns = 'http://www.w3.org/2000/svg'\r\nexport let xmlns = 'http://www.w3.org/2000/xmlns/'\r\nexport let xlink = 'http://www.w3.org/1999/xlink'\r\nexport let svgjs = 'http://svgjs.com/svgjs'\r\n","export const globals = {\r\n window: typeof window === 'undefined' ? null : window,\r\n document: typeof document === 'undefined' ? null : document\r\n}\r\n\r\nexport function registerWindow (win = null, doc = null) {\r\n globals.window = win\r\n globals.document = doc\r\n}\r\n\r\nconst save = {}\r\n\r\nexport function saveWindow () {\r\n save.window = globals.window\r\n save.document = globals.document\r\n}\r\n\r\nexport function restoreWindow () {\r\n globals.window = save.window\r\n globals.document = save.document\r\n}\r\n\r\nexport function withWindow (win, fn) {\r\n saveWindow()\r\n registerWindow(win, win.document)\r\n fn(win, win.document)\r\n restoreWindow()\r\n}\r\n\r\nexport function getWindow () {\r\n return globals.window\r\n}\r\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default class Base {\r\n // constructor (node/*, {extensions = []} */) {\r\n // // this.tags = []\r\n // //\r\n // // for (let extension of extensions) {\r\n // // extension.setup.call(this, node)\r\n // // this.tags.push(extension.name)\r\n // // }\r\n // }\r\n}\r\n","import { addMethodNames } from './methods.js'\r\nimport { capitalize } from './utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Base from '../types/Base.js'\r\n\r\nconst elements = {}\r\nexport const root = '___SYMBOL___ROOT___'\r\n\r\n// Method for element creation\r\nexport function makeNode (name) {\r\n // create element\r\n return globals.document.createElementNS(ns, name)\r\n}\r\n\r\nexport function makeInstance (element) {\r\n if (element instanceof Base) return element\r\n\r\n if (typeof element === 'object') {\r\n return adopter(element)\r\n }\r\n\r\n if (element == null) {\r\n return new elements[root]()\r\n }\r\n\r\n if (typeof element === 'string' && element.charAt(0) !== '<') {\r\n return adopter(globals.document.querySelector(element))\r\n }\r\n\r\n var node = makeNode('svg')\r\n node.innerHTML = element\r\n\r\n // We can use firstChild here because we know,\r\n // that the first char is < and thus an element\r\n element = adopter(node.firstChild)\r\n\r\n return element\r\n}\r\n\r\nexport function nodeOrNew (name, node) {\r\n return node instanceof globals.window.Node ? node : makeNode(name)\r\n}\r\n\r\n// Adopt existing svg elements\r\nexport function adopt (node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance instanceof Base) return node.instance\r\n\r\n // initialize variables\r\n var className = capitalize(node.nodeName)\r\n\r\n // Make sure that gradients are adopted correctly\r\n if (className === 'LinearGradient' || className === 'RadialGradient') {\r\n className = 'Gradient'\r\n\r\n // Fallback to Dom if element is not known\r\n } else if (!elements[className]) {\r\n className = 'Dom'\r\n }\r\n\r\n return new elements[className](node)\r\n}\r\n\r\nlet adopter = adopt\r\n\r\nexport function mockAdopt (mock = adopt) {\r\n adopter = mock\r\n}\r\n\r\nexport function register (element, name = element.name, asRoot = false) {\r\n elements[name] = element\r\n if (asRoot) elements[root] = element\r\n\r\n addMethodNames(Object.keys(element.prototype))\r\n\r\n return element\r\n}\r\n\r\nexport function getClass (name) {\r\n return elements[name]\r\n}\r\n\r\n// Element id sequence\r\nlet did = 1000\r\n\r\n// Get next named element id\r\nexport function eid (name) {\r\n return 'Svgjs' + capitalize(name) + (did++)\r\n}\r\n\r\n// Deep new id assignment\r\nexport function assignNewId (node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.children.length - 1; i >= 0; i--) {\r\n assignNewId(node.children[i])\r\n }\r\n\r\n if (node.id) {\r\n return adopt(node).id(eid(node.nodeName))\r\n }\r\n\r\n return adopt(node)\r\n}\r\n\r\n// Method for extending objects\r\nexport function extend (modules, methods, attrCheck) {\r\n var key, i\r\n\r\n modules = Array.isArray(modules) ? modules : [modules]\r\n\r\n for (i = modules.length - 1; i >= 0; i--) {\r\n for (key in methods) {\r\n let method = methods[key]\r\n if (attrCheck) {\r\n method = wrapWithAttrCheck(methods[key])\r\n }\r\n modules[i].prototype[key] = method\r\n }\r\n }\r\n}\r\n\r\n// export function extendWithAttrCheck (...args) {\r\n// extend(...args, true)\r\n// }\r\n\r\nexport function wrapWithAttrCheck (fn) {\r\n return function (...args) {\r\n let o = args[args.length - 1]\r\n\r\n if (o && o.constructor === Object && !(o instanceof Array)) {\r\n return fn.apply(this, args.slice(0, -1)).attr(o)\r\n } else {\r\n return fn.apply(this, args)\r\n }\r\n }\r\n}\r\n","import { makeInstance } from '../../utils/adopter.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Get all siblings, including myself\r\nexport function siblings () {\r\n return this.parent().children()\r\n}\r\n\r\n// Get the curent position siblings\r\nexport function position () {\r\n return this.parent().index(this)\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function next () {\r\n return this.siblings()[this.position() + 1]\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function prev () {\r\n return this.siblings()[this.position() - 1]\r\n}\r\n\r\n// Send given element one step forward\r\nexport function forward () {\r\n var i = this.position() + 1\r\n var p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element one step backward\r\nexport function backward () {\r\n var i = this.position()\r\n\r\n if (i > 0) {\r\n this.parent().removeElement(this).add(this, i - 1)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the front\r\nexport function front () {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the back\r\nexport function back () {\r\n if (this.position() > 0) {\r\n this.parent().removeElement(this).add(this, 0)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element before the targeted element\r\nexport function before (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element after the targeted element\r\nexport function after (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n}\r\n\r\nexport function insertBefore (element) {\r\n element = makeInstance(element)\r\n element.before(this)\r\n}\r\n\r\nexport function insertAfter (element) {\r\n element = makeInstance(element)\r\n element.after(this)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n siblings,\r\n position,\r\n next,\r\n prev,\r\n forward,\r\n backward,\r\n front,\r\n back,\r\n before,\r\n after,\r\n insertBefore,\r\n insertAfter\r\n})\r\n","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n","// Parse unit value\r\nexport let numberAndUnit = /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n// Parse hex value\r\nexport let hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n// Parse rgb value\r\nexport let rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n// Parse reference id\r\nexport let reference = /(#[a-z0-9\\-_]+)/i\r\n\r\n// splits a transformation chain\r\nexport let transforms = /\\)\\s*,?\\s*/\r\n\r\n// Whitespace\r\nexport let whitespace = /\\s/g\r\n\r\n// Test hex value\r\nexport let isHex = /^#[a-f0-9]{3,6}$/i\r\n\r\n// Test rgb value\r\nexport let isRgb = /^rgb\\(/\r\n\r\n// Test css declaration\r\nexport let isCss = /[^:]+:[^;]+;?/\r\n\r\n// Test for blank string\r\nexport let isBlank = /^(\\s+)?$/\r\n\r\n// Test for numeric string\r\nexport let isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n// Test for percent value\r\nexport let isPercent = /^-?[\\d.]+%$/\r\n\r\n// Test for image url\r\nexport let isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n// split at whitespace and comma\r\nexport let delimiter = /[\\s,]+/\r\n\r\n// The following regex are used to parse the d attribute of a path\r\n\r\n// Matches all hyphens which are not after an exponent\r\nexport let hyphen = /([^e])-/gi\r\n\r\n// Replaces and tests for all path letters\r\nexport let pathLetters = /[MLHVCSQTAZ]/gi\r\n\r\n// yes we need this one, too\r\nexport let isPathLetter = /[MLHVCSQTAZ]/i\r\n\r\n// matches 0.154.23.45\r\nexport let numbersWithDots = /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n// matches .\r\nexport let dots = /\\./g\r\n","import { delimiter } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Return array of classes on the node\r\nexport function classes () {\r\n var attr = this.attr('class')\r\n return attr == null ? [] : attr.trim().split(delimiter)\r\n}\r\n\r\n// Return true if class exists on the node, false otherwise\r\nexport function hasClass (name) {\r\n return this.classes().indexOf(name) !== -1\r\n}\r\n\r\n// Add class to the node\r\nexport function addClass (name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Remove class from the node\r\nexport function removeClass (name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function (c) {\r\n return c !== name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Toggle the presence of a class on the node\r\nexport function toggleClass (name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n classes, hasClass, addClass, removeClass, toggleClass\r\n})\r\n","import { camelCase } from '../../utils/utils.js'\r\nimport { isBlank } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Dynamic style generator\r\nexport function css (style, val) {\r\n let ret = {}\r\n if (arguments.length === 0) {\r\n // get full style as object\r\n this.node.style.cssText.split(/\\s*;\\s*/)\r\n .filter(function (el) { return !!el.length })\r\n .forEach(function (el) {\r\n let t = el.split(/\\s*:\\s*/)\r\n ret[t[0]] = t[1]\r\n })\r\n return ret\r\n }\r\n\r\n if (arguments.length < 2) {\r\n // get style properties in the array\r\n if (Array.isArray(style)) {\r\n for (let name of style) {\r\n let cased = camelCase(name)\r\n ret[cased] = this.node.style[cased]\r\n }\r\n return ret\r\n }\r\n\r\n // get style for property\r\n if (typeof style === 'string') {\r\n return this.node.style[camelCase(style)]\r\n }\r\n\r\n // set styles in object\r\n if (typeof style === 'object') {\r\n for (let name in style) {\r\n // set empty string if null/undefined/'' was given\r\n this.node.style[camelCase(name)] =\r\n (style[name] == null || isBlank.test(style[name])) ? '' : style[name]\r\n }\r\n }\r\n }\r\n\r\n // set style for property\r\n if (arguments.length === 2) {\r\n this.node.style[camelCase(style)] =\r\n (val == null || isBlank.test(val)) ? '' : val\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Show element\r\nexport function show () {\r\n return this.css('display', '')\r\n}\r\n\r\n// Hide element\r\nexport function hide () {\r\n return this.css('display', 'none')\r\n}\r\n\r\n// Is element visible?\r\nexport function visible () {\r\n return this.css('display') !== 'none'\r\n}\r\n\r\nregisterMethods('Dom', {\r\n css, show, hide, visible\r\n})\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Store data values on svg nodes\r\nexport function data (a, v, r) {\r\n if (typeof a === 'object') {\r\n for (v in a) {\r\n this.data(v, a[v])\r\n }\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch (e) {\r\n return this.attr('data-' + a)\r\n }\r\n } else {\r\n this.attr('data-' + a,\r\n v === null ? null\r\n : r === true || typeof v === 'string' || typeof v === 'number' ? v\r\n : JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n}\r\n\r\nregisterMethods('Dom', { data })\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Remember arbitrary data\r\nexport function remember (k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] === 'object') {\r\n for (var key in k) {\r\n this.remember(key, k[key])\r\n }\r\n } else if (arguments.length === 1) {\r\n // retrieve memory\r\n return this.memory()[k]\r\n } else {\r\n // store memory\r\n this.memory()[k] = v\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Erase a given memory\r\nexport function forget () {\r\n if (arguments.length === 0) {\r\n this._memory = {}\r\n } else {\r\n for (var i = arguments.length - 1; i >= 0; i--) {\r\n delete this.memory()[arguments[i]]\r\n }\r\n }\r\n return this\r\n}\r\n\r\n// This triggers creation of a new hidden class which is not performant\r\n// However, this function is not rarely used so it will not happen frequently\r\n// Return local memory object\r\nexport function memory () {\r\n return (this._memory = this._memory || {})\r\n}\r\n\r\nregisterMethods('Dom', { remember, forget, memory })\r\n","import { delimiter } from './regex.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\n\r\nlet listenerId = 0\r\n\r\nfunction getEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (!n.events) n.events = {}\r\n return n.events\r\n}\r\n\r\nfunction getEventTarget (node) {\r\n return makeInstance(node).getEventTarget()\r\n}\r\n\r\nfunction clearEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (n.events) n.events = {}\r\n}\r\n\r\n// Add event binder in the SVG namespace\r\nexport function on (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // events can be an array of events or a string of events\r\n events = Array.isArray(events) ? events : events.split(delimiter)\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) {\r\n listener._svgjsListenerId = ++listenerId\r\n }\r\n\r\n events.forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nexport function off (node, events, listener, options) {\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n // events can be an array of events or a string or undefined\r\n events = Array.isArray(events) ? events : (events || '').split(delimiter)\r\n\r\n events.forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) { off(n, [ev, ns].join('.'), l) }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) { off(n, [event, ns].join('.')) }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) { off(n, [ev, namespace].join('.')) }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) { off(n, event) }\r\n\r\n clearEvents(node)\r\n }\r\n })\r\n}\r\n\r\nexport function dispatch (node, event, data) {\r\n var n = getEventTarget(node)\r\n\r\n // Dispatch event\r\n if (event instanceof globals.window.Event) {\r\n n.dispatchEvent(event)\r\n } else {\r\n event = new globals.window.CustomEvent(event, { detail: data, cancelable: true })\r\n n.dispatchEvent(event)\r\n }\r\n return event\r\n}\r\n","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","/*\r\n\r\nColor {\r\n constructor (a, b, c, space) {\r\n space: 'hsl'\r\n a: 30\r\n b: 20\r\n c: 10\r\n },\r\n\r\n toRgb () { return new Color in rgb space }\r\n toHsl () { return new Color in hsl space }\r\n toLab () { return new Color in lab space }\r\n\r\n toArray () { [space, a, b, c] }\r\n fromArray () { convert it back }\r\n}\r\n\r\n// Conversions aren't always exact because of monitor profiles etc...\r\nnew Color(h, s, l, 'hsl') !== new Color(r, g, b).hsl()\r\nnew Color(100, 100, 100, [space])\r\nnew Color('hsl(30, 20, 10)')\r\n\r\n// Sugar\r\nSVG.rgb(30, 20, 50).lab()\r\nSVG.hsl()\r\nSVG.lab('rgb(100, 100, 100)')\r\n*/\r\n\r\nimport { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\r\n\r\n// Ensure to six-based hex\r\nfunction fullHex (hex) {\r\n return hex.length === 4\r\n ? [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2),\r\n hex.substring(2, 3), hex.substring(2, 3),\r\n hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('')\r\n : hex\r\n}\r\n\r\n// Component to hex value\r\nfunction compToHex (comp) {\r\n var hex = comp.toString(16)\r\n return hex.length === 1 ? '0' + hex : hex\r\n}\r\n\r\nexport default class Color {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (color, g, b) {\r\n let match\r\n\r\n // initialize defaults\r\n this.r = 0\r\n this.g = 0\r\n this.b = 0\r\n\r\n if (!color) return\r\n\r\n // parse color\r\n if (typeof color === 'string') {\r\n if (isRgb.test(color)) {\r\n // get rgb values\r\n match = rgb.exec(color.replace(whitespace, ''))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1])\r\n this.g = parseInt(match[2])\r\n this.b = parseInt(match[3])\r\n } else if (isHex.test(color)) {\r\n // get hex values\r\n match = hex.exec(fullHex(color))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1], 16)\r\n this.g = parseInt(match[2], 16)\r\n this.b = parseInt(match[3], 16)\r\n }\r\n } else if (Array.isArray(color)) {\r\n this.r = color[0]\r\n this.g = color[1]\r\n this.b = color[2]\r\n } else if (typeof color === 'object') {\r\n this.r = color.r\r\n this.g = color.g\r\n this.b = color.b\r\n } else if (arguments.length === 3) {\r\n this.r = color\r\n this.g = g\r\n this.b = b\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Default to hex conversion\r\n toString () {\r\n return this.toHex()\r\n }\r\n\r\n toArray () {\r\n return [this.r, this.g, this.b]\r\n }\r\n\r\n // Build hex value\r\n toHex () {\r\n return '#' +\r\n compToHex(Math.round(this.r)) +\r\n compToHex(Math.round(this.g)) +\r\n compToHex(Math.round(this.b))\r\n }\r\n\r\n // Build rgb value\r\n toRgb () {\r\n return 'rgb(' + [this.r, this.g, this.b].join() + ')'\r\n }\r\n\r\n // Calculate true brightness\r\n brightness () {\r\n return (this.r / 255 * 0.30) +\r\n (this.g / 255 * 0.59) +\r\n (this.b / 255 * 0.11)\r\n }\r\n\r\n // Testers\r\n\r\n // Test if given value is a color string\r\n static test (color) {\r\n color += ''\r\n return isHex.test(color) || isRgb.test(color)\r\n }\r\n\r\n // Test if given value is a rgb object\r\n static isRgb (color) {\r\n return color && typeof color.r === 'number' &&\r\n typeof color.g === 'number' &&\r\n typeof color.b === 'number'\r\n }\r\n\r\n // Test if given value is a color\r\n static isColor (color) {\r\n return this.isRgb(color) || this.test(color)\r\n }\r\n}\r\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nimport superPropBase from \"./superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n","export default class Point {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (x, y) {\r\n let source\r\n let base = { x: 0, y: 0 }\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ? { x: x[0], y: x[1] }\r\n : typeof x === 'object' ? { x: x.x, y: x.y }\r\n : { x: x, y: y }\r\n\r\n // merge source\r\n this.x = source.x == null ? base.x : source.x\r\n this.y = source.y == null ? base.y : source.y\r\n\r\n return this\r\n }\r\n\r\n // Clone point\r\n clone () {\r\n return new Point(this)\r\n }\r\n\r\n // transform point with matrix\r\n transform (m) {\r\n // Perform the matrix multiplication\r\n var x = m.a * this.x + m.c * this.y + m.e\r\n var y = m.b * this.x + m.d * this.y + m.f\r\n\r\n // Return the required point\r\n return new Point(x, y)\r\n }\r\n\r\n toArray () {\r\n return [this.x, this.y]\r\n }\r\n}\r\n\r\nexport function point (x, y) {\r\n return new Point(x, y).transform(this.screenCTM().inverse())\r\n}\r\n","import { globals } from '../../utils/window.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\n\r\nexport default function parser () {\r\n // Reuse cached element if possible\r\n if (!parser.nodes) {\r\n let svg = makeInstance().size(2, 0)\r\n svg.node.cssText = [\r\n 'opacity: 0',\r\n 'position: absolute',\r\n 'left: -100%',\r\n 'top: -100%',\r\n 'overflow: hidden'\r\n ].join(';')\r\n\r\n let path = svg.path().node\r\n\r\n parser.nodes = { svg, path }\r\n }\r\n\r\n if (!parser.nodes.svg.node.parentNode) {\r\n let b = globals.document.body || globals.document.documentElement\r\n parser.nodes.svg.addTo(b)\r\n }\r\n\r\n return parser.nodes\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Point from './Point.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nfunction isNulledBox (box) {\r\n return !box.w && !box.h && !box.x && !box.y\r\n}\r\n\r\nfunction domContains (node) {\r\n return (globals.document.documentElement.contains || function (node) {\r\n // This is IE - it does not support contains() for top-level SVGs\r\n while (node.parentNode) {\r\n node = node.parentNode\r\n }\r\n return node === document\r\n }).call(globals.document.documentElement, node)\r\n}\r\n\r\nexport default class Box {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (source) {\r\n var base = [0, 0, 0, 0]\r\n source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)\r\n : Array.isArray(source) ? source\r\n : typeof source === 'object' ? [source.left != null ? source.left\r\n : source.x, source.top != null ? source.top : source.y, source.width, source.height]\r\n : arguments.length === 4 ? [].slice.call(arguments)\r\n : base\r\n\r\n this.x = source[0] || 0\r\n this.y = source[1] || 0\r\n this.width = this.w = source[2] || 0\r\n this.height = this.h = source[3] || 0\r\n\r\n // Add more bounding box properties\r\n this.x2 = this.x + this.w\r\n this.y2 = this.y + this.h\r\n this.cx = this.x + this.w / 2\r\n this.cy = this.y + this.h / 2\r\n\r\n return this\r\n }\r\n\r\n // Merge rect box with another, return a new instance\r\n merge (box) {\r\n let x = Math.min(this.x, box.x)\r\n let y = Math.min(this.y, box.y)\r\n let width = Math.max(this.x + this.width, box.x + box.width) - x\r\n let height = Math.max(this.y + this.height, box.y + box.height) - y\r\n\r\n return new Box(x, y, width, height)\r\n }\r\n\r\n transform (m) {\r\n let xMin = Infinity\r\n let xMax = -Infinity\r\n let yMin = Infinity\r\n let yMax = -Infinity\r\n\r\n let pts = [\r\n new Point(this.x, this.y),\r\n new Point(this.x2, this.y),\r\n new Point(this.x, this.y2),\r\n new Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function (p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin, p.x)\r\n xMax = Math.max(xMax, p.x)\r\n yMin = Math.min(yMin, p.y)\r\n yMax = Math.max(yMax, p.y)\r\n })\r\n\r\n return new Box(\r\n xMin, yMin,\r\n xMax - xMin,\r\n yMax - yMin\r\n )\r\n }\r\n\r\n addOffset () {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += globals.window.pageXOffset\r\n this.y += globals.window.pageYOffset\r\n return this\r\n }\r\n\r\n toString () {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n\r\n toArray () {\r\n return [this.x, this.y, this.width, this.height]\r\n }\r\n\r\n isNulled () {\r\n return isNulledBox(this)\r\n }\r\n}\r\n\r\nfunction getBox (cb, retry) {\r\n let box\r\n\r\n try {\r\n box = cb(this.node)\r\n\r\n if (isNulledBox(box) && !domContains(this.node)) {\r\n throw new Error('Element not in the dom')\r\n }\r\n } catch (e) {\r\n box = retry(this)\r\n }\r\n\r\n return box\r\n}\r\n\r\nexport function bbox () {\r\n return new Box(getBox.call(this, (node) => node.getBBox(), (el) => {\r\n try {\r\n let clone = el.clone().addTo(parser().svg).show()\r\n let box = clone.node.getBBox()\r\n clone.remove()\r\n return box\r\n } catch (e) {\r\n throw new Error('Getting bbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }\r\n }))\r\n}\r\n\r\nexport function rbox (el) {\r\n let box = new Box(getBox.call(this, (node) => node.getBoundingClientRect(), (el) => {\r\n throw new Error('Getting rbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }))\r\n if (el) return box.transform(el.screenCTM().inverse())\r\n return box.addOffset()\r\n}\r\n\r\nregisterMethods({\r\n viewbox: {\r\n viewbox (x, y, width, height) {\r\n // act as getter\r\n if (x == null) return new Box(this.attr('viewBox'))\r\n\r\n // act as setter\r\n return this.attr('viewBox', new Box(x, y, width, height))\r\n }\r\n }\r\n})\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { radians } from '../utils/utils.js'\r\nimport Element from '../elements/Element.js'\r\nimport Point from './Point.js'\r\n\r\nfunction closeEnough (a, b, threshold) {\r\n return Math.abs(b - a) < (threshold || 1e-6)\r\n}\r\n\r\nexport default class Matrix {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n // Initialize\r\n init (source) {\r\n var base = Matrix.fromArray([1, 0, 0, 1, 0, 0])\r\n\r\n // ensure source as object\r\n source = source instanceof Element ? source.matrixify()\r\n : typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\r\n : Array.isArray(source) ? Matrix.fromArray(source)\r\n : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source\r\n : (typeof source === 'object') ? new Matrix().transform(source)\r\n : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))\r\n : base\r\n\r\n // Merge the source matrix with the base matrix\r\n this.a = source.a != null ? source.a : base.a\r\n this.b = source.b != null ? source.b : base.b\r\n this.c = source.c != null ? source.c : base.c\r\n this.d = source.d != null ? source.d : base.d\r\n this.e = source.e != null ? source.e : base.e\r\n this.f = source.f != null ? source.f : base.f\r\n\r\n return this\r\n }\r\n\r\n // Clones this matrix\r\n clone () {\r\n return new Matrix(this)\r\n }\r\n\r\n // Transform a matrix into another matrix by manipulating the space\r\n transform (o) {\r\n // Check if o is a matrix and then left multiply it directly\r\n if (Matrix.isMatrixLike(o)) {\r\n var matrix = new Matrix(o)\r\n return matrix.multiplyO(this)\r\n }\r\n\r\n // Get the proposed transformations and the current transformations\r\n var t = Matrix.formatTransforms(o)\r\n var current = this\r\n let { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\r\n\r\n // Construct the resulting matrix\r\n var transformer = new Matrix()\r\n .translateO(t.rx, t.ry)\r\n .lmultiplyO(current)\r\n .translateO(-ox, -oy)\r\n .scaleO(t.scaleX, t.scaleY)\r\n .skewO(t.skewX, t.skewY)\r\n .shearO(t.shear)\r\n .rotateO(t.theta)\r\n .translateO(ox, oy)\r\n\r\n // If we want the origin at a particular place, we force it there\r\n if (isFinite(t.px) || isFinite(t.py)) {\r\n const origin = new Point(ox, oy).transform(transformer)\r\n // TODO: Replace t.px with isFinite(t.px)\r\n const dx = t.px ? t.px - origin.x : 0\r\n const dy = t.py ? t.py - origin.y : 0\r\n transformer.translateO(dx, dy)\r\n }\r\n\r\n // Translate now after positioning\r\n transformer.translateO(t.tx, t.ty)\r\n return transformer\r\n }\r\n\r\n // Applies a matrix defined by its affine parameters\r\n compose (o) {\r\n if (o.origin) {\r\n o.originX = o.origin[0]\r\n o.originY = o.origin[1]\r\n }\r\n // Get the parameters\r\n var ox = o.originX || 0\r\n var oy = o.originY || 0\r\n var sx = o.scaleX || 1\r\n var sy = o.scaleY || 1\r\n var lam = o.shear || 0\r\n var theta = o.rotate || 0\r\n var tx = o.translateX || 0\r\n var ty = o.translateY || 0\r\n\r\n // Apply the standard matrix\r\n var result = new Matrix()\r\n .translateO(-ox, -oy)\r\n .scaleO(sx, sy)\r\n .shearO(lam)\r\n .rotateO(theta)\r\n .translateO(tx, ty)\r\n .lmultiplyO(this)\r\n .translateO(ox, oy)\r\n return result\r\n }\r\n\r\n // Decomposes this matrix into its affine parameters\r\n decompose (cx = 0, cy = 0) {\r\n // Get the parameters from the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Figure out if the winding direction is clockwise or counterclockwise\r\n var determinant = a * d - b * c\r\n var ccw = determinant > 0 ? 1 : -1\r\n\r\n // Since we only shear in x, we can use the x basis to get the x scale\r\n // and the rotation of the resulting matrix\r\n var sx = ccw * Math.sqrt(a * a + b * b)\r\n var thetaRad = Math.atan2(ccw * b, ccw * a)\r\n var theta = 180 / Math.PI * thetaRad\r\n var ct = Math.cos(thetaRad)\r\n var st = Math.sin(thetaRad)\r\n\r\n // We can then solve the y basis vector simultaneously to get the other\r\n // two affine parameters directly from these parameters\r\n var lam = (a * c + b * d) / determinant\r\n var sy = ((c * sx) / (lam * a - b)) || ((d * sx) / (lam * b + a))\r\n\r\n // Use the translations\r\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy)\r\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy)\r\n\r\n // Construct the decomposition and return it\r\n return {\r\n // Return the affine parameters\r\n scaleX: sx,\r\n scaleY: sy,\r\n shear: lam,\r\n rotate: theta,\r\n translateX: tx,\r\n translateY: ty,\r\n originX: cx,\r\n originY: cy,\r\n\r\n // Return the matrix parameters\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n // Left multiplies by the given matrix\r\n multiply (matrix) {\r\n return this.clone().multiplyO(matrix)\r\n }\r\n\r\n multiplyO (matrix) {\r\n // Get the matrices\r\n var l = this\r\n var r = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n lmultiply (matrix) {\r\n return this.clone().lmultiplyO(matrix)\r\n }\r\n\r\n lmultiplyO (matrix) {\r\n var r = this\r\n var l = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n // Inverses matrix\r\n inverseO () {\r\n // Get the current parameters out of the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Invert the 2x2 matrix in the top left\r\n var det = a * d - b * c\r\n if (!det) throw new Error('Cannot invert ' + this)\r\n\r\n // Calculate the top 2x2 matrix\r\n var na = d / det\r\n var nb = -b / det\r\n var nc = -c / det\r\n var nd = a / det\r\n\r\n // Apply the inverted matrix to the top right\r\n var ne = -(na * e + nc * f)\r\n var nf = -(nb * e + nd * f)\r\n\r\n // Construct the inverted matrix\r\n this.a = na\r\n this.b = nb\r\n this.c = nc\r\n this.d = nd\r\n this.e = ne\r\n this.f = nf\r\n\r\n return this\r\n }\r\n\r\n inverse () {\r\n return this.clone().inverseO()\r\n }\r\n\r\n // Translate matrix\r\n translate (x, y) {\r\n return this.clone().translateO(x, y)\r\n }\r\n\r\n translateO (x, y) {\r\n this.e += x || 0\r\n this.f += y || 0\r\n return this\r\n }\r\n\r\n // Scale matrix\r\n scale (x, y, cx, cy) {\r\n return this.clone().scaleO(...arguments)\r\n }\r\n\r\n scaleO (x, y = x, cx = 0, cy = 0) {\r\n // Support uniform scaling\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * x\r\n this.b = b * y\r\n this.c = c * x\r\n this.d = d * y\r\n this.e = e * x - cx * x + cx\r\n this.f = f * y - cy * y + cy\r\n\r\n return this\r\n }\r\n\r\n // Rotate matrix\r\n rotate (r, cx, cy) {\r\n return this.clone().rotateO(r, cx, cy)\r\n }\r\n\r\n rotateO (r, cx = 0, cy = 0) {\r\n // Convert degrees to radians\r\n r = radians(r)\r\n\r\n let cos = Math.cos(r)\r\n let sin = Math.sin(r)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * cos - b * sin\r\n this.b = b * cos + a * sin\r\n this.c = c * cos - d * sin\r\n this.d = d * cos + c * sin\r\n this.e = e * cos - f * sin + cy * sin - cx * cos + cx\r\n this.f = f * cos + e * sin - cx * sin - cy * cos + cy\r\n\r\n return this\r\n }\r\n\r\n // Flip matrix on x or y, at a given offset\r\n flip (axis, around) {\r\n return this.clone().flipO(axis, around)\r\n }\r\n\r\n flipO (axis, around) {\r\n return axis === 'x' ? this.scaleO(-1, 1, around, 0)\r\n : axis === 'y' ? this.scaleO(1, -1, 0, around)\r\n : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\r\n }\r\n\r\n // Shear matrix\r\n shear (a, cx, cy) {\r\n return this.clone().shearO(a, cx, cy)\r\n }\r\n\r\n shearO (lx, cx = 0, cy = 0) {\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.c = c + d * lx\r\n this.e = e + f * lx - cy * lx\r\n\r\n return this\r\n }\r\n\r\n // Skew Matrix\r\n skew (x, y, cx, cy) {\r\n return this.clone().skewO(...arguments)\r\n }\r\n\r\n skewO (x, y = x, cx = 0, cy = 0) {\r\n // support uniformal skew\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // Convert degrees to radians\r\n x = radians(x)\r\n y = radians(y)\r\n\r\n let lx = Math.tan(x)\r\n let ly = Math.tan(y)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.b = b + a * ly\r\n this.c = c + d * lx\r\n this.d = d + c * ly\r\n this.e = e + f * lx - cy * lx\r\n this.f = f + e * ly - cx * ly\r\n\r\n return this\r\n }\r\n\r\n // SkewX\r\n skewX (x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n\r\n skewXO (x, cx, cy) {\r\n return this.skewO(x, 0, cx, cy)\r\n }\r\n\r\n // SkewY\r\n skewY (y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n\r\n skewYO (y, cx, cy) {\r\n return this.skewO(0, y, cx, cy)\r\n }\r\n\r\n // Transform around a center point\r\n aroundO (cx, cy, matrix) {\r\n var dx = cx || 0\r\n var dy = cy || 0\r\n return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\r\n }\r\n\r\n around (cx, cy, matrix) {\r\n return this.clone().aroundO(cx, cy, matrix)\r\n }\r\n\r\n // Check if two matrices are equal\r\n equals (other) {\r\n var comp = new Matrix(other)\r\n return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b) &&\r\n closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d) &&\r\n closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)\r\n }\r\n\r\n // Convert matrix to string\r\n toString () {\r\n return 'matrix(' + this.a + ',' + this.b + ',' + this.c + ',' + this.d + ',' + this.e + ',' + this.f + ')'\r\n }\r\n\r\n toArray () {\r\n return [this.a, this.b, this.c, this.d, this.e, this.f]\r\n }\r\n\r\n valueOf () {\r\n return {\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n static fromArray (a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n }\r\n\r\n static isMatrixLike (o) {\r\n return (\r\n o.a != null ||\r\n o.b != null ||\r\n o.c != null ||\r\n o.d != null ||\r\n o.e != null ||\r\n o.f != null\r\n )\r\n }\r\n\r\n static formatTransforms (o) {\r\n // Get all of the parameters required to form the matrix\r\n var flipBoth = o.flip === 'both' || o.flip === true\r\n var flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\r\n var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\r\n var skewX = o.skew && o.skew.length ? o.skew[0]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewX) ? o.skewX\r\n : 0\r\n var skewY = o.skew && o.skew.length ? o.skew[1]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewY) ? o.skewY\r\n : 0\r\n var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX\r\n : isFinite(o.scale) ? o.scale * flipX\r\n : isFinite(o.scaleX) ? o.scaleX * flipX\r\n : flipX\r\n var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY\r\n : isFinite(o.scale) ? o.scale * flipY\r\n : isFinite(o.scaleY) ? o.scaleY * flipY\r\n : flipY\r\n var shear = o.shear || 0\r\n var theta = o.rotate || o.theta || 0\r\n var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)\r\n var ox = origin.x\r\n var oy = origin.y\r\n var position = new Point(o.position || o.px || o.positionX, o.py || o.positionY)\r\n var px = position.x\r\n var py = position.y\r\n var translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY)\r\n var tx = translate.x\r\n var ty = translate.y\r\n var relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY)\r\n var rx = relative.x\r\n var ry = relative.y\r\n\r\n // Populate all of the values\r\n return {\r\n scaleX, scaleY, skewX, skewY, shear, theta, rx, ry, tx, ty, ox, oy, px, py\r\n }\r\n }\r\n\r\n // left matrix, right matrix, target matrix which is overwritten\r\n static matrixMultiply (l, r, o) {\r\n // Work out the product directly\r\n var a = l.a * r.a + l.c * r.b\r\n var b = l.b * r.a + l.d * r.b\r\n var c = l.a * r.c + l.c * r.d\r\n var d = l.b * r.c + l.d * r.d\r\n var e = l.e + l.a * r.e + l.c * r.f\r\n var f = l.f + l.b * r.e + l.d * r.f\r\n\r\n // make sure to use local variables because l/r and o could be the same\r\n o.a = a\r\n o.b = b\r\n o.c = c\r\n o.d = d\r\n o.e = e\r\n o.f = f\r\n\r\n return o\r\n }\r\n}\r\n\r\nexport function ctm () {\r\n return new Matrix(this.node.getCTM())\r\n}\r\n\r\nexport function screenCTM () {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if (typeof this.isRoot === 'function' && !this.isRoot()) {\r\n var rect = this.rect(1, 1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new Matrix(m)\r\n }\r\n return new Matrix(this.node.getScreenCTM())\r\n}\r\n","/* eslint no-new-func: \"off\" */\r\nexport const subClassArray = (function () {\r\n try {\r\n // try es6 subclassing\r\n return Function('name', 'baseClass', '_constructor', [\r\n 'baseClass = baseClass || Array',\r\n 'return {',\r\n ' [name]: class extends baseClass {',\r\n ' constructor (...args) {',\r\n ' super(...args)',\r\n ' _constructor && _constructor.apply(this, args)',\r\n ' }',\r\n ' }',\r\n '}[name]'\r\n ].join('\\n'))\r\n } catch (e) {\r\n // Use es5 approach\r\n return (name, baseClass = Array, _constructor) => {\r\n const Arr = function () {\r\n baseClass.apply(this, arguments)\r\n _constructor && _constructor.apply(this, arguments)\r\n }\r\n\r\n Arr.prototype = Object.create(baseClass.prototype)\r\n Arr.prototype.constructor = Arr\r\n\r\n Arr.prototype.map = function (fn) {\r\n const arr = new Arr()\r\n arr.push.apply(arr, Array.prototype.map.call(this, fn))\r\n return arr\r\n }\r\n\r\n return Arr\r\n }\r\n }\r\n})()\r\n","import { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst List = subClassArray('List', Array, function (arr = []) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...arr)\r\n})\r\n\r\nexport default List\r\n\r\nextend(List, {\r\n each (fnOrMethodName, ...args) {\r\n if (typeof fnOrMethodName === 'function') {\r\n this.forEach((el) => { fnOrMethodName.call(el, el) })\r\n } else {\r\n return this.map(el => { return el[fnOrMethodName](...args) })\r\n }\r\n\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n }\r\n})\r\n\r\nList.extend = function (methods) {\r\n methods = methods.reduce((obj, name) => {\r\n obj[name] = function (...attrs) {\r\n return this.each(name, ...attrs)\r\n }\r\n return obj\r\n }, {})\r\n\r\n extend(List, methods)\r\n}\r\n","import { adopt } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\nimport { map } from '../../utils/utils.js'\r\nimport List from '../../types/List.js'\r\n\r\nexport default function baseFind (query, parent) {\r\n return new List(map((parent || globals.document).querySelectorAll(query), function (node) {\r\n return adopt(node)\r\n }))\r\n}\r\n\r\n// Scoped find method\r\nexport function find (query) {\r\n return baseFind(query, this.node)\r\n}\r\n","import { dispatch, off, on } from '../modules/core/event.js'\r\nimport Base from './Base.js'\r\n\r\nexport default class EventTarget extends Base {\r\n constructor ({ events = {} } = {}) {\r\n super()\r\n this.events = events\r\n }\r\n\r\n addEventListener () {}\r\n\r\n dispatch (event, data) {\r\n return dispatch(this, event, data)\r\n }\r\n\r\n dispatchEvent (event) {\r\n const bag = this.getEventHolder().events\r\n if (!bag) return true\r\n\r\n const events = bag[event.type]\r\n\r\n for (let i in events) {\r\n for (let j in events[i]) {\r\n events[i][j](event)\r\n }\r\n }\r\n\r\n return !event.defaultPrevented\r\n }\r\n\r\n // Fire given event\r\n fire (event, data) {\r\n this.dispatch(event, data)\r\n return this\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n getEventTarget () {\r\n return this\r\n }\r\n\r\n // Unbind event from listener\r\n off (event, listener) {\r\n off(this, event, listener)\r\n return this\r\n }\r\n\r\n // Bind given event to listener\r\n on (event, listener, binding, options) {\r\n on(this, event, listener, binding, options)\r\n return this\r\n }\r\n\r\n removeEventListener () {}\r\n}\r\n","\r\nexport function noop () {}\r\n\r\n// Default animation values\r\nexport let timeline = {\r\n duration: 400,\r\n ease: '>',\r\n delay: 0\r\n}\r\n\r\n// Default attribute values\r\nexport let attrs = {\r\n\r\n // fill and stroke\r\n 'fill-opacity': 1,\r\n 'stroke-opacity': 1,\r\n 'stroke-width': 0,\r\n 'stroke-linejoin': 'miter',\r\n 'stroke-linecap': 'butt',\r\n fill: '#000000',\r\n stroke: '#000000',\r\n opacity: 1,\r\n\r\n // position\r\n x: 0,\r\n y: 0,\r\n cx: 0,\r\n cy: 0,\r\n\r\n // size\r\n width: 0,\r\n height: 0,\r\n\r\n // radius\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n\r\n // gradient\r\n offset: 0,\r\n 'stop-opacity': 1,\r\n 'stop-color': '#000000',\r\n\r\n // text\r\n 'font-size': 16,\r\n 'font-family': 'Helvetica, Arial, sans-serif',\r\n 'text-anchor': 'start'\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst SVGArray = subClassArray('SVGArray', Array, function (arr) {\r\n this.init(arr)\r\n})\r\n\r\nexport default SVGArray\r\n\r\nextend(SVGArray, {\r\n init (arr) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...this.parse(arr))\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n },\r\n\r\n toString () {\r\n return this.join(' ')\r\n },\r\n\r\n // Flattens the array if needed\r\n valueOf () {\r\n const ret = []\r\n ret.push(...this)\r\n return ret\r\n },\r\n\r\n // Parse whitespace separated string\r\n parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n },\r\n\r\n clone () {\r\n return new this.constructor(this)\r\n },\r\n\r\n toSet () {\r\n return new Set(this)\r\n }\r\n})\r\n","import { numberAndUnit } from '../modules/core/regex.js'\r\n\r\n// Module for unit convertions\r\nexport default class SVGNumber {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (value, unit) {\r\n unit = Array.isArray(value) ? value[1] : unit\r\n value = Array.isArray(value) ? value[0] : value\r\n\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n } else if (typeof value === 'string') {\r\n unit = value.match(numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] === '%') { this.value /= 100 } else if (unit[5] === 's') {\r\n this.value *= 1000\r\n }\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n } else {\r\n if (value instanceof SVGNumber) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n toString () {\r\n return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6\r\n : this.unit === 's' ? this.value / 1e3\r\n : this.value\r\n ) + this.unit\r\n }\r\n\r\n toJSON () {\r\n return this.toString()\r\n }\r\n\r\n toArray () {\r\n return [this.value, this.unit]\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n // Add number\r\n plus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this + number, this.unit || number.unit)\r\n }\r\n\r\n // Subtract number\r\n minus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this - number, this.unit || number.unit)\r\n }\r\n\r\n // Multiply number\r\n times (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this * number, this.unit || number.unit)\r\n }\r\n\r\n // Divide number\r\n divide (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this / number, this.unit || number.unit)\r\n }\r\n}\r\n","import { attrs as defaults } from './defaults.js'\r\nimport { isNumber } from './regex.js'\r\nimport Color from '../../types/Color.js'\r\nimport SVGArray from '../../types/SVGArray.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\nconst hooks = []\r\nexport function registerAttrHook (fn) {\r\n hooks.push(fn)\r\n}\r\n\r\n// Set svg element attribute\r\nexport default function attr (attr, val, ns) {\r\n // act as full getter\r\n if (attr == null) {\r\n // get an object of attributes\r\n attr = {}\r\n val = this.node.attributes\r\n\r\n for (let node of val) {\r\n attr[node.nodeName] = isNumber.test(node.nodeValue)\r\n ? parseFloat(node.nodeValue)\r\n : node.nodeValue\r\n }\r\n\r\n return attr\r\n } else if (attr instanceof Array) {\r\n // loop through array and get all values\r\n return attr.reduce((last, curr) => {\r\n last[curr] = this.attr(curr)\r\n return last\r\n }, {})\r\n } else if (typeof attr === 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (val in attr) this.attr(val, attr[val])\r\n } else if (val === null) {\r\n // remove value\r\n this.node.removeAttribute(attr)\r\n } else if (val == null) {\r\n // act as a getter if the first and only argument is not an object\r\n val = this.node.getAttribute(attr)\r\n return val == null ? defaults[attr]\r\n : isNumber.test(val) ? parseFloat(val)\r\n : val\r\n } else {\r\n // Loop through hooks and execute them to convert value\r\n val = hooks.reduce((_val, hook) => {\r\n return hook(attr, _val, this)\r\n }, val)\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof val === 'number') {\r\n val = new SVGNumber(val)\r\n } else if (Color.isColor(val)) {\r\n // ensure full hex color\r\n val = new Color(val)\r\n } else if (val.constructor === Array) {\r\n // Check for plain arrays and parse array values\r\n val = new SVGArray(val)\r\n }\r\n\r\n // if the passed attribute is leading...\r\n if (attr === 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading) {\r\n this.leading(val)\r\n }\r\n } else {\r\n // set given attribute on node\r\n typeof ns === 'string' ? this.node.setAttributeNS(ns, attr, val.toString())\r\n : this.node.setAttribute(attr, val.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\r\n this.rebuild()\r\n }\r\n }\r\n\r\n return this\r\n}\r\n","import {\r\n adopt,\r\n assignNewId,\r\n eid,\r\n extend,\r\n makeInstance,\r\n makeNode,\r\n register\r\n} from '../utils/adopter.js'\r\nimport { find } from '../modules/core/selector.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { map } from '../utils/utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport List from '../types/List.js'\r\nimport attr from '../modules/core/attr.js'\r\n\r\nexport default class Dom extends EventTarget {\r\n constructor (node, attrs) {\r\n super(node)\r\n this.node = node\r\n this.type = node.nodeName\r\n\r\n if (attrs && node !== attrs) {\r\n this.attr(attrs)\r\n }\r\n }\r\n\r\n // Add given element at a position\r\n add (element, i) {\r\n element = makeInstance(element)\r\n\r\n if (i == null) {\r\n this.node.appendChild(element.node)\r\n } else if (element.node !== this.node.childNodes[i]) {\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Add element to given container and return self\r\n addTo (parent) {\r\n return makeInstance(parent).put(this)\r\n }\r\n\r\n // Returns all child elements\r\n children () {\r\n return new List(map(this.node.children, function (node) {\r\n return adopt(node)\r\n }))\r\n }\r\n\r\n // Remove all elements in this container\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n\r\n // Clone element\r\n clone () {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n return assignNewId(this.node.cloneNode(true))\r\n }\r\n\r\n // Iterates over all children and invokes a given block\r\n each (block, deep) {\r\n var children = this.children()\r\n var i, il\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n block.apply(children[i], [i, children])\r\n\r\n if (deep) {\r\n children[i].each(block, deep)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n element (nodeName) {\r\n return this.put(new Dom(makeNode(nodeName)))\r\n }\r\n\r\n // Get first child\r\n first () {\r\n return adopt(this.node.firstChild)\r\n }\r\n\r\n // Get a element at the given index\r\n get (i) {\r\n return adopt(this.node.childNodes[i])\r\n }\r\n\r\n getEventHolder () {\r\n return this.node\r\n }\r\n\r\n getEventTarget () {\r\n return this.node\r\n }\r\n\r\n // Checks if the given element is a child\r\n has (element) {\r\n return this.index(element) >= 0\r\n }\r\n\r\n // Get / set id\r\n id (id) {\r\n // generate new id if no id set\r\n if (typeof id === 'undefined' && !this.node.id) {\r\n this.node.id = eid(this.type)\r\n }\r\n\r\n // dont't set directly width this.node.id to make `null` work correctly\r\n return this.attr('id', id)\r\n }\r\n\r\n // Gets index of given element\r\n index (element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n\r\n // Get the last child\r\n last () {\r\n return adopt(this.node.lastChild)\r\n }\r\n\r\n // matches the element vs a css selector\r\n matches (selector) {\r\n const el = this.node\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector)\r\n }\r\n\r\n // Returns the parent element instance\r\n parent (type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if (!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = adopt(parent.node.parentNode)\r\n\r\n if (!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while (parent && parent.node instanceof globals.window.SVGElement) { // FIXME: That shouldnt be neccessary\r\n if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n parent = adopt(parent.node.parentNode)\r\n }\r\n }\r\n\r\n // Basically does the same as `add()` but returns the added element instead\r\n put (element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n\r\n // Add element to given container and return container\r\n putIn (parent) {\r\n return makeInstance(parent).add(this)\r\n }\r\n\r\n // Remove element\r\n remove () {\r\n if (this.parent()) {\r\n this.parent().removeElement(this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Remove a given child\r\n removeElement (element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n\r\n // Replace this with element\r\n replace (element) {\r\n element = makeInstance(element)\r\n this.node.parentNode.replaceChild(element.node, this.node)\r\n return element\r\n }\r\n\r\n round (precision = 2, map) {\r\n const factor = 10 ** precision\r\n const attrs = this.attr()\r\n\r\n // If we have no map, build one from attrs\r\n if (!map) {\r\n map = Object.keys(attrs)\r\n }\r\n\r\n // Holds rounded attributes\r\n const newAttrs = {}\r\n map.forEach((key) => {\r\n newAttrs[key] = Math.round(attrs[key] * factor) / factor\r\n })\r\n\r\n this.attr(newAttrs)\r\n return this\r\n }\r\n\r\n // Return id on string conversion\r\n toString () {\r\n return this.id()\r\n }\r\n\r\n // Import raw svg\r\n svg (svgOrFn, outerHTML) {\r\n var well, len, fragment\r\n\r\n if (svgOrFn === false) {\r\n outerHTML = false\r\n svgOrFn = null\r\n }\r\n\r\n // act as getter if no svg string is given\r\n if (svgOrFn == null || typeof svgOrFn === 'function') {\r\n // The default for exports is, that the outerNode is included\r\n outerHTML = outerHTML == null ? true : outerHTML\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n let current = this\r\n\r\n // An export modifier was passed\r\n if (svgOrFn != null) {\r\n current = adopt(current.node.cloneNode(true))\r\n\r\n // If the user wants outerHTML we need to process this node, too\r\n if (outerHTML) {\r\n let result = svgOrFn(current)\r\n current = result || current\r\n\r\n // The user does not want this node? Well, then he gets nothing\r\n if (result === false) return ''\r\n }\r\n\r\n // Deep loop through all children and apply modifier\r\n current.each(function () {\r\n let result = svgOrFn(this)\r\n let _this = result || this\r\n\r\n // If modifier returns false, discard node\r\n if (result === false) {\r\n this.remove()\r\n\r\n // If modifier returns new node, use it\r\n } else if (result && this !== _this) {\r\n this.replace(_this)\r\n }\r\n }, true)\r\n }\r\n\r\n // Return outer or inner content\r\n return outerHTML\r\n ? current.node.outerHTML\r\n : current.node.innerHTML\r\n }\r\n\r\n // Act as setter if we got a string\r\n\r\n // The default for import is, that the current node is not replaced\r\n outerHTML = outerHTML == null ? false : outerHTML\r\n\r\n // Create temporary holder\r\n well = globals.document.createElementNS(ns, 'svg')\r\n fragment = globals.document.createDocumentFragment()\r\n\r\n // Dump raw svg\r\n well.innerHTML = svgOrFn\r\n\r\n // Transplant nodes into the fragment\r\n for (len = well.children.length; len--;) {\r\n fragment.appendChild(well.firstElementChild)\r\n }\r\n\r\n let parent = this.parent()\r\n\r\n // Add the whole fragment at once\r\n return outerHTML\r\n ? this.replace(fragment) && parent\r\n : this.add(fragment)\r\n }\r\n\r\n words (text) {\r\n // This is faster than removing all children and adding a new one\r\n this.node.textContent = text\r\n return this\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // dump variables recursively\r\n this.each(function () {\r\n this.writeDataToDom()\r\n })\r\n\r\n return this\r\n }\r\n}\r\n\r\nextend(Dom, { attr, find })\r\nregister(Dom)\r\n","import { bbox, rbox } from '../types/Box.js'\r\nimport { ctm, screenCTM } from '../types/Matrix.js'\r\nimport {\r\n extend,\r\n getClass,\r\n makeInstance,\r\n register,\r\n root\r\n} from '../utils/adopter.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { point } from '../types/Point.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { reference } from '../modules/core/regex.js'\r\nimport Dom from './Dom.js'\r\nimport List from '../types/List.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nconst Svg = getClass(root)\r\n\r\nexport default class Element extends Dom {\r\n constructor (node, attrs) {\r\n super(node, attrs)\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n this.node.instance = this\r\n\r\n if (node.hasAttribute('svgjs:data')) {\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n this.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n }\r\n }\r\n\r\n // Move element by its center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n\r\n // Move by center over x-axis\r\n cx (x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n\r\n // Move by center over y-axis\r\n cy (y) {\r\n return y == null\r\n ? this.y() + this.height() / 2\r\n : this.y(y - this.height() / 2)\r\n }\r\n\r\n // Get defs\r\n defs () {\r\n return this.root().defs()\r\n }\r\n\r\n // Get parent document\r\n root () {\r\n let p = this.parent(Svg)\r\n return p && p.root()\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('height', height)\r\n }\r\n\r\n // Checks whether the given point inside the bounding box of the element\r\n inside (x, y) {\r\n let box = this.bbox()\r\n\r\n return x > box.x &&\r\n y > box.y &&\r\n x < box.x + box.width &&\r\n y < box.y + box.height\r\n }\r\n\r\n // Move element to given x and y values\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n }\r\n\r\n // return array of all ancestors of given type up to the root svg\r\n parents (until = globals.document) {\r\n until = makeInstance(until)\r\n let parents = new List()\r\n let parent = this\r\n\r\n while (\r\n (parent = parent.parent()) &&\r\n parent.node !== until.node &&\r\n parent.node !== globals.document\r\n ) {\r\n parents.push(parent)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Get referenced element form attribute value\r\n reference (attr) {\r\n attr = this.attr(attr)\r\n if (!attr) return null\r\n\r\n const m = attr.match(reference)\r\n return m ? makeInstance(m[1]) : null\r\n }\r\n\r\n // set given data to the elements data property\r\n setData (o) {\r\n this.dom = o\r\n return this\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVGNumber(p.width))\r\n .height(new SVGNumber(p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('width', width)\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if (Object.keys(this.dom).length) {\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n }\r\n\r\n return super.writeDataToDom()\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n return this.attr('y', y)\r\n }\r\n}\r\n\r\nextend(Element, {\r\n bbox, rbox, point, ctm, screenCTM\r\n})\r\n\r\nregister(Element)\r\n","import { on, off } from '../core/event.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Color from '../../types/Color.js'\r\nimport Element from '../../elements/Element.js'\r\nimport Matrix from '../../types/Matrix.js'\r\nimport Point from '../../types/Point.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'],\r\n fill: ['color', 'opacity', 'rule'],\r\n prefix: function (t, a) {\r\n return a === 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;['fill', 'stroke'].forEach(function (m) {\r\n var extension = {}\r\n var i\r\n\r\n extension[m] = function (o) {\r\n if (typeof o === 'undefined') {\r\n return this.attr(m)\r\n }\r\n if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) {\r\n this.attr(m, o)\r\n } else {\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--) {\r\n if (o[sugar[m][i]] != null) {\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n }\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n registerMethods(['Shape', 'Runner'], extension)\r\n})\r\n\r\nregisterMethods(['Element', 'Runner'], {\r\n // Let the user set the matrix directly\r\n matrix: function (mat, b, c, d, e, f) {\r\n // Act as a getter\r\n if (mat == null) {\r\n return new Matrix(this)\r\n }\r\n\r\n // Act as a setter, the user can pass a matrix or a set of numbers\r\n return this.attr('transform', new Matrix(mat, b, c, d, e, f))\r\n },\r\n\r\n // Map rotation to transform\r\n rotate: function (angle, cx, cy) {\r\n return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map skew to transform\r\n skew: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ skew: x, ox: y, oy: cx }, true)\r\n : this.transform({ skew: [x, y], ox: cx, oy: cy }, true)\r\n },\r\n\r\n shear: function (lam, cx, cy) {\r\n return this.transform({ shear: lam, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map scale to transform\r\n scale: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ scale: x, ox: y, oy: cx }, true)\r\n : this.transform({ scale: [x, y], ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map translate to transform\r\n translate: function (x, y) {\r\n return this.transform({ translate: [x, y] }, true)\r\n },\r\n\r\n // Map relative translations to transform\r\n relative: function (x, y) {\r\n return this.transform({ relative: [x, y] }, true)\r\n },\r\n\r\n // Map flip to transform\r\n flip: function (direction, around) {\r\n var directionString = typeof direction === 'string' ? direction\r\n : isFinite(direction) ? 'both'\r\n : 'both'\r\n var origin = (direction === 'both' && isFinite(around)) ? [around, around]\r\n : (direction === 'x') ? [around, 0]\r\n : (direction === 'y') ? [0, around]\r\n : isFinite(direction) ? [direction, direction]\r\n : [0, 0]\r\n this.transform({ flip: directionString, origin: origin }, true)\r\n },\r\n\r\n // Opacity\r\n opacity: function (value) {\r\n return this.attr('opacity', value)\r\n },\r\n\r\n // Relative move over x and y axes\r\n dmove: function (x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nregisterMethods('Element', {\r\n // Relative move over x axis\r\n dx: function (x) {\r\n return this.x(new SVGNumber(x).plus(this.x()))\r\n },\r\n\r\n // Relative move over y axis\r\n dy: function (y) {\r\n return this.y(new SVGNumber(y).plus(this.y()))\r\n }\r\n})\r\n\r\nregisterMethods('radius', {\r\n // Add x and y radius\r\n radius: function (x, y) {\r\n var type = (this._element || this).type\r\n return type === 'radialGradient' || type === 'radialGradient'\r\n ? this.attr('r', new SVGNumber(x))\r\n : this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nregisterMethods('Path', {\r\n // Get path length\r\n length: function () {\r\n return this.node.getTotalLength()\r\n },\r\n // Get point at length\r\n pointAt: function (length) {\r\n return new Point(this.node.getPointAtLength(length))\r\n }\r\n})\r\n\r\nregisterMethods(['Element', 'Runner'], {\r\n // Set font\r\n font: function (a, v) {\r\n if (typeof a === 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a === 'leading'\r\n ? this.leading(v)\r\n : a === 'anchor'\r\n ? this.attr('text-anchor', v)\r\n : a === 'size' || a === 'family' || a === 'weight' || a === 'stretch' || a === 'variant' || a === 'style'\r\n ? this.attr('font-' + a, v)\r\n : this.attr(a, v)\r\n }\r\n})\r\n\r\nregisterMethods('Text', {\r\n ax (x) {\r\n return this.attr('x', x)\r\n },\r\n ay (y) {\r\n return this.attr('y', y)\r\n },\r\n amove (x, y) {\r\n return this.ax(x).ay(y)\r\n }\r\n})\r\n\r\n// Add events to elements\r\nconst methods = [ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].reduce(function (last, event) {\r\n // add event to Element\r\n const fn = function (f) {\r\n if (f === null) {\r\n off(this, event)\r\n } else {\r\n on(this, event, f)\r\n }\r\n return this\r\n }\r\n\r\n last[event] = fn\r\n return last\r\n}, {})\r\n\r\nregisterMethods('Element', methods)\r\n","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Radius x value\r\nexport function rx (rx) {\r\n return this.attr('rx', rx)\r\n}\r\n\r\n// Radius y value\r\nexport function ry (ry) {\r\n return this.attr('ry', ry)\r\n}\r\n\r\n// Move over x-axis\r\nexport function x (x) {\r\n return x == null\r\n ? this.cx() - this.rx()\r\n : this.cx(x + this.rx())\r\n}\r\n\r\n// Move over y-axis\r\nexport function y (y) {\r\n return y == null\r\n ? this.cy() - this.ry()\r\n : this.cy(y + this.ry())\r\n}\r\n\r\n// Move by center over x-axis\r\nexport function cx (x) {\r\n return x == null\r\n ? this.attr('cx')\r\n : this.attr('cx', x)\r\n}\r\n\r\n// Move by center over y-axis\r\nexport function cy (y) {\r\n return y == null\r\n ? this.attr('cy')\r\n : this.attr('cy', y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n return width == null\r\n ? this.rx() * 2\r\n : this.rx(new SVGNumber(width).divide(2))\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}\r\n","import { getOrigin } from '../../utils/utils.js'\r\nimport { delimiter, transforms } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Matrix from '../../types/Matrix.js'\r\n\r\n// Reset all transformations\r\nexport function untransform () {\r\n return this.attr('transform', null)\r\n}\r\n\r\n// merge the whole transformation chain into one matrix and returns it\r\nexport function matrixify () {\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(transforms).slice(0, -1).map(function (str) {\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [kv[0],\r\n kv[1].split(delimiter)\r\n .map(function (str) { return parseFloat(str) })\r\n ]\r\n })\r\n .reverse()\r\n // merge every transformation into one matrix\r\n .reduce(function (matrix, transform) {\r\n if (transform[0] === 'matrix') {\r\n return matrix.lmultiply(Matrix.fromArray(transform[1]))\r\n }\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n }, new Matrix())\r\n\r\n return matrix\r\n}\r\n\r\n// add an element to another parent without changing the visual representation on the screen\r\nexport function toParent (parent) {\r\n if (this === parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n}\r\n\r\n// same as above with parent equals root-svg\r\nexport function toRoot () {\r\n return this.toParent(this.root())\r\n}\r\n\r\n// Add transformations\r\nexport function transform (o, relative) {\r\n // Act as a getter if no object was passed\r\n if (o == null || typeof o === 'string') {\r\n var decomposed = new Matrix(this).decompose()\r\n return decomposed[o] || decomposed\r\n }\r\n\r\n if (!Matrix.isMatrixLike(o)) {\r\n // Set the origin according to the defined transform\r\n o = { ...o, origin: getOrigin(o, this) }\r\n }\r\n\r\n // The user can pass a boolean, an Element or an Matrix or nothing\r\n var cleanRelative = relative === true ? this : (relative || false)\r\n var result = new Matrix(cleanRelative).transform(o)\r\n return this.attr('transform', result)\r\n}\r\n\r\nregisterMethods('Element', {\r\n untransform, matrixify, toParent, toRoot, transform\r\n})\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Shape extends Element {}\r\n\r\nregister(Shape)\r\n","import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\r\nimport {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Circle extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('circle', node), node)\r\n }\r\n\r\n radius (r) {\r\n return this.attr('r', r)\r\n }\r\n\r\n // Radius x value\r\n rx (rx) {\r\n return this.attr('r', rx)\r\n }\r\n\r\n // Alias radius x value\r\n ry (ry) {\r\n return this.rx(ry)\r\n }\r\n\r\n size (size) {\r\n return this.radius(new SVGNumber(size).divide(2))\r\n }\r\n}\r\n\r\nextend(Circle, { x, y, cx, cy, width, height })\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create circle element\r\n circle: wrapWithAttrCheck(function (size) {\r\n return this.put(new Circle())\r\n .size(size)\r\n .move(0, 0)\r\n })\r\n }\r\n})\r\n\r\nregister(Circle)\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Container extends Element {\r\n flatten (parent) {\r\n this.each(function () {\r\n if (this instanceof Container) return this.flatten(parent).ungroup(parent)\r\n return this.toParent(parent)\r\n })\r\n\r\n // we need this so that the root does not get removed\r\n this.node.firstElementChild || this.remove()\r\n\r\n return this\r\n }\r\n\r\n ungroup (parent) {\r\n parent = parent || this.parent()\r\n\r\n this.each(function () {\r\n return this.toParent(parent)\r\n })\r\n\r\n this.remove()\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Container)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Defs extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('defs', node), node)\r\n }\r\n\r\n flatten () { return this }\r\n ungroup () { return this }\r\n}\r\n\r\nregister(Defs)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport * as circled from '../modules/core/circled.js'\r\n\r\nexport default class Ellipse extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('ellipse', node), node)\r\n }\r\n\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVGNumber(p.width).divide(2))\r\n .ry(new SVGNumber(p.height).divide(2))\r\n }\r\n}\r\n\r\nextend(Ellipse, circled)\r\n\r\nregisterMethods('Container', {\r\n // Create an ellipse\r\n ellipse: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Ellipse()).size(width, height).move(0, 0)\r\n })\r\n})\r\n\r\nregister(Ellipse)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Stop extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('stop', node), node)\r\n }\r\n\r\n // add color stops\r\n update (o) {\r\n if (typeof o === 'number' || o instanceof SVGNumber) {\r\n o = {\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Stop)\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\nexport function from (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\r\n : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\r\n}\r\n\r\nexport function to (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\r\n : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport Stop from './Stop.js'\r\nimport baseFind from '../modules/core/selector.js'\r\nimport * as gradiented from '../modules/core/gradiented.js'\r\n\r\nexport default class Gradient extends Container {\r\n constructor (type, attrs) {\r\n super(\r\n nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\r\n attrs\r\n )\r\n }\r\n\r\n // Add a color stop\r\n stop (offset, color, opacity) {\r\n return this.put(new Stop()).update(offset, color, opacity)\r\n }\r\n\r\n // Update gradient\r\n update (block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'gradientTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nextend(Gradient, gradiented)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create gradient element in defs\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.defs().gradient(type, block)\r\n })\r\n },\r\n // define gradient\r\n Defs: {\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.put(new Gradient(type)).update(block)\r\n })\r\n }\r\n})\r\n\r\nregister(Gradient)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Pattern extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('pattern', node), node)\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Update pattern by rebuilding\r\n update (block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'patternTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create pattern element in defs\r\n pattern (...args) {\r\n return this.defs().pattern(...args)\r\n }\r\n },\r\n Defs: {\r\n pattern: wrapWithAttrCheck(function (width, height, block) {\r\n return this.put(new Pattern()).update(block).attr({\r\n x: 0,\r\n y: 0,\r\n width: width,\r\n height: height,\r\n patternUnits: 'userSpaceOnUse'\r\n })\r\n })\r\n }\r\n})\r\n\r\nregister(Pattern)\r\n","import { isImage } from '../modules/core/regex.js'\r\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { off, on } from '../modules/core/event.js'\r\nimport { registerAttrHook } from '../modules/core/attr.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Pattern from './Pattern.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Image extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('image', node), node)\r\n }\r\n\r\n // (re)load image\r\n load (url, callback) {\r\n if (!url) return this\r\n\r\n var img = new globals.window.Image()\r\n\r\n on(img, 'load', function (e) {\r\n var p = this.parent(Pattern)\r\n\r\n // ensure image size\r\n if (this.width() === 0 && this.height() === 0) {\r\n this.size(img.width, img.height)\r\n }\r\n\r\n if (p instanceof Pattern) {\r\n // ensure pattern size if not set\r\n if (p.width() === 0 && p.height() === 0) {\r\n p.size(this.width(), this.height())\r\n }\r\n }\r\n\r\n if (typeof callback === 'function') {\r\n callback.call(this, e)\r\n }\r\n }, this)\r\n\r\n on(img, 'load error', function () {\r\n // dont forget to unbind memory leaking events\r\n off(img)\r\n })\r\n\r\n return this.attr('href', (img.src = url), xlink)\r\n }\r\n}\r\n\r\nregisterAttrHook(function (attr, val, _this) {\r\n // convert image fill and stroke to patterns\r\n if (attr === 'fill' || attr === 'stroke') {\r\n if (isImage.test(val)) {\r\n val = _this.root().defs().image(val)\r\n }\r\n }\r\n\r\n if (val instanceof Image) {\r\n val = _this.root().defs().pattern(0, 0, (pattern) => {\r\n pattern.add(val)\r\n })\r\n }\r\n\r\n return val\r\n})\r\n\r\nregisterMethods({\r\n Container: {\r\n // create image element, load image and set its size\r\n image: wrapWithAttrCheck(function (source, callback) {\r\n return this.put(new Image()).size(0, 0).load(source, callback)\r\n })\r\n }\r\n})\r\n\r\nregister(Image)\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport SVGArray from './SVGArray.js'\r\n\r\nconst PointArray = subClassArray('PointArray', SVGArray)\r\n\r\nexport default PointArray\r\n\r\nextend(PointArray, {\r\n // Convert array to string\r\n toString () {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push(this[i].join(','))\r\n }\r\n\r\n return array.join(' ')\r\n },\r\n\r\n // Convert array to line object\r\n toLine () {\r\n return {\r\n x1: this[0][0],\r\n y1: this[0][1],\r\n x2: this[1][0],\r\n y2: this[1][1]\r\n }\r\n },\r\n\r\n // Get morphed array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push([\r\n this[i][0] + (this.destination[i][0] - this[i][0]) * pos,\r\n this[i][1] + (this.destination[i][1] - this[i][1]) * pos\r\n ])\r\n }\r\n\r\n return new PointArray(array)\r\n },\r\n\r\n // Parse point string and flat array\r\n parse (array = [[0, 0]]) {\r\n var points = []\r\n\r\n // if it is an array\r\n if (array instanceof Array) {\r\n // and it is not flat, there is no need to parse it\r\n if (array[0] instanceof Array) {\r\n return array\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for (var i = 0, len = array.length; i < len; i = i + 2) {\r\n points.push([ array[i], array[i + 1] ])\r\n }\r\n\r\n return points\r\n },\r\n\r\n // Move point string\r\n move (x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y)) {\r\n for (var i = this.length - 1; i >= 0; i--) {\r\n this[i] = [this[i][0] + x, this[i][1] + y]\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize poly string\r\n size (width, height) {\r\n var i\r\n var box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n if (box.width) this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\r\n if (box.height) this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get bounding box of points\r\n bbox () {\r\n var maxX = -Infinity\r\n var maxY = -Infinity\r\n var minX = Infinity\r\n var minY = Infinity\r\n this.forEach(function (el) {\r\n maxX = Math.max(el[0], maxX)\r\n maxY = Math.max(el[1], maxY)\r\n minX = Math.min(el[0], minX)\r\n minY = Math.min(el[1], minY)\r\n })\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\r\n }\r\n})\r\n","import PointArray from '../../types/PointArray.js'\r\n\r\nexport let MorphArray = PointArray\r\n\r\n// Move by left top corner over x-axis\r\nexport function x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n}\r\n\r\n// Move by left top corner over y-axis\r\nexport function y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n let b = this.bbox()\r\n return width == null ? b.width : this.size(width, b.height)\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n let b = this.bbox()\r\n return height == null ? b.height : this.size(b.width, height)\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\n\r\nexport default class Line extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('line', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return new PointArray([\r\n [ this.attr('x1'), this.attr('y1') ],\r\n [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n\r\n // Overwrite native plot() method\r\n plot (x1, y1, x2, y2) {\r\n if (x1 == null) {\r\n return this.array()\r\n } else if (typeof y1 !== 'undefined') {\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n } else {\r\n x1 = new PointArray(x1).toLine()\r\n }\r\n\r\n return this.attr(x1)\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n}\r\n\r\nextend(Line, pointed)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a line element\r\n line: wrapWithAttrCheck(function (...args) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a PointArray\r\n return Line.prototype.plot.apply(\r\n this.put(new Line())\r\n , args[0] != null ? args : [0, 0, 0, 0]\r\n )\r\n })\r\n }\r\n})\r\n\r\nregister(Line)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Marker extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('marker', node), node)\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n\r\n // Set marker refX and refY\r\n ref (x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n\r\n // Update marker\r\n update (block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') { block.call(this, this) }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n toString () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n marker (...args) {\r\n // Create marker element in defs\r\n return this.defs().marker(...args)\r\n }\r\n },\r\n Defs: {\r\n // Create marker\r\n marker: wrapWithAttrCheck(function (width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new Marker())\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n })\r\n },\r\n marker: {\r\n // Create and attach markers\r\n marker (marker, width, height, block) {\r\n var attr = ['marker']\r\n\r\n // Build attribute name\r\n if (marker !== 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof Marker\r\n ? arguments[1]\r\n : this.defs().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n }\r\n})\r\n\r\nregister(Marker)\r\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import { timeline } from '../modules/core/defaults.js'\r\nimport { extend } from '../utils/adopter.js'\r\n\r\n/***\r\nBase Class\r\n==========\r\nThe base stepper class that will be\r\n***/\r\n\r\nfunction makeSetterGetter (k, f) {\r\n return function (v) {\r\n if (v == null) return this[v]\r\n this[k] = v\r\n if (f) f.call(this)\r\n return this\r\n }\r\n}\r\n\r\nexport let easing = {\r\n '-': function (pos) { return pos },\r\n '<>': function (pos) { return -Math.cos(pos * Math.PI) / 2 + 0.5 },\r\n '>': function (pos) { return Math.sin(pos * Math.PI / 2) },\r\n '<': function (pos) { return -Math.cos(pos * Math.PI / 2) + 1 },\r\n bezier: function (x1, y1, x2, y2) {\r\n // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\r\n return function (t) {\r\n if (t < 0) {\r\n if (x1 > 0) {\r\n return y1 / x1 * t\r\n } else if (x2 > 0) {\r\n return y2 / x2 * t\r\n } else {\r\n return 0\r\n }\r\n } else if (t > 1) {\r\n if (x2 < 1) {\r\n return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2)\r\n } else if (x1 < 1) {\r\n return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1)\r\n } else {\r\n return 1\r\n }\r\n } else {\r\n return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\r\n }\r\n }\r\n },\r\n // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\r\n steps: function (steps, stepPosition = 'end') {\r\n // deal with \"jump-\" prefix\r\n stepPosition = stepPosition.split('-').reverse()[0]\r\n\r\n let jumps = steps\r\n if (stepPosition === 'none') {\r\n --jumps\r\n } else if (stepPosition === 'both') {\r\n ++jumps\r\n }\r\n\r\n // The beforeFlag is essentially useless\r\n return (t, beforeFlag = false) => {\r\n // Step is called currentStep in referenced url\r\n let step = Math.floor(t * steps)\r\n const jumping = (t * step) % 1 === 0\r\n\r\n if (stepPosition === 'start' || stepPosition === 'both') {\r\n ++step\r\n }\r\n\r\n if (beforeFlag && jumping) {\r\n --step\r\n }\r\n\r\n if (t >= 0 && step < 0) {\r\n step = 0\r\n }\r\n\r\n if (t <= 1 && step > jumps) {\r\n step = jumps\r\n }\r\n\r\n return step / jumps\r\n }\r\n }\r\n}\r\n\r\nexport class Stepper {\r\n done () { return false }\r\n}\r\n\r\n/***\r\nEasing Functions\r\n================\r\n***/\r\n\r\nexport class Ease extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.ease = easing[fn || timeline.ease] || fn\r\n }\r\n\r\n step (from, to, pos) {\r\n if (typeof from !== 'number') {\r\n return pos < 1 ? from : to\r\n }\r\n return from + (to - from) * this.ease(pos)\r\n }\r\n}\r\n\r\n/***\r\nController Types\r\n================\r\n***/\r\n\r\nexport class Controller extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.stepper = fn\r\n }\r\n\r\n step (current, target, dt, c) {\r\n return this.stepper(current, target, dt, c)\r\n }\r\n\r\n done (c) {\r\n return c.done\r\n }\r\n}\r\n\r\nfunction recalculate () {\r\n // Apply the default parameters\r\n var duration = (this._duration || 500) / 1000\r\n var overshoot = this._overshoot || 0\r\n\r\n // Calculate the PID natural response\r\n var eps = 1e-10\r\n var pi = Math.PI\r\n var os = Math.log(overshoot / 100 + eps)\r\n var zeta = -os / Math.sqrt(pi * pi + os * os)\r\n var wn = 3.9 / (zeta * duration)\r\n\r\n // Calculate the Spring values\r\n this.d = 2 * zeta * wn\r\n this.k = wn * wn\r\n}\r\n\r\nexport class Spring extends Controller {\r\n constructor (duration, overshoot) {\r\n super()\r\n this.duration(duration || 500)\r\n .overshoot(overshoot || 0)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n if (dt > 100) dt = 16\r\n\r\n dt /= 1000\r\n\r\n // Get the previous velocity\r\n var velocity = c.velocity || 0\r\n\r\n // Apply the control to get the new position and store it\r\n var acceleration = -this.d * velocity - this.k * (current - target)\r\n var newPosition = current +\r\n velocity * dt +\r\n acceleration * dt * dt / 2\r\n\r\n // Store the velocity\r\n c.velocity = velocity + acceleration * dt\r\n\r\n // Figure out if we have converged, and if so, pass the value\r\n c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\r\n return c.done ? target : newPosition\r\n }\r\n}\r\n\r\nextend(Spring, {\r\n duration: makeSetterGetter('_duration', recalculate),\r\n overshoot: makeSetterGetter('_overshoot', recalculate)\r\n})\r\n\r\nexport class PID extends Controller {\r\n constructor (p, i, d, windup) {\r\n super()\r\n\r\n p = p == null ? 0.1 : p\r\n i = i == null ? 0.01 : i\r\n d = d == null ? 0 : d\r\n windup = windup == null ? 1000 : windup\r\n this.p(p).i(i).d(d).windup(windup)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n var p = target - current\r\n var i = (c.integral || 0) + p * dt\r\n var d = (p - (c.error || 0)) / dt\r\n var windup = this.windup\r\n\r\n // antiwindup\r\n if (windup !== false) {\r\n i = Math.max(-windup, Math.min(i, windup))\r\n }\r\n\r\n c.error = p\r\n c.integral = i\r\n\r\n c.done = Math.abs(p) < 0.001\r\n\r\n return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\r\n }\r\n}\r\n\r\nextend(PID, {\r\n windup: makeSetterGetter('windup'),\r\n p: makeSetterGetter('P'),\r\n i: makeSetterGetter('I'),\r\n d: makeSetterGetter('D')\r\n})\r\n","import {\r\n delimiter,\r\n dots,\r\n hyphen,\r\n isPathLetter,\r\n numbersWithDots,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport Point from './Point.js'\r\nimport SVGArray from './SVGArray.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nconst PathArray = subClassArray('PathArray', SVGArray)\r\n\r\nexport default PathArray\r\n\r\nexport function pathRegReplace (a, b, c, d) {\r\n return c + d.replace(dots, ' .')\r\n}\r\n\r\nfunction arrayToString (a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\nconst pathHandlers = {\r\n M: function (c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return ['M', p.x, p.y]\r\n },\r\n L: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['L', c[0], c[1]]\r\n },\r\n H: function (c, p) {\r\n p.x = c[0]\r\n return ['H', c[0]]\r\n },\r\n V: function (c, p) {\r\n p.y = c[0]\r\n return ['V', c[0]]\r\n },\r\n C: function (c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]\r\n },\r\n S: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['S', c[0], c[1], c[2], c[3]]\r\n },\r\n Q: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['Q', c[0], c[1], c[2], c[3]]\r\n },\r\n T: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['T', c[0], c[1]]\r\n },\r\n Z: function (c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return ['Z']\r\n },\r\n A: function (c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]\r\n }\r\n}\r\n\r\nlet mlhvqtcsaz = 'mlhvqtcsaz'.split('')\r\n\r\nfor (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\r\n pathHandlers[mlhvqtcsaz[i]] = (function (i) {\r\n return function (c, p, p0) {\r\n if (i === 'H') c[0] = c[0] + p.x\r\n else if (i === 'V') c[0] = c[0] + p.y\r\n else if (i === 'A') {\r\n c[5] = c[5] + p.x\r\n c[6] = c[6] + p.y\r\n } else {\r\n for (var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j % 2 ? p.y : p.x)\r\n }\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsaz[i].toUpperCase())\r\n}\r\n\r\nextend(PathArray, {\r\n // Convert array to string\r\n toString () {\r\n return arrayToString(this)\r\n },\r\n\r\n // Move path string\r\n move (x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n } else if (l === 'H') {\r\n this[i][1] += x\r\n } else if (l === 'V') {\r\n this[i][1] += y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n this[i][3] += x\r\n this[i][4] += y\r\n\r\n if (l === 'C') {\r\n this[i][5] += x\r\n this[i][6] += y\r\n }\r\n } else if (l === 'A') {\r\n this[i][6] += x\r\n this[i][7] += y\r\n }\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize path string\r\n size (width, height) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n var i, l\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n } else if (l === 'H') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n } else if (l === 'V') {\r\n this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\r\n this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l === 'C') {\r\n this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\r\n this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n } else if (l === 'A') {\r\n // resize radii\r\n this[i][1] = (this[i][1] * width) / box.width\r\n this[i][2] = (this[i][2] * height) / box.height\r\n\r\n // move position values\r\n this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\r\n this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Test if the passed path array use the same path data commands as this path array\r\n equalCommands (pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new PathArray(pathArray)\r\n\r\n equalCommands = this.length === pathArray.length\r\n for (i = 0, il = this.length; equalCommands && i < il; i++) {\r\n equalCommands = this[i][0] === pathArray[i][0]\r\n }\r\n\r\n return equalCommands\r\n },\r\n\r\n // Make path array morphable\r\n morph (pathArray) {\r\n pathArray = new PathArray(pathArray)\r\n\r\n if (this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get morphed path array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this\r\n var destinationArray = this.destination.value\r\n var array = []\r\n var pathArray = new PathArray()\r\n var i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [sourceArray[i][0]]\r\n for (j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if (array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] !== 0)\r\n array[i][5] = +(array[i][5] !== 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n },\r\n\r\n // Absolutize and parse path to array\r\n parse (array = [['M', 0, 0]]) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof PathArray) return array\r\n\r\n // prepare for parsing\r\n var s\r\n var paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 }\r\n\r\n if (typeof array === 'string') {\r\n array = array\r\n .replace(numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(delimiter) // split into array\r\n } else {\r\n array = array.reduce(function (prev, curr) {\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var result = []\r\n var p = new Point()\r\n var p0 = new Point()\r\n var index = 0\r\n var len = array.length\r\n\r\n do {\r\n // Test if we have a path letter\r\n if (isPathLetter.test(array[index])) {\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n } else if (s === 'M') {\r\n s = 'L'\r\n } else if (s === 'm') {\r\n s = 'l'\r\n }\r\n\r\n result.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n } while (len > index)\r\n\r\n return result\r\n },\r\n\r\n // Get bounding box of path\r\n bbox () {\r\n parser().path.setAttribute('d', this.toString())\r\n return parser.nodes.path.getBBox()\r\n }\r\n})\r\n","import { Ease } from './Controller.js'\r\nimport {\r\n delimiter,\r\n numberAndUnit,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport Color from '../types/Color.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport SVGArray from '../types/SVGArray.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Morphable {\r\n constructor (stepper) {\r\n this._stepper = stepper || new Ease('-')\r\n\r\n this._from = null\r\n this._to = null\r\n this._type = null\r\n this._context = null\r\n this._morphObj = null\r\n }\r\n\r\n from (val) {\r\n if (val == null) {\r\n return this._from\r\n }\r\n\r\n this._from = this._set(val)\r\n return this\r\n }\r\n\r\n to (val) {\r\n if (val == null) {\r\n return this._to\r\n }\r\n\r\n this._to = this._set(val)\r\n return this\r\n }\r\n\r\n type (type) {\r\n // getter\r\n if (type == null) {\r\n return this._type\r\n }\r\n\r\n // setter\r\n this._type = type\r\n return this\r\n }\r\n\r\n _set (value) {\r\n if (!this._type) {\r\n var type = typeof value\r\n\r\n if (type === 'number') {\r\n this.type(SVGNumber)\r\n } else if (type === 'string') {\r\n if (Color.isColor(value)) {\r\n this.type(Color)\r\n } else if (delimiter.test(value)) {\r\n this.type(pathLetters.test(value)\r\n ? PathArray\r\n : SVGArray\r\n )\r\n } else if (numberAndUnit.test(value)) {\r\n this.type(SVGNumber)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n } else if (morphableTypes.indexOf(value.constructor) > -1) {\r\n this.type(value.constructor)\r\n } else if (Array.isArray(value)) {\r\n this.type(SVGArray)\r\n } else if (type === 'object') {\r\n this.type(ObjectBag)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n }\r\n\r\n var result = (new this._type(value)).toArray()\r\n this._morphObj = this._morphObj || new this._type()\r\n this._context = this._context ||\r\n Array.apply(null, Array(result.length)).map(Object)\r\n return result\r\n }\r\n\r\n stepper (stepper) {\r\n if (stepper == null) return this._stepper\r\n this._stepper = stepper\r\n return this\r\n }\r\n\r\n done () {\r\n var complete = this._context\r\n .map(this._stepper.done)\r\n .reduce(function (last, curr) {\r\n return last && curr\r\n }, true)\r\n return complete\r\n }\r\n\r\n at (pos) {\r\n var _this = this\r\n\r\n return this._morphObj.fromArray(\r\n this._from.map(function (i, index) {\r\n return _this._stepper.step(i, _this._to[index], pos, _this._context[index], _this._context)\r\n })\r\n )\r\n }\r\n}\r\n\r\nexport class NonMorphable {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (val) {\r\n val = Array.isArray(val) ? val[0] : val\r\n this.value = val\r\n return this\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n toArray () {\r\n return [this.value]\r\n }\r\n}\r\n\r\nexport class TransformBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (obj) {\r\n if (Array.isArray(obj)) {\r\n obj = {\r\n scaleX: obj[0],\r\n scaleY: obj[1],\r\n shear: obj[2],\r\n rotate: obj[3],\r\n translateX: obj[4],\r\n translateY: obj[5],\r\n originX: obj[6],\r\n originY: obj[7]\r\n }\r\n }\r\n\r\n Object.assign(this, TransformBag.defaults, obj)\r\n return this\r\n }\r\n\r\n toArray () {\r\n var v = this\r\n\r\n return [\r\n v.scaleX,\r\n v.scaleY,\r\n v.shear,\r\n v.rotate,\r\n v.translateX,\r\n v.translateY,\r\n v.originX,\r\n v.originY\r\n ]\r\n }\r\n}\r\n\r\nTransformBag.defaults = {\r\n scaleX: 1,\r\n scaleY: 1,\r\n shear: 0,\r\n rotate: 0,\r\n translateX: 0,\r\n translateY: 0,\r\n originX: 0,\r\n originY: 0\r\n}\r\n\r\nexport class ObjectBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (objOrArr) {\r\n this.values = []\r\n\r\n if (Array.isArray(objOrArr)) {\r\n this.values = objOrArr\r\n return\r\n }\r\n\r\n objOrArr = objOrArr || {}\r\n var entries = []\r\n\r\n for (let i in objOrArr) {\r\n entries.push([i, objOrArr[i]])\r\n }\r\n\r\n entries.sort((a, b) => {\r\n return a[0] - b[0]\r\n })\r\n\r\n this.values = entries.reduce((last, curr) => last.concat(curr), [])\r\n return this\r\n }\r\n\r\n valueOf () {\r\n var obj = {}\r\n var arr = this.values\r\n\r\n for (var i = 0, len = arr.length; i < len; i += 2) {\r\n obj[arr[i]] = arr[i + 1]\r\n }\r\n\r\n return obj\r\n }\r\n\r\n toArray () {\r\n return this.values\r\n }\r\n}\r\n\r\nconst morphableTypes = [\r\n NonMorphable,\r\n TransformBag,\r\n ObjectBag\r\n]\r\n\r\nexport function registerMorphableType (type = []) {\r\n morphableTypes.push(...[].concat(type))\r\n}\r\n\r\nexport function makeMorphable () {\r\n extend(morphableTypes, {\r\n to (val) {\r\n return new Morphable()\r\n .type(this.constructor)\r\n .from(this.valueOf())\r\n .to(val)\r\n },\r\n fromArray (arr) {\r\n this.init(arr)\r\n return this\r\n }\r\n })\r\n}\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Shape from './Shape.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Path extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('path', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return this._array || (this._array = new PathArray(this.attr('d')))\r\n }\r\n\r\n // Plot new path\r\n plot (d) {\r\n return (d == null) ? this.array()\r\n : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new PathArray(d)))\r\n }\r\n\r\n // Clear array cache\r\n clear () {\r\n delete this._array\r\n return this\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n\r\n // Move by left top corner over x-axis\r\n x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n\r\n // Move by left top corner over y-axis\r\n y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg textpath [href*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\n// Define morphable array\r\nPath.prototype.MorphArray = PathArray\r\n\r\n// Add parent method\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped path element\r\n path: wrapWithAttrCheck(function (d) {\r\n // make sure plot is called as a setter\r\n return this.put(new Path()).plot(d || new PathArray())\r\n })\r\n }\r\n})\r\n\r\nregister(Path)\r\n","import { proportionalSize } from '../../utils/utils.js'\r\nimport PointArray from '../../types/PointArray.js'\r\n\r\n// Get array\r\nexport function array () {\r\n return this._array || (this._array = new PointArray(this.attr('points')))\r\n}\r\n\r\n// Plot new path\r\nexport function plot (p) {\r\n return (p == null) ? this.array()\r\n : this.clear().attr('points', typeof p === 'string' ? p\r\n : (this._array = new PointArray(p)))\r\n}\r\n\r\n// Clear array cache\r\nexport function clear () {\r\n delete this._array\r\n return this\r\n}\r\n\r\n// Move by left top corner\r\nexport function move (x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n}\r\n\r\n// Set element size to given width and height\r\nexport function size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polygon extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polygon', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polygon: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polygon()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polygon, pointed)\r\nextend(Polygon, poly)\r\nregister(Polygon)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polyline extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polyline', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polyline: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polyline()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polyline, pointed)\r\nextend(Polyline, poly)\r\nregister(Polyline)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Rect extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('rect', node), node)\r\n }\r\n}\r\n\r\nextend(Rect, { rx, ry })\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a rect element\r\n rect: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Rect()).size(width, height)\r\n })\r\n }\r\n})\r\n\r\nregister(Rect)\r\n","export default class Queue {\r\n constructor () {\r\n this._first = null\r\n this._last = null\r\n }\r\n\r\n push (value) {\r\n // An item stores an id and the provided value\r\n var item = value.next ? value : { value: value, next: null, prev: null }\r\n\r\n // Deal with the queue being empty or populated\r\n if (this._last) {\r\n item.prev = this._last\r\n this._last.next = item\r\n this._last = item\r\n } else {\r\n this._last = item\r\n this._first = item\r\n }\r\n\r\n // Update the length and return the current item\r\n return item\r\n }\r\n\r\n shift () {\r\n // Check if we have a value\r\n var remove = this._first\r\n if (!remove) return null\r\n\r\n // If we do, remove it and relink things\r\n this._first = remove.next\r\n if (this._first) this._first.prev = null\r\n this._last = this._first ? this._last : null\r\n return remove.value\r\n }\r\n\r\n // Shows us the first item in the list\r\n first () {\r\n return this._first && this._first.value\r\n }\r\n\r\n // Shows us the last item in the list\r\n last () {\r\n return this._last && this._last.value\r\n }\r\n\r\n // Removes the item that was returned from the push\r\n remove (item) {\r\n // Relink the previous item\r\n if (item.prev) item.prev.next = item.next\r\n if (item.next) item.next.prev = item.prev\r\n if (item === this._last) this._last = item.prev\r\n if (item === this._first) this._first = item.next\r\n\r\n // Invalidate item\r\n item.prev = null\r\n item.next = null\r\n }\r\n}\r\n","import { globals } from '../utils/window.js'\r\nimport Queue from './Queue.js'\r\n\r\nconst Animator = {\r\n nextDraw: null,\r\n frames: new Queue(),\r\n timeouts: new Queue(),\r\n timer: () => globals.window.performance || globals.window.Date,\r\n transforms: [],\r\n\r\n frame (fn) {\r\n // Store the node\r\n var node = Animator.frames.push({ run: fn })\r\n\r\n // Request an animation frame if we don't have one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n // Return the node so we can remove it easily\r\n return node\r\n },\r\n\r\n transform_frame (fn, id) {\r\n Animator.transforms[id] = fn\r\n },\r\n\r\n timeout (fn, delay) {\r\n delay = delay || 0\r\n\r\n // Work out when the event should fire\r\n var time = Animator.timer().now() + delay\r\n\r\n // Add the timeout to the end of the queue\r\n var node = Animator.timeouts.push({ run: fn, time: time })\r\n\r\n // Request another animation frame if we need one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n return node\r\n },\r\n\r\n cancelFrame (node) {\r\n node != null && Animator.frames.remove(node)\r\n },\r\n\r\n clearTimeout (node) {\r\n node != null && Animator.timeouts.remove(node)\r\n },\r\n\r\n _draw (now) {\r\n // Run all the timeouts we can run, if they are not ready yet, add them\r\n // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\r\n var nextTimeout = null\r\n var lastTimeout = Animator.timeouts.last()\r\n while ((nextTimeout = Animator.timeouts.shift())) {\r\n // Run the timeout if its time, or push it to the end\r\n if (now >= nextTimeout.time) {\r\n nextTimeout.run()\r\n } else {\r\n Animator.timeouts.push(nextTimeout)\r\n }\r\n\r\n // If we hit the last item, we should stop shifting out more items\r\n if (nextTimeout === lastTimeout) break\r\n }\r\n\r\n // Run all of the animation frames\r\n var nextFrame = null\r\n var lastFrame = Animator.frames.last()\r\n while ((nextFrame !== lastFrame) && (nextFrame = Animator.frames.shift())) {\r\n nextFrame.run()\r\n }\r\n\r\n Animator.transforms.forEach(function (el) { el() })\r\n\r\n // If we have remaining timeouts or frames, draw until we don't anymore\r\n Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()\r\n ? globals.window.requestAnimationFrame(Animator._draw)\r\n : null\r\n }\r\n}\r\n\r\nexport default Animator\r\n","import { globals } from '../utils/window.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Animator from './Animator.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\n\r\nvar makeSchedule = function (runnerInfo) {\r\n var start = runnerInfo.start\r\n var duration = runnerInfo.runner.duration()\r\n var end = start + duration\r\n return { start: start, duration: duration, end: end, runner: runnerInfo.runner }\r\n}\r\n\r\nconst defaultSource = function () {\r\n let w = globals.window\r\n return (w.performance || w.Date).now()\r\n}\r\n\r\nexport default class Timeline extends EventTarget {\r\n // Construct a new timeline on the given element\r\n constructor (timeSource = defaultSource) {\r\n super()\r\n\r\n this._timeSource = timeSource\r\n\r\n // Store the timing variables\r\n this._startTime = 0\r\n this._speed = 1.0\r\n\r\n // Determines how long a runner is hold in memory. Can be a dt or true/false\r\n this._persist = 0\r\n\r\n // Keep track of the running animations and their starting parameters\r\n this._nextFrame = null\r\n this._paused = true\r\n this._runners = []\r\n this._order = []\r\n this._time = 0\r\n this._lastSourceTime = 0\r\n this._lastStepTime = 0\r\n\r\n // Make sure that step is always called in class context\r\n this._step = this._step.bind(this)\r\n }\r\n\r\n // schedules a runner on the timeline\r\n schedule (runner, delay, when) {\r\n if (runner == null) {\r\n return this._runners.map(makeSchedule).sort(function (a, b) {\r\n return a.runner.id - b.runner.id\r\n })\r\n }\r\n\r\n // The start time for the next animation can either be given explicitly,\r\n // derived from the current timeline time or it can be relative to the\r\n // last start time to chain animations direclty\r\n\r\n var absoluteStartTime = 0\r\n var endTime = this.getEndTime()\r\n delay = delay || 0\r\n\r\n // Work out when to start the animation\r\n if (when == null || when === 'last' || when === 'after') {\r\n // Take the last time and increment\r\n absoluteStartTime = endTime\r\n } else if (when === 'absolute' || when === 'start') {\r\n absoluteStartTime = delay\r\n delay = 0\r\n } else if (when === 'now') {\r\n absoluteStartTime = this._time\r\n } else if (when === 'relative') {\r\n let runnerInfo = this._runners[runner.id]\r\n if (runnerInfo) {\r\n absoluteStartTime = runnerInfo.start + delay\r\n delay = 0\r\n }\r\n } else {\r\n throw new Error('Invalid value for the \"when\" parameter')\r\n }\r\n\r\n // Manage runner\r\n runner.unschedule()\r\n runner.timeline(this)\r\n // runner.time(-delay)\r\n\r\n // Save runnerInfo\r\n this._runners[runner.id] = {\r\n persist: this.persist(),\r\n runner: runner,\r\n start: absoluteStartTime + delay\r\n }\r\n\r\n // Save order, update Time if needed and continue\r\n this._order.push(runner.id)\r\n this.updateTime()._continue()\r\n return this\r\n }\r\n\r\n // Remove the runner from this timeline\r\n unschedule (runner) {\r\n var index = this._order.indexOf(runner.id)\r\n if (index < 0) return this\r\n\r\n delete this._runners[runner.id]\r\n this._order.splice(index, 1)\r\n runner.timeline(null)\r\n return this\r\n }\r\n\r\n // Calculates the end of the timeline\r\n getEndTime () {\r\n var lastRunnerInfo = this._runners[this._order[this._order.length - 1]]\r\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\r\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0\r\n return lastStartTime + lastDuration\r\n }\r\n\r\n // Makes sure, that after pausing the time doesn't jump\r\n updateTime () {\r\n if (!this.active()) {\r\n this._lastSourceTime = this._timeSource()\r\n }\r\n return this\r\n }\r\n\r\n play () {\r\n // Now make sure we are not paused and continue the animation\r\n this._paused = false\r\n return this.updateTime()._continue()\r\n }\r\n\r\n pause () {\r\n this._paused = true\r\n return this._continue()\r\n }\r\n\r\n stop () {\r\n // Go to start and pause\r\n this.time(0)\r\n return this.pause()\r\n }\r\n\r\n finish () {\r\n // Go to end and pause\r\n this.time(this.getEndTime() + 1)\r\n return this.pause()\r\n }\r\n\r\n speed (speed) {\r\n if (speed == null) return this._speed\r\n this._speed = speed\r\n return this\r\n }\r\n\r\n reverse (yes) {\r\n var currentSpeed = this.speed()\r\n if (yes == null) return this.speed(-currentSpeed)\r\n\r\n var positive = Math.abs(currentSpeed)\r\n return this.speed(yes ? positive : -positive)\r\n }\r\n\r\n seek (dt) {\r\n return this.time(this._time + dt)\r\n }\r\n\r\n time (time) {\r\n if (time == null) return this._time\r\n this._time = time\r\n return this._continue(true)\r\n }\r\n\r\n persist (dtOrForever) {\r\n if (dtOrForever == null) return this._persist\r\n this._persist = dtOrForever\r\n return this\r\n }\r\n\r\n source (fn) {\r\n if (fn == null) return this._timeSource\r\n this._timeSource = fn\r\n return this\r\n }\r\n\r\n _step (immediateStep = false) {\r\n // Get the time delta from the last time and update the time\r\n var time = this._timeSource()\r\n var dtSource = time - this._lastSourceTime\r\n\r\n if (immediateStep) dtSource = 0\r\n\r\n var dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\r\n this._lastSourceTime = time\r\n\r\n // Only update the time if we use the timeSource.\r\n // Otherwise use the current time\r\n if (!immediateStep) {\r\n // Update the time\r\n this._time += dtTime\r\n this._time = this._time < 0 ? 0 : this._time\r\n }\r\n this._lastStepTime = this._time\r\n this.fire('time', this._time)\r\n\r\n // Run all of the runners directly\r\n var runnersLeft = false\r\n for (var i = 0, len = this._order.length; i < len; i++) {\r\n // Get and run the current runner and ignore it if its inactive\r\n var runnerInfo = this._runners[this._order[i]]\r\n var runner = runnerInfo.runner\r\n let dt = dtTime\r\n\r\n // Make sure that we give the actual difference\r\n // between runner start time and now\r\n let dtToStart = this._time - runnerInfo.start\r\n\r\n // Dont run runner if not started yet\r\n if (dtToStart <= 0) {\r\n runnersLeft = true\r\n\r\n // This is for the case that teh timeline was seeked so that the time\r\n // is now before the startTime of the runner. Thats why we need to set\r\n // the runner to position 0\r\n runner.reset()\r\n continue\r\n } else if (dtToStart < dt) {\r\n // Adjust dt to make sure that animation is on point\r\n dt = dtToStart\r\n }\r\n\r\n if (!runner.active()) continue\r\n\r\n // If this runner is still going, signal that we need another animation\r\n // frame, otherwise, remove the completed runner\r\n var finished = runner.step(dt).done\r\n if (!finished) {\r\n runnersLeft = true\r\n // continue\r\n } else if (runnerInfo.persist !== true) {\r\n // runner is finished. And runner might get removed\r\n\r\n var endTime = runner.duration() - runner.time() + this._time\r\n\r\n if (endTime + this._persist < this._time) {\r\n // Delete runner and correct index\r\n delete this._runners[this._order[i]]\r\n this._order.splice(i--, 1) && --len\r\n runner.timeline(null)\r\n }\r\n }\r\n }\r\n\r\n // Basically: we continue when there are runners right from us in time\r\n // when -->, and when runners are left from us when <--\r\n if ((runnersLeft && !(this._speed < 0 && this._time === 0)) || (this._order.length && this._speed < 0 && this._time > 0)) {\r\n this._continue()\r\n } else {\r\n this.fire('finished')\r\n this.pause()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Checks if we are running and continues the animation\r\n _continue (immediateStep = false) {\r\n Animator.cancelFrame(this._nextFrame)\r\n this._nextFrame = null\r\n\r\n if (immediateStep) return this._step(true)\r\n if (this._paused) return this\r\n\r\n this._nextFrame = Animator.frame(this._step)\r\n return this\r\n }\r\n\r\n active () {\r\n return !!this._nextFrame\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n timeline: function () {\r\n this._timeline = (this._timeline || new Timeline())\r\n return this._timeline\r\n }\r\n }\r\n})\r\n","import { Controller, Ease, Stepper } from './Controller.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { from, to } from '../modules/core/gradiented.js'\r\nimport { getOrigin } from '../utils/utils.js'\r\nimport { noop, timeline } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Animator from './Animator.js'\r\nimport Box from '../types/Box.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport Matrix from '../types/Matrix.js'\r\nimport Morphable, { TransformBag } from './Morphable.js'\r\nimport Point from '../types/Point.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Timeline from './Timeline.js'\r\n\r\nexport default class Runner extends EventTarget {\r\n constructor (options) {\r\n super()\r\n\r\n // Store a unique id on the runner, so that we can identify it later\r\n this.id = Runner.id++\r\n\r\n // Ensure a default value\r\n options = options == null\r\n ? timeline.duration\r\n : options\r\n\r\n // Ensure that we get a controller\r\n options = typeof options === 'function'\r\n ? new Controller(options)\r\n : options\r\n\r\n // Declare all of the variables\r\n this._element = null\r\n this._timeline = null\r\n this.done = false\r\n this._queue = []\r\n\r\n // Work out the stepper and the duration\r\n this._duration = typeof options === 'number' && options\r\n this._isDeclarative = options instanceof Controller\r\n this._stepper = this._isDeclarative ? options : new Ease()\r\n\r\n // We copy the current values from the timeline because they can change\r\n this._history = {}\r\n\r\n // Store the state of the runner\r\n this.enabled = true\r\n this._time = 0\r\n this._lastTime = 0\r\n\r\n // At creation, the runner is in reseted state\r\n this._reseted = true\r\n\r\n // Save transforms applied to this runner\r\n this.transforms = new Matrix()\r\n this.transformId = 1\r\n\r\n // Looping variables\r\n this._haveReversed = false\r\n this._reverse = false\r\n this._loopsDone = 0\r\n this._swing = false\r\n this._wait = 0\r\n this._times = 1\r\n }\r\n\r\n /*\r\n Runner Definitions\r\n ==================\r\n These methods help us define the runtime behaviour of the Runner or they\r\n help us make new runners from the current runner\r\n */\r\n\r\n element (element) {\r\n if (element == null) return this._element\r\n this._element = element\r\n element._prepareRunner()\r\n return this\r\n }\r\n\r\n timeline (timeline) {\r\n // check explicitly for undefined so we can set the timeline to null\r\n if (typeof timeline === 'undefined') return this._timeline\r\n this._timeline = timeline\r\n return this\r\n }\r\n\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var runner = new Runner(o.duration)\r\n if (this._timeline) runner.timeline(this._timeline)\r\n if (this._element) runner.element(this._element)\r\n return runner.loop(o).schedule(delay, when)\r\n }\r\n\r\n schedule (timeline, delay, when) {\r\n // The user doesn't need to pass a timeline if we already have one\r\n if (!(timeline instanceof Timeline)) {\r\n when = delay\r\n delay = timeline\r\n timeline = this.timeline()\r\n }\r\n\r\n // If there is no timeline, yell at the user...\r\n if (!timeline) {\r\n throw Error('Runner cannot be scheduled without timeline')\r\n }\r\n\r\n // Schedule the runner on the timeline provided\r\n timeline.schedule(this, delay, when)\r\n return this\r\n }\r\n\r\n unschedule () {\r\n var timeline = this.timeline()\r\n timeline && timeline.unschedule(this)\r\n return this\r\n }\r\n\r\n loop (times, swing, wait) {\r\n // Deal with the user passing in an object\r\n if (typeof times === 'object') {\r\n swing = times.swing\r\n wait = times.wait\r\n times = times.times\r\n }\r\n\r\n // Sanitise the values and store them\r\n this._times = times || Infinity\r\n this._swing = swing || false\r\n this._wait = wait || 0\r\n return this\r\n }\r\n\r\n delay (delay) {\r\n return this.animate(0, delay)\r\n }\r\n\r\n /*\r\n Basic Functionality\r\n ===================\r\n These methods allow us to attach basic functions to the runner directly\r\n */\r\n\r\n queue (initFn, runFn, retargetFn, isTransform) {\r\n this._queue.push({\r\n initialiser: initFn || noop,\r\n runner: runFn || noop,\r\n retarget: retargetFn,\r\n isTransform: isTransform,\r\n initialised: false,\r\n finished: false\r\n })\r\n var timeline = this.timeline()\r\n timeline && this.timeline()._continue()\r\n return this\r\n }\r\n\r\n during (fn) {\r\n return this.queue(null, fn)\r\n }\r\n\r\n after (fn) {\r\n return this.on('finish', fn)\r\n }\r\n\r\n /*\r\n Runner animation methods\r\n ========================\r\n Control how the animation plays\r\n */\r\n\r\n time (time) {\r\n if (time == null) {\r\n return this._time\r\n }\r\n let dt = time - this._time\r\n this.step(dt)\r\n return this\r\n }\r\n\r\n duration () {\r\n return this._times * (this._wait + this._duration) - this._wait\r\n }\r\n\r\n loops (p) {\r\n var loopDuration = this._duration + this._wait\r\n if (p == null) {\r\n var loopsDone = Math.floor(this._time / loopDuration)\r\n var relativeTime = (this._time - loopsDone * loopDuration)\r\n var position = relativeTime / this._duration\r\n return Math.min(loopsDone + position, this._times)\r\n }\r\n var whole = Math.floor(p)\r\n var partial = p % 1\r\n var time = loopDuration * whole + this._duration * partial\r\n return this.time(time)\r\n }\r\n\r\n position (p) {\r\n // Get all of the variables we need\r\n var x = this._time\r\n var d = this._duration\r\n var w = this._wait\r\n var t = this._times\r\n var s = this._swing\r\n var r = this._reverse\r\n var position\r\n\r\n if (p == null) {\r\n /*\r\n This function converts a time to a position in the range [0, 1]\r\n The full explanation can be found in this desmos demonstration\r\n https://www.desmos.com/calculator/u4fbavgche\r\n The logic is slightly simplified here because we can use booleans\r\n */\r\n\r\n // Figure out the value without thinking about the start or end time\r\n const f = function (x) {\r\n var swinging = s * Math.floor(x % (2 * (w + d)) / (w + d))\r\n var backwards = (swinging && !r) || (!swinging && r)\r\n var uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards\r\n var clipped = Math.max(Math.min(uncliped, 1), 0)\r\n return clipped\r\n }\r\n\r\n // Figure out the value by incorporating the start time\r\n var endTime = t * (w + d) - w\r\n position = x <= 0 ? Math.round(f(1e-5))\r\n : x < endTime ? f(x)\r\n : Math.round(f(endTime - 1e-5))\r\n return position\r\n }\r\n\r\n // Work out the loops done and add the position to the loops done\r\n var loopsDone = Math.floor(this.loops())\r\n var swingForward = s && (loopsDone % 2 === 0)\r\n var forwards = (swingForward && !r) || (r && swingForward)\r\n position = loopsDone + (forwards ? p : 1 - p)\r\n return this.loops(position)\r\n }\r\n\r\n progress (p) {\r\n if (p == null) {\r\n return Math.min(1, this._time / this.duration())\r\n }\r\n return this.time(p * this.duration())\r\n }\r\n\r\n step (dt) {\r\n // If we are inactive, this stepper just gets skipped\r\n if (!this.enabled) return this\r\n\r\n // Update the time and get the new position\r\n dt = dt == null ? 16 : dt\r\n this._time += dt\r\n var position = this.position()\r\n\r\n // Figure out if we need to run the stepper in this frame\r\n var running = this._lastPosition !== position && this._time >= 0\r\n this._lastPosition = position\r\n\r\n // Figure out if we just started\r\n var duration = this.duration()\r\n var justStarted = this._lastTime <= 0 && this._time > 0\r\n var justFinished = this._lastTime < this._time && this.time > duration\r\n this._lastTime = this._time\r\n if (justStarted) {\r\n this.fire('start', this)\r\n }\r\n\r\n // Work out if the runner is finished set the done flag here so animations\r\n // know, that they are running in the last step (this is good for\r\n // transformations which can be merged)\r\n var declarative = this._isDeclarative\r\n this.done = !declarative && !justFinished && this._time >= duration\r\n\r\n // Runner is running. So its not in reseted state anymore\r\n this._reseted = false\r\n\r\n // Call initialise and the run function\r\n if (running || declarative) {\r\n this._initialise(running)\r\n\r\n // clear the transforms on this runner so they dont get added again and again\r\n this.transforms = new Matrix()\r\n var converged = this._run(declarative ? dt : position)\r\n\r\n this.fire('step', this)\r\n }\r\n // correct the done flag here\r\n // declaritive animations itself know when they converged\r\n this.done = this.done || (converged && declarative)\r\n if (this.done) {\r\n this.fire('finish', this)\r\n }\r\n return this\r\n }\r\n\r\n reset () {\r\n if (this._reseted) return this\r\n this.loops(0)\r\n this._reseted = true\r\n return this\r\n }\r\n\r\n finish () {\r\n return this.step(Infinity)\r\n }\r\n\r\n reverse (reverse) {\r\n this._reverse = reverse == null ? !this._reverse : reverse\r\n return this\r\n }\r\n\r\n ease (fn) {\r\n this._stepper = new Ease(fn)\r\n return this\r\n }\r\n\r\n active (enabled) {\r\n if (enabled == null) return this.enabled\r\n this.enabled = enabled\r\n return this\r\n }\r\n\r\n /*\r\n Private Methods\r\n ===============\r\n Methods that shouldn't be used externally\r\n */\r\n\r\n // Save a morpher to the morpher list so that we can retarget it later\r\n _rememberMorpher (method, morpher) {\r\n this._history[method] = {\r\n morpher: morpher,\r\n caller: this._queue[this._queue.length - 1]\r\n }\r\n }\r\n\r\n // Try to set the target for a morpher if the morpher exists, otherwise\r\n // do nothing and return false\r\n _tryRetarget (method, target) {\r\n if (this._history[method]) {\r\n // if the last method wasnt even initialised, throw it away\r\n if (!this._history[method].caller.initialised) {\r\n let index = this._queue.indexOf(this._history[method].caller)\r\n this._queue.splice(index, 1)\r\n return false\r\n }\r\n\r\n // for the case of transformations, we use the special retarget function\r\n // which has access to the outer scope\r\n if (this._history[method].caller.retarget) {\r\n this._history[method].caller.retarget(target)\r\n // for everything else a simple morpher change is sufficient\r\n } else {\r\n this._history[method].morpher.to(target)\r\n }\r\n\r\n this._history[method].caller.finished = false\r\n var timeline = this.timeline()\r\n timeline && timeline._continue()\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n // Run each initialise function in the runner if required\r\n _initialise (running) {\r\n // If we aren't running, we shouldn't initialise when not declarative\r\n if (!running && !this._isDeclarative) return\r\n\r\n // Loop through all of the initialisers\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current initialiser\r\n var current = this._queue[i]\r\n\r\n // Determine whether we need to initialise\r\n var needsIt = this._isDeclarative || (!current.initialised && running)\r\n running = !current.finished\r\n\r\n // Call the initialiser if we need to\r\n if (needsIt && running) {\r\n current.initialiser.call(this)\r\n current.initialised = true\r\n }\r\n }\r\n }\r\n\r\n // Run each run function for the position or dt given\r\n _run (positionOrDt) {\r\n // Run all of the _queue directly\r\n var allfinished = true\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current function to run\r\n var current = this._queue[i]\r\n\r\n // Run the function if its not finished, we keep track of the finished\r\n // flag for the sake of declarative _queue\r\n var converged = current.runner.call(this, positionOrDt)\r\n current.finished = current.finished || (converged === true)\r\n allfinished = allfinished && current.finished\r\n }\r\n\r\n // We report when all of the constructors are finished\r\n return allfinished\r\n }\r\n\r\n addTransform (transform, index) {\r\n this.transforms.lmultiplyO(transform)\r\n return this\r\n }\r\n\r\n clearTransform () {\r\n this.transforms = new Matrix()\r\n return this\r\n }\r\n\r\n // TODO: Keep track of all transformations so that deletion is faster\r\n clearTransformsFromQueue () {\r\n if (!this.done) {\r\n this._queue = this._queue.filter((item) => {\r\n return !item.isTransform\r\n })\r\n }\r\n }\r\n\r\n static sanitise (duration, delay, when) {\r\n // Initialise the default parameters\r\n var times = 1\r\n var swing = false\r\n var wait = 0\r\n duration = duration || timeline.duration\r\n delay = delay || timeline.delay\r\n when = when || 'last'\r\n\r\n // If we have an object, unpack the values\r\n if (typeof duration === 'object' && !(duration instanceof Stepper)) {\r\n delay = duration.delay || delay\r\n when = duration.when || when\r\n swing = duration.swing || swing\r\n times = duration.times || times\r\n wait = duration.wait || wait\r\n duration = duration.duration || timeline.duration\r\n }\r\n\r\n return {\r\n duration: duration,\r\n delay: delay,\r\n swing: swing,\r\n times: times,\r\n wait: wait,\r\n when: when\r\n }\r\n }\r\n}\r\n\r\nRunner.id = 0\r\n\r\nclass FakeRunner {\r\n constructor (transforms = new Matrix(), id = -1, done = true) {\r\n this.transforms = transforms\r\n this.id = id\r\n this.done = done\r\n }\r\n\r\n clearTransformsFromQueue () { }\r\n}\r\n\r\nextend([Runner, FakeRunner], {\r\n mergeWith (runner) {\r\n return new FakeRunner(\r\n runner.transforms.lmultiply(this.transforms),\r\n runner.id\r\n )\r\n }\r\n})\r\n\r\n// FakeRunner.emptyRunner = new FakeRunner()\r\n\r\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\r\nconst getRunnerTransform = (runner) => runner.transforms\r\n\r\nfunction mergeTransforms () {\r\n // Find the matrix to apply to the element and apply it\r\n let runners = this._transformationRunners.runners\r\n let netTransform = runners\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n\r\n this.transform(netTransform)\r\n\r\n this._transformationRunners.merge()\r\n\r\n if (this._transformationRunners.length() === 1) {\r\n this._frameId = null\r\n }\r\n}\r\n\r\nclass RunnerArray {\r\n constructor () {\r\n this.runners = []\r\n this.ids = []\r\n }\r\n\r\n add (runner) {\r\n if (this.runners.includes(runner)) return\r\n\r\n let id = runner.id + 1\r\n\r\n let leftSibling = this.ids.reduce((last, curr) => {\r\n if (curr > last && curr < id) return curr\r\n return last\r\n }, 0)\r\n\r\n let index = this.ids.indexOf(leftSibling) + 1\r\n\r\n this.ids.splice(index, 0, id)\r\n this.runners.splice(index, 0, runner)\r\n\r\n return this\r\n }\r\n\r\n getByID (id) {\r\n return this.runners[this.ids.indexOf(id + 1)]\r\n }\r\n\r\n remove (id) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1)\r\n this.runners.splice(index, 1)\r\n return this\r\n }\r\n\r\n merge () {\r\n let lastRunner = null\r\n this.runners.forEach((runner, i) => {\r\n if (lastRunner && runner.done && lastRunner.done) {\r\n this.remove(runner.id)\r\n this.edit(lastRunner.id, runner.mergeWith(lastRunner))\r\n }\r\n\r\n lastRunner = runner\r\n })\r\n\r\n return this\r\n }\r\n\r\n edit (id, newRunner) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1, id)\r\n this.runners.splice(index, 1, newRunner)\r\n return this\r\n }\r\n\r\n length () {\r\n return this.ids.length\r\n }\r\n\r\n clearBefore (id) {\r\n let deleteCnt = this.ids.indexOf(id + 1) || 1\r\n this.ids.splice(0, deleteCnt, 0)\r\n this.runners.splice(0, deleteCnt, new FakeRunner())\r\n .forEach((r) => r.clearTransformsFromQueue())\r\n return this\r\n }\r\n}\r\n\r\nlet frameId = 0\r\nregisterMethods({\r\n Element: {\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var timeline = this.timeline()\r\n return new Runner(o.duration)\r\n .loop(o)\r\n .element(this)\r\n .timeline(timeline.play())\r\n .schedule(delay, when)\r\n },\r\n\r\n delay (by, when) {\r\n return this.animate(0, by, when)\r\n },\r\n\r\n // this function searches for all runners on the element and deletes the ones\r\n // which run before the current one. This is because absolute transformations\r\n // overwfrite anything anyway so there is no need to waste time computing\r\n // other runners\r\n _clearTransformRunnersBefore (currentRunner) {\r\n this._transformationRunners.clearBefore(currentRunner.id)\r\n },\r\n\r\n _currentTransform (current) {\r\n return this._transformationRunners.runners\r\n // we need the equal sign here to make sure, that also transformations\r\n // on the same runner which execute before the current transformation are\r\n // taken into account\r\n .filter((runner) => runner.id <= current.id)\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n },\r\n\r\n addRunner (runner) {\r\n this._transformationRunners.add(runner)\r\n\r\n Animator.transform_frame(\r\n mergeTransforms.bind(this), this._frameId\r\n )\r\n },\r\n\r\n _prepareRunner () {\r\n if (this._frameId == null) {\r\n this._transformationRunners = new RunnerArray()\r\n .add(new FakeRunner(new Matrix(this)))\r\n\r\n this._frameId = frameId++\r\n }\r\n }\r\n }\r\n})\r\n\r\nextend(Runner, {\r\n attr (a, v) {\r\n return this.styleAttr('attr', a, v)\r\n },\r\n\r\n // Add animatable styles\r\n css (s, v) {\r\n return this.styleAttr('css', s, v)\r\n },\r\n\r\n styleAttr (type, name, val) {\r\n // apply attributes individually\r\n if (typeof name === 'object') {\r\n for (var key in val) {\r\n this.styleAttr(type, key, val[key])\r\n }\r\n }\r\n\r\n var morpher = new Morphable(this._stepper).to(val)\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.element()[type](name))\r\n }, function (pos) {\r\n this.element()[type](name, morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n zoom (level, point) {\r\n var morpher = new Morphable(this._stepper).to(new SVGNumber(level))\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.zoom())\r\n }, function (pos) {\r\n this.element().zoom(morpher.at(pos), point)\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n ** absolute transformations\r\n **/\r\n\r\n //\r\n // M v -----|-----(D M v = F v)------|-----> T v\r\n //\r\n // 1. define the final state (T) and decompose it (once)\r\n // t = [tx, ty, the, lam, sy, sx]\r\n // 2. on every frame: pull the current state of all previous transforms\r\n // (M - m can change)\r\n // and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\r\n // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\r\n // - Note F(0) = M\r\n // - Note F(1) = T\r\n // 4. Now you get the delta matrix as a result: D = F * inv(M)\r\n\r\n transform (transforms, relative, affine) {\r\n // If we have a declarative function, we should retarget it if possible\r\n relative = transforms.relative || relative\r\n if (this._isDeclarative && !relative && this._tryRetarget('transform', transforms)) {\r\n return this\r\n }\r\n\r\n // Parse the parameters\r\n var isMatrix = Matrix.isMatrixLike(transforms)\r\n affine = transforms.affine != null\r\n ? transforms.affine\r\n : (affine != null ? affine : !isMatrix)\r\n\r\n // Create a morepher and set its type\r\n const morpher = new Morphable(this._stepper)\r\n .type(affine ? TransformBag : Matrix)\r\n\r\n let origin\r\n let element\r\n let current\r\n let currentAngle\r\n let startTransform\r\n\r\n function setup () {\r\n // make sure element and origin is defined\r\n element = element || this.element()\r\n origin = origin || getOrigin(transforms, element)\r\n\r\n startTransform = new Matrix(relative ? undefined : element)\r\n\r\n // add the runner to the element so it can merge transformations\r\n element.addRunner(this)\r\n\r\n // Deactivate all transforms that have run so far if we are absolute\r\n if (!relative) {\r\n element._clearTransformRunnersBefore(this)\r\n }\r\n }\r\n\r\n function run (pos) {\r\n // clear all other transforms before this in case something is saved\r\n // on this runner. We are absolute. We dont need these!\r\n if (!relative) this.clearTransform()\r\n\r\n let { x, y } = new Point(origin).transform(element._currentTransform(this))\r\n\r\n let target = new Matrix({ ...transforms, origin: [x, y] })\r\n let start = this._isDeclarative && current\r\n ? current\r\n : startTransform\r\n\r\n if (affine) {\r\n target = target.decompose(x, y)\r\n start = start.decompose(x, y)\r\n\r\n // Get the current and target angle as it was set\r\n const rTarget = target.rotate\r\n const rCurrent = start.rotate\r\n\r\n // Figure out the shortest path to rotate directly\r\n const possibilities = [rTarget - 360, rTarget, rTarget + 360]\r\n const distances = possibilities.map(a => Math.abs(a - rCurrent))\r\n const shortest = Math.min(...distances)\r\n const index = distances.indexOf(shortest)\r\n target.rotate = possibilities[index]\r\n }\r\n\r\n if (relative) {\r\n // we have to be careful here not to overwrite the rotation\r\n // with the rotate method of Matrix\r\n if (!isMatrix) {\r\n target.rotate = transforms.rotate || 0\r\n }\r\n if (this._isDeclarative && currentAngle) {\r\n start.rotate = currentAngle\r\n }\r\n }\r\n\r\n morpher.from(start)\r\n morpher.to(target)\r\n\r\n let affineParameters = morpher.at(pos)\r\n currentAngle = affineParameters.rotate\r\n current = new Matrix(affineParameters)\r\n\r\n this.addTransform(current)\r\n return morpher.done()\r\n }\r\n\r\n function retarget (newTransforms) {\r\n // only get a new origin if it changed since the last call\r\n if (\r\n (newTransforms.origin || 'center').toString() !==\r\n (transforms.origin || 'center').toString()\r\n ) {\r\n origin = getOrigin(transforms, element)\r\n }\r\n\r\n // overwrite the old transformations with the new ones\r\n transforms = { ...newTransforms, origin }\r\n }\r\n\r\n this.queue(setup, run, retarget, true)\r\n this._isDeclarative && this._rememberMorpher('transform', morpher)\r\n return this\r\n },\r\n\r\n // Animatable x-axis\r\n x (x, relative) {\r\n return this._queueNumber('x', x)\r\n },\r\n\r\n // Animatable y-axis\r\n y (y) {\r\n return this._queueNumber('y', y)\r\n },\r\n\r\n dx (x) {\r\n return this._queueNumberDelta('x', x)\r\n },\r\n\r\n dy (y) {\r\n return this._queueNumberDelta('y', y)\r\n },\r\n\r\n _queueNumberDelta (method, to) {\r\n to = new SVGNumber(to)\r\n\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n var from = null\r\n this.queue(function () {\r\n from = this.element()[method]()\r\n morpher.from(from)\r\n morpher.to(from + to)\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n }, function (newTo) {\r\n morpher.to(from + new SVGNumber(newTo))\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueObject (method, to) {\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n this.queue(function () {\r\n morpher.from(this.element()[method]())\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueNumber (method, value) {\r\n return this._queueObject(method, new SVGNumber(value))\r\n },\r\n\r\n // Animatable center x-axis\r\n cx (x) {\r\n return this._queueNumber('cx', x)\r\n },\r\n\r\n // Animatable center y-axis\r\n cy (y) {\r\n return this._queueNumber('cy', y)\r\n },\r\n\r\n // Add animatable move\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n },\r\n\r\n // Add animatable center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n },\r\n\r\n // Add animatable size\r\n size (width, height) {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if (!width || !height) {\r\n box = this._element.bbox()\r\n }\r\n\r\n if (!width) {\r\n width = box.width / box.height * height\r\n }\r\n\r\n if (!height) {\r\n height = box.height / box.width * width\r\n }\r\n\r\n return this\r\n .width(width)\r\n .height(height)\r\n },\r\n\r\n // Add animatable width\r\n width (width) {\r\n return this._queueNumber('width', width)\r\n },\r\n\r\n // Add animatable height\r\n height (height) {\r\n return this._queueNumber('height', height)\r\n },\r\n\r\n // Add animatable plot\r\n plot (a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if (arguments.length === 4) {\r\n return this.plot([a, b, c, d])\r\n }\r\n\r\n var morpher = this._element.MorphArray().to(a)\r\n\r\n this.queue(function () {\r\n morpher.from(this._element.array())\r\n }, function (pos) {\r\n this._element.plot(morpher.at(pos))\r\n })\r\n\r\n return this\r\n },\r\n\r\n // Add leading method\r\n leading (value) {\r\n return this._queueNumber('leading', value)\r\n },\r\n\r\n // Add animatable viewbox\r\n viewbox (x, y, width, height) {\r\n return this._queueObject('viewbox', new Box(x, y, width, height))\r\n },\r\n\r\n update (o) {\r\n if (typeof o !== 'object') {\r\n return this.update({\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n\r\n return this\r\n }\r\n})\r\n\r\nextend(Runner, { rx, ry, from, to })\r\n","import {\r\n adopt,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport Defs from './Defs.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Svg extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('svg', node), node)\r\n this.namespace()\r\n }\r\n\r\n isRoot () {\r\n return !this.node.parentNode ||\r\n !(this.node.parentNode instanceof globals.window.SVGElement) ||\r\n this.node.parentNode.nodeName === '#document'\r\n }\r\n\r\n // Check if this is a root svg\r\n // If not, call docs from this element\r\n root () {\r\n if (this.isRoot()) return this\r\n return super.root()\r\n }\r\n\r\n // Add namespaces\r\n namespace () {\r\n if (!this.isRoot()) return this.root().namespace()\r\n return this\r\n .attr({ xmlns: ns, version: '1.1' })\r\n .attr('xmlns:xlink', xlink, xmlns)\r\n .attr('xmlns:svgjs', svgjs, xmlns)\r\n }\r\n\r\n // Creates and returns defs element\r\n defs () {\r\n if (!this.isRoot()) return this.root().defs()\r\n\r\n return adopt(this.node.getElementsByTagName('defs')[0]) ||\r\n this.put(new Defs())\r\n }\r\n\r\n // custom parent method\r\n parent (type) {\r\n if (this.isRoot()) {\r\n return this.node.parentNode.nodeName === '#document'\r\n ? null\r\n : adopt(this.node.parentNode)\r\n }\r\n\r\n return super.parent(type)\r\n }\r\n\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n return this\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create nested svg document\r\n nested: wrapWithAttrCheck(function () {\r\n return this.put(new Svg())\r\n })\r\n }\r\n})\r\n\r\nregister(Svg, 'Svg', true)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Symbol extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('symbol', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n symbol: wrapWithAttrCheck(function () {\r\n return this.put(new Symbol())\r\n })\r\n }\r\n})\r\n\r\nregister(Symbol)\r\n","import { globals } from '../../utils/window.js'\r\n\r\n// Create plain text node\r\nexport function plain (text) {\r\n // clear if build mode is disabled\r\n if (this._build === false) {\r\n this.clear()\r\n }\r\n\r\n // create text node\r\n this.node.appendChild(globals.document.createTextNode(text))\r\n\r\n return this\r\n}\r\n\r\n// Get length of text element\r\nexport function length () {\r\n return this.node.getComputedTextLength()\r\n}\r\n","import {\r\n adopt,\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { attrs } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Text extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('text', node), node)\r\n\r\n this.dom.leading = new SVGNumber(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', attrs['font-family'])\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n // act as getter\r\n if (x == null) {\r\n return this.attr('x')\r\n }\r\n\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n var oy = this.attr('y')\r\n var o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null) {\r\n return typeof oy === 'number' ? oy - o : oy\r\n }\r\n\r\n return this.attr('y', typeof y === 'number' ? y + o : y)\r\n }\r\n\r\n // Move center over x-axis\r\n cx (x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n\r\n // Move center over y-axis\r\n cy (y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n\r\n // Set the text content\r\n text (text) {\r\n // act as getter\r\n if (text === undefined) {\r\n var children = this.node.childNodes\r\n var firstLine = 0\r\n text = ''\r\n\r\n for (var i = 0, len = children.length; i < len; ++i) {\r\n // skip textPaths - they are no lines\r\n if (children[i].nodeName === 'textPath') {\r\n if (i === 0) firstLine = 1\r\n continue\r\n }\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var j = 0, jl = text.length; j < jl; j++) {\r\n this.tspan(text[j]).newLine()\r\n }\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n\r\n // Set / get leading\r\n leading (value) {\r\n // act as getter\r\n if (value == null) {\r\n return this.dom.leading\r\n }\r\n\r\n // act as setter\r\n this.dom.leading = new SVGNumber(value)\r\n\r\n return this.rebuild()\r\n }\r\n\r\n // Rebuild appearance type\r\n rebuild (rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild === 'boolean') {\r\n this._rebuild = rebuild\r\n }\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n var blankLineOffset = 0\r\n var leading = this.dom.leading\r\n\r\n this.each(function () {\r\n var fontSize = globals.window.getComputedStyle(this.node)\r\n .getPropertyValue('font-size')\r\n var dy = leading * new SVGNumber(fontSize)\r\n\r\n if (this.dom.newLined) {\r\n this.attr('x', self.attr('x'))\r\n\r\n if (this.text() === '\\n') {\r\n blankLineOffset += dy\r\n } else {\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Enable / disable build mode\r\n build (build) {\r\n this._build = !!build\r\n return this\r\n }\r\n\r\n // overwrite method from parent to set data properly\r\n setData (o) {\r\n this.dom = o\r\n this.dom.leading = new SVGNumber(o.leading || 1.3)\r\n return this\r\n }\r\n}\r\n\r\nextend(Text, textable)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create text element\r\n text: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).text(text)\r\n }),\r\n\r\n // Create plain text element\r\n plain: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).plain(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Text)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Text from './Text.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Tspan extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('tspan', node), node)\r\n }\r\n\r\n // Set text content\r\n text (text) {\r\n if (text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n\r\n // Shortcut dx\r\n dx (dx) {\r\n return this.attr('dx', dx)\r\n }\r\n\r\n // Shortcut dy\r\n dy (dy) {\r\n return this.attr('dy', dy)\r\n }\r\n\r\n // Create new line\r\n newLine () {\r\n // fetch text parent\r\n var t = this.parent(Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new position\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n}\r\n\r\nextend(Tspan, textable)\r\n\r\nregisterMethods({\r\n Tspan: {\r\n tspan: wrapWithAttrCheck(function (text) {\r\n var tspan = new Tspan()\r\n\r\n // clear if build mode is disabled\r\n if (!this._build) {\r\n this.clear()\r\n }\r\n\r\n // add new tspan\r\n this.node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Tspan)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class ClipPath extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('clipPath', node), node)\r\n }\r\n\r\n // Unclip all clipped elements and remove itself\r\n remove () {\r\n // unclip all targets\r\n this.targets().forEach(function (el) {\r\n el.unclip()\r\n })\r\n\r\n // remove clipPath from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [clip-path*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create clipping element\r\n clip: wrapWithAttrCheck(function () {\r\n return this.defs().put(new ClipPath())\r\n })\r\n },\r\n Element: {\r\n // Distribute clipPath to svg element\r\n clipWith (element) {\r\n // use given clip or create a new one\r\n let clipper = element instanceof ClipPath\r\n ? element\r\n : this.parent().clip().add(element)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + clipper.id() + '\")')\r\n },\r\n\r\n // Unclip element\r\n unclip () {\r\n return this.attr('clip-path', null)\r\n },\r\n\r\n clipper () {\r\n return this.reference('clip-path')\r\n }\r\n }\r\n})\r\n\r\nregister(ClipPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class G extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('g', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create a group element\r\n group: wrapWithAttrCheck(function () {\r\n return this.put(new G())\r\n })\r\n }\r\n})\r\n\r\nregister(G)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class A extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('a', node), node)\r\n }\r\n\r\n // Link url\r\n to (url) {\r\n return this.attr('href', url, xlink)\r\n }\r\n\r\n // Link target attribute\r\n target (target) {\r\n return this.attr('target', target)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a hyperlink element\r\n link: wrapWithAttrCheck(function (url) {\r\n return this.put(new A()).to(url)\r\n })\r\n },\r\n Element: {\r\n // Create a hyperlink element\r\n linkTo: function (url) {\r\n var link = new A()\r\n\r\n if (typeof url === 'function') { url.call(link, link) } else {\r\n link.to(url)\r\n }\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n }\r\n})\r\n\r\nregister(A)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Mask extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('mask', node), node)\r\n }\r\n\r\n // Unmask all masked elements and remove itself\r\n remove () {\r\n // unmask all targets\r\n this.targets().forEach(function (el) {\r\n el.unmask()\r\n })\r\n\r\n // remove mask from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [mask*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n mask: wrapWithAttrCheck(function () {\r\n return this.defs().put(new Mask())\r\n })\r\n },\r\n Element: {\r\n // Distribute mask to svg element\r\n maskWith (element) {\r\n // use given mask or create a new one\r\n var masker = element instanceof Mask\r\n ? element\r\n : this.parent().mask().add(element)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + masker.id() + '\")')\r\n },\r\n\r\n // Unmask element\r\n unmask () {\r\n return this.attr('mask', null)\r\n },\r\n\r\n masker () {\r\n return this.reference('mask')\r\n }\r\n }\r\n})\r\n\r\nregister(Mask)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { unCamelCase } from '../utils/utils.js'\r\nimport Element from './Element.js'\r\n\r\nfunction cssRule (selector, rule) {\r\n if (!selector) return ''\r\n if (!rule) return selector\r\n\r\n var ret = selector + '{'\r\n\r\n for (var i in rule) {\r\n ret += unCamelCase(i) + ':' + rule[i] + ';'\r\n }\r\n\r\n ret += '}'\r\n\r\n return ret\r\n}\r\n\r\nexport default class Style extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('style', node), node)\r\n }\r\n\r\n addText (w = '') {\r\n this.node.textContent += w\r\n return this\r\n }\r\n\r\n font (name, src, params = {}) {\r\n return this.rule('@font-face', {\r\n fontFamily: name,\r\n src: src,\r\n ...params\r\n })\r\n }\r\n\r\n rule (selector, obj) {\r\n return this.addText(cssRule(selector, obj))\r\n }\r\n}\r\n\r\nregisterMethods('Dom', {\r\n style: wrapWithAttrCheck(function (selector, obj) {\r\n return this.put(new Style()).rule(selector, obj)\r\n }),\r\n fontface: wrapWithAttrCheck(function (name, src, params) {\r\n return this.put(new Style()).font(name, src, params)\r\n })\r\n})\r\n\r\nregister(Style)\r\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Path from './Path.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Text from './Text.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class TextPath extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('textPath', node), node)\r\n }\r\n\r\n // return the array of the path track element\r\n array () {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n\r\n // Plot path if any\r\n plot (d) {\r\n var track = this.track()\r\n var pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n\r\n // Get the path element\r\n track () {\r\n return this.reference('href')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n textPath: wrapWithAttrCheck(function (text, path) {\r\n return this.defs().path(path).text(text).addTo(this)\r\n })\r\n },\r\n Text: {\r\n // Create path for text to run on\r\n path: wrapWithAttrCheck(function (track) {\r\n var path = new TextPath()\r\n\r\n // if track is a path, reuse it\r\n if (!(track instanceof Path)) {\r\n // create path element\r\n track = this.root().defs().path(track)\r\n }\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, xlink)\r\n\r\n // add textPath element as child node and return textPath\r\n return this.put(path)\r\n }),\r\n\r\n // Get the textPath children\r\n textPath () {\r\n return this.find('textPath')[0]\r\n }\r\n },\r\n Path: {\r\n // creates a textPath from this path\r\n text: wrapWithAttrCheck(function (text) {\r\n if (text instanceof Text) {\r\n var txt = text.text()\r\n return text.clear().path(this).text(txt)\r\n }\r\n return this.parent().put(new Text()).path(this).text(text)\r\n }),\r\n\r\n targets () {\r\n return baseFind('svg [href*=\"' + this.id() + '\"]')\r\n }\r\n }\r\n})\r\n\r\nTextPath.prototype.MorphArray = PathArray\r\nregister(TextPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Use extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('use', node), node)\r\n }\r\n\r\n // Use element as a reference\r\n element (element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, xlink)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a use element\r\n use: wrapWithAttrCheck(function (element, file) {\r\n return this.put(new Use()).element(element, file)\r\n })\r\n }\r\n})\r\n\r\nregister(Use)\r\n","/* Optional Modules */\r\nimport './modules/optional/arrange.js'\r\nimport './modules/optional/class.js'\r\nimport './modules/optional/css.js'\r\nimport './modules/optional/data.js'\r\nimport './modules/optional/memory.js'\r\nimport './modules/optional/sugar.js'\r\nimport './modules/optional/transform.js'\r\n\r\nimport { extend, makeInstance } from './utils/adopter.js'\r\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\r\nimport Box from './types/Box.js'\r\nimport Circle from './elements/Circle.js'\r\nimport Color from './types/Color.js'\r\nimport Container from './elements/Container.js'\r\nimport Defs from './elements/Defs.js'\r\nimport Dom from './elements/Dom.js'\r\nimport Element from './elements/Element.js'\r\nimport Ellipse from './elements/Ellipse.js'\r\nimport EventTarget from './types/EventTarget.js'\r\nimport Gradient from './elements/Gradient.js'\r\nimport Image from './elements/Image.js'\r\nimport Line from './elements/Line.js'\r\nimport List from './types/List.js'\r\nimport Marker from './elements/Marker.js'\r\nimport Matrix from './types/Matrix.js'\r\nimport Morphable, {\r\n NonMorphable,\r\n ObjectBag,\r\n TransformBag,\r\n makeMorphable,\r\n registerMorphableType\r\n} from './animation/Morphable.js'\r\nimport Path from './elements/Path.js'\r\nimport PathArray from './types/PathArray.js'\r\nimport Pattern from './elements/Pattern.js'\r\nimport PointArray from './types/PointArray.js'\r\nimport Polygon from './elements/Polygon.js'\r\nimport Polyline from './elements/Polyline.js'\r\nimport Rect from './elements/Rect.js'\r\nimport Runner from './animation/Runner.js'\r\nimport SVGArray from './types/SVGArray.js'\r\nimport SVGNumber from './types/SVGNumber.js'\r\nimport Shape from './elements/Shape.js'\r\nimport Svg from './elements/Svg.js'\r\nimport Symbol from './elements/Symbol.js'\r\nimport Text from './elements/Text.js'\r\nimport Tspan from './elements/Tspan.js'\r\nimport * as defaults from './modules/core/defaults.js'\r\nimport * as utils from './utils/utils.js'\r\nimport * as namespaces from './modules/core/namespaces.js'\r\nimport * as regex from './modules/core/regex.js'\r\n\r\nexport {\r\n Morphable,\r\n registerMorphableType,\r\n makeMorphable,\r\n TransformBag,\r\n ObjectBag,\r\n NonMorphable\r\n}\r\n\r\nexport { defaults, utils, namespaces, regex }\r\nexport const SVG = makeInstance\r\nexport { default as parser } from './modules/core/parser.js'\r\nexport { default as find } from './modules/core/selector.js'\r\nexport * from './modules/core/event.js'\r\nexport * from './utils/adopter.js'\r\nexport { registerWindow } from './utils/window.js'\r\n\r\n/* Animation Modules */\r\nexport { default as Animator } from './animation/Animator.js'\r\nexport { Controller, Ease, PID, Spring, easing } from './animation/Controller.js'\r\nexport { default as Queue } from './animation/Queue.js'\r\nexport { default as Runner } from './animation/Runner.js'\r\nexport { default as Timeline } from './animation/Timeline.js'\r\n\r\n/* Types */\r\nexport { default as Array } from './types/SVGArray.js'\r\nexport { default as Box } from './types/Box.js'\r\nexport { default as Color } from './types/Color.js'\r\nexport { default as EventTarget } from './types/EventTarget.js'\r\nexport { default as Matrix } from './types/Matrix.js'\r\nexport { default as Number } from './types/SVGNumber.js'\r\nexport { default as PathArray } from './types/PathArray.js'\r\nexport { default as Point } from './types/Point.js'\r\nexport { default as PointArray } from './types/PointArray.js'\r\nexport { default as List } from './types/List.js'\r\n\r\n/* Elements */\r\nexport { default as Circle } from './elements/Circle.js'\r\nexport { default as ClipPath } from './elements/ClipPath.js'\r\nexport { default as Container } from './elements/Container.js'\r\nexport { default as Defs } from './elements/Defs.js'\r\nexport { default as Dom } from './elements/Dom.js'\r\nexport { default as Element } from './elements/Element.js'\r\nexport { default as Ellipse } from './elements/Ellipse.js'\r\nexport { default as Gradient } from './elements/Gradient.js'\r\nexport { default as G } from './elements/G.js'\r\nexport { default as A } from './elements/A.js'\r\nexport { default as Image } from './elements/Image.js'\r\nexport { default as Line } from './elements/Line.js'\r\nexport { default as Marker } from './elements/Marker.js'\r\nexport { default as Mask } from './elements/Mask.js'\r\nexport { default as Path } from './elements/Path.js'\r\nexport { default as Pattern } from './elements/Pattern.js'\r\nexport { default as Polygon } from './elements/Polygon.js'\r\nexport { default as Polyline } from './elements/Polyline.js'\r\nexport { default as Rect } from './elements/Rect.js'\r\nexport { default as Shape } from './elements/Shape.js'\r\nexport { default as Stop } from './elements/Stop.js'\r\nexport { default as Style } from './elements/Style.js'\r\nexport { default as Svg } from './elements/Svg.js'\r\nexport { default as Symbol } from './elements/Symbol.js'\r\nexport { default as Text } from './elements/Text.js'\r\nexport { default as TextPath } from './elements/TextPath.js'\r\nexport { default as Tspan } from './elements/Tspan.js'\r\nexport { default as Use } from './elements/Use.js'\r\n\r\nextend([\r\n Svg,\r\n Symbol,\r\n Image,\r\n Pattern,\r\n Marker\r\n], getMethodsFor('viewbox'))\r\n\r\nextend([\r\n Line,\r\n Polyline,\r\n Polygon,\r\n Path\r\n], getMethodsFor('marker'))\r\n\r\nextend(Text, getMethodsFor('Text'))\r\nextend(Path, getMethodsFor('Path'))\r\n\r\nextend(Defs, getMethodsFor('Defs'))\r\n\r\nextend([\r\n Text,\r\n Tspan\r\n], getMethodsFor('Tspan'))\r\n\r\nextend([\r\n Rect,\r\n Ellipse,\r\n Circle,\r\n Gradient\r\n], getMethodsFor('radius'))\r\n\r\nextend(EventTarget, getMethodsFor('EventTarget'))\r\nextend(Dom, getMethodsFor('Dom'))\r\nextend(Element, getMethodsFor('Element'))\r\nextend(Shape, getMethodsFor('Shape'))\r\n// extend(Element, getConstructor('Memory'))\r\nextend(Container, getMethodsFor('Container'))\r\n\r\nextend(Runner, getMethodsFor('Runner'))\r\n\r\nList.extend(getMethodNames())\r\n\r\nregisterMorphableType([\r\n SVGNumber,\r\n Color,\r\n Box,\r\n Matrix,\r\n SVGArray,\r\n PointArray,\r\n PathArray\r\n])\r\n\r\nmakeMorphable()\r\n","import * as svgMembers from './main.js'\r\nimport { makeInstance } from './utils/adopter.js'\r\n\r\n// The main wrapping element\r\nexport default function SVG (element) {\r\n return makeInstance(element)\r\n}\r\n\r\nObject.assign(SVG, svgMembers)\r\n"],"names":["global","module","window","Math","self","Function","__g","core","version","__e","it","isObject","TypeError","exec","e","require$$0","Object","defineProperty","get","a","document","is","createElement","require$$1","require$$2","S","fn","val","toString","call","valueOf","dP","O","P","Attributes","anObject","toPrimitive","IE8_DOM_DEFINE","value","bitmap","enumerable","configurable","writable","object","key","f","createDesc","hasOwnProperty","id","px","random","concat","undefined","SRC","TO_STRING","$toString","TPL","split","inspectSource","safe","isFunction","has","hide","join","String","prototype","this","that","length","aFunction","b","c","apply","arguments","PROTOTYPE","$export","type","name","source","own","out","exp","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","exports","expProto","ctx","redefine","U","W","R","slice","propertyIsEnumerable","cof","IObject","defined","ceil","floor","isNaN","min","toInteger","max","IS_INCLUDES","$this","el","fromIndex","index","toIObject","toLength","SHARED","store","push","mode","copyright","shared","uid","arrayIndexOf","IE_PROTO","names","i","result","keys","$keys","enumBugKeys","getOwnPropertySymbols","$assign","assign","A","Symbol","K","forEach","k","T","toObject","aLen","getSymbols","gOPS","isEnum","pIE","getKeys","j","USE_SYMBOL","UNSCOPABLES","ArrayProto","Array","done","defineProperties","Properties","documentElement","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","open","write","lt","close","create","dPs","def","TAG","tag","stat","IteratorPrototype","ObjectProto","getPrototypeOf","constructor","ITERATOR","BUGGY","VALUES","returnThis","Base","NAME","Constructor","next","DEFAULT","IS_SET","FORCED","descriptor","setToStringTag","methods","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","Iterators","values","iterated","_t","_i","_k","step","Arguments","wks","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","$iterators","KEY","fails","FProto","nameRE","_typeof2","obj","iterator","_typeof","match","$at","pos","s","l","charCodeAt","charAt","point","forbiddenField","ret","ARG","getIteratorMethod","tryGet","callee","BREAK","RETURN","iterable","iterFn","getIterFn","SPECIES","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","TYPE","SIZE","DESCRIPTORS","getEntry","entry","_f","n","getConstructor","wrapper","IS_MAP","ADDER","C","anInstance","_l","forOf","redefineAll","clear","validate","data","r","p","delete","prev","callbackfn","v","setStrong","$iterDefine","SAFE_CLOSING","gOPD","getOwnPropertyDescriptor","check","setPrototypeOf","set","test","buggy","__proto__","common","IS_WEAK","fixMethod","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","skipClosing","arr","iter","$iterDetect","BUGGY_ZERO","$instance","add","strong","_toConsumableArray","isArray","arr2","arrayWithoutHoles","from","iterableToArray","nonIterableSpread","$Symbol","wksExt","arg","hiddenKeys","getOwnPropertyNames","gOPN","windowNames","getWindowNames","$GOPD","$DP","gOPNExt","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","$fails","_create","D","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","symbols","enumKeys","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","require$$3","es6Symbols","wellKnownSymbols","wksDefine","for","keyFor","useSetter","useSimple","replacer","$replacer","args","require$$5","registerMethods","m","addMethodNames","_name","getMethodsFor","_names","$includes","includes","MATCH","isRegExp","INCLUDES","re","searchString","context","indexOf","SYMBOL","fns","strfn","rxfn","RegExp","string","map","array","block","il","radians","d","PI","camelCase","toLowerCase","replace","g","toUpperCase","unCamelCase","capitalize","proportionalSize","element","width","height","box","bbox","getOrigin","o","ox","oy","origin","trim","x","y","bx","by","REPLACE","$replace","searchValue","replaceValue","ns","xmlns","xlink","svgjs","globals","_classCallCheck","elements","root","makeNode","createElementNS","makeInstance","adopter","querySelector","node","innerHTML","firstChild","nodeOrNew","Node","adopt","className","nodeName","register","asRoot","getClass","did","eid","assignNewId","children","extend","modules","attrCheck","method","wrapWithAttrCheck","attr","siblings","parent","position","forward","removeElement","isRoot","defs","backward","front","back","before","remove","after","insertBefore","insertAfter","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","separator","limit","separator2","lastIndex","lastLength","output","flags","ignoreCase","multiline","unicode","sticky","lastLastIndex","splitLimit","separatorCopy","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isBlank","isNumber","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","classes","hasClass","addClass","removeClass","filter","toggleClass","css","cssText","t","cased","show","visible","parse","remember","memory","forget","_memory","listenerId","getEvents","getEventHolder","events","getEventTarget","on","listener","binding","options","bind","bag","_svgjsListenerId","event","ev","addEventListener","off","namespace","removeEventListener","dispatch","Event","CustomEvent","detail","cancelable","dispatchEvent","_defineProperties","props","_createClass","protoProps","staticProps","define","compToHex","comp","$flags","Color","init","color","parseInt","substring","toHex","round","_assertThisInitialized","ReferenceError","_possibleConstructorReturn","assertThisInitialized","_getPrototypeOf","_get","property","receiver","Reflect","base","superPropBase","desc","_setPrototypeOf","_inherits","subClass","superClass","$match","regexp","Point","parser","nodes","svg","size","path","parentNode","body","addTo","isNulledBox","h","Box","parseFloat","left","top","x2","y2","cx","cy","xMin","Infinity","xMax","yMin","yMax","transform","pageXOffset","pageYOffset","getBox","cb","retry","contains","Error","closeEnough","threshold","abs","viewbox","Matrix","fromArray","Element","matrixify","isMatrixLike","multiplyO","formatTransforms","transformer","translateO","rx","ry","lmultiplyO","scaleO","scaleX","scaleY","skewO","skewX","skewY","shearO","shear","rotateO","theta","isFinite","py","dx","dy","tx","ty","originX","originY","sx","sy","lam","rotate","translateX","translateY","determinant","ccw","sqrt","thetaRad","atan2","ct","cos","st","sin","matrix","clone","matrixMultiply","det","na","nb","nc","nd","ne","nf","inverseO","axis","around","flipO","lx","tan","ly","skew","aroundO","other","flipBoth","flip","flipX","flipY","scale","positionX","positionY","translate","relative","relativeX","relativeY","subClassArray","baseClass","_constructor","Arr","List","baseFind","query","querySelectorAll","each","fnOrMethodName","toArray","reduce","attrs","EventTarget","defaultPrevented","noop","timeline","duration","ease","delay","fill","stroke","opacity","offset","SVGArray","toSet","Set","SVGNumber","unit","number","hooks","Dom","childNodes","put","hasChildNodes","removeChild","lastChild","_defs","writeDataToDom","cloneNode","deep","selector","matches","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","SVGElement","replaceChild","precision","factor","newAttrs","svgOrFn","outerHTML","well","len","fragment","current","_this","createDocumentFragment","firstElementChild","text","textContent","attributes","nodeValue","last","curr","removeAttribute","getAttribute","defaults","_val","hook","isColor","leading","setAttributeNS","setAttribute","rebuild","find","Svg","dom","hasAttribute","setData","until","parents","getBBox","rbox","getBoundingClientRect","screenCTM","inverse","addOffset","ctm","getCTM","getScreenCTM","rect","sugar","prefix","_objectSpread","ownKeys","divide","extension","mat","angle","direction","directionString","dmove","plus","radius","_element","getTotalLength","pointAt","getPointAtLength","font","ax","ay","amove","untransform","str","kv","reverse","lmultiply","toParent","pCtm","multiply","toRoot","decomposed","decompose","Shape","Circle","circle","move","Container","flatten","ungroup","Defs","Ellipse","circled","ellipse","Stop","fx","fy","x1","y1","to","Gradient","update","url","gradiented","gradient","Pattern","pattern","patternUnits","Image","callback","img","image","load","PointArray","toLine","at","destination","points","pop","maxX","maxY","minX","minY","MorphArray","Line","pointed","line","plot","Marker","marker","ref","$sort","sort","makeSetterGetter","comparefn","easing","bezier","steps","stepPosition","jumps","beforeFlag","jumping","Stepper","Ease","Controller","stepper","dt","recalculate","_duration","overshoot","_overshoot","pi","os","log","zeta","wn","Spring","velocity","acceleration","newPosition","PID","windup","integral","error","I","PathArray","pathRegReplace","pathHandlers","M","p0","L","H","V","Q","Z","mlhvqtcsaz","jl","arrayToString","equalCommands","pathArray","morph","sourceArray","destinationArray","paramCnt","Morphable","_stepper","_from","_to","_type","_context","_morphObj","_set","NonMorphable","morphableTypes","ObjectBag","TransformBag","objOrArr","registerMorphableType","makeMorphable","Path","_array","Polygon","polygon","poly","Polyline","polyline","Rect","Queue","_first","_last","item","Animator","nextDraw","frames","timeouts","timer","performance","Date","frame","run","requestAnimationFrame","_draw","transform_frame","timeout","time","now","cancelFrame","clearTimeout","nextTimeout","lastTimeout","shift","nextFrame","lastFrame","first","makeSchedule","runnerInfo","start","runner","end","defaultSource","Timeline","timeSource","_timeSource","_startTime","_speed","_persist","_nextFrame","_paused","_runners","_order","_time","_lastSourceTime","_lastStepTime","_step","when","absoluteStartTime","endTime","getEndTime","unschedule","persist","updateTime","_continue","splice","lastRunnerInfo","lastDuration","active","pause","speed","yes","currentSpeed","positive","dtOrForever","immediateStep","dtSource","dtTime","fire","runnersLeft","dtToStart","reset","_timeline","Runner","_queue","_isDeclarative","_history","enabled","_lastTime","_reseted","transformId","_haveReversed","_reverse","_loopsDone","_swing","_wait","_times","_prepareRunner","sanitise","loop","schedule","times","swing","wait","animate","initFn","runFn","retargetFn","isTransform","initialiser","retarget","initialised","finished","queue","loopDuration","loopsDone","partial","swinging","backwards","uncliped","pow","loops","swingForward","running","_lastPosition","justStarted","justFinished","declarative","_initialise","converged","_run","morpher","caller","needsIt","positionOrDt","allfinished","FakeRunner","mergeWith","getRunnerTransform","RunnerArray","runners","ids","leftSibling","lastRunner","_this2","edit","newRunner","deleteCnt","clearTransformsFromQueue","frameId","play","_clearTransformRunnersBefore","currentRunner","_transformationRunners","clearBefore","_currentTransform","addRunner","netTransform","merge","_frameId","styleAttr","zoom","level","affine","_tryRetarget","isMatrix","currentAngle","startTransform","clearTransform","rTarget","rCurrent","possibilities","distances","shortest","affineParameters","addTransform","newTransforms","_rememberMorpher","_queueNumber","_queueNumberDelta","newTo","_queueObject","center","getElementsByTagName","nested","symbol","_build","createTextNode","getComputedTextLength","Text","_rebuild","firstLine","nodeType","newLined","build","tspan","newLine","blankLineOffset","fontSize","getComputedStyle","getPropertyValue","textable","plain","Tspan","ClipPath","targets","unclip","clip","clipWith","clipper","group","link","linkTo","Mask","unmask","mask","maskWith","masker","Style","params","rule","fontFamily","addText","cssRule","fontface","$create","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$find","original","res","forced","TextPath","track","textPath","txt","Use","file","use","SVG","win","doc","mock","svgMembers"],"mappings":";iHACA,IAAIA,EAASC,UAAkC,oBAAVC,QAAyBA,OAAOC,MAAQA,KACzED,OAAwB,oBAARE,MAAuBA,KAAKD,MAAQA,KAAOC,KAE3DC,SAAS,cAATA,GACc,iBAAPC,MAAiBA,IAAMN,qBCLlC,IAAIO,EAAON,UAAiB,CAAEO,QAAS,SACrB,iBAAPC,MAAiBA,IAAMF,kBCDjB,SAAUG,GACzB,MAAqB,iBAAPA,EAAyB,OAAPA,EAA4B,mBAAPA,MCAtC,SAAUA,GACzB,IAAKC,EAASD,GAAK,MAAME,UAAUF,EAAK,sBACxC,OAAOA,KCHQ,SAAUG,GACzB,IACE,QAASA,IACT,MAAO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ACAqI,GACAoD,KAGFiC,mNxFvKO,eAAyBkP,yDAAM,KAAMC,yDAAM,KAChDpvB,GAAQ5c,OAAS+rC,EACjBnvB,GAAQ1b,SAAW8qC,2nBG8Dd,eAAoBC,yDAAOvuB,GAChCP,GAAU8uB,kFsFlEG,SAASH,GAAKzwB,UACpB6B,GAAa7B,UAGtBva,OAAOqH,OAAO2jC,GAAKI"} \ No newline at end of file
+{"version":3,"file":"svg.min.js","sources":["../node_modules/core-js/modules/_global.js","../node_modules/core-js/modules/_core.js","../node_modules/core-js/modules/_is-object.js","../node_modules/core-js/modules/_an-object.js","../node_modules/core-js/modules/_fails.js","../node_modules/core-js/modules/_descriptors.js","../node_modules/core-js/modules/_dom-create.js","../node_modules/core-js/modules/_ie8-dom-define.js","../node_modules/core-js/modules/_to-primitive.js","../node_modules/core-js/modules/_object-dp.js","../node_modules/core-js/modules/_property-desc.js","../node_modules/core-js/modules/_hide.js","../node_modules/core-js/modules/_has.js","../node_modules/core-js/modules/_uid.js","../node_modules/core-js/modules/_redefine.js","../node_modules/core-js/modules/_a-function.js","../node_modules/core-js/modules/_ctx.js","../node_modules/core-js/modules/_export.js","../node_modules/core-js/modules/_cof.js","../node_modules/core-js/modules/_iobject.js","../node_modules/core-js/modules/_defined.js","../node_modules/core-js/modules/_to-iobject.js","../node_modules/core-js/modules/_to-integer.js","../node_modules/core-js/modules/_to-length.js","../node_modules/core-js/modules/_to-absolute-index.js","../node_modules/core-js/modules/_array-includes.js","../node_modules/core-js/modules/_shared.js","../node_modules/core-js/modules/_shared-key.js","../node_modules/core-js/modules/_object-keys-internal.js","../node_modules/core-js/modules/_enum-bug-keys.js","../node_modules/core-js/modules/_object-keys.js","../node_modules/core-js/modules/_object-gops.js","../node_modules/core-js/modules/_object-pie.js","../node_modules/core-js/modules/_to-object.js","../node_modules/core-js/modules/_object-assign.js","../node_modules/core-js/modules/es6.object.assign.js","../node_modules/core-js/modules/_wks.js","../node_modules/core-js/modules/_add-to-unscopables.js","../node_modules/core-js/modules/_iter-step.js","../node_modules/core-js/modules/_iterators.js","../node_modules/core-js/modules/_object-dps.js","../node_modules/core-js/modules/_html.js","../node_modules/core-js/modules/_object-create.js","../node_modules/core-js/modules/_set-to-string-tag.js","../node_modules/core-js/modules/_iter-create.js","../node_modules/core-js/modules/_object-gpo.js","../node_modules/core-js/modules/_iter-define.js","../node_modules/core-js/modules/es6.array.iterator.js","../node_modules/core-js/modules/web.dom.iterable.js","../node_modules/core-js/modules/_object-sap.js","../node_modules/core-js/modules/es6.object.keys.js","../node_modules/core-js/modules/es6.function.name.js","../node_modules/@babel/runtime/helpers/esm/typeof.js","../node_modules/core-js/modules/_string-at.js","../node_modules/core-js/modules/es6.string.iterator.js","../node_modules/core-js/modules/_redefine-all.js","../node_modules/core-js/modules/_an-instance.js","../node_modules/core-js/modules/_iter-call.js","../node_modules/core-js/modules/_is-array-iter.js","../node_modules/core-js/modules/_classof.js","../node_modules/core-js/modules/core.get-iterator-method.js","../node_modules/core-js/modules/_for-of.js","../node_modules/core-js/modules/_set-species.js","../node_modules/core-js/modules/_meta.js","../node_modules/core-js/modules/_validate-collection.js","../node_modules/core-js/modules/_collection-strong.js","../node_modules/core-js/modules/_iter-detect.js","../node_modules/core-js/modules/_object-gopd.js","../node_modules/core-js/modules/_set-proto.js","../node_modules/core-js/modules/_inherit-if-required.js","../node_modules/core-js/modules/_collection.js","../node_modules/core-js/modules/es6.set.js","../node_modules/@babel/runtime/helpers/esm/toConsumableArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithoutHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArray.js","../node_modules/@babel/runtime/helpers/esm/nonIterableSpread.js","../node_modules/core-js/modules/_wks-ext.js","../node_modules/core-js/modules/_wks-define.js","../node_modules/core-js/modules/es7.symbol.async-iterator.js","../node_modules/core-js/modules/_enum-keys.js","../node_modules/core-js/modules/_is-array.js","../node_modules/core-js/modules/_object-gopn.js","../node_modules/core-js/modules/_object-gopn-ext.js","../node_modules/core-js/modules/es6.symbol.js","../src/utils/methods.js","../node_modules/core-js/modules/es7.array.includes.js","../node_modules/core-js/modules/_is-regexp.js","../node_modules/core-js/modules/_fails-is-regexp.js","../node_modules/core-js/modules/es6.string.includes.js","../node_modules/core-js/modules/_string-context.js","../node_modules/core-js/modules/_fix-re-wks.js","../src/utils/utils.js","../node_modules/core-js/modules/es6.regexp.replace.js","../src/modules/core/namespaces.js","../src/utils/window.js","../node_modules/@babel/runtime/helpers/esm/classCallCheck.js","../src/types/Base.js","../src/utils/adopter.js","../src/modules/optional/arrange.js","../node_modules/core-js/modules/es6.regexp.split.js","../src/modules/core/regex.js","../src/modules/optional/class.js","../src/modules/optional/css.js","../src/modules/optional/data.js","../src/modules/optional/memory.js","../src/modules/core/event.js","../node_modules/@babel/runtime/helpers/esm/slicedToArray.js","../node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js","../node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js","../node_modules/@babel/runtime/helpers/esm/nonIterableRest.js","../node_modules/@babel/runtime/helpers/esm/createClass.js","../node_modules/core-js/modules/_flags.js","../node_modules/core-js/modules/es6.regexp.flags.js","../node_modules/core-js/modules/es6.regexp.to-string.js","../src/types/Color.js","../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js","../node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/get.js","../node_modules/@babel/runtime/helpers/esm/superPropBase.js","../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../node_modules/@babel/runtime/helpers/esm/inherits.js","../node_modules/core-js/modules/es6.regexp.match.js","../src/types/Point.js","../src/modules/core/parser.js","../src/types/Box.js","../src/types/Matrix.js","../src/types/ArrayPolyfill.js","../src/types/List.js","../src/modules/core/selector.js","../src/types/EventTarget.js","../src/modules/core/defaults.js","../src/types/SVGArray.js","../src/types/SVGNumber.js","../src/modules/core/attr.js","../src/elements/Dom.js","../src/elements/Element.js","../src/modules/optional/sugar.js","../node_modules/@babel/runtime/helpers/esm/objectSpread.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../src/modules/core/circled.js","../src/modules/optional/transform.js","../src/elements/Shape.js","../src/elements/Circle.js","../src/elements/Container.js","../src/elements/Defs.js","../src/elements/Ellipse.js","../src/elements/Stop.js","../src/modules/core/gradiented.js","../src/elements/Gradient.js","../src/elements/Pattern.js","../src/elements/Image.js","../src/types/PointArray.js","../src/modules/core/pointed.js","../src/elements/Line.js","../src/elements/Marker.js","../node_modules/core-js/modules/_strict-method.js","../node_modules/core-js/modules/es6.array.sort.js","../src/animation/Controller.js","../src/types/PathArray.js","../src/animation/Morphable.js","../src/elements/Path.js","../src/modules/core/poly.js","../src/elements/Polygon.js","../src/elements/Polyline.js","../src/elements/Rect.js","../src/animation/Queue.js","../src/animation/Animator.js","../src/animation/Timeline.js","../src/animation/Runner.js","../src/elements/Svg.js","../src/elements/Symbol.js","../src/modules/core/textable.js","../src/elements/Text.js","../src/elements/Tspan.js","../src/elements/ClipPath.js","../src/elements/G.js","../src/elements/A.js","../src/elements/Mask.js","../src/elements/Style.js","../node_modules/core-js/modules/_array-species-constructor.js","../node_modules/core-js/modules/_array-methods.js","../node_modules/core-js/modules/es6.array.find.js","../node_modules/core-js/modules/_array-species-create.js","../src/elements/TextPath.js","../src/elements/Use.js","../src/main.js","../src/svg.js"],"sourcesContent":["// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n","// fallback for non-array-like ES3 and non-enumerable old V8 strings\nvar cof = require('./_cof');\n// eslint-disable-next-line no-prototype-builtins\nmodule.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) {\n return cof(it) == 'String' ? it.split('') : Object(it);\n};\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// to indexed object, toObject with fallback for non-array-like ES3 strings\nvar IObject = require('./_iobject');\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return IObject(defined(it));\n};\n","// 7.1.4 ToInteger\nvar ceil = Math.ceil;\nvar floor = Math.floor;\nmodule.exports = function (it) {\n return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);\n};\n","// 7.1.15 ToLength\nvar toInteger = require('./_to-integer');\nvar min = Math.min;\nmodule.exports = function (it) {\n return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991\n};\n","var toInteger = require('./_to-integer');\nvar max = Math.max;\nvar min = Math.min;\nmodule.exports = function (index, length) {\n index = toInteger(index);\n return index < 0 ? max(index + length, 0) : min(index, length);\n};\n","// false -> Array#indexOf\n// true -> Array#includes\nvar toIObject = require('./_to-iobject');\nvar toLength = require('./_to-length');\nvar toAbsoluteIndex = require('./_to-absolute-index');\nmodule.exports = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) if (IS_INCLUDES || index in O) {\n if (O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n","var core = require('./_core');\nvar global = require('./_global');\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || (global[SHARED] = {});\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: core.version,\n mode: require('./_library') ? 'pure' : 'global',\n copyright: '© 2018 Denis Pushkarev (zloirock.ru)'\n});\n","var shared = require('./_shared')('keys');\nvar uid = require('./_uid');\nmodule.exports = function (key) {\n return shared[key] || (shared[key] = uid(key));\n};\n","var has = require('./_has');\nvar toIObject = require('./_to-iobject');\nvar arrayIndexOf = require('./_array-includes')(false);\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\n\nmodule.exports = function (object, names) {\n var O = toIObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) if (key != IE_PROTO) has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~arrayIndexOf(result, key) || result.push(key);\n }\n return result;\n};\n","// IE 8- don't enum bug keys\nmodule.exports = (\n 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf'\n).split(',');\n","// 19.1.2.14 / 15.2.3.14 Object.keys(O)\nvar $keys = require('./_object-keys-internal');\nvar enumBugKeys = require('./_enum-bug-keys');\n\nmodule.exports = Object.keys || function keys(O) {\n return $keys(O, enumBugKeys);\n};\n","exports.f = Object.getOwnPropertySymbols;\n","exports.f = {}.propertyIsEnumerable;\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","'use strict';\n// 19.1.2.1 Object.assign(target, source, ...)\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nvar toObject = require('./_to-object');\nvar IObject = require('./_iobject');\nvar $assign = Object.assign;\n\n// should work with symbols and should have deterministic property order (V8 bug)\nmodule.exports = !$assign || require('./_fails')(function () {\n var A = {};\n var B = {};\n // eslint-disable-next-line no-undef\n var S = Symbol();\n var K = 'abcdefghijklmnopqrst';\n A[S] = 7;\n K.split('').forEach(function (k) { B[k] = k; });\n return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars\n var T = toObject(target);\n var aLen = arguments.length;\n var index = 1;\n var getSymbols = gOPS.f;\n var isEnum = pIE.f;\n while (aLen > index) {\n var S = IObject(arguments[index++]);\n var keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) if (isEnum.call(S, key = keys[j++])) T[key] = S[key];\n } return T;\n} : $assign;\n","// 19.1.3.1 Object.assign(target, source)\nvar $export = require('./_export');\n\n$export($export.S + $export.F, 'Object', { assign: require('./_object-assign') });\n","var store = require('./_shared')('wks');\nvar uid = require('./_uid');\nvar Symbol = require('./_global').Symbol;\nvar USE_SYMBOL = typeof Symbol == 'function';\n\nvar $exports = module.exports = function (name) {\n return store[name] || (store[name] =\n USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name));\n};\n\n$exports.store = store;\n","// 22.1.3.31 Array.prototype[@@unscopables]\nvar UNSCOPABLES = require('./_wks')('unscopables');\nvar ArrayProto = Array.prototype;\nif (ArrayProto[UNSCOPABLES] == undefined) require('./_hide')(ArrayProto, UNSCOPABLES, {});\nmodule.exports = function (key) {\n ArrayProto[UNSCOPABLES][key] = true;\n};\n","module.exports = function (done, value) {\n return { value: value, done: !!done };\n};\n","module.exports = {};\n","var dP = require('./_object-dp');\nvar anObject = require('./_an-object');\nvar getKeys = require('./_object-keys');\n\nmodule.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = getKeys(Properties);\n var length = keys.length;\n var i = 0;\n var P;\n while (length > i) dP.f(O, P = keys[i++], Properties[P]);\n return O;\n};\n","var document = require('./_global').document;\nmodule.exports = document && document.documentElement;\n","// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])\nvar anObject = require('./_an-object');\nvar dPs = require('./_object-dps');\nvar enumBugKeys = require('./_enum-bug-keys');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar Empty = function () { /* empty */ };\nvar PROTOTYPE = 'prototype';\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar createDict = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = require('./_dom-create')('iframe');\n var i = enumBugKeys.length;\n var lt = '<';\n var gt = '>';\n var iframeDocument;\n iframe.style.display = 'none';\n require('./_html').appendChild(iframe);\n iframe.src = 'javascript:'; // eslint-disable-line no-script-url\n // createDict = iframe.contentWindow.Object;\n // html.removeChild(iframe);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);\n iframeDocument.close();\n createDict = iframeDocument.F;\n while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];\n return createDict();\n};\n\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n Empty[PROTOTYPE] = anObject(O);\n result = new Empty();\n Empty[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = createDict();\n return Properties === undefined ? result : dPs(result, Properties);\n};\n","var def = require('./_object-dp').f;\nvar has = require('./_has');\nvar TAG = require('./_wks')('toStringTag');\n\nmodule.exports = function (it, tag, stat) {\n if (it && !has(it = stat ? it : it.prototype, TAG)) def(it, TAG, { configurable: true, value: tag });\n};\n","'use strict';\nvar create = require('./_object-create');\nvar descriptor = require('./_property-desc');\nvar setToStringTag = require('./_set-to-string-tag');\nvar IteratorPrototype = {};\n\n// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()\nrequire('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function () { return this; });\n\nmodule.exports = function (Constructor, NAME, next) {\n Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) });\n setToStringTag(Constructor, NAME + ' Iterator');\n};\n","// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O)\nvar has = require('./_has');\nvar toObject = require('./_to-object');\nvar IE_PROTO = require('./_shared-key')('IE_PROTO');\nvar ObjectProto = Object.prototype;\n\nmodule.exports = Object.getPrototypeOf || function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectProto : null;\n};\n","'use strict';\nvar LIBRARY = require('./_library');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar $iterCreate = require('./_iter-create');\nvar setToStringTag = require('./_set-to-string-tag');\nvar getPrototypeOf = require('./_object-gpo');\nvar ITERATOR = require('./_wks')('iterator');\nvar BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next`\nvar FF_ITERATOR = '@@iterator';\nvar KEYS = 'keys';\nvar VALUES = 'values';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) {\n $iterCreate(Constructor, NAME, next);\n var getMethod = function (kind) {\n if (!BUGGY && kind in proto) return proto[kind];\n switch (kind) {\n case KEYS: return function keys() { return new Constructor(this, kind); };\n case VALUES: return function values() { return new Constructor(this, kind); };\n } return function entries() { return new Constructor(this, kind); };\n };\n var TAG = NAME + ' Iterator';\n var DEF_VALUES = DEFAULT == VALUES;\n var VALUES_BUG = false;\n var proto = Base.prototype;\n var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT];\n var $default = $native || getMethod(DEFAULT);\n var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined;\n var $anyNative = NAME == 'Array' ? proto.entries || $native : $native;\n var methods, key, IteratorPrototype;\n // Fix native\n if ($anyNative) {\n IteratorPrototype = getPrototypeOf($anyNative.call(new Base()));\n if (IteratorPrototype !== Object.prototype && IteratorPrototype.next) {\n // Set @@toStringTag to native iterators\n setToStringTag(IteratorPrototype, TAG, true);\n // fix for some old engines\n if (!LIBRARY && typeof IteratorPrototype[ITERATOR] != 'function') hide(IteratorPrototype, ITERATOR, returnThis);\n }\n }\n // fix Array#{values, @@iterator}.name in V8 / FF\n if (DEF_VALUES && $native && $native.name !== VALUES) {\n VALUES_BUG = true;\n $default = function values() { return $native.call(this); };\n }\n // Define iterator\n if ((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])) {\n hide(proto, ITERATOR, $default);\n }\n // Plug for library\n Iterators[NAME] = $default;\n Iterators[TAG] = returnThis;\n if (DEFAULT) {\n methods = {\n values: DEF_VALUES ? $default : getMethod(VALUES),\n keys: IS_SET ? $default : getMethod(KEYS),\n entries: $entries\n };\n if (FORCED) for (key in methods) {\n if (!(key in proto)) redefine(proto, key, methods[key]);\n } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods);\n }\n return methods;\n};\n","'use strict';\nvar addToUnscopables = require('./_add-to-unscopables');\nvar step = require('./_iter-step');\nvar Iterators = require('./_iterators');\nvar toIObject = require('./_to-iobject');\n\n// 22.1.3.4 Array.prototype.entries()\n// 22.1.3.13 Array.prototype.keys()\n// 22.1.3.29 Array.prototype.values()\n// 22.1.3.30 Array.prototype[@@iterator]()\nmodule.exports = require('./_iter-define')(Array, 'Array', function (iterated, kind) {\n this._t = toIObject(iterated); // target\n this._i = 0; // next index\n this._k = kind; // kind\n// 22.1.5.2.1 %ArrayIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var kind = this._k;\n var index = this._i++;\n if (!O || index >= O.length) {\n this._t = undefined;\n return step(1);\n }\n if (kind == 'keys') return step(0, index);\n if (kind == 'values') return step(0, O[index]);\n return step(0, [index, O[index]]);\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7)\nIterators.Arguments = Iterators.Array;\n\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n","var $iterators = require('./es6.array.iterator');\nvar getKeys = require('./_object-keys');\nvar redefine = require('./_redefine');\nvar global = require('./_global');\nvar hide = require('./_hide');\nvar Iterators = require('./_iterators');\nvar wks = require('./_wks');\nvar ITERATOR = wks('iterator');\nvar TO_STRING_TAG = wks('toStringTag');\nvar ArrayValues = Iterators.Array;\n\nvar DOMIterables = {\n CSSRuleList: true, // TODO: Not spec compliant, should be false.\n CSSStyleDeclaration: false,\n CSSValueList: false,\n ClientRectList: false,\n DOMRectList: false,\n DOMStringList: false,\n DOMTokenList: true,\n DataTransferItemList: false,\n FileList: false,\n HTMLAllCollection: false,\n HTMLCollection: false,\n HTMLFormElement: false,\n HTMLSelectElement: false,\n MediaList: true, // TODO: Not spec compliant, should be false.\n MimeTypeArray: false,\n NamedNodeMap: false,\n NodeList: true,\n PaintRequestList: false,\n Plugin: false,\n PluginArray: false,\n SVGLengthList: false,\n SVGNumberList: false,\n SVGPathSegList: false,\n SVGPointList: false,\n SVGStringList: false,\n SVGTransformList: false,\n SourceBufferList: false,\n StyleSheetList: true, // TODO: Not spec compliant, should be false.\n TextTrackCueList: false,\n TextTrackList: false,\n TouchList: false\n};\n\nfor (var collections = getKeys(DOMIterables), i = 0; i < collections.length; i++) {\n var NAME = collections[i];\n var explicit = DOMIterables[NAME];\n var Collection = global[NAME];\n var proto = Collection && Collection.prototype;\n var key;\n if (proto) {\n if (!proto[ITERATOR]) hide(proto, ITERATOR, ArrayValues);\n if (!proto[TO_STRING_TAG]) hide(proto, TO_STRING_TAG, NAME);\n Iterators[NAME] = ArrayValues;\n if (explicit) for (key in $iterators) if (!proto[key]) redefine(proto, key, $iterators[key], true);\n }\n}\n","// most Object methods by ES6 should accept primitives\nvar $export = require('./_export');\nvar core = require('./_core');\nvar fails = require('./_fails');\nmodule.exports = function (KEY, exec) {\n var fn = (core.Object || {})[KEY] || Object[KEY];\n var exp = {};\n exp[KEY] = exec(fn);\n $export($export.S + $export.F * fails(function () { fn(1); }), 'Object', exp);\n};\n","// 19.1.2.14 Object.keys(O)\nvar toObject = require('./_to-object');\nvar $keys = require('./_object-keys');\n\nrequire('./_object-sap')('keys', function () {\n return function keys(it) {\n return $keys(toObject(it));\n };\n});\n","var dP = require('./_object-dp').f;\nvar FProto = Function.prototype;\nvar nameRE = /^\\s*function ([^ (]*)/;\nvar NAME = 'name';\n\n// 19.2.4.2 name\nNAME in FProto || require('./_descriptors') && dP(FProto, NAME, {\n configurable: true,\n get: function () {\n try {\n return ('' + this).match(nameRE)[1];\n } catch (e) {\n return '';\n }\n }\n});\n","function _typeof2(obj) { if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof2(obj); }\n\nexport default function _typeof(obj) {\n if (typeof Symbol === \"function\" && _typeof2(Symbol.iterator) === \"symbol\") {\n _typeof = function _typeof(obj) {\n return _typeof2(obj);\n };\n } else {\n _typeof = function _typeof(obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : _typeof2(obj);\n };\n }\n\n return _typeof(obj);\n}","var toInteger = require('./_to-integer');\nvar defined = require('./_defined');\n// true -> String#at\n// false -> String#codePointAt\nmodule.exports = function (TO_STRING) {\n return function (that, pos) {\n var s = String(defined(that));\n var i = toInteger(pos);\n var l = s.length;\n var a, b;\n if (i < 0 || i >= l) return TO_STRING ? '' : undefined;\n a = s.charCodeAt(i);\n return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff\n ? TO_STRING ? s.charAt(i) : a\n : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;\n };\n};\n","'use strict';\nvar $at = require('./_string-at')(true);\n\n// 21.1.3.27 String.prototype[@@iterator]()\nrequire('./_iter-define')(String, 'String', function (iterated) {\n this._t = String(iterated); // target\n this._i = 0; // next index\n// 21.1.5.2.1 %StringIteratorPrototype%.next()\n}, function () {\n var O = this._t;\n var index = this._i;\n var point;\n if (index >= O.length) return { value: undefined, done: true };\n point = $at(O, index);\n this._i += point.length;\n return { value: point, done: false };\n});\n","var redefine = require('./_redefine');\nmodule.exports = function (target, src, safe) {\n for (var key in src) redefine(target, key, src[key], safe);\n return target;\n};\n","module.exports = function (it, Constructor, name, forbiddenField) {\n if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) {\n throw TypeError(name + ': incorrect invocation!');\n } return it;\n};\n","// call something on iterator step with safe closing on error\nvar anObject = require('./_an-object');\nmodule.exports = function (iterator, fn, value, entries) {\n try {\n return entries ? fn(anObject(value)[0], value[1]) : fn(value);\n // 7.4.6 IteratorClose(iterator, completion)\n } catch (e) {\n var ret = iterator['return'];\n if (ret !== undefined) anObject(ret.call(iterator));\n throw e;\n }\n};\n","// check on default Array iterator\nvar Iterators = require('./_iterators');\nvar ITERATOR = require('./_wks')('iterator');\nvar ArrayProto = Array.prototype;\n\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);\n};\n","// getting tag from 19.1.3.6 Object.prototype.toString()\nvar cof = require('./_cof');\nvar TAG = require('./_wks')('toStringTag');\n// ES3 wrong here\nvar ARG = cof(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (e) { /* empty */ }\n};\n\nmodule.exports = function (it) {\n var O, T, B;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T\n // builtinTag case\n : ARG ? cof(O)\n // ES3 arguments fallback\n : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B;\n};\n","var classof = require('./_classof');\nvar ITERATOR = require('./_wks')('iterator');\nvar Iterators = require('./_iterators');\nmodule.exports = require('./_core').getIteratorMethod = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n","var ctx = require('./_ctx');\nvar call = require('./_iter-call');\nvar isArrayIter = require('./_is-array-iter');\nvar anObject = require('./_an-object');\nvar toLength = require('./_to-length');\nvar getIterFn = require('./core.get-iterator-method');\nvar BREAK = {};\nvar RETURN = {};\nvar exports = module.exports = function (iterable, entries, fn, that, ITERATOR) {\n var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable);\n var f = ctx(fn, that, entries ? 2 : 1);\n var index = 0;\n var length, step, iterator, result;\n if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!');\n // fast case for arrays with default iterator\n if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) {\n result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]);\n if (result === BREAK || result === RETURN) return result;\n } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) {\n result = call(iterator, f, step.value, entries);\n if (result === BREAK || result === RETURN) return result;\n }\n};\nexports.BREAK = BREAK;\nexports.RETURN = RETURN;\n","'use strict';\nvar global = require('./_global');\nvar dP = require('./_object-dp');\nvar DESCRIPTORS = require('./_descriptors');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (KEY) {\n var C = global[KEY];\n if (DESCRIPTORS && C && !C[SPECIES]) dP.f(C, SPECIES, {\n configurable: true,\n get: function () { return this; }\n });\n};\n","var META = require('./_uid')('meta');\nvar isObject = require('./_is-object');\nvar has = require('./_has');\nvar setDesc = require('./_object-dp').f;\nvar id = 0;\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\nvar FREEZE = !require('./_fails')(function () {\n return isExtensible(Object.preventExtensions({}));\n});\nvar setMeta = function (it) {\n setDesc(it, META, { value: {\n i: 'O' + ++id, // object ID\n w: {} // weak collections IDs\n } });\n};\nvar fastKey = function (it, create) {\n // return primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMeta(it);\n // return object ID\n } return it[META].i;\n};\nvar getWeak = function (it, create) {\n if (!has(it, META)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMeta(it);\n // return hash weak collections IDs\n } return it[META].w;\n};\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZE && meta.NEED && isExtensible(it) && !has(it, META)) setMeta(it);\n return it;\n};\nvar meta = module.exports = {\n KEY: META,\n NEED: false,\n fastKey: fastKey,\n getWeak: getWeak,\n onFreeze: onFreeze\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it, TYPE) {\n if (!isObject(it) || it._t !== TYPE) throw TypeError('Incompatible receiver, ' + TYPE + ' required!');\n return it;\n};\n","'use strict';\nvar dP = require('./_object-dp').f;\nvar create = require('./_object-create');\nvar redefineAll = require('./_redefine-all');\nvar ctx = require('./_ctx');\nvar anInstance = require('./_an-instance');\nvar forOf = require('./_for-of');\nvar $iterDefine = require('./_iter-define');\nvar step = require('./_iter-step');\nvar setSpecies = require('./_set-species');\nvar DESCRIPTORS = require('./_descriptors');\nvar fastKey = require('./_meta').fastKey;\nvar validate = require('./_validate-collection');\nvar SIZE = DESCRIPTORS ? '_s' : 'size';\n\nvar getEntry = function (that, key) {\n // fast case\n var index = fastKey(key);\n var entry;\n if (index !== 'F') return that._i[index];\n // frozen object case\n for (entry = that._f; entry; entry = entry.n) {\n if (entry.k == key) return entry;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, NAME, '_i');\n that._t = NAME; // collection type\n that._i = create(null); // index\n that._f = undefined; // first entry\n that._l = undefined; // last entry\n that[SIZE] = 0; // size\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n });\n redefineAll(C.prototype, {\n // 23.1.3.1 Map.prototype.clear()\n // 23.2.3.2 Set.prototype.clear()\n clear: function clear() {\n for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) {\n entry.r = true;\n if (entry.p) entry.p = entry.p.n = undefined;\n delete data[entry.i];\n }\n that._f = that._l = undefined;\n that[SIZE] = 0;\n },\n // 23.1.3.3 Map.prototype.delete(key)\n // 23.2.3.4 Set.prototype.delete(value)\n 'delete': function (key) {\n var that = validate(this, NAME);\n var entry = getEntry(that, key);\n if (entry) {\n var next = entry.n;\n var prev = entry.p;\n delete that._i[entry.i];\n entry.r = true;\n if (prev) prev.n = next;\n if (next) next.p = prev;\n if (that._f == entry) that._f = next;\n if (that._l == entry) that._l = prev;\n that[SIZE]--;\n } return !!entry;\n },\n // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined)\n // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined)\n forEach: function forEach(callbackfn /* , that = undefined */) {\n validate(this, NAME);\n var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3);\n var entry;\n while (entry = entry ? entry.n : this._f) {\n f(entry.v, entry.k, this);\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n }\n },\n // 23.1.3.7 Map.prototype.has(key)\n // 23.2.3.7 Set.prototype.has(value)\n has: function has(key) {\n return !!getEntry(validate(this, NAME), key);\n }\n });\n if (DESCRIPTORS) dP(C.prototype, 'size', {\n get: function () {\n return validate(this, NAME)[SIZE];\n }\n });\n return C;\n },\n def: function (that, key, value) {\n var entry = getEntry(that, key);\n var prev, index;\n // change existing entry\n if (entry) {\n entry.v = value;\n // create new entry\n } else {\n that._l = entry = {\n i: index = fastKey(key, true), // <- index\n k: key, // <- key\n v: value, // <- value\n p: prev = that._l, // <- previous entry\n n: undefined, // <- next entry\n r: false // <- removed\n };\n if (!that._f) that._f = entry;\n if (prev) prev.n = entry;\n that[SIZE]++;\n // add to index\n if (index !== 'F') that._i[index] = entry;\n } return that;\n },\n getEntry: getEntry,\n setStrong: function (C, NAME, IS_MAP) {\n // add .keys, .values, .entries, [@@iterator]\n // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11\n $iterDefine(C, NAME, function (iterated, kind) {\n this._t = validate(iterated, NAME); // target\n this._k = kind; // kind\n this._l = undefined; // previous\n }, function () {\n var that = this;\n var kind = that._k;\n var entry = that._l;\n // revert to the last existing entry\n while (entry && entry.r) entry = entry.p;\n // get next entry\n if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) {\n // or finish the iteration\n that._t = undefined;\n return step(1);\n }\n // return step by kind\n if (kind == 'keys') return step(0, entry.k);\n if (kind == 'values') return step(0, entry.v);\n return step(0, [entry.k, entry.v]);\n }, IS_MAP ? 'entries' : 'values', !IS_MAP, true);\n\n // add [@@species], 23.1.2.2, 23.2.2.2\n setSpecies(NAME);\n }\n};\n","var ITERATOR = require('./_wks')('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var riter = [7][ITERATOR]();\n riter['return'] = function () { SAFE_CLOSING = true; };\n // eslint-disable-next-line no-throw-literal\n Array.from(riter, function () { throw 2; });\n} catch (e) { /* empty */ }\n\nmodule.exports = function (exec, skipClosing) {\n if (!skipClosing && !SAFE_CLOSING) return false;\n var safe = false;\n try {\n var arr = [7];\n var iter = arr[ITERATOR]();\n iter.next = function () { return { done: safe = true }; };\n arr[ITERATOR] = function () { return iter; };\n exec(arr);\n } catch (e) { /* empty */ }\n return safe;\n};\n","var pIE = require('./_object-pie');\nvar createDesc = require('./_property-desc');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar has = require('./_has');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar gOPD = Object.getOwnPropertyDescriptor;\n\nexports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P) {\n O = toIObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return gOPD(O, P);\n } catch (e) { /* empty */ }\n if (has(O, P)) return createDesc(!pIE.f.call(O, P), O[P]);\n};\n","// Works with __proto__ only. Old v8 can't work with null proto objects.\n/* eslint-disable no-proto */\nvar isObject = require('./_is-object');\nvar anObject = require('./_an-object');\nvar check = function (O, proto) {\n anObject(O);\n if (!isObject(proto) && proto !== null) throw TypeError(proto + \": can't set as prototype!\");\n};\nmodule.exports = {\n set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line\n function (test, buggy, set) {\n try {\n set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2);\n set(test, []);\n buggy = !(test instanceof Array);\n } catch (e) { buggy = true; }\n return function setPrototypeOf(O, proto) {\n check(O, proto);\n if (buggy) O.__proto__ = proto;\n else set(O, proto);\n return O;\n };\n }({}, false) : undefined),\n check: check\n};\n","var isObject = require('./_is-object');\nvar setPrototypeOf = require('./_set-proto').set;\nmodule.exports = function (that, target, C) {\n var S = target.constructor;\n var P;\n if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) {\n setPrototypeOf(that, P);\n } return that;\n};\n","'use strict';\nvar global = require('./_global');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar redefineAll = require('./_redefine-all');\nvar meta = require('./_meta');\nvar forOf = require('./_for-of');\nvar anInstance = require('./_an-instance');\nvar isObject = require('./_is-object');\nvar fails = require('./_fails');\nvar $iterDetect = require('./_iter-detect');\nvar setToStringTag = require('./_set-to-string-tag');\nvar inheritIfRequired = require('./_inherit-if-required');\n\nmodule.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) {\n var Base = global[NAME];\n var C = Base;\n var ADDER = IS_MAP ? 'set' : 'add';\n var proto = C && C.prototype;\n var O = {};\n var fixMethod = function (KEY) {\n var fn = proto[KEY];\n redefine(proto, KEY,\n KEY == 'delete' ? function (a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'has' ? function has(a) {\n return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'get' ? function get(a) {\n return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a);\n } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; }\n : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; }\n );\n };\n if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () {\n new C().entries().next();\n }))) {\n // create collection constructor\n C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER);\n redefineAll(C.prototype, methods);\n meta.NEED = true;\n } else {\n var instance = new C();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new C();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n if (!ACCEPT_ITERABLES) {\n C = wrapper(function (target, iterable) {\n anInstance(target, C, NAME);\n var that = inheritIfRequired(new Base(), target, C);\n if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that);\n return that;\n });\n C.prototype = proto;\n proto.constructor = C;\n }\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n // weak collections should not contains .clear method\n if (IS_WEAK && proto.clear) delete proto.clear;\n }\n\n setToStringTag(C, NAME);\n\n O[NAME] = C;\n $export($export.G + $export.W + $export.F * (C != Base), O);\n\n if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP);\n\n return C;\n};\n","'use strict';\nvar strong = require('./_collection-strong');\nvar validate = require('./_validate-collection');\nvar SET = 'Set';\n\n// 23.2 Set Objects\nmodule.exports = require('./_collection')(SET, function (get) {\n return function Set() { return get(this, arguments.length > 0 ? arguments[0] : undefined); };\n}, {\n // 23.2.3.1 Set.prototype.add(value)\n add: function add(value) {\n return strong.def(validate(this, SET), value = value === 0 ? 0 : value, value);\n }\n}, strong);\n","import arrayWithoutHoles from \"./arrayWithoutHoles\";\nimport iterableToArray from \"./iterableToArray\";\nimport nonIterableSpread from \"./nonIterableSpread\";\nexport default function _toConsumableArray(arr) {\n return arrayWithoutHoles(arr) || iterableToArray(arr) || nonIterableSpread();\n}","export default function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) {\n arr2[i] = arr[i];\n }\n\n return arr2;\n }\n}","export default function _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}","export default function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}","exports.f = require('./_wks');\n","var global = require('./_global');\nvar core = require('./_core');\nvar LIBRARY = require('./_library');\nvar wksExt = require('./_wks-ext');\nvar defineProperty = require('./_object-dp').f;\nmodule.exports = function (name) {\n var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {});\n if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty($Symbol, name, { value: wksExt.f(name) });\n};\n","require('./_wks-define')('asyncIterator');\n","// all enumerable object keys, includes symbols\nvar getKeys = require('./_object-keys');\nvar gOPS = require('./_object-gops');\nvar pIE = require('./_object-pie');\nmodule.exports = function (it) {\n var result = getKeys(it);\n var getSymbols = gOPS.f;\n if (getSymbols) {\n var symbols = getSymbols(it);\n var isEnum = pIE.f;\n var i = 0;\n var key;\n while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key);\n } return result;\n};\n","// 7.2.2 IsArray(argument)\nvar cof = require('./_cof');\nmodule.exports = Array.isArray || function isArray(arg) {\n return cof(arg) == 'Array';\n};\n","// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)\nvar $keys = require('./_object-keys-internal');\nvar hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype');\n\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return $keys(O, hiddenKeys);\n};\n","// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window\nvar toIObject = require('./_to-iobject');\nvar gOPN = require('./_object-gopn').f;\nvar toString = {}.toString;\n\nvar windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames\n ? Object.getOwnPropertyNames(window) : [];\n\nvar getWindowNames = function (it) {\n try {\n return gOPN(it);\n } catch (e) {\n return windowNames.slice();\n }\n};\n\nmodule.exports.f = function getOwnPropertyNames(it) {\n return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it));\n};\n","'use strict';\n// ECMAScript 6 symbols shim\nvar global = require('./_global');\nvar has = require('./_has');\nvar DESCRIPTORS = require('./_descriptors');\nvar $export = require('./_export');\nvar redefine = require('./_redefine');\nvar META = require('./_meta').KEY;\nvar $fails = require('./_fails');\nvar shared = require('./_shared');\nvar setToStringTag = require('./_set-to-string-tag');\nvar uid = require('./_uid');\nvar wks = require('./_wks');\nvar wksExt = require('./_wks-ext');\nvar wksDefine = require('./_wks-define');\nvar enumKeys = require('./_enum-keys');\nvar isArray = require('./_is-array');\nvar anObject = require('./_an-object');\nvar isObject = require('./_is-object');\nvar toIObject = require('./_to-iobject');\nvar toPrimitive = require('./_to-primitive');\nvar createDesc = require('./_property-desc');\nvar _create = require('./_object-create');\nvar gOPNExt = require('./_object-gopn-ext');\nvar $GOPD = require('./_object-gopd');\nvar $DP = require('./_object-dp');\nvar $keys = require('./_object-keys');\nvar gOPD = $GOPD.f;\nvar dP = $DP.f;\nvar gOPN = gOPNExt.f;\nvar $Symbol = global.Symbol;\nvar $JSON = global.JSON;\nvar _stringify = $JSON && $JSON.stringify;\nvar PROTOTYPE = 'prototype';\nvar HIDDEN = wks('_hidden');\nvar TO_PRIMITIVE = wks('toPrimitive');\nvar isEnum = {}.propertyIsEnumerable;\nvar SymbolRegistry = shared('symbol-registry');\nvar AllSymbols = shared('symbols');\nvar OPSymbols = shared('op-symbols');\nvar ObjectProto = Object[PROTOTYPE];\nvar USE_NATIVE = typeof $Symbol == 'function';\nvar QObject = global.QObject;\n// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173\nvar setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild;\n\n// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687\nvar setSymbolDesc = DESCRIPTORS && $fails(function () {\n return _create(dP({}, 'a', {\n get: function () { return dP(this, 'a', { value: 7 }).a; }\n })).a != 7;\n}) ? function (it, key, D) {\n var protoDesc = gOPD(ObjectProto, key);\n if (protoDesc) delete ObjectProto[key];\n dP(it, key, D);\n if (protoDesc && it !== ObjectProto) dP(ObjectProto, key, protoDesc);\n} : dP;\n\nvar wrap = function (tag) {\n var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]);\n sym._k = tag;\n return sym;\n};\n\nvar isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function (it) {\n return typeof it == 'symbol';\n} : function (it) {\n return it instanceof $Symbol;\n};\n\nvar $defineProperty = function defineProperty(it, key, D) {\n if (it === ObjectProto) $defineProperty(OPSymbols, key, D);\n anObject(it);\n key = toPrimitive(key, true);\n anObject(D);\n if (has(AllSymbols, key)) {\n if (!D.enumerable) {\n if (!has(it, HIDDEN)) dP(it, HIDDEN, createDesc(1, {}));\n it[HIDDEN][key] = true;\n } else {\n if (has(it, HIDDEN) && it[HIDDEN][key]) it[HIDDEN][key] = false;\n D = _create(D, { enumerable: createDesc(0, false) });\n } return setSymbolDesc(it, key, D);\n } return dP(it, key, D);\n};\nvar $defineProperties = function defineProperties(it, P) {\n anObject(it);\n var keys = enumKeys(P = toIObject(P));\n var i = 0;\n var l = keys.length;\n var key;\n while (l > i) $defineProperty(it, key = keys[i++], P[key]);\n return it;\n};\nvar $create = function create(it, P) {\n return P === undefined ? _create(it) : $defineProperties(_create(it), P);\n};\nvar $propertyIsEnumerable = function propertyIsEnumerable(key) {\n var E = isEnum.call(this, key = toPrimitive(key, true));\n if (this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return false;\n return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true;\n};\nvar $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key) {\n it = toIObject(it);\n key = toPrimitive(key, true);\n if (it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key)) return;\n var D = gOPD(it, key);\n if (D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key])) D.enumerable = true;\n return D;\n};\nvar $getOwnPropertyNames = function getOwnPropertyNames(it) {\n var names = gOPN(toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);\n } return result;\n};\nvar $getOwnPropertySymbols = function getOwnPropertySymbols(it) {\n var IS_OP = it === ObjectProto;\n var names = gOPN(IS_OP ? OPSymbols : toIObject(it));\n var result = [];\n var i = 0;\n var key;\n while (names.length > i) {\n if (has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true)) result.push(AllSymbols[key]);\n } return result;\n};\n\n// 19.4.1.1 Symbol([description])\nif (!USE_NATIVE) {\n $Symbol = function Symbol() {\n if (this instanceof $Symbol) throw TypeError('Symbol is not a constructor!');\n var tag = uid(arguments.length > 0 ? arguments[0] : undefined);\n var $set = function (value) {\n if (this === ObjectProto) $set.call(OPSymbols, value);\n if (has(this, HIDDEN) && has(this[HIDDEN], tag)) this[HIDDEN][tag] = false;\n setSymbolDesc(this, tag, createDesc(1, value));\n };\n if (DESCRIPTORS && setter) setSymbolDesc(ObjectProto, tag, { configurable: true, set: $set });\n return wrap(tag);\n };\n redefine($Symbol[PROTOTYPE], 'toString', function toString() {\n return this._k;\n });\n\n $GOPD.f = $getOwnPropertyDescriptor;\n $DP.f = $defineProperty;\n require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames;\n require('./_object-pie').f = $propertyIsEnumerable;\n require('./_object-gops').f = $getOwnPropertySymbols;\n\n if (DESCRIPTORS && !require('./_library')) {\n redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true);\n }\n\n wksExt.f = function (name) {\n return wrap(wks(name));\n };\n}\n\n$export($export.G + $export.W + $export.F * !USE_NATIVE, { Symbol: $Symbol });\n\nfor (var es6Symbols = (\n // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14\n 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables'\n).split(','), j = 0; es6Symbols.length > j;)wks(es6Symbols[j++]);\n\nfor (var wellKnownSymbols = $keys(wks.store), k = 0; wellKnownSymbols.length > k;) wksDefine(wellKnownSymbols[k++]);\n\n$export($export.S + $export.F * !USE_NATIVE, 'Symbol', {\n // 19.4.2.1 Symbol.for(key)\n 'for': function (key) {\n return has(SymbolRegistry, key += '')\n ? SymbolRegistry[key]\n : SymbolRegistry[key] = $Symbol(key);\n },\n // 19.4.2.5 Symbol.keyFor(sym)\n keyFor: function keyFor(sym) {\n if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol!');\n for (var key in SymbolRegistry) if (SymbolRegistry[key] === sym) return key;\n },\n useSetter: function () { setter = true; },\n useSimple: function () { setter = false; }\n});\n\n$export($export.S + $export.F * !USE_NATIVE, 'Object', {\n // 19.1.2.2 Object.create(O [, Properties])\n create: $create,\n // 19.1.2.4 Object.defineProperty(O, P, Attributes)\n defineProperty: $defineProperty,\n // 19.1.2.3 Object.defineProperties(O, Properties)\n defineProperties: $defineProperties,\n // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P)\n getOwnPropertyDescriptor: $getOwnPropertyDescriptor,\n // 19.1.2.7 Object.getOwnPropertyNames(O)\n getOwnPropertyNames: $getOwnPropertyNames,\n // 19.1.2.8 Object.getOwnPropertySymbols(O)\n getOwnPropertySymbols: $getOwnPropertySymbols\n});\n\n// 24.3.2 JSON.stringify(value [, replacer [, space]])\n$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function () {\n var S = $Symbol();\n // MS Edge converts symbol values to JSON as {}\n // WebKit converts symbol values to JSON as null\n // V8 throws on boxed symbols\n return _stringify([S]) != '[null]' || _stringify({ a: S }) != '{}' || _stringify(Object(S)) != '{}';\n})), 'JSON', {\n stringify: function stringify(it) {\n var args = [it];\n var i = 1;\n var replacer, $replacer;\n while (arguments.length > i) args.push(arguments[i++]);\n $replacer = replacer = args[1];\n if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined\n if (!isArray(replacer)) replacer = function (key, value) {\n if (typeof $replacer == 'function') value = $replacer.call(this, key, value);\n if (!isSymbol(value)) return value;\n };\n args[1] = replacer;\n return _stringify.apply($JSON, args);\n }\n});\n\n// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint)\n$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf);\n// 19.4.3.5 Symbol.prototype[@@toStringTag]\nsetToStringTag($Symbol, 'Symbol');\n// 20.2.1.9 Math[@@toStringTag]\nsetToStringTag(Math, 'Math', true);\n// 24.3.3 JSON[@@toStringTag]\nsetToStringTag(global.JSON, 'JSON', true);\n","const methods = {}\r\nconst names = []\r\n\r\nexport function registerMethods (name, m) {\r\n if (Array.isArray(name)) {\r\n for (let _name of name) {\r\n registerMethods(_name, m)\r\n }\r\n return\r\n }\r\n\r\n if (typeof name === 'object') {\r\n for (let _name in name) {\r\n registerMethods(_name, name[_name])\r\n }\r\n return\r\n }\r\n\r\n addMethodNames(Object.keys(m))\r\n methods[name] = Object.assign(methods[name] || {}, m)\r\n}\r\n\r\nexport function getMethodsFor (name) {\r\n return methods[name] || {}\r\n}\r\n\r\nexport function getMethodNames () {\r\n return [ ...new Set(names) ]\r\n}\r\n\r\nexport function addMethodNames (_names) {\r\n names.push(..._names)\r\n}\r\n","'use strict';\n// https://github.com/tc39/Array.prototype.includes\nvar $export = require('./_export');\nvar $includes = require('./_array-includes')(true);\n\n$export($export.P, 'Array', {\n includes: function includes(el /* , fromIndex = 0 */) {\n return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n\nrequire('./_add-to-unscopables')('includes');\n","// 7.2.8 IsRegExp(argument)\nvar isObject = require('./_is-object');\nvar cof = require('./_cof');\nvar MATCH = require('./_wks')('match');\nmodule.exports = function (it) {\n var isRegExp;\n return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp');\n};\n","var MATCH = require('./_wks')('match');\nmodule.exports = function (KEY) {\n var re = /./;\n try {\n '/./'[KEY](re);\n } catch (e) {\n try {\n re[MATCH] = false;\n return !'/./'[KEY](re);\n } catch (f) { /* empty */ }\n } return true;\n};\n","// 21.1.3.7 String.prototype.includes(searchString, position = 0)\n'use strict';\nvar $export = require('./_export');\nvar context = require('./_string-context');\nvar INCLUDES = 'includes';\n\n$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', {\n includes: function includes(searchString /* , position = 0 */) {\n return !!~context(this, searchString, INCLUDES)\n .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\n","// helper for String#{startsWith, endsWith, includes}\nvar isRegExp = require('./_is-regexp');\nvar defined = require('./_defined');\n\nmodule.exports = function (that, searchString, NAME) {\n if (isRegExp(searchString)) throw TypeError('String#' + NAME + \" doesn't accept regex!\");\n return String(defined(that));\n};\n","'use strict';\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar fails = require('./_fails');\nvar defined = require('./_defined');\nvar wks = require('./_wks');\n\nmodule.exports = function (KEY, length, exec) {\n var SYMBOL = wks(KEY);\n var fns = exec(defined, SYMBOL, ''[KEY]);\n var strfn = fns[0];\n var rxfn = fns[1];\n if (fails(function () {\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n })) {\n redefine(String.prototype, KEY, strfn);\n hide(RegExp.prototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return rxfn.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return rxfn.call(string, this); }\n );\n }\n};\n","// Map function\r\nexport function map (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n result.push(block(array[i]))\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Filter function\r\nexport function filter (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n if (block(array[i])) {\r\n result.push(array[i])\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Degrees to radians\r\nexport function radians (d) {\r\n return d % 360 * Math.PI / 180\r\n}\r\n\r\n// Radians to degrees\r\nexport function degrees (r) {\r\n return r * 180 / Math.PI % 360\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nexport function camelCase (s) {\r\n return s.toLowerCase().replace(/-(.)/g, function (m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Convert camel cased string to string seperated\r\nexport function unCamelCase (s) {\r\n return s.replace(/([A-Z])/g, function (m, g) {\r\n return '-' + g.toLowerCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nexport function capitalize (s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nexport function proportionalSize (element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null) {\r\n width = box.width / box.height * height\r\n } else if (height == null) {\r\n height = box.height / box.width * width\r\n }\r\n }\r\n\r\n return {\r\n width: width,\r\n height: height\r\n }\r\n}\r\n\r\nexport function getOrigin (o, element) {\r\n // Allow origin or around as the names\r\n let origin = o.origin // o.around == null ? o.origin : o.around\r\n let ox, oy\r\n\r\n // Allow the user to pass a string to rotate around a given point\r\n if (typeof origin === 'string' || origin == null) {\r\n // Get the bounding box of the element with no transformations applied\r\n const string = (origin || 'center').toLowerCase().trim()\r\n const { height, width, x, y } = element.bbox()\r\n\r\n // Calculate the transformed x and y coordinates\r\n let bx = string.includes('left') ? x\r\n : string.includes('right') ? x + width\r\n : x + width / 2\r\n let by = string.includes('top') ? y\r\n : string.includes('bottom') ? y + height\r\n : y + height / 2\r\n\r\n // Set the bounds eg : \"bottom-left\", \"Top right\", \"middle\" etc...\r\n ox = o.ox != null ? o.ox : bx\r\n oy = o.oy != null ? o.oy : by\r\n } else {\r\n ox = origin[0]\r\n oy = origin[1]\r\n }\r\n\r\n // Return the origin as it is if it wasn't a string\r\n return [ ox, oy ]\r\n}\r\n","// @@replace logic\nrequire('./_fix-re-wks')('replace', 2, function (defined, REPLACE, $replace) {\n // 21.1.3.14 String.prototype.replace(searchValue, replaceValue)\n return [function replace(searchValue, replaceValue) {\n 'use strict';\n var O = defined(this);\n var fn = searchValue == undefined ? undefined : searchValue[REPLACE];\n return fn !== undefined\n ? fn.call(searchValue, O, replaceValue)\n : $replace.call(String(O), searchValue, replaceValue);\n }, $replace];\n});\n","// Default namespaces\r\nexport let ns = 'http://www.w3.org/2000/svg'\r\nexport let xmlns = 'http://www.w3.org/2000/xmlns/'\r\nexport let xlink = 'http://www.w3.org/1999/xlink'\r\nexport let svgjs = 'http://svgjs.com/svgjs'\r\n","export const globals = {\r\n window: typeof window === 'undefined' ? null : window,\r\n document: typeof document === 'undefined' ? null : document\r\n}\r\n\r\nexport function registerWindow (win = null, doc = null) {\r\n globals.window = win\r\n globals.document = doc\r\n}\r\n\r\nconst save = {}\r\n\r\nexport function saveWindow () {\r\n save.window = globals.window\r\n save.document = globals.document\r\n}\r\n\r\nexport function restoreWindow () {\r\n globals.window = save.window\r\n globals.document = save.document\r\n}\r\n\r\nexport function withWindow (win, fn) {\r\n saveWindow()\r\n registerWindow(win, win.document)\r\n fn(win, win.document)\r\n restoreWindow()\r\n}\r\n\r\nexport function getWindow () {\r\n return globals.window\r\n}\r\n","export default function _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}","export default class Base {\r\n // constructor (node/*, {extensions = []} */) {\r\n // // this.tags = []\r\n // //\r\n // // for (let extension of extensions) {\r\n // // extension.setup.call(this, node)\r\n // // this.tags.push(extension.name)\r\n // // }\r\n // }\r\n}\r\n","import { addMethodNames } from './methods.js'\r\nimport { capitalize } from './utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Base from '../types/Base.js'\r\n\r\nconst elements = {}\r\nexport const root = '___SYMBOL___ROOT___'\r\n\r\n// Method for element creation\r\nexport function makeNode (name) {\r\n // create element\r\n return globals.document.createElementNS(ns, name)\r\n}\r\n\r\nexport function makeInstance (element) {\r\n if (element instanceof Base) return element\r\n\r\n if (typeof element === 'object') {\r\n return adopter(element)\r\n }\r\n\r\n if (element == null) {\r\n return new elements[root]()\r\n }\r\n\r\n if (typeof element === 'string' && element.charAt(0) !== '<') {\r\n return adopter(globals.document.querySelector(element))\r\n }\r\n\r\n var node = makeNode('svg')\r\n node.innerHTML = element\r\n\r\n // We can use firstChild here because we know,\r\n // that the first char is < and thus an element\r\n element = adopter(node.firstChild)\r\n\r\n return element\r\n}\r\n\r\nexport function nodeOrNew (name, node) {\r\n return node instanceof globals.window.Node ? node : makeNode(name)\r\n}\r\n\r\n// Adopt existing svg elements\r\nexport function adopt (node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance instanceof Base) return node.instance\r\n\r\n // initialize variables\r\n var className = capitalize(node.nodeName)\r\n\r\n // Make sure that gradients are adopted correctly\r\n if (className === 'LinearGradient' || className === 'RadialGradient') {\r\n className = 'Gradient'\r\n\r\n // Fallback to Dom if element is not known\r\n } else if (!elements[className]) {\r\n className = 'Dom'\r\n }\r\n\r\n return new elements[className](node)\r\n}\r\n\r\nlet adopter = adopt\r\n\r\nexport function mockAdopt (mock = adopt) {\r\n adopter = mock\r\n}\r\n\r\nexport function register (element, name = element.name, asRoot = false) {\r\n elements[name] = element\r\n if (asRoot) elements[root] = element\r\n\r\n addMethodNames(Object.keys(element.prototype))\r\n\r\n return element\r\n}\r\n\r\nexport function getClass (name) {\r\n return elements[name]\r\n}\r\n\r\n// Element id sequence\r\nlet did = 1000\r\n\r\n// Get next named element id\r\nexport function eid (name) {\r\n return 'Svgjs' + capitalize(name) + (did++)\r\n}\r\n\r\n// Deep new id assignment\r\nexport function assignNewId (node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.children.length - 1; i >= 0; i--) {\r\n assignNewId(node.children[i])\r\n }\r\n\r\n if (node.id) {\r\n return adopt(node).id(eid(node.nodeName))\r\n }\r\n\r\n return adopt(node)\r\n}\r\n\r\n// Method for extending objects\r\nexport function extend (modules, methods, attrCheck) {\r\n var key, i\r\n\r\n modules = Array.isArray(modules) ? modules : [ modules ]\r\n\r\n for (i = modules.length - 1; i >= 0; i--) {\r\n for (key in methods) {\r\n let method = methods[key]\r\n if (attrCheck) {\r\n method = wrapWithAttrCheck(methods[key])\r\n }\r\n modules[i].prototype[key] = method\r\n }\r\n }\r\n}\r\n\r\n// export function extendWithAttrCheck (...args) {\r\n// extend(...args, true)\r\n// }\r\n\r\nexport function wrapWithAttrCheck (fn) {\r\n return function (...args) {\r\n let o = args[args.length - 1]\r\n\r\n if (o && o.constructor === Object && !(o instanceof Array)) {\r\n return fn.apply(this, args.slice(0, -1)).attr(o)\r\n } else {\r\n return fn.apply(this, args)\r\n }\r\n }\r\n}\r\n","import { makeInstance } from '../../utils/adopter.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Get all siblings, including myself\r\nexport function siblings () {\r\n return this.parent().children()\r\n}\r\n\r\n// Get the curent position siblings\r\nexport function position () {\r\n return this.parent().index(this)\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function next () {\r\n return this.siblings()[this.position() + 1]\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function prev () {\r\n return this.siblings()[this.position() - 1]\r\n}\r\n\r\n// Send given element one step forward\r\nexport function forward () {\r\n var i = this.position() + 1\r\n var p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element one step backward\r\nexport function backward () {\r\n var i = this.position()\r\n\r\n if (i > 0) {\r\n this.parent().removeElement(this).add(this, i - 1)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the front\r\nexport function front () {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the back\r\nexport function back () {\r\n if (this.position() > 0) {\r\n this.parent().removeElement(this).add(this, 0)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element before the targeted element\r\nexport function before (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element after the targeted element\r\nexport function after (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n}\r\n\r\nexport function insertBefore (element) {\r\n element = makeInstance(element)\r\n element.before(this)\r\n}\r\n\r\nexport function insertAfter (element) {\r\n element = makeInstance(element)\r\n element.after(this)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n siblings,\r\n position,\r\n next,\r\n prev,\r\n forward,\r\n backward,\r\n front,\r\n back,\r\n before,\r\n after,\r\n insertBefore,\r\n insertAfter\r\n})\r\n","// @@split logic\nrequire('./_fix-re-wks')('split', 2, function (defined, SPLIT, $split) {\n 'use strict';\n var isRegExp = require('./_is-regexp');\n var _split = $split;\n var $push = [].push;\n var $SPLIT = 'split';\n var LENGTH = 'length';\n var LAST_INDEX = 'lastIndex';\n if (\n 'abbc'[$SPLIT](/(b)*/)[1] == 'c' ||\n 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 ||\n 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 ||\n '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 ||\n '.'[$SPLIT](/()()/)[LENGTH] > 1 ||\n ''[$SPLIT](/.?/)[LENGTH]\n ) {\n var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group\n // based on es5-shim implementation, need to rework it\n $split = function (separator, limit) {\n var string = String(this);\n if (separator === undefined && limit === 0) return [];\n // If `separator` is not a regex, use native split\n if (!isRegExp(separator)) return _split.call(string, separator, limit);\n var output = [];\n var flags = (separator.ignoreCase ? 'i' : '') +\n (separator.multiline ? 'm' : '') +\n (separator.unicode ? 'u' : '') +\n (separator.sticky ? 'y' : '');\n var lastLastIndex = 0;\n var splitLimit = limit === undefined ? 4294967295 : limit >>> 0;\n // Make `global` and avoid `lastIndex` issues by working with a copy\n var separatorCopy = new RegExp(separator.source, flags + 'g');\n var separator2, match, lastIndex, lastLength, i;\n // Doesn't need flags gy, but they don't hurt\n if (!NPCG) separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\\\s)', flags);\n while (match = separatorCopy.exec(string)) {\n // `separatorCopy.lastIndex` is not reliable cross-browser\n lastIndex = match.index + match[0][LENGTH];\n if (lastIndex > lastLastIndex) {\n output.push(string.slice(lastLastIndex, match.index));\n // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG\n // eslint-disable-next-line no-loop-func\n if (!NPCG && match[LENGTH] > 1) match[0].replace(separator2, function () {\n for (i = 1; i < arguments[LENGTH] - 2; i++) if (arguments[i] === undefined) match[i] = undefined;\n });\n if (match[LENGTH] > 1 && match.index < string[LENGTH]) $push.apply(output, match.slice(1));\n lastLength = match[0][LENGTH];\n lastLastIndex = lastIndex;\n if (output[LENGTH] >= splitLimit) break;\n }\n if (separatorCopy[LAST_INDEX] === match.index) separatorCopy[LAST_INDEX]++; // Avoid an infinite loop\n }\n if (lastLastIndex === string[LENGTH]) {\n if (lastLength || !separatorCopy.test('')) output.push('');\n } else output.push(string.slice(lastLastIndex));\n return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output;\n };\n // Chakra, V8\n } else if ('0'[$SPLIT](undefined, 0)[LENGTH]) {\n $split = function (separator, limit) {\n return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit);\n };\n }\n // 21.1.3.17 String.prototype.split(separator, limit)\n return [function split(separator, limit) {\n var O = defined(this);\n var fn = separator == undefined ? undefined : separator[SPLIT];\n return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit);\n }, $split];\n});\n","// Parse unit value\r\nexport let numberAndUnit = /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n// Parse hex value\r\nexport let hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n// Parse rgb value\r\nexport let rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n// Parse reference id\r\nexport let reference = /(#[a-z0-9\\-_]+)/i\r\n\r\n// splits a transformation chain\r\nexport let transforms = /\\)\\s*,?\\s*/\r\n\r\n// Whitespace\r\nexport let whitespace = /\\s/g\r\n\r\n// Test hex value\r\nexport let isHex = /^#[a-f0-9]{3,6}$/i\r\n\r\n// Test rgb value\r\nexport let isRgb = /^rgb\\(/\r\n\r\n// Test css declaration\r\nexport let isCss = /[^:]+:[^;]+;?/\r\n\r\n// Test for blank string\r\nexport let isBlank = /^(\\s+)?$/\r\n\r\n// Test for numeric string\r\nexport let isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n// Test for percent value\r\nexport let isPercent = /^-?[\\d.]+%$/\r\n\r\n// Test for image url\r\nexport let isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n// split at whitespace and comma\r\nexport let delimiter = /[\\s,]+/\r\n\r\n// The following regex are used to parse the d attribute of a path\r\n\r\n// Matches all hyphens which are not after an exponent\r\nexport let hyphen = /([^e])-/gi\r\n\r\n// Replaces and tests for all path letters\r\nexport let pathLetters = /[MLHVCSQTAZ]/gi\r\n\r\n// yes we need this one, too\r\nexport let isPathLetter = /[MLHVCSQTAZ]/i\r\n\r\n// matches 0.154.23.45\r\nexport let numbersWithDots = /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n// matches .\r\nexport let dots = /\\./g\r\n","import { delimiter } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Return array of classes on the node\r\nexport function classes () {\r\n var attr = this.attr('class')\r\n return attr == null ? [] : attr.trim().split(delimiter)\r\n}\r\n\r\n// Return true if class exists on the node, false otherwise\r\nexport function hasClass (name) {\r\n return this.classes().indexOf(name) !== -1\r\n}\r\n\r\n// Add class to the node\r\nexport function addClass (name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Remove class from the node\r\nexport function removeClass (name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function (c) {\r\n return c !== name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Toggle the presence of a class on the node\r\nexport function toggleClass (name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n classes, hasClass, addClass, removeClass, toggleClass\r\n})\r\n","import { camelCase } from '../../utils/utils.js'\r\nimport { isBlank } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Dynamic style generator\r\nexport function css (style, val) {\r\n let ret = {}\r\n if (arguments.length === 0) {\r\n // get full style as object\r\n this.node.style.cssText.split(/\\s*;\\s*/)\r\n .filter(function (el) {\r\n return !!el.length\r\n })\r\n .forEach(function (el) {\r\n let t = el.split(/\\s*:\\s*/)\r\n ret[t[0]] = t[1]\r\n })\r\n return ret\r\n }\r\n\r\n if (arguments.length < 2) {\r\n // get style properties in the array\r\n if (Array.isArray(style)) {\r\n for (let name of style) {\r\n let cased = camelCase(name)\r\n ret[cased] = this.node.style[cased]\r\n }\r\n return ret\r\n }\r\n\r\n // get style for property\r\n if (typeof style === 'string') {\r\n return this.node.style[camelCase(style)]\r\n }\r\n\r\n // set styles in object\r\n if (typeof style === 'object') {\r\n for (let name in style) {\r\n // set empty string if null/undefined/'' was given\r\n this.node.style[camelCase(name)]\r\n = (style[name] == null || isBlank.test(style[name])) ? '' : style[name]\r\n }\r\n }\r\n }\r\n\r\n // set style for property\r\n if (arguments.length === 2) {\r\n this.node.style[camelCase(style)]\r\n = (val == null || isBlank.test(val)) ? '' : val\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Show element\r\nexport function show () {\r\n return this.css('display', '')\r\n}\r\n\r\n// Hide element\r\nexport function hide () {\r\n return this.css('display', 'none')\r\n}\r\n\r\n// Is element visible?\r\nexport function visible () {\r\n return this.css('display') !== 'none'\r\n}\r\n\r\nregisterMethods('Dom', {\r\n css, show, hide, visible\r\n})\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Store data values on svg nodes\r\nexport function data (a, v, r) {\r\n if (typeof a === 'object') {\r\n for (v in a) {\r\n this.data(v, a[v])\r\n }\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch (e) {\r\n return this.attr('data-' + a)\r\n }\r\n } else {\r\n this.attr('data-' + a,\r\n v === null ? null\r\n : r === true || typeof v === 'string' || typeof v === 'number' ? v\r\n : JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n}\r\n\r\nregisterMethods('Dom', { data })\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Remember arbitrary data\r\nexport function remember (k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] === 'object') {\r\n for (var key in k) {\r\n this.remember(key, k[key])\r\n }\r\n } else if (arguments.length === 1) {\r\n // retrieve memory\r\n return this.memory()[k]\r\n } else {\r\n // store memory\r\n this.memory()[k] = v\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Erase a given memory\r\nexport function forget () {\r\n if (arguments.length === 0) {\r\n this._memory = {}\r\n } else {\r\n for (var i = arguments.length - 1; i >= 0; i--) {\r\n delete this.memory()[arguments[i]]\r\n }\r\n }\r\n return this\r\n}\r\n\r\n// This triggers creation of a new hidden class which is not performant\r\n// However, this function is not rarely used so it will not happen frequently\r\n// Return local memory object\r\nexport function memory () {\r\n return (this._memory = this._memory || {})\r\n}\r\n\r\nregisterMethods('Dom', { remember, forget, memory })\r\n","import { delimiter } from './regex.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\n\r\nlet listenerId = 0\r\n\r\nfunction getEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (!n.events) n.events = {}\r\n return n.events\r\n}\r\n\r\nfunction getEventTarget (node) {\r\n return makeInstance(node).getEventTarget()\r\n}\r\n\r\nfunction clearEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (n.events) n.events = {}\r\n}\r\n\r\n// Add event binder in the SVG namespace\r\nexport function on (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // events can be an array of events or a string of events\r\n events = Array.isArray(events) ? events : events.split(delimiter)\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) {\r\n listener._svgjsListenerId = ++listenerId\r\n }\r\n\r\n events.forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nexport function off (node, events, listener, options) {\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n // events can be an array of events or a string or undefined\r\n events = Array.isArray(events) ? events : (events || '').split(delimiter)\r\n\r\n events.forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) {\r\n off(n, [ ev, ns ].join('.'), l)\r\n }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) {\r\n off(n, [ event, ns ].join('.'))\r\n }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) {\r\n off(n, [ ev, namespace ].join('.'))\r\n }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) {\r\n off(n, event)\r\n }\r\n\r\n clearEvents(node)\r\n }\r\n })\r\n}\r\n\r\nexport function dispatch (node, event, data) {\r\n var n = getEventTarget(node)\r\n\r\n // Dispatch event\r\n if (event instanceof globals.window.Event) {\r\n n.dispatchEvent(event)\r\n } else {\r\n event = new globals.window.CustomEvent(event, { detail: data, cancelable: true })\r\n n.dispatchEvent(event)\r\n }\r\n return event\r\n}\r\n","import arrayWithHoles from \"./arrayWithHoles\";\nimport iterableToArrayLimit from \"./iterableToArrayLimit\";\nimport nonIterableRest from \"./nonIterableRest\";\nexport default function _slicedToArray(arr, i) {\n return arrayWithHoles(arr) || iterableToArrayLimit(arr, i) || nonIterableRest();\n}","export default function _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}","export default function _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}","export default function _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}","function _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}","'use strict';\n// 21.2.5.3 get RegExp.prototype.flags\nvar anObject = require('./_an-object');\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","// 21.2.5.3 get RegExp.prototype.flags()\nif (require('./_descriptors') && /./g.flags != 'g') require('./_object-dp').f(RegExp.prototype, 'flags', {\n configurable: true,\n get: require('./_flags')\n});\n","'use strict';\nrequire('./es6.regexp.flags');\nvar anObject = require('./_an-object');\nvar $flags = require('./_flags');\nvar DESCRIPTORS = require('./_descriptors');\nvar TO_STRING = 'toString';\nvar $toString = /./[TO_STRING];\n\nvar define = function (fn) {\n require('./_redefine')(RegExp.prototype, TO_STRING, fn, true);\n};\n\n// 21.2.5.14 RegExp.prototype.toString()\nif (require('./_fails')(function () { return $toString.call({ source: 'a', flags: 'b' }) != '/a/b'; })) {\n define(function toString() {\n var R = anObject(this);\n return '/'.concat(R.source, '/',\n 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined);\n });\n// FF44- RegExp#toString has a wrong name\n} else if ($toString.name != TO_STRING) {\n define(function toString() {\n return $toString.call(this);\n });\n}\n","\r\nimport { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\r\n\r\nfunction sixDigitHex (hex) {\r\n return hex.length === 4\r\n ? [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2),\r\n hex.substring(2, 3), hex.substring(2, 3),\r\n hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('')\r\n : hex\r\n}\r\n\r\nfunction componentHex (component) {\r\n const integer = Math.round(component)\r\n const hex = integer.toString(16)\r\n return hex.length === 1 ? '0' + hex : hex\r\n}\r\n\r\nfunction is (object, space) {\r\n for (const key of space) {\r\n if (object[key] == null) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction getParameters (a, b) {\r\n const params = is(a, 'rgb') ? { _a: a.r, _b: a.g, _c: a.b, space: 'rgb' }\r\n : is(a, 'xyz') ? { _a: a.x, _b: a.y, _c: a.z, _d: 0, space: 'xyz' }\r\n : is(a, 'hsl') ? { _a: a.h, _b: a.s, _c: a.l, _d: 0, space: 'hsl' }\r\n : is(a, 'lab') ? { _a: a.l, _b: a.a, _c: a.b, _d: 0, space: 'lab' }\r\n : is(a, 'lch') ? { _a: a.l, _b: a.c, _c: a.h, _d: 0, space: 'lch' }\r\n : is(a, 'cmyk') ? { _a: a.c, _b: a.m, _c: a.y, _d: a.k, space: 'cmyk' }\r\n : { _a: 0, _b: 0, _c: 0, space: 'rgb' }\r\n\r\n params.space = b || params.space\r\n return params\r\n}\r\n\r\nfunction cieSpace (space) {\r\n if (space === 'lab' || space === 'xyz' || space === 'lch') {\r\n return true\r\n } else {\r\n return false\r\n }\r\n}\r\n\r\nfunction hueToRgb (p, q, t) {\r\n if (t < 0) t += 1\r\n if (t > 1) t -= 1\r\n if (t < 1 / 6) return p + (q - p) * 6 * t\r\n if (t < 1 / 2) return q\r\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\r\n return p\r\n}\r\n\r\nexport default class Color {\r\n constructor (...inputs) {\r\n this.init(...inputs)\r\n }\r\n\r\n init (a = 0, b = 0, c = 0, d = 0, space = 'rgb') {\r\n // Reset all values in case the init function is rerun with new color space\r\n if (this.space) {\r\n for (let component in this.space) {\r\n delete this[this.space[component]]\r\n }\r\n }\r\n\r\n if (typeof a === 'number') {\r\n // Allow for the case that we don't need d...\r\n space = typeof d === 'string' ? d : space\r\n d = typeof d === 'string' ? 0 : d\r\n\r\n // Assign the values straight to the color\r\n Object.assign(this, { _a: a, _b: b, _c: c, _d: d, space })\r\n // If the user gave us an array, make the color from it\r\n } else if (a instanceof Array) {\r\n this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb'\r\n Object.assign(this, { _a: a[0], _b: a[1], _c: a[2], _d: a[3] || 0 })\r\n } else if (a instanceof Object) {\r\n // Set the object up and assign its values directly\r\n const values = getParameters(a, b)\r\n Object.assign(this, values)\r\n } else if (typeof a === 'string') {\r\n if (isRgb.test(a)) {\r\n const noWhitespace = a.replace(whitespace, '')\r\n const [ _a, _b, _c ] = rgb.exec(noWhitespace)\r\n .slice(1, 4).map(v => parseInt(v))\r\n Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\r\n } else if (isHex.test(a)) {\r\n const hexParse = v => parseInt(v, 16)\r\n const [ , _a, _b, _c ] = hex.exec(sixDigitHex(a)).map(hexParse)\r\n Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\r\n } else throw Error(`Unsupported string format, can't construct Color`)\r\n }\r\n\r\n // Now add the components as a convenience\r\n const { _a, _b, _c, _d } = this\r\n const components = this.space === 'rgb' ? { r: _a, g: _b, b: _c }\r\n : this.space === 'xyz' ? { x: _a, y: _b, z: _c }\r\n : this.space === 'hsl' ? { h: _a, s: _b, l: _c }\r\n : this.space === 'lab' ? { l: _a, a: _b, b: _c }\r\n : this.space === 'lch' ? { l: _a, c: _b, h: _c }\r\n : this.space === 'cmyk' ? { c: _a, m: _b, y: _c, k: _d }\r\n : {}\r\n Object.assign(this, components)\r\n }\r\n\r\n /*\r\n Conversion Methods\r\n */\r\n\r\n rgb () {\r\n if (this.space === 'rgb') {\r\n return this\r\n } else if (cieSpace(this.space)) {\r\n // Convert to the xyz color space\r\n let { x, y, z } = this\r\n if (this.space === 'lab' || this.space === 'lch') {\r\n // Get the values in the lab space\r\n let { l, a, b } = this\r\n if (this.space === 'lch') {\r\n let { c, h } = this\r\n const dToR = Math.PI / 180\r\n a = c * Math.cos(dToR * h)\r\n b = c * Math.sin(dToR * h)\r\n }\r\n\r\n // Undo the nonlinear function\r\n const yL = (l + 16) / 116\r\n const xL = a / 500 + yL\r\n const zL = yL - b / 200\r\n\r\n // Get the xyz values\r\n const ct = 16 / 116\r\n const mx = 0.008856\r\n const nm = 7.787\r\n x = 0.95047 * ((xL ** 3 > mx) ? xL ** 3 : (xL - ct) / nm)\r\n y = 1.00000 * ((yL ** 3 > mx) ? yL ** 3 : (yL - ct) / nm)\r\n z = 1.08883 * ((zL ** 3 > mx) ? zL ** 3 : (zL - ct) / nm)\r\n }\r\n\r\n // Convert xyz to unbounded rgb values\r\n const rU = x * 3.2406 + y * -1.5372 + z * -0.4986\r\n const gU = x * -0.9689 + y * 1.8758 + z * 0.0415\r\n const bU = x * 0.0557 + y * -0.2040 + z * 1.0570\r\n\r\n // Convert the values to true rgb values\r\n let pow = Math.pow\r\n let bd = 0.0031308\r\n const r = (rU > bd) ? (1.055 * pow(rU, 1 / 2.4) - 0.055) : 12.92 * rU\r\n const g = (gU > bd) ? (1.055 * pow(gU, 1 / 2.4) - 0.055) : 12.92 * gU\r\n const b = (bU > bd) ? (1.055 * pow(bU, 1 / 2.4) - 0.055) : 12.92 * bU\r\n\r\n // Make and return the color\r\n const color = new Color(255 * r, 255 * g, 255 * b)\r\n return color\r\n } else if (this.space === 'hsl') {\r\n // https://bgrins.github.io/TinyColor/docs/tinycolor.html\r\n // Get the current hsl values\r\n let { h, s, l } = this\r\n h /= 360\r\n s /= 100\r\n l /= 100\r\n\r\n // If we are grey, then just make the color directly\r\n if (s === 0) {\r\n l *= 255\r\n let color = new Color(l, l, l)\r\n return color\r\n }\r\n\r\n // TODO I have no idea what this does :D If you figure it out, tell me!\r\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s\r\n const p = 2 * l - q\r\n\r\n // Get the rgb values\r\n const r = 255 * hueToRgb(p, q, h + 1 / 3)\r\n const g = 255 * hueToRgb(p, q, h)\r\n const b = 255 * hueToRgb(p, q, h - 1 / 3)\r\n\r\n // Make a new color\r\n const color = new Color(r, g, b)\r\n return color\r\n } else if (this.space === 'cmyk') {\r\n // https://gist.github.com/felipesabino/5066336\r\n // Get the normalised cmyk values\r\n const { c, m, y, k } = this\r\n\r\n // Get the rgb values\r\n const r = 255 * (1 - Math.min(1, c * (1 - k) + k))\r\n const g = 255 * (1 - Math.min(1, m * (1 - k) + k))\r\n const b = 255 * (1 - Math.min(1, y * (1 - k) + k))\r\n\r\n // Form the color and return it\r\n const color = new Color(r, g, b)\r\n return color\r\n } else {\r\n return this\r\n }\r\n }\r\n\r\n lab () {\r\n // Get the xyz color\r\n const { x, y, z } = this.xyz()\r\n\r\n // Get the lab components\r\n const l = (116 * y) - 16\r\n const a = 500 * (x - y)\r\n const b = 200 * (y - z)\r\n\r\n // Construct and return a new color\r\n const color = new Color(l, a, b, 'lab')\r\n return color\r\n }\r\n\r\n xyz () {\r\n\r\n // Normalise the red, green and blue values\r\n const { _a: r255, _b: g255, _c: b255 } = this.rgb()\r\n const [ r, g, b ] = [ r255, g255, b255 ].map(v => v / 255)\r\n\r\n // Convert to the lab rgb space\r\n const rL = (r > 0.04045) ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92\r\n const gL = (g > 0.04045) ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92\r\n const bL = (b > 0.04045) ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92\r\n\r\n // Convert to the xyz color space without bounding the values\r\n const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047\r\n const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.00000\r\n const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883\r\n\r\n // Get the proper xyz values by applying the bounding\r\n const x = (xU > 0.008856) ? Math.pow(xU, 1 / 3) : (7.787 * xU) + 16 / 116\r\n const y = (yU > 0.008856) ? Math.pow(yU, 1 / 3) : (7.787 * yU) + 16 / 116\r\n const z = (zU > 0.008856) ? Math.pow(zU, 1 / 3) : (7.787 * zU) + 16 / 116\r\n\r\n // Make and return the color\r\n const color = new Color(x, y, z, 'xyz')\r\n return color\r\n }\r\n\r\n lch () {\r\n\r\n // Get the lab color directly\r\n const { l, a, b } = this.lab()\r\n\r\n // Get the chromaticity and the hue using polar coordinates\r\n const c = Math.sqrt(a ** 2 + b ** 2)\r\n let h = 180 * Math.atan2(b, a) / Math.PI\r\n if (h < 0) {\r\n h *= -1\r\n h = 360 - h\r\n }\r\n\r\n // Make a new color and return it\r\n const color = new Color(l, c, h, 'lch')\r\n return color\r\n }\r\n\r\n hsl () {\r\n\r\n // Get the rgb values\r\n const { _a, _b, _c } = this.rgb()\r\n const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)\r\n\r\n // Find the maximum and minimum values to get the lightness\r\n const max = Math.max(r, g, b)\r\n const min = Math.min(r, g, b)\r\n const l = (max + min) / 2\r\n\r\n // If the r, g, v values are identical then we are grey\r\n const isGrey = max === min\r\n\r\n // Calculate the hue and saturation\r\n const delta = max - min\r\n const s = isGrey ? 0\r\n : l > 0.5 ? delta / (2 - max - min)\r\n : delta / (max + min)\r\n const h = isGrey ? 0\r\n : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6\r\n : max === g ? ((b - r) / delta + 2) / 6\r\n : max === b ? ((r - g) / delta + 4) / 6\r\n : 0\r\n\r\n // Construct and return the new color\r\n const color = new Color(360 * h, 100 * s, 100 * l, 'hsl')\r\n return color\r\n }\r\n\r\n cmyk () {\r\n\r\n // Get the rgb values for the current color\r\n const { _a, _b, _c } = this.rgb()\r\n const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)\r\n\r\n // Get the cmyk values in an unbounded format\r\n const k = Math.min(1 - r, 1 - g, 1 - b)\r\n\r\n if (k === 1) {\r\n // Catch the black case\r\n return new Color(0, 0, 0, 1, 'cmyk')\r\n }\r\n\r\n const c = (1 - r - k) / (1 - k)\r\n const m = (1 - g - k) / (1 - k)\r\n const y = (1 - b - k) / (1 - k)\r\n\r\n // Construct the new color\r\n const color = new Color(c, m, y, k, 'cmyk')\r\n return color\r\n }\r\n\r\n /*\r\n Input and Output methods\r\n */\r\n\r\n toHex () {\r\n let { _a, _b, _c } = this.rgb()\r\n let [ r, g, b ] = [ _a, _b, _c ].map(componentHex)\r\n return `#${r}${g}${b}`\r\n }\r\n\r\n toString () {\r\n return this.toHex()\r\n }\r\n\r\n toRgb () {\r\n let { r, g, b } = this.rgb()\r\n let { max, min, round } = Math\r\n let format = v => max(0, min(round(v), 255))\r\n let [ rV, gV, bV ] = [ r, g, b ].map(format)\r\n let string = `rgb(${rV},${gV},${bV})`\r\n return string\r\n }\r\n\r\n toArray () {\r\n let { _a, _b, _c, _d, space } = this\r\n return [ _a, _b, _c, _d, space ]\r\n }\r\n\r\n /*\r\n Generating random colors\r\n */\r\n\r\n static random (mode = 'vibrant') {\r\n 'sine'\r\n 'pastel'\r\n 'vibrant'\r\n 'dark'\r\n 'rgb'\r\n 'lab'\r\n 'grey'\r\n }\r\n\r\n /*\r\n Constructing colors\r\n */\r\n\r\n // Test if given value is a color string\r\n static test (color) {\r\n color += ''\r\n return isHex.test(color) || isRgb.test(color)\r\n }\r\n\r\n // Test if given value is a rgb object\r\n static isRgb (color) {\r\n return color && typeof color.r === 'number'\r\n && typeof color.g === 'number'\r\n && typeof color.b === 'number'\r\n }\r\n\r\n // Test if given value is a color\r\n static isColor (color) {\r\n return this.isRgb(color) || this.test(color)\r\n }\r\n}\r\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","import _typeof from \"../../helpers/esm/typeof\";\nimport assertThisInitialized from \"./assertThisInitialized\";\nexport default function _possibleConstructorReturn(self, call) {\n if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return assertThisInitialized(self);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nimport superPropBase from \"./superPropBase\";\nexport default function _get(target, property, receiver) {\n if (typeof Reflect !== \"undefined\" && Reflect.get) {\n _get = Reflect.get;\n } else {\n _get = function _get(target, property, receiver) {\n var base = superPropBase(target, property);\n if (!base) return;\n var desc = Object.getOwnPropertyDescriptor(base, property);\n\n if (desc.get) {\n return desc.get.call(receiver);\n }\n\n return desc.value;\n };\n }\n\n return _get(target, property, receiver || target);\n}","import getPrototypeOf from \"./getPrototypeOf\";\nexport default function _superPropBase(object, property) {\n while (!Object.prototype.hasOwnProperty.call(object, property)) {\n object = getPrototypeOf(object);\n if (object === null) break;\n }\n\n return object;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf\";\nexport default function _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n writable: true,\n configurable: true\n }\n });\n if (superClass) setPrototypeOf(subClass, superClass);\n}","// @@match logic\nrequire('./_fix-re-wks')('match', 1, function (defined, MATCH, $match) {\n // 21.1.3.11 String.prototype.match(regexp)\n return [function match(regexp) {\n 'use strict';\n var O = defined(this);\n var fn = regexp == undefined ? undefined : regexp[MATCH];\n return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O));\n }, $match];\n});\n","export default class Point {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (x, y) {\r\n let source\r\n let base = { x: 0, y: 0 }\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ? { x: x[0], y: x[1] }\r\n : typeof x === 'object' ? { x: x.x, y: x.y }\r\n : { x: x, y: y }\r\n\r\n // merge source\r\n this.x = source.x == null ? base.x : source.x\r\n this.y = source.y == null ? base.y : source.y\r\n\r\n return this\r\n }\r\n\r\n // Clone point\r\n clone () {\r\n return new Point(this)\r\n }\r\n\r\n // transform point with matrix\r\n transform (m) {\r\n // Perform the matrix multiplication\r\n var x = m.a * this.x + m.c * this.y + m.e\r\n var y = m.b * this.x + m.d * this.y + m.f\r\n\r\n // Return the required point\r\n return new Point(x, y)\r\n }\r\n\r\n toArray () {\r\n return [ this.x, this.y ]\r\n }\r\n}\r\n\r\nexport function point (x, y) {\r\n return new Point(x, y).transform(this.screenCTM().inverse())\r\n}\r\n","import { globals } from '../../utils/window.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\n\r\nexport default function parser () {\r\n // Reuse cached element if possible\r\n if (!parser.nodes) {\r\n let svg = makeInstance().size(2, 0)\r\n svg.node.cssText = [\r\n 'opacity: 0',\r\n 'position: absolute',\r\n 'left: -100%',\r\n 'top: -100%',\r\n 'overflow: hidden'\r\n ].join(';')\r\n\r\n let path = svg.path().node\r\n\r\n parser.nodes = { svg, path }\r\n }\r\n\r\n if (!parser.nodes.svg.node.parentNode) {\r\n let b = globals.document.body || globals.document.documentElement\r\n parser.nodes.svg.addTo(b)\r\n }\r\n\r\n return parser.nodes\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Point from './Point.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nfunction isNulledBox (box) {\r\n return !box.w && !box.h && !box.x && !box.y\r\n}\r\n\r\nfunction domContains (node) {\r\n return (globals.document.documentElement.contains || function (node) {\r\n // This is IE - it does not support contains() for top-level SVGs\r\n while (node.parentNode) {\r\n node = node.parentNode\r\n }\r\n return node === document\r\n }).call(globals.document.documentElement, node)\r\n}\r\n\r\nexport default class Box {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (source) {\r\n var base = [ 0, 0, 0, 0 ]\r\n source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)\r\n : Array.isArray(source) ? source\r\n : typeof source === 'object' ? [ source.left != null ? source.left\r\n : source.x, source.top != null ? source.top : source.y, source.width, source.height ]\r\n : arguments.length === 4 ? [].slice.call(arguments)\r\n : base\r\n\r\n this.x = source[0] || 0\r\n this.y = source[1] || 0\r\n this.width = this.w = source[2] || 0\r\n this.height = this.h = source[3] || 0\r\n\r\n // Add more bounding box properties\r\n this.x2 = this.x + this.w\r\n this.y2 = this.y + this.h\r\n this.cx = this.x + this.w / 2\r\n this.cy = this.y + this.h / 2\r\n\r\n return this\r\n }\r\n\r\n // Merge rect box with another, return a new instance\r\n merge (box) {\r\n let x = Math.min(this.x, box.x)\r\n let y = Math.min(this.y, box.y)\r\n let width = Math.max(this.x + this.width, box.x + box.width) - x\r\n let height = Math.max(this.y + this.height, box.y + box.height) - y\r\n\r\n return new Box(x, y, width, height)\r\n }\r\n\r\n transform (m) {\r\n let xMin = Infinity\r\n let xMax = -Infinity\r\n let yMin = Infinity\r\n let yMax = -Infinity\r\n\r\n let pts = [\r\n new Point(this.x, this.y),\r\n new Point(this.x2, this.y),\r\n new Point(this.x, this.y2),\r\n new Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function (p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin, p.x)\r\n xMax = Math.max(xMax, p.x)\r\n yMin = Math.min(yMin, p.y)\r\n yMax = Math.max(yMax, p.y)\r\n })\r\n\r\n return new Box(\r\n xMin, yMin,\r\n xMax - xMin,\r\n yMax - yMin\r\n )\r\n }\r\n\r\n addOffset () {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += globals.window.pageXOffset\r\n this.y += globals.window.pageYOffset\r\n return this\r\n }\r\n\r\n toString () {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n\r\n toArray () {\r\n return [ this.x, this.y, this.width, this.height ]\r\n }\r\n\r\n isNulled () {\r\n return isNulledBox(this)\r\n }\r\n}\r\n\r\nfunction getBox (cb, retry) {\r\n let box\r\n\r\n try {\r\n box = cb(this.node)\r\n\r\n if (isNulledBox(box) && !domContains(this.node)) {\r\n throw new Error('Element not in the dom')\r\n }\r\n } catch (e) {\r\n box = retry(this)\r\n }\r\n\r\n return box\r\n}\r\n\r\nexport function bbox () {\r\n return new Box(getBox.call(this, (node) => node.getBBox(), (el) => {\r\n try {\r\n let clone = el.clone().addTo(parser().svg).show()\r\n let box = clone.node.getBBox()\r\n clone.remove()\r\n return box\r\n } catch (e) {\r\n throw new Error('Getting bbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }\r\n }))\r\n}\r\n\r\nexport function rbox (el) {\r\n let box = new Box(getBox.call(this, (node) => node.getBoundingClientRect(), (el) => {\r\n throw new Error('Getting rbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }))\r\n if (el) return box.transform(el.screenCTM().inverse())\r\n return box.addOffset()\r\n}\r\n\r\nregisterMethods({\r\n viewbox: {\r\n viewbox (x, y, width, height) {\r\n // act as getter\r\n if (x == null) return new Box(this.attr('viewBox'))\r\n\r\n // act as setter\r\n return this.attr('viewBox', new Box(x, y, width, height))\r\n }\r\n }\r\n})\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { radians } from '../utils/utils.js'\r\nimport Element from '../elements/Element.js'\r\nimport Point from './Point.js'\r\n\r\nfunction closeEnough (a, b, threshold) {\r\n return Math.abs(b - a) < (threshold || 1e-6)\r\n}\r\n\r\nexport default class Matrix {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n // Initialize\r\n init (source) {\r\n var base = Matrix.fromArray([ 1, 0, 0, 1, 0, 0 ])\r\n\r\n // ensure source as object\r\n source = source instanceof Element ? source.matrixify()\r\n : typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\r\n : Array.isArray(source) ? Matrix.fromArray(source)\r\n : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source\r\n : (typeof source === 'object') ? new Matrix().transform(source)\r\n : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))\r\n : base\r\n\r\n // Merge the source matrix with the base matrix\r\n this.a = source.a != null ? source.a : base.a\r\n this.b = source.b != null ? source.b : base.b\r\n this.c = source.c != null ? source.c : base.c\r\n this.d = source.d != null ? source.d : base.d\r\n this.e = source.e != null ? source.e : base.e\r\n this.f = source.f != null ? source.f : base.f\r\n\r\n return this\r\n }\r\n\r\n // Clones this matrix\r\n clone () {\r\n return new Matrix(this)\r\n }\r\n\r\n // Transform a matrix into another matrix by manipulating the space\r\n transform (o) {\r\n // Check if o is a matrix and then left multiply it directly\r\n if (Matrix.isMatrixLike(o)) {\r\n var matrix = new Matrix(o)\r\n return matrix.multiplyO(this)\r\n }\r\n\r\n // Get the proposed transformations and the current transformations\r\n var t = Matrix.formatTransforms(o)\r\n var current = this\r\n let { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\r\n\r\n // Construct the resulting matrix\r\n var transformer = new Matrix()\r\n .translateO(t.rx, t.ry)\r\n .lmultiplyO(current)\r\n .translateO(-ox, -oy)\r\n .scaleO(t.scaleX, t.scaleY)\r\n .skewO(t.skewX, t.skewY)\r\n .shearO(t.shear)\r\n .rotateO(t.theta)\r\n .translateO(ox, oy)\r\n\r\n // If we want the origin at a particular place, we force it there\r\n if (isFinite(t.px) || isFinite(t.py)) {\r\n const origin = new Point(ox, oy).transform(transformer)\r\n // TODO: Replace t.px with isFinite(t.px)\r\n const dx = t.px ? t.px - origin.x : 0\r\n const dy = t.py ? t.py - origin.y : 0\r\n transformer.translateO(dx, dy)\r\n }\r\n\r\n // Translate now after positioning\r\n transformer.translateO(t.tx, t.ty)\r\n return transformer\r\n }\r\n\r\n // Applies a matrix defined by its affine parameters\r\n compose (o) {\r\n if (o.origin) {\r\n o.originX = o.origin[0]\r\n o.originY = o.origin[1]\r\n }\r\n // Get the parameters\r\n var ox = o.originX || 0\r\n var oy = o.originY || 0\r\n var sx = o.scaleX || 1\r\n var sy = o.scaleY || 1\r\n var lam = o.shear || 0\r\n var theta = o.rotate || 0\r\n var tx = o.translateX || 0\r\n var ty = o.translateY || 0\r\n\r\n // Apply the standard matrix\r\n var result = new Matrix()\r\n .translateO(-ox, -oy)\r\n .scaleO(sx, sy)\r\n .shearO(lam)\r\n .rotateO(theta)\r\n .translateO(tx, ty)\r\n .lmultiplyO(this)\r\n .translateO(ox, oy)\r\n return result\r\n }\r\n\r\n // Decomposes this matrix into its affine parameters\r\n decompose (cx = 0, cy = 0) {\r\n // Get the parameters from the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Figure out if the winding direction is clockwise or counterclockwise\r\n var determinant = a * d - b * c\r\n var ccw = determinant > 0 ? 1 : -1\r\n\r\n // Since we only shear in x, we can use the x basis to get the x scale\r\n // and the rotation of the resulting matrix\r\n var sx = ccw * Math.sqrt(a * a + b * b)\r\n var thetaRad = Math.atan2(ccw * b, ccw * a)\r\n var theta = 180 / Math.PI * thetaRad\r\n var ct = Math.cos(thetaRad)\r\n var st = Math.sin(thetaRad)\r\n\r\n // We can then solve the y basis vector simultaneously to get the other\r\n // two affine parameters directly from these parameters\r\n var lam = (a * c + b * d) / determinant\r\n var sy = ((c * sx) / (lam * a - b)) || ((d * sx) / (lam * b + a))\r\n\r\n // Use the translations\r\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy)\r\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy)\r\n\r\n // Construct the decomposition and return it\r\n return {\r\n // Return the affine parameters\r\n scaleX: sx,\r\n scaleY: sy,\r\n shear: lam,\r\n rotate: theta,\r\n translateX: tx,\r\n translateY: ty,\r\n originX: cx,\r\n originY: cy,\r\n\r\n // Return the matrix parameters\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n // Left multiplies by the given matrix\r\n multiply (matrix) {\r\n return this.clone().multiplyO(matrix)\r\n }\r\n\r\n multiplyO (matrix) {\r\n // Get the matrices\r\n var l = this\r\n var r = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n lmultiply (matrix) {\r\n return this.clone().lmultiplyO(matrix)\r\n }\r\n\r\n lmultiplyO (matrix) {\r\n var r = this\r\n var l = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n // Inverses matrix\r\n inverseO () {\r\n // Get the current parameters out of the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Invert the 2x2 matrix in the top left\r\n var det = a * d - b * c\r\n if (!det) throw new Error('Cannot invert ' + this)\r\n\r\n // Calculate the top 2x2 matrix\r\n var na = d / det\r\n var nb = -b / det\r\n var nc = -c / det\r\n var nd = a / det\r\n\r\n // Apply the inverted matrix to the top right\r\n var ne = -(na * e + nc * f)\r\n var nf = -(nb * e + nd * f)\r\n\r\n // Construct the inverted matrix\r\n this.a = na\r\n this.b = nb\r\n this.c = nc\r\n this.d = nd\r\n this.e = ne\r\n this.f = nf\r\n\r\n return this\r\n }\r\n\r\n inverse () {\r\n return this.clone().inverseO()\r\n }\r\n\r\n // Translate matrix\r\n translate (x, y) {\r\n return this.clone().translateO(x, y)\r\n }\r\n\r\n translateO (x, y) {\r\n this.e += x || 0\r\n this.f += y || 0\r\n return this\r\n }\r\n\r\n // Scale matrix\r\n scale (x, y, cx, cy) {\r\n return this.clone().scaleO(...arguments)\r\n }\r\n\r\n scaleO (x, y = x, cx = 0, cy = 0) {\r\n // Support uniform scaling\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * x\r\n this.b = b * y\r\n this.c = c * x\r\n this.d = d * y\r\n this.e = e * x - cx * x + cx\r\n this.f = f * y - cy * y + cy\r\n\r\n return this\r\n }\r\n\r\n // Rotate matrix\r\n rotate (r, cx, cy) {\r\n return this.clone().rotateO(r, cx, cy)\r\n }\r\n\r\n rotateO (r, cx = 0, cy = 0) {\r\n // Convert degrees to radians\r\n r = radians(r)\r\n\r\n let cos = Math.cos(r)\r\n let sin = Math.sin(r)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * cos - b * sin\r\n this.b = b * cos + a * sin\r\n this.c = c * cos - d * sin\r\n this.d = d * cos + c * sin\r\n this.e = e * cos - f * sin + cy * sin - cx * cos + cx\r\n this.f = f * cos + e * sin - cx * sin - cy * cos + cy\r\n\r\n return this\r\n }\r\n\r\n // Flip matrix on x or y, at a given offset\r\n flip (axis, around) {\r\n return this.clone().flipO(axis, around)\r\n }\r\n\r\n flipO (axis, around) {\r\n return axis === 'x' ? this.scaleO(-1, 1, around, 0)\r\n : axis === 'y' ? this.scaleO(1, -1, 0, around)\r\n : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\r\n }\r\n\r\n // Shear matrix\r\n shear (a, cx, cy) {\r\n return this.clone().shearO(a, cx, cy)\r\n }\r\n\r\n shearO (lx, cx = 0, cy = 0) {\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.c = c + d * lx\r\n this.e = e + f * lx - cy * lx\r\n\r\n return this\r\n }\r\n\r\n // Skew Matrix\r\n skew (x, y, cx, cy) {\r\n return this.clone().skewO(...arguments)\r\n }\r\n\r\n skewO (x, y = x, cx = 0, cy = 0) {\r\n // support uniformal skew\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // Convert degrees to radians\r\n x = radians(x)\r\n y = radians(y)\r\n\r\n let lx = Math.tan(x)\r\n let ly = Math.tan(y)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.b = b + a * ly\r\n this.c = c + d * lx\r\n this.d = d + c * ly\r\n this.e = e + f * lx - cy * lx\r\n this.f = f + e * ly - cx * ly\r\n\r\n return this\r\n }\r\n\r\n // SkewX\r\n skewX (x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n\r\n skewXO (x, cx, cy) {\r\n return this.skewO(x, 0, cx, cy)\r\n }\r\n\r\n // SkewY\r\n skewY (y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n\r\n skewYO (y, cx, cy) {\r\n return this.skewO(0, y, cx, cy)\r\n }\r\n\r\n // Transform around a center point\r\n aroundO (cx, cy, matrix) {\r\n var dx = cx || 0\r\n var dy = cy || 0\r\n return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\r\n }\r\n\r\n around (cx, cy, matrix) {\r\n return this.clone().aroundO(cx, cy, matrix)\r\n }\r\n\r\n // Check if two matrices are equal\r\n equals (other) {\r\n var comp = new Matrix(other)\r\n return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b)\r\n && closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d)\r\n && closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)\r\n }\r\n\r\n // Convert matrix to string\r\n toString () {\r\n return 'matrix(' + this.a + ',' + this.b + ',' + this.c + ',' + this.d + ',' + this.e + ',' + this.f + ')'\r\n }\r\n\r\n toArray () {\r\n return [ this.a, this.b, this.c, this.d, this.e, this.f ]\r\n }\r\n\r\n valueOf () {\r\n return {\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n static fromArray (a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n }\r\n\r\n static isMatrixLike (o) {\r\n return (\r\n o.a != null\r\n || o.b != null\r\n || o.c != null\r\n || o.d != null\r\n || o.e != null\r\n || o.f != null\r\n )\r\n }\r\n\r\n static formatTransforms (o) {\r\n // Get all of the parameters required to form the matrix\r\n var flipBoth = o.flip === 'both' || o.flip === true\r\n var flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\r\n var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\r\n var skewX = o.skew && o.skew.length ? o.skew[0]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewX) ? o.skewX\r\n : 0\r\n var skewY = o.skew && o.skew.length ? o.skew[1]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewY) ? o.skewY\r\n : 0\r\n var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX\r\n : isFinite(o.scale) ? o.scale * flipX\r\n : isFinite(o.scaleX) ? o.scaleX * flipX\r\n : flipX\r\n var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY\r\n : isFinite(o.scale) ? o.scale * flipY\r\n : isFinite(o.scaleY) ? o.scaleY * flipY\r\n : flipY\r\n var shear = o.shear || 0\r\n var theta = o.rotate || o.theta || 0\r\n var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)\r\n var ox = origin.x\r\n var oy = origin.y\r\n var position = new Point(o.position || o.px || o.positionX, o.py || o.positionY)\r\n var px = position.x\r\n var py = position.y\r\n var translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY)\r\n var tx = translate.x\r\n var ty = translate.y\r\n var relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY)\r\n var rx = relative.x\r\n var ry = relative.y\r\n\r\n // Populate all of the values\r\n return {\r\n scaleX, scaleY, skewX, skewY, shear, theta, rx, ry, tx, ty, ox, oy, px, py\r\n }\r\n }\r\n\r\n // left matrix, right matrix, target matrix which is overwritten\r\n static matrixMultiply (l, r, o) {\r\n // Work out the product directly\r\n var a = l.a * r.a + l.c * r.b\r\n var b = l.b * r.a + l.d * r.b\r\n var c = l.a * r.c + l.c * r.d\r\n var d = l.b * r.c + l.d * r.d\r\n var e = l.e + l.a * r.e + l.c * r.f\r\n var f = l.f + l.b * r.e + l.d * r.f\r\n\r\n // make sure to use local variables because l/r and o could be the same\r\n o.a = a\r\n o.b = b\r\n o.c = c\r\n o.d = d\r\n o.e = e\r\n o.f = f\r\n\r\n return o\r\n }\r\n}\r\n\r\nexport function ctm () {\r\n return new Matrix(this.node.getCTM())\r\n}\r\n\r\nexport function screenCTM () {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if (typeof this.isRoot === 'function' && !this.isRoot()) {\r\n var rect = this.rect(1, 1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new Matrix(m)\r\n }\r\n return new Matrix(this.node.getScreenCTM())\r\n}\r\n","/* eslint no-new-func: \"off\" */\r\nexport const subClassArray = (function () {\r\n try {\r\n // try es6 subclassing\r\n return Function('name', 'baseClass', '_constructor', [\r\n 'baseClass = baseClass || Array',\r\n 'return {',\r\n ' [name]: class extends baseClass {',\r\n ' constructor (...args) {',\r\n ' super(...args)',\r\n ' _constructor && _constructor.apply(this, args)',\r\n ' }',\r\n ' }',\r\n '}[name]'\r\n ].join('\\n'))\r\n } catch (e) {\r\n // Use es5 approach\r\n return (name, baseClass = Array, _constructor) => {\r\n const Arr = function () {\r\n baseClass.apply(this, arguments)\r\n _constructor && _constructor.apply(this, arguments)\r\n }\r\n\r\n Arr.prototype = Object.create(baseClass.prototype)\r\n Arr.prototype.constructor = Arr\r\n\r\n Arr.prototype.map = function (fn) {\r\n const arr = new Arr()\r\n arr.push.apply(arr, Array.prototype.map.call(this, fn))\r\n return arr\r\n }\r\n\r\n return Arr\r\n }\r\n }\r\n})()\r\n","import { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst List = subClassArray('List', Array, function (arr = []) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...arr)\r\n})\r\n\r\nexport default List\r\n\r\nextend(List, {\r\n each (fnOrMethodName, ...args) {\r\n if (typeof fnOrMethodName === 'function') {\r\n this.forEach((el) => {\r\n fnOrMethodName.call(el, el)\r\n })\r\n } else {\r\n return this.map(el => {\r\n return el[fnOrMethodName](...args)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n }\r\n})\r\n\r\nList.extend = function (methods) {\r\n methods = methods.reduce((obj, name) => {\r\n obj[name] = function (...attrs) {\r\n return this.each(name, ...attrs)\r\n }\r\n return obj\r\n }, {})\r\n\r\n extend(List, methods)\r\n}\r\n","import { adopt } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\nimport { map } from '../../utils/utils.js'\r\nimport List from '../../types/List.js'\r\n\r\nexport default function baseFind (query, parent) {\r\n return new List(map((parent || globals.document).querySelectorAll(query), function (node) {\r\n return adopt(node)\r\n }))\r\n}\r\n\r\n// Scoped find method\r\nexport function find (query) {\r\n return baseFind(query, this.node)\r\n}\r\n","import { dispatch, off, on } from '../modules/core/event.js'\r\nimport Base from './Base.js'\r\n\r\nexport default class EventTarget extends Base {\r\n constructor ({ events = {} } = {}) {\r\n super()\r\n this.events = events\r\n }\r\n\r\n addEventListener () {}\r\n\r\n dispatch (event, data) {\r\n return dispatch(this, event, data)\r\n }\r\n\r\n dispatchEvent (event) {\r\n const bag = this.getEventHolder().events\r\n if (!bag) return true\r\n\r\n const events = bag[event.type]\r\n\r\n for (let i in events) {\r\n for (let j in events[i]) {\r\n events[i][j](event)\r\n }\r\n }\r\n\r\n return !event.defaultPrevented\r\n }\r\n\r\n // Fire given event\r\n fire (event, data) {\r\n this.dispatch(event, data)\r\n return this\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n getEventTarget () {\r\n return this\r\n }\r\n\r\n // Unbind event from listener\r\n off (event, listener) {\r\n off(this, event, listener)\r\n return this\r\n }\r\n\r\n // Bind given event to listener\r\n on (event, listener, binding, options) {\r\n on(this, event, listener, binding, options)\r\n return this\r\n }\r\n\r\n removeEventListener () {}\r\n}\r\n","\r\nexport function noop () {}\r\n\r\n// Default animation values\r\nexport let timeline = {\r\n duration: 400,\r\n ease: '>',\r\n delay: 0\r\n}\r\n\r\n// Default attribute values\r\nexport let attrs = {\r\n\r\n // fill and stroke\r\n 'fill-opacity': 1,\r\n 'stroke-opacity': 1,\r\n 'stroke-width': 0,\r\n 'stroke-linejoin': 'miter',\r\n 'stroke-linecap': 'butt',\r\n fill: '#000000',\r\n stroke: '#000000',\r\n opacity: 1,\r\n\r\n // position\r\n x: 0,\r\n y: 0,\r\n cx: 0,\r\n cy: 0,\r\n\r\n // size\r\n width: 0,\r\n height: 0,\r\n\r\n // radius\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n\r\n // gradient\r\n offset: 0,\r\n 'stop-opacity': 1,\r\n 'stop-color': '#000000',\r\n\r\n // text\r\n 'font-size': 16,\r\n 'font-family': 'Helvetica, Arial, sans-serif',\r\n 'text-anchor': 'start'\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst SVGArray = subClassArray('SVGArray', Array, function (arr) {\r\n this.init(arr)\r\n})\r\n\r\nexport default SVGArray\r\n\r\nextend(SVGArray, {\r\n init (arr) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...this.parse(arr))\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n },\r\n\r\n toString () {\r\n return this.join(' ')\r\n },\r\n\r\n // Flattens the array if needed\r\n valueOf () {\r\n const ret = []\r\n ret.push(...this)\r\n return ret\r\n },\r\n\r\n // Parse whitespace separated string\r\n parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n },\r\n\r\n clone () {\r\n return new this.constructor(this)\r\n },\r\n\r\n toSet () {\r\n return new Set(this)\r\n }\r\n})\r\n","import { numberAndUnit } from '../modules/core/regex.js'\r\n\r\n// Module for unit convertions\r\nexport default class SVGNumber {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (value, unit) {\r\n unit = Array.isArray(value) ? value[1] : unit\r\n value = Array.isArray(value) ? value[0] : value\r\n\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n } else if (typeof value === 'string') {\r\n unit = value.match(numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] === '%') {\r\n this.value /= 100\r\n } else if (unit[5] === 's') {\r\n this.value *= 1000\r\n }\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n } else {\r\n if (value instanceof SVGNumber) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n toString () {\r\n return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6\r\n : this.unit === 's' ? this.value / 1e3\r\n : this.value\r\n ) + this.unit\r\n }\r\n\r\n toJSON () {\r\n return this.toString()\r\n }\r\n\r\n toArray () {\r\n return [ this.value, this.unit ]\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n // Add number\r\n plus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this + number, this.unit || number.unit)\r\n }\r\n\r\n // Subtract number\r\n minus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this - number, this.unit || number.unit)\r\n }\r\n\r\n // Multiply number\r\n times (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this * number, this.unit || number.unit)\r\n }\r\n\r\n // Divide number\r\n divide (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this / number, this.unit || number.unit)\r\n }\r\n}\r\n","import { attrs as defaults } from './defaults.js'\r\nimport { isNumber } from './regex.js'\r\nimport Color from '../../types/Color.js'\r\nimport SVGArray from '../../types/SVGArray.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\nconst hooks = []\r\nexport function registerAttrHook (fn) {\r\n hooks.push(fn)\r\n}\r\n\r\n// Set svg element attribute\r\nexport default function attr (attr, val, ns) {\r\n // act as full getter\r\n if (attr == null) {\r\n // get an object of attributes\r\n attr = {}\r\n val = this.node.attributes\r\n\r\n for (let node of val) {\r\n attr[node.nodeName] = isNumber.test(node.nodeValue)\r\n ? parseFloat(node.nodeValue)\r\n : node.nodeValue\r\n }\r\n\r\n return attr\r\n } else if (attr instanceof Array) {\r\n // loop through array and get all values\r\n return attr.reduce((last, curr) => {\r\n last[curr] = this.attr(curr)\r\n return last\r\n }, {})\r\n } else if (typeof attr === 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (val in attr) this.attr(val, attr[val])\r\n } else if (val === null) {\r\n // remove value\r\n this.node.removeAttribute(attr)\r\n } else if (val == null) {\r\n // act as a getter if the first and only argument is not an object\r\n val = this.node.getAttribute(attr)\r\n return val == null ? defaults[attr]\r\n : isNumber.test(val) ? parseFloat(val)\r\n : val\r\n } else {\r\n // Loop through hooks and execute them to convert value\r\n val = hooks.reduce((_val, hook) => {\r\n return hook(attr, _val, this)\r\n }, val)\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof val === 'number') {\r\n val = new SVGNumber(val)\r\n } else if (Color.isColor(val)) {\r\n // ensure full hex color\r\n val = new Color(val)\r\n } else if (val.constructor === Array) {\r\n // Check for plain arrays and parse array values\r\n val = new SVGArray(val)\r\n }\r\n\r\n // if the passed attribute is leading...\r\n if (attr === 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading) {\r\n this.leading(val)\r\n }\r\n } else {\r\n // set given attribute on node\r\n typeof ns === 'string' ? this.node.setAttributeNS(ns, attr, val.toString())\r\n : this.node.setAttribute(attr, val.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\r\n this.rebuild()\r\n }\r\n }\r\n\r\n return this\r\n}\r\n","import {\r\n adopt,\r\n assignNewId,\r\n eid,\r\n extend,\r\n makeInstance,\r\n makeNode,\r\n register\r\n} from '../utils/adopter.js'\r\nimport { find } from '../modules/core/selector.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { map } from '../utils/utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport List from '../types/List.js'\r\nimport attr from '../modules/core/attr.js'\r\n\r\nexport default class Dom extends EventTarget {\r\n constructor (node, attrs) {\r\n super(node)\r\n this.node = node\r\n this.type = node.nodeName\r\n\r\n if (attrs && node !== attrs) {\r\n this.attr(attrs)\r\n }\r\n }\r\n\r\n // Add given element at a position\r\n add (element, i) {\r\n element = makeInstance(element)\r\n\r\n if (i == null) {\r\n this.node.appendChild(element.node)\r\n } else if (element.node !== this.node.childNodes[i]) {\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Add element to given container and return self\r\n addTo (parent) {\r\n return makeInstance(parent).put(this)\r\n }\r\n\r\n // Returns all child elements\r\n children () {\r\n return new List(map(this.node.children, function (node) {\r\n return adopt(node)\r\n }))\r\n }\r\n\r\n // Remove all elements in this container\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n\r\n // Clone element\r\n clone () {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n return assignNewId(this.node.cloneNode(true))\r\n }\r\n\r\n // Iterates over all children and invokes a given block\r\n each (block, deep) {\r\n var children = this.children()\r\n var i, il\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n block.apply(children[i], [ i, children ])\r\n\r\n if (deep) {\r\n children[i].each(block, deep)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n element (nodeName) {\r\n return this.put(new Dom(makeNode(nodeName)))\r\n }\r\n\r\n // Get first child\r\n first () {\r\n return adopt(this.node.firstChild)\r\n }\r\n\r\n // Get a element at the given index\r\n get (i) {\r\n return adopt(this.node.childNodes[i])\r\n }\r\n\r\n getEventHolder () {\r\n return this.node\r\n }\r\n\r\n getEventTarget () {\r\n return this.node\r\n }\r\n\r\n // Checks if the given element is a child\r\n has (element) {\r\n return this.index(element) >= 0\r\n }\r\n\r\n // Get / set id\r\n id (id) {\r\n // generate new id if no id set\r\n if (typeof id === 'undefined' && !this.node.id) {\r\n this.node.id = eid(this.type)\r\n }\r\n\r\n // dont't set directly width this.node.id to make `null` work correctly\r\n return this.attr('id', id)\r\n }\r\n\r\n // Gets index of given element\r\n index (element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n\r\n // Get the last child\r\n last () {\r\n return adopt(this.node.lastChild)\r\n }\r\n\r\n // matches the element vs a css selector\r\n matches (selector) {\r\n const el = this.node\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector)\r\n }\r\n\r\n // Returns the parent element instance\r\n parent (type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if (!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = adopt(parent.node.parentNode)\r\n\r\n if (!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while (parent && parent.node instanceof globals.window.SVGElement) { // FIXME: That shouldnt be neccessary\r\n if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n parent = adopt(parent.node.parentNode)\r\n }\r\n }\r\n\r\n // Basically does the same as `add()` but returns the added element instead\r\n put (element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n\r\n // Add element to given container and return container\r\n putIn (parent) {\r\n return makeInstance(parent).add(this)\r\n }\r\n\r\n // Remove element\r\n remove () {\r\n if (this.parent()) {\r\n this.parent().removeElement(this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Remove a given child\r\n removeElement (element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n\r\n // Replace this with element\r\n replace (element) {\r\n element = makeInstance(element)\r\n this.node.parentNode.replaceChild(element.node, this.node)\r\n return element\r\n }\r\n\r\n round (precision = 2, map) {\r\n const factor = 10 ** precision\r\n const attrs = this.attr()\r\n\r\n // If we have no map, build one from attrs\r\n if (!map) {\r\n map = Object.keys(attrs)\r\n }\r\n\r\n // Holds rounded attributes\r\n const newAttrs = {}\r\n map.forEach((key) => {\r\n newAttrs[key] = Math.round(attrs[key] * factor) / factor\r\n })\r\n\r\n this.attr(newAttrs)\r\n return this\r\n }\r\n\r\n // Return id on string conversion\r\n toString () {\r\n return this.id()\r\n }\r\n\r\n // Import raw svg\r\n svg (svgOrFn, outerHTML) {\r\n var well, len, fragment\r\n\r\n if (svgOrFn === false) {\r\n outerHTML = false\r\n svgOrFn = null\r\n }\r\n\r\n // act as getter if no svg string is given\r\n if (svgOrFn == null || typeof svgOrFn === 'function') {\r\n // The default for exports is, that the outerNode is included\r\n outerHTML = outerHTML == null ? true : outerHTML\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n let current = this\r\n\r\n // An export modifier was passed\r\n if (svgOrFn != null) {\r\n current = adopt(current.node.cloneNode(true))\r\n\r\n // If the user wants outerHTML we need to process this node, too\r\n if (outerHTML) {\r\n let result = svgOrFn(current)\r\n current = result || current\r\n\r\n // The user does not want this node? Well, then he gets nothing\r\n if (result === false) return ''\r\n }\r\n\r\n // Deep loop through all children and apply modifier\r\n current.each(function () {\r\n let result = svgOrFn(this)\r\n let _this = result || this\r\n\r\n // If modifier returns false, discard node\r\n if (result === false) {\r\n this.remove()\r\n\r\n // If modifier returns new node, use it\r\n } else if (result && this !== _this) {\r\n this.replace(_this)\r\n }\r\n }, true)\r\n }\r\n\r\n // Return outer or inner content\r\n return outerHTML\r\n ? current.node.outerHTML\r\n : current.node.innerHTML\r\n }\r\n\r\n // Act as setter if we got a string\r\n\r\n // The default for import is, that the current node is not replaced\r\n outerHTML = outerHTML == null ? false : outerHTML\r\n\r\n // Create temporary holder\r\n well = globals.document.createElementNS(ns, 'svg')\r\n fragment = globals.document.createDocumentFragment()\r\n\r\n // Dump raw svg\r\n well.innerHTML = svgOrFn\r\n\r\n // Transplant nodes into the fragment\r\n for (len = well.children.length; len--;) {\r\n fragment.appendChild(well.firstElementChild)\r\n }\r\n\r\n let parent = this.parent()\r\n\r\n // Add the whole fragment at once\r\n return outerHTML\r\n ? this.replace(fragment) && parent\r\n : this.add(fragment)\r\n }\r\n\r\n words (text) {\r\n // This is faster than removing all children and adding a new one\r\n this.node.textContent = text\r\n return this\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // dump variables recursively\r\n this.each(function () {\r\n this.writeDataToDom()\r\n })\r\n\r\n return this\r\n }\r\n}\r\n\r\nextend(Dom, { attr, find })\r\nregister(Dom)\r\n","import { bbox, rbox } from '../types/Box.js'\r\nimport { ctm, screenCTM } from '../types/Matrix.js'\r\nimport {\r\n extend,\r\n getClass,\r\n makeInstance,\r\n register,\r\n root\r\n} from '../utils/adopter.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { point } from '../types/Point.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { reference } from '../modules/core/regex.js'\r\nimport Dom from './Dom.js'\r\nimport List from '../types/List.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nconst Svg = getClass(root)\r\n\r\nexport default class Element extends Dom {\r\n constructor (node, attrs) {\r\n super(node, attrs)\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n this.node.instance = this\r\n\r\n if (node.hasAttribute('svgjs:data')) {\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n this.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n }\r\n }\r\n\r\n // Move element by its center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n\r\n // Move by center over x-axis\r\n cx (x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n\r\n // Move by center over y-axis\r\n cy (y) {\r\n return y == null\r\n ? this.y() + this.height() / 2\r\n : this.y(y - this.height() / 2)\r\n }\r\n\r\n // Get defs\r\n defs () {\r\n return this.root().defs()\r\n }\r\n\r\n // Get parent document\r\n root () {\r\n let p = this.parent(Svg)\r\n return p && p.root()\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('height', height)\r\n }\r\n\r\n // Checks whether the given point inside the bounding box of the element\r\n inside (x, y) {\r\n let box = this.bbox()\r\n\r\n return x > box.x\r\n && y > box.y\r\n && x < box.x + box.width\r\n && y < box.y + box.height\r\n }\r\n\r\n // Move element to given x and y values\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n }\r\n\r\n // return array of all ancestors of given type up to the root svg\r\n parents (until = globals.document) {\r\n until = makeInstance(until)\r\n let parents = new List()\r\n let parent = this\r\n\r\n while (\r\n (parent = parent.parent())\r\n && parent.node !== until.node\r\n && parent.node !== globals.document\r\n ) {\r\n parents.push(parent)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Get referenced element form attribute value\r\n reference (attr) {\r\n attr = this.attr(attr)\r\n if (!attr) return null\r\n\r\n const m = attr.match(reference)\r\n return m ? makeInstance(m[1]) : null\r\n }\r\n\r\n // set given data to the elements data property\r\n setData (o) {\r\n this.dom = o\r\n return this\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVGNumber(p.width))\r\n .height(new SVGNumber(p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('width', width)\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if (Object.keys(this.dom).length) {\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n }\r\n\r\n return super.writeDataToDom()\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n return this.attr('y', y)\r\n }\r\n}\r\n\r\nextend(Element, {\r\n bbox, rbox, point, ctm, screenCTM\r\n})\r\n\r\nregister(Element)\r\n","import { on, off } from '../core/event.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Color from '../../types/Color.js'\r\nimport Element from '../../elements/Element.js'\r\nimport Matrix from '../../types/Matrix.js'\r\nimport Point from '../../types/Point.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: [ 'color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset' ],\r\n fill: [ 'color', 'opacity', 'rule' ],\r\n prefix: function (t, a) {\r\n return a === 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;[ 'fill', 'stroke' ].forEach(function (m) {\r\n var extension = {}\r\n var i\r\n\r\n extension[m] = function (o) {\r\n if (typeof o === 'undefined') {\r\n return this.attr(m)\r\n }\r\n if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || (o instanceof Element)) {\r\n this.attr(m, o)\r\n } else {\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--) {\r\n if (o[sugar[m][i]] != null) {\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n }\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n registerMethods([ 'Shape', 'Runner' ], extension)\r\n})\r\n\r\nregisterMethods([ 'Element', 'Runner' ], {\r\n // Let the user set the matrix directly\r\n matrix: function (mat, b, c, d, e, f) {\r\n // Act as a getter\r\n if (mat == null) {\r\n return new Matrix(this)\r\n }\r\n\r\n // Act as a setter, the user can pass a matrix or a set of numbers\r\n return this.attr('transform', new Matrix(mat, b, c, d, e, f))\r\n },\r\n\r\n // Map rotation to transform\r\n rotate: function (angle, cx, cy) {\r\n return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map skew to transform\r\n skew: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ skew: x, ox: y, oy: cx }, true)\r\n : this.transform({ skew: [ x, y ], ox: cx, oy: cy }, true)\r\n },\r\n\r\n shear: function (lam, cx, cy) {\r\n return this.transform({ shear: lam, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map scale to transform\r\n scale: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ scale: x, ox: y, oy: cx }, true)\r\n : this.transform({ scale: [ x, y ], ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map translate to transform\r\n translate: function (x, y) {\r\n return this.transform({ translate: [ x, y ] }, true)\r\n },\r\n\r\n // Map relative translations to transform\r\n relative: function (x, y) {\r\n return this.transform({ relative: [ x, y ] }, true)\r\n },\r\n\r\n // Map flip to transform\r\n flip: function (direction, around) {\r\n var directionString = typeof direction === 'string' ? direction\r\n : isFinite(direction) ? 'both'\r\n : 'both'\r\n var origin = (direction === 'both' && isFinite(around)) ? [ around, around ]\r\n : (direction === 'x') ? [ around, 0 ]\r\n : (direction === 'y') ? [ 0, around ]\r\n : isFinite(direction) ? [ direction, direction ]\r\n : [ 0, 0 ]\r\n this.transform({ flip: directionString, origin: origin }, true)\r\n },\r\n\r\n // Opacity\r\n opacity: function (value) {\r\n return this.attr('opacity', value)\r\n },\r\n\r\n // Relative move over x and y axes\r\n dmove: function (x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nregisterMethods('Element', {\r\n // Relative move over x axis\r\n dx: function (x) {\r\n return this.x(new SVGNumber(x).plus(this.x()))\r\n },\r\n\r\n // Relative move over y axis\r\n dy: function (y) {\r\n return this.y(new SVGNumber(y).plus(this.y()))\r\n }\r\n})\r\n\r\nregisterMethods('radius', {\r\n // Add x and y radius\r\n radius: function (x, y) {\r\n var type = (this._element || this).type\r\n return type === 'radialGradient' || type === 'radialGradient'\r\n ? this.attr('r', new SVGNumber(x))\r\n : this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nregisterMethods('Path', {\r\n // Get path length\r\n length: function () {\r\n return this.node.getTotalLength()\r\n },\r\n // Get point at length\r\n pointAt: function (length) {\r\n return new Point(this.node.getPointAtLength(length))\r\n }\r\n})\r\n\r\nregisterMethods([ 'Element', 'Runner' ], {\r\n // Set font\r\n font: function (a, v) {\r\n if (typeof a === 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a === 'leading'\r\n ? this.leading(v)\r\n : a === 'anchor'\r\n ? this.attr('text-anchor', v)\r\n : a === 'size' || a === 'family' || a === 'weight' || a === 'stretch' || a === 'variant' || a === 'style'\r\n ? this.attr('font-' + a, v)\r\n : this.attr(a, v)\r\n }\r\n})\r\n\r\nregisterMethods('Text', {\r\n ax (x) {\r\n return this.attr('x', x)\r\n },\r\n ay (y) {\r\n return this.attr('y', y)\r\n },\r\n amove (x, y) {\r\n return this.ax(x).ay(y)\r\n }\r\n})\r\n\r\n// Add events to elements\r\nconst methods = [ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].reduce(function (last, event) {\r\n // add event to Element\r\n const fn = function (f) {\r\n if (f === null) {\r\n off(this, event)\r\n } else {\r\n on(this, event, f)\r\n }\r\n return this\r\n }\r\n\r\n last[event] = fn\r\n return last\r\n}, {})\r\n\r\nregisterMethods('Element', methods)\r\n","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Radius x value\r\nexport function rx (rx) {\r\n return this.attr('rx', rx)\r\n}\r\n\r\n// Radius y value\r\nexport function ry (ry) {\r\n return this.attr('ry', ry)\r\n}\r\n\r\n// Move over x-axis\r\nexport function x (x) {\r\n return x == null\r\n ? this.cx() - this.rx()\r\n : this.cx(x + this.rx())\r\n}\r\n\r\n// Move over y-axis\r\nexport function y (y) {\r\n return y == null\r\n ? this.cy() - this.ry()\r\n : this.cy(y + this.ry())\r\n}\r\n\r\n// Move by center over x-axis\r\nexport function cx (x) {\r\n return x == null\r\n ? this.attr('cx')\r\n : this.attr('cx', x)\r\n}\r\n\r\n// Move by center over y-axis\r\nexport function cy (y) {\r\n return y == null\r\n ? this.attr('cy')\r\n : this.attr('cy', y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n return width == null\r\n ? this.rx() * 2\r\n : this.rx(new SVGNumber(width).divide(2))\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}\r\n","import { getOrigin } from '../../utils/utils.js'\r\nimport { delimiter, transforms } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Matrix from '../../types/Matrix.js'\r\n\r\n// Reset all transformations\r\nexport function untransform () {\r\n return this.attr('transform', null)\r\n}\r\n\r\n// merge the whole transformation chain into one matrix and returns it\r\nexport function matrixify () {\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(transforms).slice(0, -1).map(function (str) {\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [ kv[0],\r\n kv[1].split(delimiter)\r\n .map(function (str) {\r\n return parseFloat(str)\r\n })\r\n ]\r\n })\r\n .reverse()\r\n // merge every transformation into one matrix\r\n .reduce(function (matrix, transform) {\r\n if (transform[0] === 'matrix') {\r\n return matrix.lmultiply(Matrix.fromArray(transform[1]))\r\n }\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n }, new Matrix())\r\n\r\n return matrix\r\n}\r\n\r\n// add an element to another parent without changing the visual representation on the screen\r\nexport function toParent (parent) {\r\n if (this === parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n}\r\n\r\n// same as above with parent equals root-svg\r\nexport function toRoot () {\r\n return this.toParent(this.root())\r\n}\r\n\r\n// Add transformations\r\nexport function transform (o, relative) {\r\n // Act as a getter if no object was passed\r\n if (o == null || typeof o === 'string') {\r\n var decomposed = new Matrix(this).decompose()\r\n return decomposed[o] || decomposed\r\n }\r\n\r\n if (!Matrix.isMatrixLike(o)) {\r\n // Set the origin according to the defined transform\r\n o = { ...o, origin: getOrigin(o, this) }\r\n }\r\n\r\n // The user can pass a boolean, an Element or an Matrix or nothing\r\n var cleanRelative = relative === true ? this : (relative || false)\r\n var result = new Matrix(cleanRelative).transform(o)\r\n return this.attr('transform', result)\r\n}\r\n\r\nregisterMethods('Element', {\r\n untransform, matrixify, toParent, toRoot, transform\r\n})\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Shape extends Element {}\r\n\r\nregister(Shape)\r\n","import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\r\nimport {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Circle extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('circle', node), node)\r\n }\r\n\r\n radius (r) {\r\n return this.attr('r', r)\r\n }\r\n\r\n // Radius x value\r\n rx (rx) {\r\n return this.attr('r', rx)\r\n }\r\n\r\n // Alias radius x value\r\n ry (ry) {\r\n return this.rx(ry)\r\n }\r\n\r\n size (size) {\r\n return this.radius(new SVGNumber(size).divide(2))\r\n }\r\n}\r\n\r\nextend(Circle, { x, y, cx, cy, width, height })\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create circle element\r\n circle: wrapWithAttrCheck(function (size) {\r\n return this.put(new Circle())\r\n .size(size)\r\n .move(0, 0)\r\n })\r\n }\r\n})\r\n\r\nregister(Circle)\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Container extends Element {\r\n flatten (parent) {\r\n this.each(function () {\r\n if (this instanceof Container) return this.flatten(parent).ungroup(parent)\r\n return this.toParent(parent)\r\n })\r\n\r\n // we need this so that the root does not get removed\r\n this.node.firstElementChild || this.remove()\r\n\r\n return this\r\n }\r\n\r\n ungroup (parent) {\r\n parent = parent || this.parent()\r\n\r\n this.each(function () {\r\n return this.toParent(parent)\r\n })\r\n\r\n this.remove()\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Container)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Defs extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('defs', node), node)\r\n }\r\n\r\n flatten () {\r\n return this\r\n }\r\n ungroup () {\r\n return this\r\n }\r\n}\r\n\r\nregister(Defs)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport * as circled from '../modules/core/circled.js'\r\n\r\nexport default class Ellipse extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('ellipse', node), node)\r\n }\r\n\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVGNumber(p.width).divide(2))\r\n .ry(new SVGNumber(p.height).divide(2))\r\n }\r\n}\r\n\r\nextend(Ellipse, circled)\r\n\r\nregisterMethods('Container', {\r\n // Create an ellipse\r\n ellipse: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Ellipse()).size(width, height).move(0, 0)\r\n })\r\n})\r\n\r\nregister(Ellipse)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Stop extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('stop', node), node)\r\n }\r\n\r\n // add color stops\r\n update (o) {\r\n if (typeof o === 'number' || o instanceof SVGNumber) {\r\n o = {\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Stop)\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\nexport function from (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\r\n : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\r\n}\r\n\r\nexport function to (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\r\n : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport Stop from './Stop.js'\r\nimport baseFind from '../modules/core/selector.js'\r\nimport * as gradiented from '../modules/core/gradiented.js'\r\n\r\nexport default class Gradient extends Container {\r\n constructor (type, attrs) {\r\n super(\r\n nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\r\n attrs\r\n )\r\n }\r\n\r\n // Add a color stop\r\n stop (offset, color, opacity) {\r\n return this.put(new Stop()).update(offset, color, opacity)\r\n }\r\n\r\n // Update gradient\r\n update (block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'gradientTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nextend(Gradient, gradiented)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create gradient element in defs\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.defs().gradient(type, block)\r\n })\r\n },\r\n // define gradient\r\n Defs: {\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.put(new Gradient(type)).update(block)\r\n })\r\n }\r\n})\r\n\r\nregister(Gradient)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Pattern extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('pattern', node), node)\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Update pattern by rebuilding\r\n update (block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'patternTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create pattern element in defs\r\n pattern (...args) {\r\n return this.defs().pattern(...args)\r\n }\r\n },\r\n Defs: {\r\n pattern: wrapWithAttrCheck(function (width, height, block) {\r\n return this.put(new Pattern()).update(block).attr({\r\n x: 0,\r\n y: 0,\r\n width: width,\r\n height: height,\r\n patternUnits: 'userSpaceOnUse'\r\n })\r\n })\r\n }\r\n})\r\n\r\nregister(Pattern)\r\n","import { isImage } from '../modules/core/regex.js'\r\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { off, on } from '../modules/core/event.js'\r\nimport { registerAttrHook } from '../modules/core/attr.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Pattern from './Pattern.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Image extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('image', node), node)\r\n }\r\n\r\n // (re)load image\r\n load (url, callback) {\r\n if (!url) return this\r\n\r\n var img = new globals.window.Image()\r\n\r\n on(img, 'load', function (e) {\r\n var p = this.parent(Pattern)\r\n\r\n // ensure image size\r\n if (this.width() === 0 && this.height() === 0) {\r\n this.size(img.width, img.height)\r\n }\r\n\r\n if (p instanceof Pattern) {\r\n // ensure pattern size if not set\r\n if (p.width() === 0 && p.height() === 0) {\r\n p.size(this.width(), this.height())\r\n }\r\n }\r\n\r\n if (typeof callback === 'function') {\r\n callback.call(this, e)\r\n }\r\n }, this)\r\n\r\n on(img, 'load error', function () {\r\n // dont forget to unbind memory leaking events\r\n off(img)\r\n })\r\n\r\n return this.attr('href', (img.src = url), xlink)\r\n }\r\n}\r\n\r\nregisterAttrHook(function (attr, val, _this) {\r\n // convert image fill and stroke to patterns\r\n if (attr === 'fill' || attr === 'stroke') {\r\n if (isImage.test(val)) {\r\n val = _this.root().defs().image(val)\r\n }\r\n }\r\n\r\n if (val instanceof Image) {\r\n val = _this.root().defs().pattern(0, 0, (pattern) => {\r\n pattern.add(val)\r\n })\r\n }\r\n\r\n return val\r\n})\r\n\r\nregisterMethods({\r\n Container: {\r\n // create image element, load image and set its size\r\n image: wrapWithAttrCheck(function (source, callback) {\r\n return this.put(new Image()).size(0, 0).load(source, callback)\r\n })\r\n }\r\n})\r\n\r\nregister(Image)\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport SVGArray from './SVGArray.js'\r\n\r\nconst PointArray = subClassArray('PointArray', SVGArray)\r\n\r\nexport default PointArray\r\n\r\nextend(PointArray, {\r\n // Convert array to string\r\n toString () {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push(this[i].join(','))\r\n }\r\n\r\n return array.join(' ')\r\n },\r\n\r\n // Convert array to line object\r\n toLine () {\r\n return {\r\n x1: this[0][0],\r\n y1: this[0][1],\r\n x2: this[1][0],\r\n y2: this[1][1]\r\n }\r\n },\r\n\r\n // Get morphed array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push([\r\n this[i][0] + (this.destination[i][0] - this[i][0]) * pos,\r\n this[i][1] + (this.destination[i][1] - this[i][1]) * pos\r\n ])\r\n }\r\n\r\n return new PointArray(array)\r\n },\r\n\r\n // Parse point string and flat array\r\n parse (array = [ [ 0, 0 ] ]) {\r\n var points = []\r\n\r\n // if it is an array\r\n if (array instanceof Array) {\r\n // and it is not flat, there is no need to parse it\r\n if (array[0] instanceof Array) {\r\n return array\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for (var i = 0, len = array.length; i < len; i = i + 2) {\r\n points.push([ array[i], array[i + 1] ])\r\n }\r\n\r\n return points\r\n },\r\n\r\n // Move point string\r\n move (x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y)) {\r\n for (var i = this.length - 1; i >= 0; i--) {\r\n this[i] = [ this[i][0] + x, this[i][1] + y ]\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize poly string\r\n size (width, height) {\r\n var i\r\n var box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n if (box.width) this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\r\n if (box.height) this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get bounding box of points\r\n bbox () {\r\n var maxX = -Infinity\r\n var maxY = -Infinity\r\n var minX = Infinity\r\n var minY = Infinity\r\n this.forEach(function (el) {\r\n maxX = Math.max(el[0], maxX)\r\n maxY = Math.max(el[1], maxY)\r\n minX = Math.min(el[0], minX)\r\n minY = Math.min(el[1], minY)\r\n })\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\r\n }\r\n})\r\n","import PointArray from '../../types/PointArray.js'\r\n\r\nexport let MorphArray = PointArray\r\n\r\n// Move by left top corner over x-axis\r\nexport function x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n}\r\n\r\n// Move by left top corner over y-axis\r\nexport function y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n let b = this.bbox()\r\n return width == null ? b.width : this.size(width, b.height)\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n let b = this.bbox()\r\n return height == null ? b.height : this.size(b.width, height)\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\n\r\nexport default class Line extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('line', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return new PointArray([\r\n [ this.attr('x1'), this.attr('y1') ],\r\n [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n\r\n // Overwrite native plot() method\r\n plot (x1, y1, x2, y2) {\r\n if (x1 == null) {\r\n return this.array()\r\n } else if (typeof y1 !== 'undefined') {\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n } else {\r\n x1 = new PointArray(x1).toLine()\r\n }\r\n\r\n return this.attr(x1)\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n}\r\n\r\nextend(Line, pointed)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a line element\r\n line: wrapWithAttrCheck(function (...args) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a PointArray\r\n return Line.prototype.plot.apply(\r\n this.put(new Line())\r\n , args[0] != null ? args : [ 0, 0, 0, 0 ]\r\n )\r\n })\r\n }\r\n})\r\n\r\nregister(Line)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Marker extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('marker', node), node)\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n\r\n // Set marker refX and refY\r\n ref (x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n\r\n // Update marker\r\n update (block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n toString () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n marker (...args) {\r\n // Create marker element in defs\r\n return this.defs().marker(...args)\r\n }\r\n },\r\n Defs: {\r\n // Create marker\r\n marker: wrapWithAttrCheck(function (width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new Marker())\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n })\r\n },\r\n marker: {\r\n // Create and attach markers\r\n marker (marker, width, height, block) {\r\n var attr = [ 'marker' ]\r\n\r\n // Build attribute name\r\n if (marker !== 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof Marker\r\n ? arguments[1]\r\n : this.defs().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n }\r\n})\r\n\r\nregister(Marker)\r\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import { timeline } from '../modules/core/defaults.js'\r\nimport { extend } from '../utils/adopter.js'\r\n\r\n/***\r\nBase Class\r\n==========\r\nThe base stepper class that will be\r\n***/\r\n\r\nfunction makeSetterGetter (k, f) {\r\n return function (v) {\r\n if (v == null) return this[v]\r\n this[k] = v\r\n if (f) f.call(this)\r\n return this\r\n }\r\n}\r\n\r\nexport let easing = {\r\n '-': function (pos) {\r\n return pos\r\n },\r\n '<>': function (pos) {\r\n return -Math.cos(pos * Math.PI) / 2 + 0.5\r\n },\r\n '>': function (pos) {\r\n return Math.sin(pos * Math.PI / 2)\r\n },\r\n '<': function (pos) {\r\n return -Math.cos(pos * Math.PI / 2) + 1\r\n },\r\n bezier: function (x1, y1, x2, y2) {\r\n // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\r\n return function (t) {\r\n if (t < 0) {\r\n if (x1 > 0) {\r\n return y1 / x1 * t\r\n } else if (x2 > 0) {\r\n return y2 / x2 * t\r\n } else {\r\n return 0\r\n }\r\n } else if (t > 1) {\r\n if (x2 < 1) {\r\n return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2)\r\n } else if (x1 < 1) {\r\n return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1)\r\n } else {\r\n return 1\r\n }\r\n } else {\r\n return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\r\n }\r\n }\r\n },\r\n // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\r\n steps: function (steps, stepPosition = 'end') {\r\n // deal with \"jump-\" prefix\r\n stepPosition = stepPosition.split('-').reverse()[0]\r\n\r\n let jumps = steps\r\n if (stepPosition === 'none') {\r\n --jumps\r\n } else if (stepPosition === 'both') {\r\n ++jumps\r\n }\r\n\r\n // The beforeFlag is essentially useless\r\n return (t, beforeFlag = false) => {\r\n // Step is called currentStep in referenced url\r\n let step = Math.floor(t * steps)\r\n const jumping = (t * step) % 1 === 0\r\n\r\n if (stepPosition === 'start' || stepPosition === 'both') {\r\n ++step\r\n }\r\n\r\n if (beforeFlag && jumping) {\r\n --step\r\n }\r\n\r\n if (t >= 0 && step < 0) {\r\n step = 0\r\n }\r\n\r\n if (t <= 1 && step > jumps) {\r\n step = jumps\r\n }\r\n\r\n return step / jumps\r\n }\r\n }\r\n}\r\n\r\nexport class Stepper {\r\n done () {\r\n return false\r\n }\r\n}\r\n\r\n/***\r\nEasing Functions\r\n================\r\n***/\r\n\r\nexport class Ease extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.ease = easing[fn || timeline.ease] || fn\r\n }\r\n\r\n step (from, to, pos) {\r\n if (typeof from !== 'number') {\r\n return pos < 1 ? from : to\r\n }\r\n return from + (to - from) * this.ease(pos)\r\n }\r\n}\r\n\r\n/***\r\nController Types\r\n================\r\n***/\r\n\r\nexport class Controller extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.stepper = fn\r\n }\r\n\r\n step (current, target, dt, c) {\r\n return this.stepper(current, target, dt, c)\r\n }\r\n\r\n done (c) {\r\n return c.done\r\n }\r\n}\r\n\r\nfunction recalculate () {\r\n // Apply the default parameters\r\n var duration = (this._duration || 500) / 1000\r\n var overshoot = this._overshoot || 0\r\n\r\n // Calculate the PID natural response\r\n var eps = 1e-10\r\n var pi = Math.PI\r\n var os = Math.log(overshoot / 100 + eps)\r\n var zeta = -os / Math.sqrt(pi * pi + os * os)\r\n var wn = 3.9 / (zeta * duration)\r\n\r\n // Calculate the Spring values\r\n this.d = 2 * zeta * wn\r\n this.k = wn * wn\r\n}\r\n\r\nexport class Spring extends Controller {\r\n constructor (duration, overshoot) {\r\n super()\r\n this.duration(duration || 500)\r\n .overshoot(overshoot || 0)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n if (dt > 100) dt = 16\r\n\r\n dt /= 1000\r\n\r\n // Get the previous velocity\r\n var velocity = c.velocity || 0\r\n\r\n // Apply the control to get the new position and store it\r\n var acceleration = -this.d * velocity - this.k * (current - target)\r\n var newPosition = current\r\n + velocity * dt\r\n + acceleration * dt * dt / 2\r\n\r\n // Store the velocity\r\n c.velocity = velocity + acceleration * dt\r\n\r\n // Figure out if we have converged, and if so, pass the value\r\n c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\r\n return c.done ? target : newPosition\r\n }\r\n}\r\n\r\nextend(Spring, {\r\n duration: makeSetterGetter('_duration', recalculate),\r\n overshoot: makeSetterGetter('_overshoot', recalculate)\r\n})\r\n\r\nexport class PID extends Controller {\r\n constructor (p, i, d, windup) {\r\n super()\r\n\r\n p = p == null ? 0.1 : p\r\n i = i == null ? 0.01 : i\r\n d = d == null ? 0 : d\r\n windup = windup == null ? 1000 : windup\r\n this.p(p).i(i).d(d).windup(windup)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n var p = target - current\r\n var i = (c.integral || 0) + p * dt\r\n var d = (p - (c.error || 0)) / dt\r\n var windup = this.windup\r\n\r\n // antiwindup\r\n if (windup !== false) {\r\n i = Math.max(-windup, Math.min(i, windup))\r\n }\r\n\r\n c.error = p\r\n c.integral = i\r\n\r\n c.done = Math.abs(p) < 0.001\r\n\r\n return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\r\n }\r\n}\r\n\r\nextend(PID, {\r\n windup: makeSetterGetter('windup'),\r\n p: makeSetterGetter('P'),\r\n i: makeSetterGetter('I'),\r\n d: makeSetterGetter('D')\r\n})\r\n","import {\r\n delimiter,\r\n dots,\r\n hyphen,\r\n isPathLetter,\r\n numbersWithDots,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport Point from './Point.js'\r\nimport SVGArray from './SVGArray.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nconst PathArray = subClassArray('PathArray', SVGArray)\r\n\r\nexport default PathArray\r\n\r\nexport function pathRegReplace (a, b, c, d) {\r\n return c + d.replace(dots, ' .')\r\n}\r\n\r\nfunction arrayToString (a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\nconst pathHandlers = {\r\n M: function (c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return [ 'M', p.x, p.y ]\r\n },\r\n L: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return [ 'L', c[0], c[1] ]\r\n },\r\n H: function (c, p) {\r\n p.x = c[0]\r\n return [ 'H', c[0] ]\r\n },\r\n V: function (c, p) {\r\n p.y = c[0]\r\n return [ 'V', c[0] ]\r\n },\r\n C: function (c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return [ 'C', c[0], c[1], c[2], c[3], c[4], c[5] ]\r\n },\r\n S: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return [ 'S', c[0], c[1], c[2], c[3] ]\r\n },\r\n Q: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return [ 'Q', c[0], c[1], c[2], c[3] ]\r\n },\r\n T: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return [ 'T', c[0], c[1] ]\r\n },\r\n Z: function (c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return [ 'Z' ]\r\n },\r\n A: function (c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return [ 'A', c[0], c[1], c[2], c[3], c[4], c[5], c[6] ]\r\n }\r\n}\r\n\r\nlet mlhvqtcsaz = 'mlhvqtcsaz'.split('')\r\n\r\nfor (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\r\n pathHandlers[mlhvqtcsaz[i]] = (function (i) {\r\n return function (c, p, p0) {\r\n if (i === 'H') c[0] = c[0] + p.x\r\n else if (i === 'V') c[0] = c[0] + p.y\r\n else if (i === 'A') {\r\n c[5] = c[5] + p.x\r\n c[6] = c[6] + p.y\r\n } else {\r\n for (var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j % 2 ? p.y : p.x)\r\n }\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsaz[i].toUpperCase())\r\n}\r\n\r\nextend(PathArray, {\r\n // Convert array to string\r\n toString () {\r\n return arrayToString(this)\r\n },\r\n\r\n // Move path string\r\n move (x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n } else if (l === 'H') {\r\n this[i][1] += x\r\n } else if (l === 'V') {\r\n this[i][1] += y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n this[i][3] += x\r\n this[i][4] += y\r\n\r\n if (l === 'C') {\r\n this[i][5] += x\r\n this[i][6] += y\r\n }\r\n } else if (l === 'A') {\r\n this[i][6] += x\r\n this[i][7] += y\r\n }\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize path string\r\n size (width, height) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n var i, l\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n } else if (l === 'H') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n } else if (l === 'V') {\r\n this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\r\n this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l === 'C') {\r\n this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\r\n this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n } else if (l === 'A') {\r\n // resize radii\r\n this[i][1] = (this[i][1] * width) / box.width\r\n this[i][2] = (this[i][2] * height) / box.height\r\n\r\n // move position values\r\n this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\r\n this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Test if the passed path array use the same path data commands as this path array\r\n equalCommands (pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new PathArray(pathArray)\r\n\r\n equalCommands = this.length === pathArray.length\r\n for (i = 0, il = this.length; equalCommands && i < il; i++) {\r\n equalCommands = this[i][0] === pathArray[i][0]\r\n }\r\n\r\n return equalCommands\r\n },\r\n\r\n // Make path array morphable\r\n morph (pathArray) {\r\n pathArray = new PathArray(pathArray)\r\n\r\n if (this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get morphed path array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this\r\n var destinationArray = this.destination.value\r\n var array = []\r\n var pathArray = new PathArray()\r\n var i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [ sourceArray[i][0] ]\r\n for (j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if (array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] !== 0)\r\n array[i][5] = +(array[i][5] !== 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n },\r\n\r\n // Absolutize and parse path to array\r\n parse (array = [ [ 'M', 0, 0 ] ]) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof PathArray) return array\r\n\r\n // prepare for parsing\r\n var s\r\n var paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 }\r\n\r\n if (typeof array === 'string') {\r\n array = array\r\n .replace(numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(delimiter) // split into array\r\n } else {\r\n array = array.reduce(function (prev, curr) {\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var result = []\r\n var p = new Point()\r\n var p0 = new Point()\r\n var index = 0\r\n var len = array.length\r\n\r\n do {\r\n // Test if we have a path letter\r\n if (isPathLetter.test(array[index])) {\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n } else if (s === 'M') {\r\n s = 'L'\r\n } else if (s === 'm') {\r\n s = 'l'\r\n }\r\n\r\n result.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n } while (len > index)\r\n\r\n return result\r\n },\r\n\r\n // Get bounding box of path\r\n bbox () {\r\n parser().path.setAttribute('d', this.toString())\r\n return parser.nodes.path.getBBox()\r\n }\r\n})\r\n","import { Ease } from './Controller.js'\r\nimport {\r\n delimiter,\r\n numberAndUnit,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport Color from '../types/Color.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport SVGArray from '../types/SVGArray.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Morphable {\r\n constructor (stepper) {\r\n this._stepper = stepper || new Ease('-')\r\n\r\n this._from = null\r\n this._to = null\r\n this._type = null\r\n this._context = null\r\n this._morphObj = null\r\n }\r\n\r\n from (val) {\r\n if (val == null) {\r\n return this._from\r\n }\r\n\r\n this._from = this._set(val)\r\n return this\r\n }\r\n\r\n to (val) {\r\n if (val == null) {\r\n return this._to\r\n }\r\n\r\n this._to = this._set(val)\r\n return this\r\n }\r\n\r\n type (type) {\r\n // getter\r\n if (type == null) {\r\n return this._type\r\n }\r\n\r\n // setter\r\n this._type = type\r\n return this\r\n }\r\n\r\n _set (value) {\r\n if (!this._type) {\r\n var type = typeof value\r\n\r\n if (type === 'number') {\r\n this.type(SVGNumber)\r\n } else if (type === 'string') {\r\n if (Color.isColor(value)) {\r\n this.type(Color)\r\n } else if (delimiter.test(value)) {\r\n this.type(pathLetters.test(value)\r\n ? PathArray\r\n : SVGArray\r\n )\r\n } else if (numberAndUnit.test(value)) {\r\n this.type(SVGNumber)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n } else if (morphableTypes.indexOf(value.constructor) > -1) {\r\n this.type(value.constructor)\r\n } else if (Array.isArray(value)) {\r\n this.type(SVGArray)\r\n } else if (type === 'object') {\r\n this.type(ObjectBag)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n }\r\n\r\n var result = (new this._type(value))\r\n if (this._type === Color) {\r\n result = this._to ? result[this._to[4]]()\r\n : this._from ? result[this._from[4]]()\r\n : result\r\n }\r\n result = result.toArray()\r\n\r\n this._morphObj = this._morphObj || new this._type()\r\n this._context = this._context\r\n || Array.apply(null, Array(result.length)).map(Object)\r\n return result\r\n }\r\n\r\n stepper (stepper) {\r\n if (stepper == null) return this._stepper\r\n this._stepper = stepper\r\n return this\r\n }\r\n\r\n done () {\r\n var complete = this._context\r\n .map(this._stepper.done)\r\n .reduce(function (last, curr) {\r\n return last && curr\r\n }, true)\r\n return complete\r\n }\r\n\r\n at (pos) {\r\n var _this = this\r\n\r\n return this._morphObj.fromArray(\r\n this._from.map(function (i, index) {\r\n return _this._stepper.step(i, _this._to[index], pos, _this._context[index], _this._context)\r\n })\r\n )\r\n }\r\n}\r\n\r\nexport class NonMorphable {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (val) {\r\n val = Array.isArray(val) ? val[0] : val\r\n this.value = val\r\n return this\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n toArray () {\r\n return [ this.value ]\r\n }\r\n}\r\n\r\nexport class TransformBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (obj) {\r\n if (Array.isArray(obj)) {\r\n obj = {\r\n scaleX: obj[0],\r\n scaleY: obj[1],\r\n shear: obj[2],\r\n rotate: obj[3],\r\n translateX: obj[4],\r\n translateY: obj[5],\r\n originX: obj[6],\r\n originY: obj[7]\r\n }\r\n }\r\n\r\n Object.assign(this, TransformBag.defaults, obj)\r\n return this\r\n }\r\n\r\n toArray () {\r\n var v = this\r\n\r\n return [\r\n v.scaleX,\r\n v.scaleY,\r\n v.shear,\r\n v.rotate,\r\n v.translateX,\r\n v.translateY,\r\n v.originX,\r\n v.originY\r\n ]\r\n }\r\n}\r\n\r\nTransformBag.defaults = {\r\n scaleX: 1,\r\n scaleY: 1,\r\n shear: 0,\r\n rotate: 0,\r\n translateX: 0,\r\n translateY: 0,\r\n originX: 0,\r\n originY: 0\r\n}\r\n\r\nexport class ObjectBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (objOrArr) {\r\n this.values = []\r\n\r\n if (Array.isArray(objOrArr)) {\r\n this.values = objOrArr\r\n return\r\n }\r\n\r\n objOrArr = objOrArr || {}\r\n var entries = []\r\n\r\n for (let i in objOrArr) {\r\n entries.push([i, objOrArr[i]])\r\n }\r\n\r\n entries.sort((a, b) => {\r\n return a[0] - b[0]\r\n })\r\n\r\n this.values = entries.reduce((last, curr) => last.concat(curr), [])\r\n return this\r\n }\r\n\r\n valueOf () {\r\n var obj = {}\r\n var arr = this.values\r\n\r\n for (var i = 0, len = arr.length; i < len; i += 2) {\r\n obj[arr[i]] = arr[i + 1]\r\n }\r\n\r\n return obj\r\n }\r\n\r\n toArray () {\r\n return this.values\r\n }\r\n}\r\n\r\nconst morphableTypes = [\r\n NonMorphable,\r\n TransformBag,\r\n ObjectBag\r\n]\r\n\r\nexport function registerMorphableType (type = []) {\r\n morphableTypes.push(...[].concat(type))\r\n}\r\n\r\nexport function makeMorphable () {\r\n extend(morphableTypes, {\r\n to (val) {\r\n return new Morphable()\r\n .type(this.constructor)\r\n .from(this.valueOf())\r\n .to(val)\r\n },\r\n fromArray (arr) {\r\n this.init(arr)\r\n return this\r\n }\r\n })\r\n}\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Shape from './Shape.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Path extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('path', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return this._array || (this._array = new PathArray(this.attr('d')))\r\n }\r\n\r\n // Plot new path\r\n plot (d) {\r\n return (d == null) ? this.array()\r\n : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new PathArray(d)))\r\n }\r\n\r\n // Clear array cache\r\n clear () {\r\n delete this._array\r\n return this\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n\r\n // Move by left top corner over x-axis\r\n x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n\r\n // Move by left top corner over y-axis\r\n y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg textpath [href*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\n// Define morphable array\r\nPath.prototype.MorphArray = PathArray\r\n\r\n// Add parent method\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped path element\r\n path: wrapWithAttrCheck(function (d) {\r\n // make sure plot is called as a setter\r\n return this.put(new Path()).plot(d || new PathArray())\r\n })\r\n }\r\n})\r\n\r\nregister(Path)\r\n","import { proportionalSize } from '../../utils/utils.js'\r\nimport PointArray from '../../types/PointArray.js'\r\n\r\n// Get array\r\nexport function array () {\r\n return this._array || (this._array = new PointArray(this.attr('points')))\r\n}\r\n\r\n// Plot new path\r\nexport function plot (p) {\r\n return (p == null) ? this.array()\r\n : this.clear().attr('points', typeof p === 'string' ? p\r\n : (this._array = new PointArray(p)))\r\n}\r\n\r\n// Clear array cache\r\nexport function clear () {\r\n delete this._array\r\n return this\r\n}\r\n\r\n// Move by left top corner\r\nexport function move (x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n}\r\n\r\n// Set element size to given width and height\r\nexport function size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polygon extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polygon', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polygon: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polygon()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polygon, pointed)\r\nextend(Polygon, poly)\r\nregister(Polygon)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polyline extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polyline', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polyline: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polyline()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polyline, pointed)\r\nextend(Polyline, poly)\r\nregister(Polyline)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Rect extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('rect', node), node)\r\n }\r\n}\r\n\r\nextend(Rect, { rx, ry })\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a rect element\r\n rect: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Rect()).size(width, height)\r\n })\r\n }\r\n})\r\n\r\nregister(Rect)\r\n","export default class Queue {\r\n constructor () {\r\n this._first = null\r\n this._last = null\r\n }\r\n\r\n push (value) {\r\n // An item stores an id and the provided value\r\n var item = value.next ? value : { value: value, next: null, prev: null }\r\n\r\n // Deal with the queue being empty or populated\r\n if (this._last) {\r\n item.prev = this._last\r\n this._last.next = item\r\n this._last = item\r\n } else {\r\n this._last = item\r\n this._first = item\r\n }\r\n\r\n // Update the length and return the current item\r\n return item\r\n }\r\n\r\n shift () {\r\n // Check if we have a value\r\n var remove = this._first\r\n if (!remove) return null\r\n\r\n // If we do, remove it and relink things\r\n this._first = remove.next\r\n if (this._first) this._first.prev = null\r\n this._last = this._first ? this._last : null\r\n return remove.value\r\n }\r\n\r\n // Shows us the first item in the list\r\n first () {\r\n return this._first && this._first.value\r\n }\r\n\r\n // Shows us the last item in the list\r\n last () {\r\n return this._last && this._last.value\r\n }\r\n\r\n // Removes the item that was returned from the push\r\n remove (item) {\r\n // Relink the previous item\r\n if (item.prev) item.prev.next = item.next\r\n if (item.next) item.next.prev = item.prev\r\n if (item === this._last) this._last = item.prev\r\n if (item === this._first) this._first = item.next\r\n\r\n // Invalidate item\r\n item.prev = null\r\n item.next = null\r\n }\r\n}\r\n","import { globals } from '../utils/window.js'\r\nimport Queue from './Queue.js'\r\n\r\nconst Animator = {\r\n nextDraw: null,\r\n frames: new Queue(),\r\n timeouts: new Queue(),\r\n timer: () => globals.window.performance || globals.window.Date,\r\n transforms: [],\r\n\r\n frame (fn) {\r\n // Store the node\r\n var node = Animator.frames.push({ run: fn })\r\n\r\n // Request an animation frame if we don't have one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n // Return the node so we can remove it easily\r\n return node\r\n },\r\n\r\n transform_frame (fn, id) {\r\n Animator.transforms[id] = fn\r\n },\r\n\r\n timeout (fn, delay) {\r\n delay = delay || 0\r\n\r\n // Work out when the event should fire\r\n var time = Animator.timer().now() + delay\r\n\r\n // Add the timeout to the end of the queue\r\n var node = Animator.timeouts.push({ run: fn, time: time })\r\n\r\n // Request another animation frame if we need one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n return node\r\n },\r\n\r\n cancelFrame (node) {\r\n node != null && Animator.frames.remove(node)\r\n },\r\n\r\n clearTimeout (node) {\r\n node != null && Animator.timeouts.remove(node)\r\n },\r\n\r\n _draw (now) {\r\n // Run all the timeouts we can run, if they are not ready yet, add them\r\n // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\r\n var nextTimeout = null\r\n var lastTimeout = Animator.timeouts.last()\r\n while ((nextTimeout = Animator.timeouts.shift())) {\r\n // Run the timeout if its time, or push it to the end\r\n if (now >= nextTimeout.time) {\r\n nextTimeout.run()\r\n } else {\r\n Animator.timeouts.push(nextTimeout)\r\n }\r\n\r\n // If we hit the last item, we should stop shifting out more items\r\n if (nextTimeout === lastTimeout) break\r\n }\r\n\r\n // Run all of the animation frames\r\n var nextFrame = null\r\n var lastFrame = Animator.frames.last()\r\n while ((nextFrame !== lastFrame) && (nextFrame = Animator.frames.shift())) {\r\n nextFrame.run()\r\n }\r\n\r\n Animator.transforms.forEach(function (el) {\r\n el()\r\n })\r\n\r\n // If we have remaining timeouts or frames, draw until we don't anymore\r\n Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()\r\n ? globals.window.requestAnimationFrame(Animator._draw)\r\n : null\r\n }\r\n}\r\n\r\nexport default Animator\r\n","import { globals } from '../utils/window.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Animator from './Animator.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\n\r\nvar makeSchedule = function (runnerInfo) {\r\n var start = runnerInfo.start\r\n var duration = runnerInfo.runner.duration()\r\n var end = start + duration\r\n return { start: start, duration: duration, end: end, runner: runnerInfo.runner }\r\n}\r\n\r\nconst defaultSource = function () {\r\n let w = globals.window\r\n return (w.performance || w.Date).now()\r\n}\r\n\r\nexport default class Timeline extends EventTarget {\r\n // Construct a new timeline on the given element\r\n constructor (timeSource = defaultSource) {\r\n super()\r\n\r\n this._timeSource = timeSource\r\n\r\n // Store the timing variables\r\n this._startTime = 0\r\n this._speed = 1.0\r\n\r\n // Determines how long a runner is hold in memory. Can be a dt or true/false\r\n this._persist = 0\r\n\r\n // Keep track of the running animations and their starting parameters\r\n this._nextFrame = null\r\n this._paused = true\r\n this._runners = []\r\n this._order = []\r\n this._time = 0\r\n this._lastSourceTime = 0\r\n this._lastStepTime = 0\r\n\r\n // Make sure that step is always called in class context\r\n this._step = this._step.bind(this)\r\n }\r\n\r\n // schedules a runner on the timeline\r\n schedule (runner, delay, when) {\r\n if (runner == null) {\r\n return this._runners.map(makeSchedule).sort(function (a, b) {\r\n return a.runner.id - b.runner.id\r\n })\r\n }\r\n\r\n // The start time for the next animation can either be given explicitly,\r\n // derived from the current timeline time or it can be relative to the\r\n // last start time to chain animations direclty\r\n\r\n var absoluteStartTime = 0\r\n var endTime = this.getEndTime()\r\n delay = delay || 0\r\n\r\n // Work out when to start the animation\r\n if (when == null || when === 'last' || when === 'after') {\r\n // Take the last time and increment\r\n absoluteStartTime = endTime\r\n } else if (when === 'absolute' || when === 'start') {\r\n absoluteStartTime = delay\r\n delay = 0\r\n } else if (when === 'now') {\r\n absoluteStartTime = this._time\r\n } else if (when === 'relative') {\r\n let runnerInfo = this._runners[runner.id]\r\n if (runnerInfo) {\r\n absoluteStartTime = runnerInfo.start + delay\r\n delay = 0\r\n }\r\n } else {\r\n throw new Error('Invalid value for the \"when\" parameter')\r\n }\r\n\r\n // Manage runner\r\n runner.unschedule()\r\n runner.timeline(this)\r\n // runner.time(-delay)\r\n\r\n // Save runnerInfo\r\n this._runners[runner.id] = {\r\n persist: this.persist(),\r\n runner: runner,\r\n start: absoluteStartTime + delay\r\n }\r\n\r\n // Save order, update Time if needed and continue\r\n this._order.push(runner.id)\r\n this.updateTime()._continue()\r\n return this\r\n }\r\n\r\n // Remove the runner from this timeline\r\n unschedule (runner) {\r\n var index = this._order.indexOf(runner.id)\r\n if (index < 0) return this\r\n\r\n delete this._runners[runner.id]\r\n this._order.splice(index, 1)\r\n runner.timeline(null)\r\n return this\r\n }\r\n\r\n // Calculates the end of the timeline\r\n getEndTime () {\r\n var lastRunnerInfo = this._runners[this._order[this._order.length - 1]]\r\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\r\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0\r\n return lastStartTime + lastDuration\r\n }\r\n\r\n // Makes sure, that after pausing the time doesn't jump\r\n updateTime () {\r\n if (!this.active()) {\r\n this._lastSourceTime = this._timeSource()\r\n }\r\n return this\r\n }\r\n\r\n play () {\r\n // Now make sure we are not paused and continue the animation\r\n this._paused = false\r\n return this.updateTime()._continue()\r\n }\r\n\r\n pause () {\r\n this._paused = true\r\n return this._continue()\r\n }\r\n\r\n stop () {\r\n // Go to start and pause\r\n this.time(0)\r\n return this.pause()\r\n }\r\n\r\n finish () {\r\n // Go to end and pause\r\n this.time(this.getEndTime() + 1)\r\n return this.pause()\r\n }\r\n\r\n speed (speed) {\r\n if (speed == null) return this._speed\r\n this._speed = speed\r\n return this\r\n }\r\n\r\n reverse (yes) {\r\n var currentSpeed = this.speed()\r\n if (yes == null) return this.speed(-currentSpeed)\r\n\r\n var positive = Math.abs(currentSpeed)\r\n return this.speed(yes ? positive : -positive)\r\n }\r\n\r\n seek (dt) {\r\n return this.time(this._time + dt)\r\n }\r\n\r\n time (time) {\r\n if (time == null) return this._time\r\n this._time = time\r\n return this._continue(true)\r\n }\r\n\r\n persist (dtOrForever) {\r\n if (dtOrForever == null) return this._persist\r\n this._persist = dtOrForever\r\n return this\r\n }\r\n\r\n source (fn) {\r\n if (fn == null) return this._timeSource\r\n this._timeSource = fn\r\n return this\r\n }\r\n\r\n _step (immediateStep = false) {\r\n // Get the time delta from the last time and update the time\r\n var time = this._timeSource()\r\n var dtSource = time - this._lastSourceTime\r\n\r\n if (immediateStep) dtSource = 0\r\n\r\n var dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\r\n this._lastSourceTime = time\r\n\r\n // Only update the time if we use the timeSource.\r\n // Otherwise use the current time\r\n if (!immediateStep) {\r\n // Update the time\r\n this._time += dtTime\r\n this._time = this._time < 0 ? 0 : this._time\r\n }\r\n this._lastStepTime = this._time\r\n this.fire('time', this._time)\r\n\r\n // Run all of the runners directly\r\n var runnersLeft = false\r\n for (var i = 0, len = this._order.length; i < len; i++) {\r\n // Get and run the current runner and ignore it if its inactive\r\n var runnerInfo = this._runners[this._order[i]]\r\n var runner = runnerInfo.runner\r\n let dt = dtTime\r\n\r\n // Make sure that we give the actual difference\r\n // between runner start time and now\r\n let dtToStart = this._time - runnerInfo.start\r\n\r\n // Dont run runner if not started yet\r\n if (dtToStart <= 0) {\r\n runnersLeft = true\r\n\r\n // This is for the case that teh timeline was seeked so that the time\r\n // is now before the startTime of the runner. Thats why we need to set\r\n // the runner to position 0\r\n runner.reset()\r\n continue\r\n } else if (dtToStart < dt) {\r\n // Adjust dt to make sure that animation is on point\r\n dt = dtToStart\r\n }\r\n\r\n if (!runner.active()) continue\r\n\r\n // If this runner is still going, signal that we need another animation\r\n // frame, otherwise, remove the completed runner\r\n var finished = runner.step(dt).done\r\n if (!finished) {\r\n runnersLeft = true\r\n // continue\r\n } else if (runnerInfo.persist !== true) {\r\n // runner is finished. And runner might get removed\r\n\r\n var endTime = runner.duration() - runner.time() + this._time\r\n\r\n if (endTime + this._persist < this._time) {\r\n // Delete runner and correct index\r\n delete this._runners[this._order[i]]\r\n this._order.splice(i--, 1) && --len\r\n runner.timeline(null)\r\n }\r\n }\r\n }\r\n\r\n // Basically: we continue when there are runners right from us in time\r\n // when -->, and when runners are left from us when <--\r\n if ((runnersLeft && !(this._speed < 0 && this._time === 0)) || (this._order.length && this._speed < 0 && this._time > 0)) {\r\n this._continue()\r\n } else {\r\n this.fire('finished')\r\n this.pause()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Checks if we are running and continues the animation\r\n _continue (immediateStep = false) {\r\n Animator.cancelFrame(this._nextFrame)\r\n this._nextFrame = null\r\n\r\n if (immediateStep) return this._step(true)\r\n if (this._paused) return this\r\n\r\n this._nextFrame = Animator.frame(this._step)\r\n return this\r\n }\r\n\r\n active () {\r\n return !!this._nextFrame\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n timeline: function () {\r\n this._timeline = (this._timeline || new Timeline())\r\n return this._timeline\r\n }\r\n }\r\n})\r\n","import { Controller, Ease, Stepper } from './Controller.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { from, to } from '../modules/core/gradiented.js'\r\nimport { getOrigin } from '../utils/utils.js'\r\nimport { noop, timeline } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Animator from './Animator.js'\r\nimport Box from '../types/Box.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport Matrix from '../types/Matrix.js'\r\nimport Morphable, { TransformBag } from './Morphable.js'\r\nimport Point from '../types/Point.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Timeline from './Timeline.js'\r\n\r\nexport default class Runner extends EventTarget {\r\n constructor (options) {\r\n super()\r\n\r\n // Store a unique id on the runner, so that we can identify it later\r\n this.id = Runner.id++\r\n\r\n // Ensure a default value\r\n options = options == null\r\n ? timeline.duration\r\n : options\r\n\r\n // Ensure that we get a controller\r\n options = typeof options === 'function'\r\n ? new Controller(options)\r\n : options\r\n\r\n // Declare all of the variables\r\n this._element = null\r\n this._timeline = null\r\n this.done = false\r\n this._queue = []\r\n\r\n // Work out the stepper and the duration\r\n this._duration = typeof options === 'number' && options\r\n this._isDeclarative = options instanceof Controller\r\n this._stepper = this._isDeclarative ? options : new Ease()\r\n\r\n // We copy the current values from the timeline because they can change\r\n this._history = {}\r\n\r\n // Store the state of the runner\r\n this.enabled = true\r\n this._time = 0\r\n this._lastTime = 0\r\n\r\n // At creation, the runner is in reseted state\r\n this._reseted = true\r\n\r\n // Save transforms applied to this runner\r\n this.transforms = new Matrix()\r\n this.transformId = 1\r\n\r\n // Looping variables\r\n this._haveReversed = false\r\n this._reverse = false\r\n this._loopsDone = 0\r\n this._swing = false\r\n this._wait = 0\r\n this._times = 1\r\n }\r\n\r\n /*\r\n Runner Definitions\r\n ==================\r\n These methods help us define the runtime behaviour of the Runner or they\r\n help us make new runners from the current runner\r\n */\r\n\r\n element (element) {\r\n if (element == null) return this._element\r\n this._element = element\r\n element._prepareRunner()\r\n return this\r\n }\r\n\r\n timeline (timeline) {\r\n // check explicitly for undefined so we can set the timeline to null\r\n if (typeof timeline === 'undefined') return this._timeline\r\n this._timeline = timeline\r\n return this\r\n }\r\n\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var runner = new Runner(o.duration)\r\n if (this._timeline) runner.timeline(this._timeline)\r\n if (this._element) runner.element(this._element)\r\n return runner.loop(o).schedule(delay, when)\r\n }\r\n\r\n schedule (timeline, delay, when) {\r\n // The user doesn't need to pass a timeline if we already have one\r\n if (!(timeline instanceof Timeline)) {\r\n when = delay\r\n delay = timeline\r\n timeline = this.timeline()\r\n }\r\n\r\n // If there is no timeline, yell at the user...\r\n if (!timeline) {\r\n throw Error('Runner cannot be scheduled without timeline')\r\n }\r\n\r\n // Schedule the runner on the timeline provided\r\n timeline.schedule(this, delay, when)\r\n return this\r\n }\r\n\r\n unschedule () {\r\n var timeline = this.timeline()\r\n timeline && timeline.unschedule(this)\r\n return this\r\n }\r\n\r\n loop (times, swing, wait) {\r\n // Deal with the user passing in an object\r\n if (typeof times === 'object') {\r\n swing = times.swing\r\n wait = times.wait\r\n times = times.times\r\n }\r\n\r\n // Sanitise the values and store them\r\n this._times = times || Infinity\r\n this._swing = swing || false\r\n this._wait = wait || 0\r\n return this\r\n }\r\n\r\n delay (delay) {\r\n return this.animate(0, delay)\r\n }\r\n\r\n /*\r\n Basic Functionality\r\n ===================\r\n These methods allow us to attach basic functions to the runner directly\r\n */\r\n\r\n queue (initFn, runFn, retargetFn, isTransform) {\r\n this._queue.push({\r\n initialiser: initFn || noop,\r\n runner: runFn || noop,\r\n retarget: retargetFn,\r\n isTransform: isTransform,\r\n initialised: false,\r\n finished: false\r\n })\r\n var timeline = this.timeline()\r\n timeline && this.timeline()._continue()\r\n return this\r\n }\r\n\r\n during (fn) {\r\n return this.queue(null, fn)\r\n }\r\n\r\n after (fn) {\r\n return this.on('finish', fn)\r\n }\r\n\r\n /*\r\n Runner animation methods\r\n ========================\r\n Control how the animation plays\r\n */\r\n\r\n time (time) {\r\n if (time == null) {\r\n return this._time\r\n }\r\n let dt = time - this._time\r\n this.step(dt)\r\n return this\r\n }\r\n\r\n duration () {\r\n return this._times * (this._wait + this._duration) - this._wait\r\n }\r\n\r\n loops (p) {\r\n var loopDuration = this._duration + this._wait\r\n if (p == null) {\r\n var loopsDone = Math.floor(this._time / loopDuration)\r\n var relativeTime = (this._time - loopsDone * loopDuration)\r\n var position = relativeTime / this._duration\r\n return Math.min(loopsDone + position, this._times)\r\n }\r\n var whole = Math.floor(p)\r\n var partial = p % 1\r\n var time = loopDuration * whole + this._duration * partial\r\n return this.time(time)\r\n }\r\n\r\n position (p) {\r\n // Get all of the variables we need\r\n var x = this._time\r\n var d = this._duration\r\n var w = this._wait\r\n var t = this._times\r\n var s = this._swing\r\n var r = this._reverse\r\n var position\r\n\r\n if (p == null) {\r\n /*\r\n This function converts a time to a position in the range [0, 1]\r\n The full explanation can be found in this desmos demonstration\r\n https://www.desmos.com/calculator/u4fbavgche\r\n The logic is slightly simplified here because we can use booleans\r\n */\r\n\r\n // Figure out the value without thinking about the start or end time\r\n const f = function (x) {\r\n var swinging = s * Math.floor(x % (2 * (w + d)) / (w + d))\r\n var backwards = (swinging && !r) || (!swinging && r)\r\n var uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards\r\n var clipped = Math.max(Math.min(uncliped, 1), 0)\r\n return clipped\r\n }\r\n\r\n // Figure out the value by incorporating the start time\r\n var endTime = t * (w + d) - w\r\n position = x <= 0 ? Math.round(f(1e-5))\r\n : x < endTime ? f(x)\r\n : Math.round(f(endTime - 1e-5))\r\n return position\r\n }\r\n\r\n // Work out the loops done and add the position to the loops done\r\n var loopsDone = Math.floor(this.loops())\r\n var swingForward = s && (loopsDone % 2 === 0)\r\n var forwards = (swingForward && !r) || (r && swingForward)\r\n position = loopsDone + (forwards ? p : 1 - p)\r\n return this.loops(position)\r\n }\r\n\r\n progress (p) {\r\n if (p == null) {\r\n return Math.min(1, this._time / this.duration())\r\n }\r\n return this.time(p * this.duration())\r\n }\r\n\r\n step (dt) {\r\n // If we are inactive, this stepper just gets skipped\r\n if (!this.enabled) return this\r\n\r\n // Update the time and get the new position\r\n dt = dt == null ? 16 : dt\r\n this._time += dt\r\n var position = this.position()\r\n\r\n // Figure out if we need to run the stepper in this frame\r\n var running = this._lastPosition !== position && this._time >= 0\r\n this._lastPosition = position\r\n\r\n // Figure out if we just started\r\n var duration = this.duration()\r\n var justStarted = this._lastTime <= 0 && this._time > 0\r\n var justFinished = this._lastTime < this._time && this.time > duration\r\n this._lastTime = this._time\r\n if (justStarted) {\r\n this.fire('start', this)\r\n }\r\n\r\n // Work out if the runner is finished set the done flag here so animations\r\n // know, that they are running in the last step (this is good for\r\n // transformations which can be merged)\r\n var declarative = this._isDeclarative\r\n this.done = !declarative && !justFinished && this._time >= duration\r\n\r\n // Runner is running. So its not in reseted state anymore\r\n this._reseted = false\r\n\r\n // Call initialise and the run function\r\n if (running || declarative) {\r\n this._initialise(running)\r\n\r\n // clear the transforms on this runner so they dont get added again and again\r\n this.transforms = new Matrix()\r\n var converged = this._run(declarative ? dt : position)\r\n\r\n this.fire('step', this)\r\n }\r\n // correct the done flag here\r\n // declaritive animations itself know when they converged\r\n this.done = this.done || (converged && declarative)\r\n if (this.done) {\r\n this.fire('finish', this)\r\n }\r\n return this\r\n }\r\n\r\n reset () {\r\n if (this._reseted) return this\r\n this.loops(0)\r\n this._reseted = true\r\n return this\r\n }\r\n\r\n finish () {\r\n return this.step(Infinity)\r\n }\r\n\r\n reverse (reverse) {\r\n this._reverse = reverse == null ? !this._reverse : reverse\r\n return this\r\n }\r\n\r\n ease (fn) {\r\n this._stepper = new Ease(fn)\r\n return this\r\n }\r\n\r\n active (enabled) {\r\n if (enabled == null) return this.enabled\r\n this.enabled = enabled\r\n return this\r\n }\r\n\r\n /*\r\n Private Methods\r\n ===============\r\n Methods that shouldn't be used externally\r\n */\r\n\r\n // Save a morpher to the morpher list so that we can retarget it later\r\n _rememberMorpher (method, morpher) {\r\n this._history[method] = {\r\n morpher: morpher,\r\n caller: this._queue[this._queue.length - 1]\r\n }\r\n }\r\n\r\n // Try to set the target for a morpher if the morpher exists, otherwise\r\n // do nothing and return false\r\n _tryRetarget (method, target) {\r\n if (this._history[method]) {\r\n // if the last method wasnt even initialised, throw it away\r\n if (!this._history[method].caller.initialised) {\r\n let index = this._queue.indexOf(this._history[method].caller)\r\n this._queue.splice(index, 1)\r\n return false\r\n }\r\n\r\n // for the case of transformations, we use the special retarget function\r\n // which has access to the outer scope\r\n if (this._history[method].caller.retarget) {\r\n this._history[method].caller.retarget(target)\r\n // for everything else a simple morpher change is sufficient\r\n } else {\r\n this._history[method].morpher.to(target)\r\n }\r\n\r\n this._history[method].caller.finished = false\r\n var timeline = this.timeline()\r\n timeline && timeline._continue()\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n // Run each initialise function in the runner if required\r\n _initialise (running) {\r\n // If we aren't running, we shouldn't initialise when not declarative\r\n if (!running && !this._isDeclarative) return\r\n\r\n // Loop through all of the initialisers\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current initialiser\r\n var current = this._queue[i]\r\n\r\n // Determine whether we need to initialise\r\n var needsIt = this._isDeclarative || (!current.initialised && running)\r\n running = !current.finished\r\n\r\n // Call the initialiser if we need to\r\n if (needsIt && running) {\r\n current.initialiser.call(this)\r\n current.initialised = true\r\n }\r\n }\r\n }\r\n\r\n // Run each run function for the position or dt given\r\n _run (positionOrDt) {\r\n // Run all of the _queue directly\r\n var allfinished = true\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current function to run\r\n var current = this._queue[i]\r\n\r\n // Run the function if its not finished, we keep track of the finished\r\n // flag for the sake of declarative _queue\r\n var converged = current.runner.call(this, positionOrDt)\r\n current.finished = current.finished || (converged === true)\r\n allfinished = allfinished && current.finished\r\n }\r\n\r\n // We report when all of the constructors are finished\r\n return allfinished\r\n }\r\n\r\n addTransform (transform, index) {\r\n this.transforms.lmultiplyO(transform)\r\n return this\r\n }\r\n\r\n clearTransform () {\r\n this.transforms = new Matrix()\r\n return this\r\n }\r\n\r\n // TODO: Keep track of all transformations so that deletion is faster\r\n clearTransformsFromQueue () {\r\n if (!this.done) {\r\n this._queue = this._queue.filter((item) => {\r\n return !item.isTransform\r\n })\r\n }\r\n }\r\n\r\n static sanitise (duration, delay, when) {\r\n // Initialise the default parameters\r\n var times = 1\r\n var swing = false\r\n var wait = 0\r\n duration = duration || timeline.duration\r\n delay = delay || timeline.delay\r\n when = when || 'last'\r\n\r\n // If we have an object, unpack the values\r\n if (typeof duration === 'object' && !(duration instanceof Stepper)) {\r\n delay = duration.delay || delay\r\n when = duration.when || when\r\n swing = duration.swing || swing\r\n times = duration.times || times\r\n wait = duration.wait || wait\r\n duration = duration.duration || timeline.duration\r\n }\r\n\r\n return {\r\n duration: duration,\r\n delay: delay,\r\n swing: swing,\r\n times: times,\r\n wait: wait,\r\n when: when\r\n }\r\n }\r\n}\r\n\r\nRunner.id = 0\r\n\r\nclass FakeRunner {\r\n constructor (transforms = new Matrix(), id = -1, done = true) {\r\n this.transforms = transforms\r\n this.id = id\r\n this.done = done\r\n }\r\n\r\n clearTransformsFromQueue () { }\r\n}\r\n\r\nextend([ Runner, FakeRunner ], {\r\n mergeWith (runner) {\r\n return new FakeRunner(\r\n runner.transforms.lmultiply(this.transforms),\r\n runner.id\r\n )\r\n }\r\n})\r\n\r\n// FakeRunner.emptyRunner = new FakeRunner()\r\n\r\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\r\nconst getRunnerTransform = (runner) => runner.transforms\r\n\r\nfunction mergeTransforms () {\r\n // Find the matrix to apply to the element and apply it\r\n let runners = this._transformationRunners.runners\r\n let netTransform = runners\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n\r\n this.transform(netTransform)\r\n\r\n this._transformationRunners.merge()\r\n\r\n if (this._transformationRunners.length() === 1) {\r\n this._frameId = null\r\n }\r\n}\r\n\r\nclass RunnerArray {\r\n constructor () {\r\n this.runners = []\r\n this.ids = []\r\n }\r\n\r\n add (runner) {\r\n if (this.runners.includes(runner)) return\r\n\r\n let id = runner.id + 1\r\n\r\n let leftSibling = this.ids.reduce((last, curr) => {\r\n if (curr > last && curr < id) return curr\r\n return last\r\n }, 0)\r\n\r\n let index = this.ids.indexOf(leftSibling) + 1\r\n\r\n this.ids.splice(index, 0, id)\r\n this.runners.splice(index, 0, runner)\r\n\r\n return this\r\n }\r\n\r\n getByID (id) {\r\n return this.runners[this.ids.indexOf(id + 1)]\r\n }\r\n\r\n remove (id) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1)\r\n this.runners.splice(index, 1)\r\n return this\r\n }\r\n\r\n merge () {\r\n let lastRunner = null\r\n this.runners.forEach((runner, i) => {\r\n if (lastRunner && runner.done && lastRunner.done) {\r\n this.remove(runner.id)\r\n this.edit(lastRunner.id, runner.mergeWith(lastRunner))\r\n }\r\n\r\n lastRunner = runner\r\n })\r\n\r\n return this\r\n }\r\n\r\n edit (id, newRunner) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1, id)\r\n this.runners.splice(index, 1, newRunner)\r\n return this\r\n }\r\n\r\n length () {\r\n return this.ids.length\r\n }\r\n\r\n clearBefore (id) {\r\n let deleteCnt = this.ids.indexOf(id + 1) || 1\r\n this.ids.splice(0, deleteCnt, 0)\r\n this.runners.splice(0, deleteCnt, new FakeRunner())\r\n .forEach((r) => r.clearTransformsFromQueue())\r\n return this\r\n }\r\n}\r\n\r\nlet frameId = 0\r\nregisterMethods({\r\n Element: {\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var timeline = this.timeline()\r\n return new Runner(o.duration)\r\n .loop(o)\r\n .element(this)\r\n .timeline(timeline.play())\r\n .schedule(delay, when)\r\n },\r\n\r\n delay (by, when) {\r\n return this.animate(0, by, when)\r\n },\r\n\r\n // this function searches for all runners on the element and deletes the ones\r\n // which run before the current one. This is because absolute transformations\r\n // overwfrite anything anyway so there is no need to waste time computing\r\n // other runners\r\n _clearTransformRunnersBefore (currentRunner) {\r\n this._transformationRunners.clearBefore(currentRunner.id)\r\n },\r\n\r\n _currentTransform (current) {\r\n return this._transformationRunners.runners\r\n // we need the equal sign here to make sure, that also transformations\r\n // on the same runner which execute before the current transformation are\r\n // taken into account\r\n .filter((runner) => runner.id <= current.id)\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n },\r\n\r\n addRunner (runner) {\r\n this._transformationRunners.add(runner)\r\n\r\n Animator.transform_frame(\r\n mergeTransforms.bind(this), this._frameId\r\n )\r\n },\r\n\r\n _prepareRunner () {\r\n if (this._frameId == null) {\r\n this._transformationRunners = new RunnerArray()\r\n .add(new FakeRunner(new Matrix(this)))\r\n\r\n this._frameId = frameId++\r\n }\r\n }\r\n }\r\n})\r\n\r\nextend(Runner, {\r\n attr (a, v) {\r\n return this.styleAttr('attr', a, v)\r\n },\r\n\r\n // Add animatable styles\r\n css (s, v) {\r\n return this.styleAttr('css', s, v)\r\n },\r\n\r\n styleAttr (type, name, val) {\r\n // apply attributes individually\r\n if (typeof name === 'object') {\r\n for (var key in val) {\r\n this.styleAttr(type, key, val[key])\r\n }\r\n }\r\n\r\n var morpher = new Morphable(this._stepper).to(val)\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.element()[type](name))\r\n }, function (pos) {\r\n this.element()[type](name, morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n zoom (level, point) {\r\n var morpher = new Morphable(this._stepper).to(new SVGNumber(level))\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.zoom())\r\n }, function (pos) {\r\n this.element().zoom(morpher.at(pos), point)\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n ** absolute transformations\r\n **/\r\n\r\n //\r\n // M v -----|-----(D M v = F v)------|-----> T v\r\n //\r\n // 1. define the final state (T) and decompose it (once)\r\n // t = [tx, ty, the, lam, sy, sx]\r\n // 2. on every frame: pull the current state of all previous transforms\r\n // (M - m can change)\r\n // and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\r\n // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\r\n // - Note F(0) = M\r\n // - Note F(1) = T\r\n // 4. Now you get the delta matrix as a result: D = F * inv(M)\r\n\r\n transform (transforms, relative, affine) {\r\n // If we have a declarative function, we should retarget it if possible\r\n relative = transforms.relative || relative\r\n if (this._isDeclarative && !relative && this._tryRetarget('transform', transforms)) {\r\n return this\r\n }\r\n\r\n // Parse the parameters\r\n var isMatrix = Matrix.isMatrixLike(transforms)\r\n affine = transforms.affine != null\r\n ? transforms.affine\r\n : (affine != null ? affine : !isMatrix)\r\n\r\n // Create a morepher and set its type\r\n const morpher = new Morphable(this._stepper)\r\n .type(affine ? TransformBag : Matrix)\r\n\r\n let origin\r\n let element\r\n let current\r\n let currentAngle\r\n let startTransform\r\n\r\n function setup () {\r\n // make sure element and origin is defined\r\n element = element || this.element()\r\n origin = origin || getOrigin(transforms, element)\r\n\r\n startTransform = new Matrix(relative ? undefined : element)\r\n\r\n // add the runner to the element so it can merge transformations\r\n element.addRunner(this)\r\n\r\n // Deactivate all transforms that have run so far if we are absolute\r\n if (!relative) {\r\n element._clearTransformRunnersBefore(this)\r\n }\r\n }\r\n\r\n function run (pos) {\r\n // clear all other transforms before this in case something is saved\r\n // on this runner. We are absolute. We dont need these!\r\n if (!relative) this.clearTransform()\r\n\r\n let { x, y } = new Point(origin).transform(element._currentTransform(this))\r\n\r\n let target = new Matrix({ ...transforms, origin: [ x, y ] })\r\n let start = this._isDeclarative && current\r\n ? current\r\n : startTransform\r\n\r\n if (affine) {\r\n target = target.decompose(x, y)\r\n start = start.decompose(x, y)\r\n\r\n // Get the current and target angle as it was set\r\n const rTarget = target.rotate\r\n const rCurrent = start.rotate\r\n\r\n // Figure out the shortest path to rotate directly\r\n const possibilities = [ rTarget - 360, rTarget, rTarget + 360 ]\r\n const distances = possibilities.map(a => Math.abs(a - rCurrent))\r\n const shortest = Math.min(...distances)\r\n const index = distances.indexOf(shortest)\r\n target.rotate = possibilities[index]\r\n }\r\n\r\n if (relative) {\r\n // we have to be careful here not to overwrite the rotation\r\n // with the rotate method of Matrix\r\n if (!isMatrix) {\r\n target.rotate = transforms.rotate || 0\r\n }\r\n if (this._isDeclarative && currentAngle) {\r\n start.rotate = currentAngle\r\n }\r\n }\r\n\r\n morpher.from(start)\r\n morpher.to(target)\r\n\r\n let affineParameters = morpher.at(pos)\r\n currentAngle = affineParameters.rotate\r\n current = new Matrix(affineParameters)\r\n\r\n this.addTransform(current)\r\n return morpher.done()\r\n }\r\n\r\n function retarget (newTransforms) {\r\n // only get a new origin if it changed since the last call\r\n if (\r\n (newTransforms.origin || 'center').toString()\r\n !== (transforms.origin || 'center').toString()\r\n ) {\r\n origin = getOrigin(transforms, element)\r\n }\r\n\r\n // overwrite the old transformations with the new ones\r\n transforms = { ...newTransforms, origin }\r\n }\r\n\r\n this.queue(setup, run, retarget, true)\r\n this._isDeclarative && this._rememberMorpher('transform', morpher)\r\n return this\r\n },\r\n\r\n // Animatable x-axis\r\n x (x, relative) {\r\n return this._queueNumber('x', x)\r\n },\r\n\r\n // Animatable y-axis\r\n y (y) {\r\n return this._queueNumber('y', y)\r\n },\r\n\r\n dx (x) {\r\n return this._queueNumberDelta('x', x)\r\n },\r\n\r\n dy (y) {\r\n return this._queueNumberDelta('y', y)\r\n },\r\n\r\n _queueNumberDelta (method, to) {\r\n to = new SVGNumber(to)\r\n\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n var from = null\r\n this.queue(function () {\r\n from = this.element()[method]()\r\n morpher.from(from)\r\n morpher.to(from + to)\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n }, function (newTo) {\r\n morpher.to(from + new SVGNumber(newTo))\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueObject (method, to) {\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n this.queue(function () {\r\n morpher.from(this.element()[method]())\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueNumber (method, value) {\r\n return this._queueObject(method, new SVGNumber(value))\r\n },\r\n\r\n // Animatable center x-axis\r\n cx (x) {\r\n return this._queueNumber('cx', x)\r\n },\r\n\r\n // Animatable center y-axis\r\n cy (y) {\r\n return this._queueNumber('cy', y)\r\n },\r\n\r\n // Add animatable move\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n },\r\n\r\n // Add animatable center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n },\r\n\r\n // Add animatable size\r\n size (width, height) {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if (!width || !height) {\r\n box = this._element.bbox()\r\n }\r\n\r\n if (!width) {\r\n width = box.width / box.height * height\r\n }\r\n\r\n if (!height) {\r\n height = box.height / box.width * width\r\n }\r\n\r\n return this\r\n .width(width)\r\n .height(height)\r\n },\r\n\r\n // Add animatable width\r\n width (width) {\r\n return this._queueNumber('width', width)\r\n },\r\n\r\n // Add animatable height\r\n height (height) {\r\n return this._queueNumber('height', height)\r\n },\r\n\r\n // Add animatable plot\r\n plot (a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if (arguments.length === 4) {\r\n return this.plot([ a, b, c, d ])\r\n }\r\n\r\n var morpher = this._element.MorphArray().to(a)\r\n\r\n this.queue(function () {\r\n morpher.from(this._element.array())\r\n }, function (pos) {\r\n this._element.plot(morpher.at(pos))\r\n })\r\n\r\n return this\r\n },\r\n\r\n // Add leading method\r\n leading (value) {\r\n return this._queueNumber('leading', value)\r\n },\r\n\r\n // Add animatable viewbox\r\n viewbox (x, y, width, height) {\r\n return this._queueObject('viewbox', new Box(x, y, width, height))\r\n },\r\n\r\n update (o) {\r\n if (typeof o !== 'object') {\r\n return this.update({\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n\r\n return this\r\n }\r\n})\r\n\r\nextend(Runner, { rx, ry, from, to })\r\n","import {\r\n adopt,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport Defs from './Defs.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Svg extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('svg', node), node)\r\n this.namespace()\r\n }\r\n\r\n isRoot () {\r\n return !this.node.parentNode\r\n || !(this.node.parentNode instanceof globals.window.SVGElement)\r\n || this.node.parentNode.nodeName === '#document'\r\n }\r\n\r\n // Check if this is a root svg\r\n // If not, call docs from this element\r\n root () {\r\n if (this.isRoot()) return this\r\n return super.root()\r\n }\r\n\r\n // Add namespaces\r\n namespace () {\r\n if (!this.isRoot()) return this.root().namespace()\r\n return this\r\n .attr({ xmlns: ns, version: '1.1' })\r\n .attr('xmlns:xlink', xlink, xmlns)\r\n .attr('xmlns:svgjs', svgjs, xmlns)\r\n }\r\n\r\n // Creates and returns defs element\r\n defs () {\r\n if (!this.isRoot()) return this.root().defs()\r\n\r\n return adopt(this.node.getElementsByTagName('defs')[0])\r\n || this.put(new Defs())\r\n }\r\n\r\n // custom parent method\r\n parent (type) {\r\n if (this.isRoot()) {\r\n return this.node.parentNode.nodeName === '#document'\r\n ? null\r\n : adopt(this.node.parentNode)\r\n }\r\n\r\n return super.parent(type)\r\n }\r\n\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n return this\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create nested svg document\r\n nested: wrapWithAttrCheck(function () {\r\n return this.put(new Svg())\r\n })\r\n }\r\n})\r\n\r\nregister(Svg, 'Svg', true)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Symbol extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('symbol', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n symbol: wrapWithAttrCheck(function () {\r\n return this.put(new Symbol())\r\n })\r\n }\r\n})\r\n\r\nregister(Symbol)\r\n","import { globals } from '../../utils/window.js'\r\n\r\n// Create plain text node\r\nexport function plain (text) {\r\n // clear if build mode is disabled\r\n if (this._build === false) {\r\n this.clear()\r\n }\r\n\r\n // create text node\r\n this.node.appendChild(globals.document.createTextNode(text))\r\n\r\n return this\r\n}\r\n\r\n// Get length of text element\r\nexport function length () {\r\n return this.node.getComputedTextLength()\r\n}\r\n","import {\r\n adopt,\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { attrs } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Text extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('text', node), node)\r\n\r\n this.dom.leading = new SVGNumber(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', attrs['font-family'])\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n // act as getter\r\n if (x == null) {\r\n return this.attr('x')\r\n }\r\n\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n var oy = this.attr('y')\r\n var o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null) {\r\n return typeof oy === 'number' ? oy - o : oy\r\n }\r\n\r\n return this.attr('y', typeof y === 'number' ? y + o : y)\r\n }\r\n\r\n // Move center over x-axis\r\n cx (x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n\r\n // Move center over y-axis\r\n cy (y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n\r\n // Set the text content\r\n text (text) {\r\n // act as getter\r\n if (text === undefined) {\r\n var children = this.node.childNodes\r\n var firstLine = 0\r\n text = ''\r\n\r\n for (var i = 0, len = children.length; i < len; ++i) {\r\n // skip textPaths - they are no lines\r\n if (children[i].nodeName === 'textPath') {\r\n if (i === 0) firstLine = 1\r\n continue\r\n }\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var j = 0, jl = text.length; j < jl; j++) {\r\n this.tspan(text[j]).newLine()\r\n }\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n\r\n // Set / get leading\r\n leading (value) {\r\n // act as getter\r\n if (value == null) {\r\n return this.dom.leading\r\n }\r\n\r\n // act as setter\r\n this.dom.leading = new SVGNumber(value)\r\n\r\n return this.rebuild()\r\n }\r\n\r\n // Rebuild appearance type\r\n rebuild (rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild === 'boolean') {\r\n this._rebuild = rebuild\r\n }\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n var blankLineOffset = 0\r\n var leading = this.dom.leading\r\n\r\n this.each(function () {\r\n var fontSize = globals.window.getComputedStyle(this.node)\r\n .getPropertyValue('font-size')\r\n var dy = leading * new SVGNumber(fontSize)\r\n\r\n if (this.dom.newLined) {\r\n this.attr('x', self.attr('x'))\r\n\r\n if (this.text() === '\\n') {\r\n blankLineOffset += dy\r\n } else {\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Enable / disable build mode\r\n build (build) {\r\n this._build = !!build\r\n return this\r\n }\r\n\r\n // overwrite method from parent to set data properly\r\n setData (o) {\r\n this.dom = o\r\n this.dom.leading = new SVGNumber(o.leading || 1.3)\r\n return this\r\n }\r\n}\r\n\r\nextend(Text, textable)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create text element\r\n text: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).text(text)\r\n }),\r\n\r\n // Create plain text element\r\n plain: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).plain(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Text)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Text from './Text.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Tspan extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('tspan', node), node)\r\n }\r\n\r\n // Set text content\r\n text (text) {\r\n if (text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n\r\n // Shortcut dx\r\n dx (dx) {\r\n return this.attr('dx', dx)\r\n }\r\n\r\n // Shortcut dy\r\n dy (dy) {\r\n return this.attr('dy', dy)\r\n }\r\n\r\n // Create new line\r\n newLine () {\r\n // fetch text parent\r\n var t = this.parent(Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new position\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n}\r\n\r\nextend(Tspan, textable)\r\n\r\nregisterMethods({\r\n Tspan: {\r\n tspan: wrapWithAttrCheck(function (text) {\r\n var tspan = new Tspan()\r\n\r\n // clear if build mode is disabled\r\n if (!this._build) {\r\n this.clear()\r\n }\r\n\r\n // add new tspan\r\n this.node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Tspan)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class ClipPath extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('clipPath', node), node)\r\n }\r\n\r\n // Unclip all clipped elements and remove itself\r\n remove () {\r\n // unclip all targets\r\n this.targets().forEach(function (el) {\r\n el.unclip()\r\n })\r\n\r\n // remove clipPath from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [clip-path*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create clipping element\r\n clip: wrapWithAttrCheck(function () {\r\n return this.defs().put(new ClipPath())\r\n })\r\n },\r\n Element: {\r\n // Distribute clipPath to svg element\r\n clipWith (element) {\r\n // use given clip or create a new one\r\n let clipper = element instanceof ClipPath\r\n ? element\r\n : this.parent().clip().add(element)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + clipper.id() + '\")')\r\n },\r\n\r\n // Unclip element\r\n unclip () {\r\n return this.attr('clip-path', null)\r\n },\r\n\r\n clipper () {\r\n return this.reference('clip-path')\r\n }\r\n }\r\n})\r\n\r\nregister(ClipPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class G extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('g', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create a group element\r\n group: wrapWithAttrCheck(function () {\r\n return this.put(new G())\r\n })\r\n }\r\n})\r\n\r\nregister(G)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class A extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('a', node), node)\r\n }\r\n\r\n // Link url\r\n to (url) {\r\n return this.attr('href', url, xlink)\r\n }\r\n\r\n // Link target attribute\r\n target (target) {\r\n return this.attr('target', target)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a hyperlink element\r\n link: wrapWithAttrCheck(function (url) {\r\n return this.put(new A()).to(url)\r\n })\r\n },\r\n Element: {\r\n // Create a hyperlink element\r\n linkTo: function (url) {\r\n var link = new A()\r\n\r\n if (typeof url === 'function') {\r\n url.call(link, link)\r\n } else {\r\n link.to(url)\r\n }\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n }\r\n})\r\n\r\nregister(A)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Mask extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('mask', node), node)\r\n }\r\n\r\n // Unmask all masked elements and remove itself\r\n remove () {\r\n // unmask all targets\r\n this.targets().forEach(function (el) {\r\n el.unmask()\r\n })\r\n\r\n // remove mask from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [mask*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n mask: wrapWithAttrCheck(function () {\r\n return this.defs().put(new Mask())\r\n })\r\n },\r\n Element: {\r\n // Distribute mask to svg element\r\n maskWith (element) {\r\n // use given mask or create a new one\r\n var masker = element instanceof Mask\r\n ? element\r\n : this.parent().mask().add(element)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + masker.id() + '\")')\r\n },\r\n\r\n // Unmask element\r\n unmask () {\r\n return this.attr('mask', null)\r\n },\r\n\r\n masker () {\r\n return this.reference('mask')\r\n }\r\n }\r\n})\r\n\r\nregister(Mask)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { unCamelCase } from '../utils/utils.js'\r\nimport Element from './Element.js'\r\n\r\nfunction cssRule (selector, rule) {\r\n if (!selector) return ''\r\n if (!rule) return selector\r\n\r\n var ret = selector + '{'\r\n\r\n for (var i in rule) {\r\n ret += unCamelCase(i) + ':' + rule[i] + ';'\r\n }\r\n\r\n ret += '}'\r\n\r\n return ret\r\n}\r\n\r\nexport default class Style extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('style', node), node)\r\n }\r\n\r\n addText (w = '') {\r\n this.node.textContent += w\r\n return this\r\n }\r\n\r\n font (name, src, params = {}) {\r\n return this.rule('@font-face', {\r\n fontFamily: name,\r\n src: src,\r\n ...params\r\n })\r\n }\r\n\r\n rule (selector, obj) {\r\n return this.addText(cssRule(selector, obj))\r\n }\r\n}\r\n\r\nregisterMethods('Dom', {\r\n style: wrapWithAttrCheck(function (selector, obj) {\r\n return this.put(new Style()).rule(selector, obj)\r\n }),\r\n fontface: wrapWithAttrCheck(function (name, src, params) {\r\n return this.put(new Style()).font(name, src, params)\r\n })\r\n})\r\n\r\nregister(Style)\r\n","var isObject = require('./_is-object');\nvar isArray = require('./_is-array');\nvar SPECIES = require('./_wks')('species');\n\nmodule.exports = function (original) {\n var C;\n if (isArray(original)) {\n C = original.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return C === undefined ? Array : C;\n};\n","// 0 -> Array#forEach\n// 1 -> Array#map\n// 2 -> Array#filter\n// 3 -> Array#some\n// 4 -> Array#every\n// 5 -> Array#find\n// 6 -> Array#findIndex\nvar ctx = require('./_ctx');\nvar IObject = require('./_iobject');\nvar toObject = require('./_to-object');\nvar toLength = require('./_to-length');\nvar asc = require('./_array-species-create');\nmodule.exports = function (TYPE, $create) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n var create = $create || asc;\n return function ($this, callbackfn, that) {\n var O = toObject($this);\n var self = IObject(O);\n var f = ctx(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined;\n var val, res;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n val = self[index];\n res = f(val, index, O);\n if (TYPE) {\n if (IS_MAP) result[index] = res; // map\n else if (res) switch (TYPE) {\n case 3: return true; // some\n case 5: return val; // find\n case 6: return index; // findIndex\n case 2: result.push(val); // filter\n } else if (IS_EVERY) return false; // every\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result;\n };\n};\n","'use strict';\n// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined)\nvar $export = require('./_export');\nvar $find = require('./_array-methods')(5);\nvar KEY = 'find';\nvar forced = true;\n// Shouldn't skip holes\nif (KEY in []) Array(1)[KEY](function () { forced = false; });\n$export($export.P + $export.F * forced, 'Array', {\n find: function find(callbackfn /* , that = undefined */) {\n return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n }\n});\nrequire('./_add-to-unscopables')(KEY);\n","// 9.4.2.3 ArraySpeciesCreate(originalArray, length)\nvar speciesConstructor = require('./_array-species-constructor');\n\nmodule.exports = function (original, length) {\n return new (speciesConstructor(original))(length);\n};\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Path from './Path.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Text from './Text.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class TextPath extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('textPath', node), node)\r\n }\r\n\r\n // return the array of the path track element\r\n array () {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n\r\n // Plot path if any\r\n plot (d) {\r\n var track = this.track()\r\n var pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n\r\n // Get the path element\r\n track () {\r\n return this.reference('href')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n textPath: wrapWithAttrCheck(function (text, path) {\r\n return this.defs().path(path).text(text).addTo(this)\r\n })\r\n },\r\n Text: {\r\n // Create path for text to run on\r\n path: wrapWithAttrCheck(function (track) {\r\n var path = new TextPath()\r\n\r\n // if track is a path, reuse it\r\n if (!(track instanceof Path)) {\r\n // create path element\r\n track = this.root().defs().path(track)\r\n }\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, xlink)\r\n\r\n // add textPath element as child node and return textPath\r\n return this.put(path)\r\n }),\r\n\r\n // Get the textPath children\r\n textPath () {\r\n return this.find('textPath')[0]\r\n }\r\n },\r\n Path: {\r\n // creates a textPath from this path\r\n text: wrapWithAttrCheck(function (text) {\r\n if (text instanceof Text) {\r\n var txt = text.text()\r\n return text.clear().path(this).text(txt)\r\n }\r\n return this.parent().put(new Text()).path(this).text(text)\r\n }),\r\n\r\n targets () {\r\n return baseFind('svg [href*=\"' + this.id() + '\"]')\r\n }\r\n }\r\n})\r\n\r\nTextPath.prototype.MorphArray = PathArray\r\nregister(TextPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Use extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('use', node), node)\r\n }\r\n\r\n // Use element as a reference\r\n element (element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, xlink)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a use element\r\n use: wrapWithAttrCheck(function (element, file) {\r\n return this.put(new Use()).element(element, file)\r\n })\r\n }\r\n})\r\n\r\nregister(Use)\r\n","/* Optional Modules */\r\nimport './modules/optional/arrange.js'\r\nimport './modules/optional/class.js'\r\nimport './modules/optional/css.js'\r\nimport './modules/optional/data.js'\r\nimport './modules/optional/memory.js'\r\nimport './modules/optional/sugar.js'\r\nimport './modules/optional/transform.js'\r\n\r\nimport { extend, makeInstance } from './utils/adopter.js'\r\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\r\nimport Box from './types/Box.js'\r\nimport Circle from './elements/Circle.js'\r\nimport Color from './types/Color.js'\r\nimport Container from './elements/Container.js'\r\nimport Defs from './elements/Defs.js'\r\nimport Dom from './elements/Dom.js'\r\nimport Element from './elements/Element.js'\r\nimport Ellipse from './elements/Ellipse.js'\r\nimport EventTarget from './types/EventTarget.js'\r\nimport Gradient from './elements/Gradient.js'\r\nimport Image from './elements/Image.js'\r\nimport Line from './elements/Line.js'\r\nimport List from './types/List.js'\r\nimport Marker from './elements/Marker.js'\r\nimport Matrix from './types/Matrix.js'\r\nimport Morphable, {\r\n NonMorphable,\r\n ObjectBag,\r\n TransformBag,\r\n makeMorphable,\r\n registerMorphableType\r\n} from './animation/Morphable.js'\r\nimport Path from './elements/Path.js'\r\nimport PathArray from './types/PathArray.js'\r\nimport Pattern from './elements/Pattern.js'\r\nimport PointArray from './types/PointArray.js'\r\nimport Polygon from './elements/Polygon.js'\r\nimport Polyline from './elements/Polyline.js'\r\nimport Rect from './elements/Rect.js'\r\nimport Runner from './animation/Runner.js'\r\nimport SVGArray from './types/SVGArray.js'\r\nimport SVGNumber from './types/SVGNumber.js'\r\nimport Shape from './elements/Shape.js'\r\nimport Svg from './elements/Svg.js'\r\nimport Symbol from './elements/Symbol.js'\r\nimport Text from './elements/Text.js'\r\nimport Tspan from './elements/Tspan.js'\r\nimport * as defaults from './modules/core/defaults.js'\r\nimport * as utils from './utils/utils.js'\r\nimport * as namespaces from './modules/core/namespaces.js'\r\nimport * as regex from './modules/core/regex.js'\r\n\r\nexport {\r\n Morphable,\r\n registerMorphableType,\r\n makeMorphable,\r\n TransformBag,\r\n ObjectBag,\r\n NonMorphable\r\n}\r\n\r\nexport { defaults, utils, namespaces, regex }\r\nexport const SVG = makeInstance\r\nexport { default as parser } from './modules/core/parser.js'\r\nexport { default as find } from './modules/core/selector.js'\r\nexport * from './modules/core/event.js'\r\nexport * from './utils/adopter.js'\r\nexport { registerWindow } from './utils/window.js'\r\n\r\n/* Animation Modules */\r\nexport { default as Animator } from './animation/Animator.js'\r\nexport { Controller, Ease, PID, Spring, easing } from './animation/Controller.js'\r\nexport { default as Queue } from './animation/Queue.js'\r\nexport { default as Runner } from './animation/Runner.js'\r\nexport { default as Timeline } from './animation/Timeline.js'\r\n\r\n/* Types */\r\nexport { default as Array } from './types/SVGArray.js'\r\nexport { default as Box } from './types/Box.js'\r\nexport { default as Color } from './types/Color.js'\r\nexport { default as EventTarget } from './types/EventTarget.js'\r\nexport { default as Matrix } from './types/Matrix.js'\r\nexport { default as Number } from './types/SVGNumber.js'\r\nexport { default as PathArray } from './types/PathArray.js'\r\nexport { default as Point } from './types/Point.js'\r\nexport { default as PointArray } from './types/PointArray.js'\r\nexport { default as List } from './types/List.js'\r\n\r\n/* Elements */\r\nexport { default as Circle } from './elements/Circle.js'\r\nexport { default as ClipPath } from './elements/ClipPath.js'\r\nexport { default as Container } from './elements/Container.js'\r\nexport { default as Defs } from './elements/Defs.js'\r\nexport { default as Dom } from './elements/Dom.js'\r\nexport { default as Element } from './elements/Element.js'\r\nexport { default as Ellipse } from './elements/Ellipse.js'\r\nexport { default as Gradient } from './elements/Gradient.js'\r\nexport { default as G } from './elements/G.js'\r\nexport { default as A } from './elements/A.js'\r\nexport { default as Image } from './elements/Image.js'\r\nexport { default as Line } from './elements/Line.js'\r\nexport { default as Marker } from './elements/Marker.js'\r\nexport { default as Mask } from './elements/Mask.js'\r\nexport { default as Path } from './elements/Path.js'\r\nexport { default as Pattern } from './elements/Pattern.js'\r\nexport { default as Polygon } from './elements/Polygon.js'\r\nexport { default as Polyline } from './elements/Polyline.js'\r\nexport { default as Rect } from './elements/Rect.js'\r\nexport { default as Shape } from './elements/Shape.js'\r\nexport { default as Stop } from './elements/Stop.js'\r\nexport { default as Style } from './elements/Style.js'\r\nexport { default as Svg } from './elements/Svg.js'\r\nexport { default as Symbol } from './elements/Symbol.js'\r\nexport { default as Text } from './elements/Text.js'\r\nexport { default as TextPath } from './elements/TextPath.js'\r\nexport { default as Tspan } from './elements/Tspan.js'\r\nexport { default as Use } from './elements/Use.js'\r\n\r\nextend([\r\n Svg,\r\n Symbol,\r\n Image,\r\n Pattern,\r\n Marker\r\n], getMethodsFor('viewbox'))\r\n\r\nextend([\r\n Line,\r\n Polyline,\r\n Polygon,\r\n Path\r\n], getMethodsFor('marker'))\r\n\r\nextend(Text, getMethodsFor('Text'))\r\nextend(Path, getMethodsFor('Path'))\r\n\r\nextend(Defs, getMethodsFor('Defs'))\r\n\r\nextend([\r\n Text,\r\n Tspan\r\n], getMethodsFor('Tspan'))\r\n\r\nextend([\r\n Rect,\r\n Ellipse,\r\n Circle,\r\n Gradient\r\n], getMethodsFor('radius'))\r\n\r\nextend(EventTarget, getMethodsFor('EventTarget'))\r\nextend(Dom, getMethodsFor('Dom'))\r\nextend(Element, getMethodsFor('Element'))\r\nextend(Shape, getMethodsFor('Shape'))\r\n// extend(Element, getConstructor('Memory'))\r\nextend(Container, getMethodsFor('Container'))\r\n\r\nextend(Runner, getMethodsFor('Runner'))\r\n\r\nList.extend(getMethodNames())\r\n\r\nregisterMorphableType([\r\n SVGNumber,\r\n Color,\r\n Box,\r\n Matrix,\r\n SVGArray,\r\n PointArray,\r\n PathArray\r\n])\r\n\r\nmakeMorphable()\r\n","import * as svgMembers from './main.js'\r\nimport { makeInstance } from './utils/adopter.js'\r\n\r\n// The main wrapping element\r\nexport default function SVG (element) {\r\n return makeInstance(element)\r\n}\r\n\r\nObject.assign(SVG, svgMembers)\r\n"],"names":["global","module","window","Math","self","Function","__g","core","version","__e","it","isObject","TypeError","exec","e","require$$0","Object","defineProperty","get","a","document","is","createElement","require$$1","require$$2","S","fn","val","toString","call","valueOf","dP","O","P","Attributes","anObject","toPrimitive","IE8_DOM_DEFINE","value","bitmap","enumerable","configurable","writable","object","key","f","createDesc","hasOwnProperty","id","px","random","concat","undefined","SRC","TO_STRING","$toString","TPL","split","inspectSource","safe","isFunction","has","hide","join","String","prototype","this","that","length","aFunction","b","c","apply","arguments","PROTOTYPE","$export","type","name","source","own","out","exp","IS_FORCED","F","IS_GLOBAL","G","IS_STATIC","IS_PROTO","IS_BIND","B","target","exports","expProto","ctx","redefine","U","W","R","slice","propertyIsEnumerable","cof","IObject","defined","ceil","floor","isNaN","min","toInteger","max","IS_INCLUDES","$this","el","fromIndex","index","toIObject","toLength","SHARED","store","push","mode","copyright","shared","uid","arrayIndexOf","IE_PROTO","names","i","result","keys","$keys","enumBugKeys","getOwnPropertySymbols","$assign","assign","A","Symbol","K","forEach","k","T","toObject","aLen","getSymbols","gOPS","isEnum","pIE","getKeys","j","USE_SYMBOL","UNSCOPABLES","ArrayProto","Array","done","defineProperties","Properties","documentElement","Empty","createDict","iframeDocument","iframe","style","display","appendChild","src","contentWindow","open","write","lt","close","create","dPs","def","TAG","tag","stat","IteratorPrototype","ObjectProto","getPrototypeOf","constructor","ITERATOR","BUGGY","VALUES","returnThis","Base","NAME","Constructor","next","DEFAULT","IS_SET","FORCED","descriptor","setToStringTag","methods","getMethod","kind","proto","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","entries","Iterators","values","iterated","_t","_i","_k","step","Arguments","wks","TO_STRING_TAG","ArrayValues","DOMIterables","CSSRuleList","CSSStyleDeclaration","CSSValueList","ClientRectList","DOMRectList","DOMStringList","DOMTokenList","DataTransferItemList","FileList","HTMLAllCollection","HTMLCollection","HTMLFormElement","HTMLSelectElement","MediaList","MimeTypeArray","NamedNodeMap","NodeList","PaintRequestList","Plugin","PluginArray","SVGLengthList","SVGNumberList","SVGPathSegList","SVGPointList","SVGStringList","SVGTransformList","SourceBufferList","StyleSheetList","TextTrackCueList","TextTrackList","TouchList","collections","explicit","Collection","$iterators","KEY","fails","FProto","nameRE","_typeof2","obj","iterator","_typeof","match","$at","pos","s","l","charCodeAt","charAt","point","forbiddenField","ret","ARG","getIteratorMethod","tryGet","callee","BREAK","RETURN","iterable","iterFn","getIterFn","SPECIES","META","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","meta","NEED","fastKey","getWeak","onFreeze","TYPE","SIZE","DESCRIPTORS","getEntry","entry","_f","n","getConstructor","wrapper","IS_MAP","ADDER","C","anInstance","_l","forOf","redefineAll","clear","validate","data","r","p","delete","prev","callbackfn","v","setStrong","$iterDefine","SAFE_CLOSING","gOPD","getOwnPropertyDescriptor","check","setPrototypeOf","set","test","buggy","__proto__","common","IS_WEAK","fixMethod","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","skipClosing","arr","iter","$iterDetect","BUGGY_ZERO","$instance","add","strong","_toConsumableArray","isArray","arr2","arrayWithoutHoles","from","iterableToArray","nonIterableSpread","$Symbol","wksExt","arg","hiddenKeys","getOwnPropertyNames","gOPN","windowNames","getWindowNames","$GOPD","$DP","gOPNExt","$JSON","JSON","_stringify","stringify","HIDDEN","TO_PRIMITIVE","SymbolRegistry","AllSymbols","OPSymbols","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","$fails","_create","D","protoDesc","wrap","sym","isSymbol","$defineProperty","$defineProperties","symbols","enumKeys","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","$getOwnPropertyNames","$getOwnPropertySymbols","IS_OP","$set","require$$3","es6Symbols","wellKnownSymbols","wksDefine","for","keyFor","useSetter","useSimple","replacer","$replacer","args","require$$5","registerMethods","m","addMethodNames","_name","getMethodsFor","_names","$includes","includes","MATCH","isRegExp","INCLUDES","re","searchString","context","indexOf","SYMBOL","fns","strfn","rxfn","RegExp","string","map","array","block","il","radians","d","PI","camelCase","toLowerCase","replace","g","toUpperCase","unCamelCase","capitalize","proportionalSize","element","width","height","box","bbox","getOrigin","o","ox","oy","origin","trim","x","y","bx","by","REPLACE","$replace","searchValue","replaceValue","ns","xmlns","xlink","svgjs","globals","_classCallCheck","elements","root","makeNode","createElementNS","makeInstance","adopter","querySelector","node","innerHTML","firstChild","nodeOrNew","Node","adopt","className","nodeName","register","asRoot","getClass","did","eid","assignNewId","children","extend","modules","attrCheck","method","wrapWithAttrCheck","attr","siblings","parent","position","forward","removeElement","isRoot","defs","backward","front","back","before","remove","after","insertBefore","insertAfter","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","separator","limit","separator2","lastIndex","lastLength","output","flags","ignoreCase","multiline","unicode","sticky","lastLastIndex","splitLimit","separatorCopy","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isBlank","isNumber","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","classes","hasClass","addClass","removeClass","filter","toggleClass","css","cssText","t","cased","show","visible","parse","remember","memory","forget","_memory","listenerId","getEvents","getEventHolder","events","getEventTarget","on","listener","binding","options","bind","bag","_svgjsListenerId","event","ev","addEventListener","off","namespace","removeEventListener","dispatch","Event","CustomEvent","detail","cancelable","dispatchEvent","_slicedToArray","arrayWithHoles","_arr","_n","_d","_e","_s","err","iterableToArrayLimit","nonIterableRest","_defineProperties","props","_createClass","protoProps","staticProps","define","componentHex","component","round","space","hueToRgb","q","$flags","Color","init","params","_a","_b","_c","z","h","noWhitespace","parseInt","Error","substring","components","dToR","cos","sin","yL","xL","zL","ct","mx","rU","gU","bU","pow","bd","xyz","rL","gL","bL","xU","yU","zU","lab","sqrt","atan2","isGrey","delta","toHex","rV","gV","bV","color","_assertThisInitialized","ReferenceError","_possibleConstructorReturn","assertThisInitialized","_getPrototypeOf","_get","property","receiver","Reflect","base","superPropBase","desc","_setPrototypeOf","_inherits","subClass","superClass","$match","regexp","Point","parser","nodes","svg","size","path","parentNode","body","addTo","isNulledBox","Box","parseFloat","left","top","x2","y2","cx","cy","xMin","Infinity","xMax","yMin","yMax","transform","pageXOffset","pageYOffset","getBox","cb","retry","contains","closeEnough","threshold","abs","viewbox","Matrix","fromArray","Element","matrixify","isMatrixLike","multiplyO","formatTransforms","transformer","translateO","rx","ry","lmultiplyO","scaleO","scaleX","scaleY","skewO","skewX","skewY","shearO","shear","rotateO","theta","isFinite","py","dx","dy","tx","ty","originX","originY","sx","sy","lam","rotate","translateX","translateY","determinant","ccw","thetaRad","st","matrix","clone","matrixMultiply","det","na","nb","nc","nd","ne","nf","inverseO","axis","around","flipO","lx","tan","ly","skew","aroundO","other","comp","flipBoth","flip","flipX","flipY","scale","positionX","positionY","translate","relative","relativeX","relativeY","subClassArray","baseClass","_constructor","Arr","List","baseFind","query","querySelectorAll","each","fnOrMethodName","toArray","reduce","attrs","EventTarget","defaultPrevented","noop","timeline","duration","ease","delay","fill","stroke","opacity","offset","SVGArray","toSet","Set","SVGNumber","unit","number","hooks","Dom","childNodes","put","hasChildNodes","removeChild","lastChild","_defs","writeDataToDom","cloneNode","deep","selector","matches","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","SVGElement","replaceChild","precision","factor","newAttrs","svgOrFn","outerHTML","well","len","fragment","current","_this","createDocumentFragment","firstElementChild","text","textContent","attributes","nodeValue","last","curr","removeAttribute","getAttribute","defaults","_val","hook","isColor","leading","setAttributeNS","setAttribute","rebuild","find","Svg","dom","hasAttribute","setData","until","parents","getBBox","rbox","getBoundingClientRect","screenCTM","inverse","addOffset","ctm","getCTM","getScreenCTM","rect","sugar","prefix","_objectSpread","ownKeys","divide","extension","mat","angle","direction","directionString","dmove","plus","radius","_element","getTotalLength","pointAt","getPointAtLength","font","ax","ay","amove","untransform","str","kv","reverse","lmultiply","toParent","pCtm","multiply","toRoot","decomposed","decompose","Shape","Circle","circle","move","Container","flatten","ungroup","Defs","Ellipse","circled","ellipse","Stop","fx","fy","x1","y1","to","Gradient","update","url","gradiented","gradient","Pattern","pattern","patternUnits","Image","callback","img","image","load","PointArray","toLine","at","destination","points","pop","maxX","maxY","minX","minY","MorphArray","Line","pointed","line","plot","Marker","marker","ref","$sort","sort","makeSetterGetter","comparefn","easing","bezier","steps","stepPosition","jumps","beforeFlag","jumping","Stepper","Ease","Controller","stepper","dt","recalculate","_duration","overshoot","_overshoot","pi","os","log","zeta","wn","Spring","velocity","acceleration","newPosition","PID","windup","integral","error","I","PathArray","pathRegReplace","pathHandlers","M","p0","L","H","V","Q","Z","mlhvqtcsaz","jl","arrayToString","equalCommands","pathArray","morph","sourceArray","destinationArray","paramCnt","Morphable","_stepper","_from","_to","_type","_context","_morphObj","_set","NonMorphable","morphableTypes","ObjectBag","TransformBag","objOrArr","registerMorphableType","makeMorphable","Path","_array","Polygon","polygon","poly","Polyline","polyline","Rect","Queue","_first","_last","item","Animator","nextDraw","frames","timeouts","timer","performance","Date","frame","run","requestAnimationFrame","_draw","transform_frame","timeout","time","now","cancelFrame","clearTimeout","nextTimeout","lastTimeout","shift","nextFrame","lastFrame","first","makeSchedule","runnerInfo","start","runner","end","defaultSource","Timeline","timeSource","_timeSource","_startTime","_speed","_persist","_nextFrame","_paused","_runners","_order","_time","_lastSourceTime","_lastStepTime","_step","when","absoluteStartTime","endTime","getEndTime","unschedule","persist","updateTime","_continue","splice","lastRunnerInfo","lastDuration","active","pause","speed","yes","currentSpeed","positive","dtOrForever","immediateStep","dtSource","dtTime","fire","runnersLeft","dtToStart","reset","_timeline","Runner","_queue","_isDeclarative","_history","enabled","_lastTime","_reseted","transformId","_haveReversed","_reverse","_loopsDone","_swing","_wait","_times","_prepareRunner","sanitise","loop","schedule","times","swing","wait","animate","initFn","runFn","retargetFn","isTransform","initialiser","retarget","initialised","finished","queue","loopDuration","loopsDone","partial","swinging","backwards","uncliped","loops","swingForward","running","_lastPosition","justStarted","justFinished","declarative","_initialise","converged","_run","morpher","caller","needsIt","positionOrDt","allfinished","FakeRunner","mergeWith","getRunnerTransform","RunnerArray","runners","ids","leftSibling","lastRunner","_this2","edit","newRunner","deleteCnt","clearTransformsFromQueue","frameId","play","_clearTransformRunnersBefore","currentRunner","_transformationRunners","clearBefore","_currentTransform","addRunner","netTransform","merge","_frameId","styleAttr","zoom","level","affine","_tryRetarget","isMatrix","currentAngle","startTransform","clearTransform","rTarget","rCurrent","possibilities","distances","shortest","affineParameters","addTransform","newTransforms","_rememberMorpher","_queueNumber","_queueNumberDelta","newTo","_queueObject","center","getElementsByTagName","nested","symbol","_build","createTextNode","getComputedTextLength","Text","_rebuild","firstLine","nodeType","newLined","build","tspan","newLine","blankLineOffset","fontSize","getComputedStyle","getPropertyValue","textable","plain","Tspan","ClipPath","targets","unclip","clip","clipWith","clipper","group","link","linkTo","Mask","unmask","mask","maskWith","masker","Style","rule","fontFamily","addText","cssRule","fontface","$create","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","$find","original","res","forced","TextPath","track","textPath","txt","Use","file","use","SVG","win","doc","mock","svgMembers"],"mappings":";iHACA,IAAIA,EAASC,UAAkC,oBAAVC,QAAyBA,OAAOC,MAAQA,KACzED,OAAwB,oBAARE,MAAuBA,KAAKD,MAAQA,KAAOC,KAE3DC,SAAS,cAATA,GACc,iBAAPC,MAAiBA,IAAMN,qBCLlC,IAAIO,EAAON,UAAiB,CAAEO,QAAS,SACrB,iBAAPC,MAAiBA,IAAMF,kBCDjB,SAAUG,GACzB,MAAqB,iBAAPA,EAAyB,OAAPA,EAA4B,mBAAPA,MCAtC,SAAUA,GACzB,IAAKC,EAASD,GAAK,MAAME,UAAUF,EAAK,sBACxC,OAAOA,KCHQ,SAAUG,GACzB,IACE,QAASA,IACT,MAAOC,GACP,OAAO,OCHOC,EAAoB,WACpC,OAA+E,GAAxEC,OAAOC,eAAe,GAAI,IAAK,CAAEC,IAAK,WAAc,OAAO,KA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c,WAEjB+E,GAAOgT,GAAa/X,GAAc,gBAClC+E,GAAOkU,IAAKjZ,GAAc,QAC1B+E,GAAO6N,QAAS5S,GAAc,YAC9B+E,GAAOka,MAAOjf,GAAc,UAE5B+E,GAAOsa,UAAWrf,GAAc,cAEhC+E,GAAOumB,GAAQtrB,GAAc,WAE7BsX,GAAKvS,UtGrIS,IAAI6T,IAAItqB,MsGuItB63B,GAAsB,CACpBtN,GACAlM,GACAuE,GACAwB,GACAgG,GACAqI,GACAoD,KAGFiC,mN5FvKO,eAAyBgP,yDAAM,KAAMC,yDAAM,KAChD9xB,GAAQ5c,OAASyuC,EACjB7xB,GAAQ1b,SAAWwtC,2nBG8Dd,eAAoBC,yDAAOjxB,GAChCP,GAAUwxB,kF0FlEG,SAASH,GAAKnzB,UACpB6B,GAAa7B,UAGtBva,OAAOqH,OAAOqmC,GAAKI"} \ No newline at end of file
diff --git a/dist/svg.node.js b/dist/svg.node.js
index da72a27..53a9e06 100644
--- a/dist/svg.node.js
+++ b/dist/svg.node.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@mick-wout.com>
* @license MIT
*
-* BUILT: Wed Nov 28 2018 13:48:04 GMT+0100 (GMT+01:00)
+* BUILT: Fri Nov 30 2018 13:17:15 GMT+0100 (GMT+01:00)
*/;
'use strict';
@@ -741,114 +741,468 @@ function dispatch(node, event, data) {
return event;
}
-/*
-
-Color {
- constructor (a, b, c, space) {
- space: 'hsl'
- a: 30
- b: 20
- c: 10
- },
-
- toRgb () { return new Color in rgb space }
- toHsl () { return new Color in hsl space }
- toLab () { return new Color in lab space }
+function sixDigitHex(hex$$1) {
+ return hex$$1.length === 4 ? ['#', hex$$1.substring(1, 2), hex$$1.substring(1, 2), hex$$1.substring(2, 3), hex$$1.substring(2, 3), hex$$1.substring(3, 4), hex$$1.substring(3, 4)].join('') : hex$$1;
+}
- toArray () { [space, a, b, c] }
- fromArray () { convert it back }
+function componentHex(component) {
+ const integer = Math.round(component);
+ const hex$$1 = integer.toString(16);
+ return hex$$1.length === 1 ? '0' + hex$$1 : hex$$1;
}
-// Conversions aren't always exact because of monitor profiles etc...
-new Color(h, s, l, 'hsl') !== new Color(r, g, b).hsl()
-new Color(100, 100, 100, [space])
-new Color('hsl(30, 20, 10)')
+function is(object, space) {
+ for (const key of space) {
+ if (object[key] == null) {
+ return false;
+ }
+ }
-// Sugar
-SVG.rgb(30, 20, 50).lab()
-SVG.hsl()
-SVG.lab('rgb(100, 100, 100)')
-*/
+ return true;
+}
-function fullHex(hex$$1) {
- return hex$$1.length === 4 ? ['#', hex$$1.substring(1, 2), hex$$1.substring(1, 2), hex$$1.substring(2, 3), hex$$1.substring(2, 3), hex$$1.substring(3, 4), hex$$1.substring(3, 4)].join('') : hex$$1;
-} // Component to hex value
+function getParameters(a, b) {
+ const params = is(a, 'rgb') ? {
+ _a: a.r,
+ _b: a.g,
+ _c: a.b,
+ space: 'rgb'
+ } : is(a, 'xyz') ? {
+ _a: a.x,
+ _b: a.y,
+ _c: a.z,
+ _d: 0,
+ space: 'xyz'
+ } : is(a, 'hsl') ? {
+ _a: a.h,
+ _b: a.s,
+ _c: a.l,
+ _d: 0,
+ space: 'hsl'
+ } : is(a, 'lab') ? {
+ _a: a.l,
+ _b: a.a,
+ _c: a.b,
+ _d: 0,
+ space: 'lab'
+ } : is(a, 'lch') ? {
+ _a: a.l,
+ _b: a.c,
+ _c: a.h,
+ _d: 0,
+ space: 'lch'
+ } : is(a, 'cmyk') ? {
+ _a: a.c,
+ _b: a.m,
+ _c: a.y,
+ _d: a.k,
+ space: 'cmyk'
+ } : {
+ _a: 0,
+ _b: 0,
+ _c: 0,
+ space: 'rgb'
+ };
+ params.space = b || params.space;
+ return params;
+}
+function cieSpace(space) {
+ if (space === 'lab' || space === 'xyz' || space === 'lch') {
+ return true;
+ } else {
+ return false;
+ }
+}
-function compToHex(comp) {
- var hex$$1 = comp.toString(16);
- return hex$$1.length === 1 ? '0' + hex$$1 : hex$$1;
+function hueToRgb(p, q, t) {
+ if (t < 0) t += 1;
+ if (t > 1) t -= 1;
+ if (t < 1 / 6) return p + (q - p) * 6 * t;
+ if (t < 1 / 2) return q;
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;
+ return p;
}
class Color {
- constructor(...args) {
- this.init(...args);
+ constructor(...inputs) {
+ this.init(...inputs);
}
- init(color, g, b) {
- let match; // initialize defaults
+ init(a = 0, b = 0, c = 0, d = 0, space = 'rgb') {
+ // Reset all values in case the init function is rerun with new color space
+ if (this.space) {
+ for (let component in this.space) {
+ delete this[this.space[component]];
+ }
+ }
- this.r = 0;
- this.g = 0;
- this.b = 0;
- if (!color) return; // parse color
+ if (typeof a === 'number') {
+ // Allow for the case that we don't need d...
+ space = typeof d === 'string' ? d : space;
+ d = typeof d === 'string' ? 0 : d; // Assign the values straight to the color
+
+ Object.assign(this, {
+ _a: a,
+ _b: b,
+ _c: c,
+ _d: d,
+ space
+ }); // If the user gave us an array, make the color from it
+ } else if (a instanceof Array) {
+ this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb';
+ Object.assign(this, {
+ _a: a[0],
+ _b: a[1],
+ _c: a[2],
+ _d: a[3] || 0
+ });
+ } else if (a instanceof Object) {
+ // Set the object up and assign its values directly
+ const values = getParameters(a, b);
+ Object.assign(this, values);
+ } else if (typeof a === 'string') {
+ if (isRgb.test(a)) {
+ const noWhitespace = a.replace(whitespace, '');
+ const [_a, _b, _c] = rgb.exec(noWhitespace).slice(1, 4).map(v => parseInt(v));
+ Object.assign(this, {
+ _a,
+ _b,
+ _c,
+ _d: 0,
+ space: 'rgb'
+ });
+ } else if (isHex.test(a)) {
+ const hexParse = v => parseInt(v, 16);
+
+ const [, _a, _b, _c] = hex.exec(sixDigitHex(a)).map(hexParse);
+ Object.assign(this, {
+ _a,
+ _b,
+ _c,
+ _d: 0,
+ space: 'rgb'
+ });
+ } else throw Error(`Unsupported string format, can't construct Color`);
+ } // Now add the components as a convenience
- if (typeof color === 'string') {
- if (isRgb.test(color)) {
- // get rgb values
- match = rgb.exec(color.replace(whitespace, '')); // parse numeric values
- this.r = parseInt(match[1]);
- this.g = parseInt(match[2]);
- this.b = parseInt(match[3]);
- } else if (isHex.test(color)) {
- // get hex values
- match = hex.exec(fullHex(color)); // parse numeric values
+ const {
+ _a,
+ _b,
+ _c,
+ _d
+ } = this;
+ const components = this.space === 'rgb' ? {
+ r: _a,
+ g: _b,
+ b: _c
+ } : this.space === 'xyz' ? {
+ x: _a,
+ y: _b,
+ z: _c
+ } : this.space === 'hsl' ? {
+ h: _a,
+ s: _b,
+ l: _c
+ } : this.space === 'lab' ? {
+ l: _a,
+ a: _b,
+ b: _c
+ } : this.space === 'lch' ? {
+ l: _a,
+ c: _b,
+ h: _c
+ } : this.space === 'cmyk' ? {
+ c: _a,
+ m: _b,
+ y: _c,
+ k: _d
+ } : {};
+ Object.assign(this, components);
+ }
+ /*
+ Conversion Methods
+ */
- this.r = parseInt(match[1], 16);
- this.g = parseInt(match[2], 16);
- this.b = parseInt(match[3], 16);
- }
- } else if (Array.isArray(color)) {
- this.r = color[0];
- this.g = color[1];
- this.b = color[2];
- } else if (typeof color === 'object') {
- this.r = color.r;
- this.g = color.g;
- this.b = color.b;
- } else if (arguments.length === 3) {
- this.r = color;
- this.g = g;
- this.b = b;
+
+ rgb() {
+ if (this.space === 'rgb') {
+ return this;
+ } else if (cieSpace(this.space)) {
+ // Convert to the xyz color space
+ let {
+ x,
+ y,
+ z
+ } = this;
+
+ if (this.space === 'lab' || this.space === 'lch') {
+ // Get the values in the lab space
+ let {
+ l,
+ a,
+ b
+ } = this;
+
+ if (this.space === 'lch') {
+ let {
+ c,
+ h
+ } = this;
+ const dToR = Math.PI / 180;
+ a = c * Math.cos(dToR * h);
+ b = c * Math.sin(dToR * h);
+ } // Undo the nonlinear function
+
+
+ const yL = (l + 16) / 116;
+ const xL = a / 500 + yL;
+ const zL = yL - b / 200; // Get the xyz values
+
+ const ct = 16 / 116;
+ const mx = 0.008856;
+ const nm = 7.787;
+ x = 0.95047 * (Math.pow(xL, 3) > mx ? Math.pow(xL, 3) : (xL - ct) / nm);
+ y = 1.00000 * (Math.pow(yL, 3) > mx ? Math.pow(yL, 3) : (yL - ct) / nm);
+ z = 1.08883 * (Math.pow(zL, 3) > mx ? Math.pow(zL, 3) : (zL - ct) / nm);
+ } // Convert xyz to unbounded rgb values
+
+
+ const rU = x * 3.2406 + y * -1.5372 + z * -0.4986;
+ const gU = x * -0.9689 + y * 1.8758 + z * 0.0415;
+ const bU = x * 0.0557 + y * -0.2040 + z * 1.0570; // Convert the values to true rgb values
+
+ let pow = Math.pow;
+ let bd = 0.0031308;
+ const r = rU > bd ? 1.055 * pow(rU, 1 / 2.4) - 0.055 : 12.92 * rU;
+ const g = gU > bd ? 1.055 * pow(gU, 1 / 2.4) - 0.055 : 12.92 * gU;
+ const b = bU > bd ? 1.055 * pow(bU, 1 / 2.4) - 0.055 : 12.92 * bU; // Make and return the color
+
+ const color = new Color(255 * r, 255 * g, 255 * b);
+ return color;
+ } else if (this.space === 'hsl') {
+ // https://bgrins.github.io/TinyColor/docs/tinycolor.html
+ // Get the current hsl values
+ let {
+ h,
+ s,
+ l
+ } = this;
+ h /= 360;
+ s /= 100;
+ l /= 100; // If we are grey, then just make the color directly
+
+ if (s === 0) {
+ l *= 255;
+ let color = new Color(l, l, l);
+ return color;
+ } // TODO I have no idea what this does :D If you figure it out, tell me!
+
+
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
+ const p = 2 * l - q; // Get the rgb values
+
+ const r = 255 * hueToRgb(p, q, h + 1 / 3);
+ const g = 255 * hueToRgb(p, q, h);
+ const b = 255 * hueToRgb(p, q, h - 1 / 3); // Make a new color
+
+ const color = new Color(r, g, b);
+ return color;
+ } else if (this.space === 'cmyk') {
+ // https://gist.github.com/felipesabino/5066336
+ // Get the normalised cmyk values
+ const {
+ c,
+ m,
+ y,
+ k
+ } = this; // Get the rgb values
+
+ const r = 255 * (1 - Math.min(1, c * (1 - k) + k));
+ const g = 255 * (1 - Math.min(1, m * (1 - k) + k));
+ const b = 255 * (1 - Math.min(1, y * (1 - k) + k)); // Form the color and return it
+
+ const color = new Color(r, g, b);
+ return color;
+ } else {
+ return this;
}
+ }
- return this;
- } // Default to hex conversion
+ lab() {
+ // Get the xyz color
+ const {
+ x,
+ y,
+ z
+ } = this.xyz(); // Get the lab components
+ const l = 116 * y - 16;
+ const a = 500 * (x - y);
+ const b = 200 * (y - z); // Construct and return a new color
- toString() {
- return this.toHex();
+ const color = new Color(l, a, b, 'lab');
+ return color;
}
- toArray() {
- return [this.r, this.g, this.b];
- } // Build hex value
+ xyz() {
+ // Normalise the red, green and blue values
+ const {
+ _a: r255,
+ _b: g255,
+ _c: b255
+ } = this.rgb();
+ const [r, g, b] = [r255, g255, b255].map(v => v / 255); // Convert to the lab rgb space
+
+ const rL = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92;
+ const gL = g > 0.04045 ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92;
+ const bL = b > 0.04045 ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92; // Convert to the xyz color space without bounding the values
+
+ const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047;
+ const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.00000;
+ const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883; // Get the proper xyz values by applying the bounding
+
+ const x = xU > 0.008856 ? Math.pow(xU, 1 / 3) : 7.787 * xU + 16 / 116;
+ const y = yU > 0.008856 ? Math.pow(yU, 1 / 3) : 7.787 * yU + 16 / 116;
+ const z = zU > 0.008856 ? Math.pow(zU, 1 / 3) : 7.787 * zU + 16 / 116; // Make and return the color
+
+ const color = new Color(x, y, z, 'xyz');
+ return color;
+ }
+
+ lch() {
+ // Get the lab color directly
+ const {
+ l,
+ a,
+ b
+ } = this.lab(); // Get the chromaticity and the hue using polar coordinates
+
+ const c = Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));
+ let h = 180 * Math.atan2(b, a) / Math.PI;
+
+ if (h < 0) {
+ h *= -1;
+ h = 360 - h;
+ } // Make a new color and return it
+
+
+ const color = new Color(l, c, h, 'lch');
+ return color;
+ }
+
+ hsl() {
+ // Get the rgb values
+ const {
+ _a,
+ _b,
+ _c
+ } = this.rgb();
+ const [r, g, b] = [_a, _b, _c].map(v => v / 255); // Find the maximum and minimum values to get the lightness
+
+ const max = Math.max(r, g, b);
+ const min = Math.min(r, g, b);
+ const l = (max + min) / 2; // If the r, g, v values are identical then we are grey
+
+ const isGrey = max === min; // Calculate the hue and saturation
+
+ const delta = max - min;
+ const s = isGrey ? 0 : l > 0.5 ? delta / (2 - max - min) : delta / (max + min);
+ const h = isGrey ? 0 : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6 : max === g ? ((b - r) / delta + 2) / 6 : max === b ? ((r - g) / delta + 4) / 6 : 0; // Construct and return the new color
+
+ const color = new Color(360 * h, 100 * s, 100 * l, 'hsl');
+ return color;
+ }
+
+ cmyk() {
+ // Get the rgb values for the current color
+ const {
+ _a,
+ _b,
+ _c
+ } = this.rgb();
+ const [r, g, b] = [_a, _b, _c].map(v => v / 255); // Get the cmyk values in an unbounded format
+
+ const k = Math.min(1 - r, 1 - g, 1 - b);
+
+ if (k === 1) {
+ // Catch the black case
+ return new Color(0, 0, 0, 1, 'cmyk');
+ }
+
+ const c = (1 - r - k) / (1 - k);
+ const m = (1 - g - k) / (1 - k);
+ const y = (1 - b - k) / (1 - k); // Construct the new color
+
+ const color = new Color(c, m, y, k, 'cmyk');
+ return color;
+ }
+ /*
+ Input and Output methods
+ */
toHex() {
- return '#' + compToHex(Math.round(this.r)) + compToHex(Math.round(this.g)) + compToHex(Math.round(this.b));
- } // Build rgb value
+ let {
+ _a,
+ _b,
+ _c
+ } = this.rgb();
+ let [r, g, b] = [_a, _b, _c].map(componentHex);
+ return `#${r}${g}${b}`;
+ }
+ toString() {
+ return this.toHex();
+ }
toRgb() {
- return 'rgb(' + [this.r, this.g, this.b].join() + ')';
- } // Calculate true brightness
+ let {
+ r,
+ g,
+ b
+ } = this.rgb();
+ let {
+ max,
+ min,
+ round
+ } = Math;
+
+ let format = v => max(0, min(round(v), 255));
+
+ let [rV, gV, bV] = [r, g, b].map(format);
+ let string = `rgb(${rV},${gV},${bV})`;
+ return string;
+ }
+
+ toArray() {
+ let {
+ _a,
+ _b,
+ _c,
+ _d,
+ space
+ } = this;
+ return [_a, _b, _c, _d, space];
+ }
+ /*
+ Generating random colors
+ */
- brightness() {
- return this.r / 255 * 0.30 + this.g / 255 * 0.59 + this.b / 255 * 0.11;
- } // Testers
+ static random(mode = 'vibrant') {
+ 'sine';
+ 'pastel';
+ 'vibrant';
+ 'dark';
+ 'rgb';
+ 'lab';
+ 'grey';
+ }
+ /*
+ Constructing colors
+ */
// Test if given value is a color string
@@ -2342,7 +2696,7 @@ var sugar = {
return this.attr(m);
}
- if (typeof o === 'string' || Color.isRgb(o) || o instanceof Element) {
+ if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || o instanceof Element) {
this.attr(m, o);
} else {
// set all attributes from sugar.fill and sugar.stroke list
@@ -3295,9 +3649,9 @@ var _descriptors = !_fails(function () {
var document$1 = _global.document;
// typeof document.createElement is 'object' in old IE
-var is = _isObject(document$1) && _isObject(document$1.createElement);
+var is$1 = _isObject(document$1) && _isObject(document$1.createElement);
var _domCreate = function (it) {
- return is ? document$1.createElement(it) : {};
+ return is$1 ? document$1.createElement(it) : {};
};
var _ie8DomDefine = !_descriptors && !_fails(function () {
@@ -4099,7 +4453,13 @@ class Morphable {
}
}
- var result = new this._type(value).toArray();
+ var result = new this._type(value);
+
+ if (this._type === Color) {
+ result = this._to ? result[this._to[4]]() : this._from ? result[this._from[4]]() : result;
+ }
+
+ result = result.toArray();
this._morphObj = this._morphObj || new this._type();
this._context = this._context || Array.apply(null, Array(result.length)).map(Object);
return result;
diff --git a/dist/svg.node.js.map b/dist/svg.node.js.map
index b5a7e7f..f42f22d 100644
--- a/dist/svg.node.js.map
+++ b/dist/svg.node.js.map
@@ -1 +1 @@
-{"version":3,"file":"svg.node.js","sources":["../src/utils/methods.js","../src/utils/utils.js","../src/modules/core/namespaces.js","../src/utils/window.js","../src/types/Base.js","../src/utils/adopter.js","../src/modules/optional/arrange.js","../src/modules/core/regex.js","../src/modules/optional/class.js","../src/modules/optional/css.js","../src/modules/optional/data.js","../src/modules/optional/memory.js","../src/modules/core/event.js","../src/types/Color.js","../src/types/Point.js","../src/modules/core/parser.js","../src/types/Box.js","../src/types/Matrix.js","../src/types/ArrayPolyfill.js","../src/types/List.js","../src/modules/core/selector.js","../src/types/EventTarget.js","../src/modules/core/defaults.js","../src/types/SVGArray.js","../src/types/SVGNumber.js","../src/modules/core/attr.js","../src/elements/Dom.js","../src/elements/Element.js","../src/modules/optional/sugar.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/objectSpread.js","../src/modules/optional/transform.js","../src/modules/core/circled.js","../src/elements/Shape.js","../src/elements/Circle.js","../src/elements/Container.js","../src/elements/Defs.js","../src/elements/Ellipse.js","../src/elements/Stop.js","../src/modules/core/gradiented.js","../src/elements/Gradient.js","../src/elements/Pattern.js","../src/elements/Image.js","../src/types/PointArray.js","../src/modules/core/pointed.js","../src/elements/Line.js","../src/elements/Marker.js","../node_modules/core-js/modules/_global.js","../node_modules/core-js/modules/_core.js","../node_modules/core-js/modules/_is-object.js","../node_modules/core-js/modules/_an-object.js","../node_modules/core-js/modules/_fails.js","../node_modules/core-js/modules/_descriptors.js","../node_modules/core-js/modules/_dom-create.js","../node_modules/core-js/modules/_ie8-dom-define.js","../node_modules/core-js/modules/_to-primitive.js","../node_modules/core-js/modules/_object-dp.js","../node_modules/core-js/modules/_property-desc.js","../node_modules/core-js/modules/_hide.js","../node_modules/core-js/modules/_has.js","../node_modules/core-js/modules/_uid.js","../node_modules/core-js/modules/_redefine.js","../node_modules/core-js/modules/_a-function.js","../node_modules/core-js/modules/_ctx.js","../node_modules/core-js/modules/_export.js","../node_modules/core-js/modules/_defined.js","../node_modules/core-js/modules/_to-object.js","../node_modules/core-js/modules/_strict-method.js","../node_modules/core-js/modules/es6.array.sort.js","../src/animation/Controller.js","../src/types/PathArray.js","../src/animation/Morphable.js","../src/elements/Path.js","../src/modules/core/poly.js","../src/elements/Polygon.js","../src/elements/Polyline.js","../src/elements/Rect.js","../src/animation/Queue.js","../src/animation/Animator.js","../src/animation/Timeline.js","../src/animation/Runner.js","../src/elements/Svg.js","../src/elements/Symbol.js","../src/modules/core/textable.js","../src/elements/Text.js","../src/elements/Tspan.js","../src/elements/ClipPath.js","../src/elements/G.js","../src/elements/A.js","../src/elements/Mask.js","../src/elements/Style.js","../src/elements/TextPath.js","../src/elements/Use.js","../src/main.js"],"sourcesContent":["const methods = {}\r\nconst names = []\r\n\r\nexport function registerMethods (name, m) {\r\n if (Array.isArray(name)) {\r\n for (let _name of name) {\r\n registerMethods(_name, m)\r\n }\r\n return\r\n }\r\n\r\n if (typeof name === 'object') {\r\n for (let _name in name) {\r\n registerMethods(_name, name[_name])\r\n }\r\n return\r\n }\r\n\r\n addMethodNames(Object.keys(m))\r\n methods[name] = Object.assign(methods[name] || {}, m)\r\n}\r\n\r\nexport function getMethodsFor (name) {\r\n return methods[name] || {}\r\n}\r\n\r\nexport function getMethodNames () {\r\n return [...new Set(names)]\r\n}\r\n\r\nexport function addMethodNames (_names) {\r\n names.push(..._names)\r\n}\r\n","// Map function\r\nexport function map (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n result.push(block(array[i]))\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Filter function\r\nexport function filter (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n if (block(array[i])) { result.push(array[i]) }\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Degrees to radians\r\nexport function radians (d) {\r\n return d % 360 * Math.PI / 180\r\n}\r\n\r\n// Radians to degrees\r\nexport function degrees (r) {\r\n return r * 180 / Math.PI % 360\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nexport function camelCase (s) {\r\n return s.toLowerCase().replace(/-(.)/g, function (m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Convert camel cased string to string seperated\r\nexport function unCamelCase (s) {\r\n return s.replace(/([A-Z])/g, function (m, g) {\r\n return '-' + g.toLowerCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nexport function capitalize (s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nexport function proportionalSize (element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null) {\r\n width = box.width / box.height * height\r\n } else if (height == null) {\r\n height = box.height / box.width * width\r\n }\r\n }\r\n\r\n return {\r\n width: width,\r\n height: height\r\n }\r\n}\r\n\r\nexport function getOrigin (o, element) {\r\n // Allow origin or around as the names\r\n let origin = o.origin // o.around == null ? o.origin : o.around\r\n let ox, oy\r\n\r\n // Allow the user to pass a string to rotate around a given point\r\n if (typeof origin === 'string' || origin == null) {\r\n // Get the bounding box of the element with no transformations applied\r\n const string = (origin || 'center').toLowerCase().trim()\r\n const { height, width, x, y } = element.bbox()\r\n\r\n // Calculate the transformed x and y coordinates\r\n let bx = string.includes('left') ? x\r\n : string.includes('right') ? x + width\r\n : x + width / 2\r\n let by = string.includes('top') ? y\r\n : string.includes('bottom') ? y + height\r\n : y + height / 2\r\n\r\n // Set the bounds eg : \"bottom-left\", \"Top right\", \"middle\" etc...\r\n ox = o.ox != null ? o.ox : bx\r\n oy = o.oy != null ? o.oy : by\r\n } else {\r\n ox = origin[0]\r\n oy = origin[1]\r\n }\r\n\r\n // Return the origin as it is if it wasn't a string\r\n return [ ox, oy ]\r\n}\r\n","// Default namespaces\r\nexport let ns = 'http://www.w3.org/2000/svg'\r\nexport let xmlns = 'http://www.w3.org/2000/xmlns/'\r\nexport let xlink = 'http://www.w3.org/1999/xlink'\r\nexport let svgjs = 'http://svgjs.com/svgjs'\r\n","export const globals = {\r\n window: typeof window === 'undefined' ? null : window,\r\n document: typeof document === 'undefined' ? null : document\r\n}\r\n\r\nexport function registerWindow (win = null, doc = null) {\r\n globals.window = win\r\n globals.document = doc\r\n}\r\n\r\nconst save = {}\r\n\r\nexport function saveWindow () {\r\n save.window = globals.window\r\n save.document = globals.document\r\n}\r\n\r\nexport function restoreWindow () {\r\n globals.window = save.window\r\n globals.document = save.document\r\n}\r\n\r\nexport function withWindow (win, fn) {\r\n saveWindow()\r\n registerWindow(win, win.document)\r\n fn(win, win.document)\r\n restoreWindow()\r\n}\r\n\r\nexport function getWindow () {\r\n return globals.window\r\n}\r\n","export default class Base {\r\n // constructor (node/*, {extensions = []} */) {\r\n // // this.tags = []\r\n // //\r\n // // for (let extension of extensions) {\r\n // // extension.setup.call(this, node)\r\n // // this.tags.push(extension.name)\r\n // // }\r\n // }\r\n}\r\n","import { addMethodNames } from './methods.js'\r\nimport { capitalize } from './utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Base from '../types/Base.js'\r\n\r\nconst elements = {}\r\nexport const root = '___SYMBOL___ROOT___'\r\n\r\n// Method for element creation\r\nexport function makeNode (name) {\r\n // create element\r\n return globals.document.createElementNS(ns, name)\r\n}\r\n\r\nexport function makeInstance (element) {\r\n if (element instanceof Base) return element\r\n\r\n if (typeof element === 'object') {\r\n return adopter(element)\r\n }\r\n\r\n if (element == null) {\r\n return new elements[root]()\r\n }\r\n\r\n if (typeof element === 'string' && element.charAt(0) !== '<') {\r\n return adopter(globals.document.querySelector(element))\r\n }\r\n\r\n var node = makeNode('svg')\r\n node.innerHTML = element\r\n\r\n // We can use firstChild here because we know,\r\n // that the first char is < and thus an element\r\n element = adopter(node.firstChild)\r\n\r\n return element\r\n}\r\n\r\nexport function nodeOrNew (name, node) {\r\n return node instanceof globals.window.Node ? node : makeNode(name)\r\n}\r\n\r\n// Adopt existing svg elements\r\nexport function adopt (node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance instanceof Base) return node.instance\r\n\r\n // initialize variables\r\n var className = capitalize(node.nodeName)\r\n\r\n // Make sure that gradients are adopted correctly\r\n if (className === 'LinearGradient' || className === 'RadialGradient') {\r\n className = 'Gradient'\r\n\r\n // Fallback to Dom if element is not known\r\n } else if (!elements[className]) {\r\n className = 'Dom'\r\n }\r\n\r\n return new elements[className](node)\r\n}\r\n\r\nlet adopter = adopt\r\n\r\nexport function mockAdopt (mock = adopt) {\r\n adopter = mock\r\n}\r\n\r\nexport function register (element, name = element.name, asRoot = false) {\r\n elements[name] = element\r\n if (asRoot) elements[root] = element\r\n\r\n addMethodNames(Object.keys(element.prototype))\r\n\r\n return element\r\n}\r\n\r\nexport function getClass (name) {\r\n return elements[name]\r\n}\r\n\r\n// Element id sequence\r\nlet did = 1000\r\n\r\n// Get next named element id\r\nexport function eid (name) {\r\n return 'Svgjs' + capitalize(name) + (did++)\r\n}\r\n\r\n// Deep new id assignment\r\nexport function assignNewId (node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.children.length - 1; i >= 0; i--) {\r\n assignNewId(node.children[i])\r\n }\r\n\r\n if (node.id) {\r\n return adopt(node).id(eid(node.nodeName))\r\n }\r\n\r\n return adopt(node)\r\n}\r\n\r\n// Method for extending objects\r\nexport function extend (modules, methods, attrCheck) {\r\n var key, i\r\n\r\n modules = Array.isArray(modules) ? modules : [modules]\r\n\r\n for (i = modules.length - 1; i >= 0; i--) {\r\n for (key in methods) {\r\n let method = methods[key]\r\n if (attrCheck) {\r\n method = wrapWithAttrCheck(methods[key])\r\n }\r\n modules[i].prototype[key] = method\r\n }\r\n }\r\n}\r\n\r\n// export function extendWithAttrCheck (...args) {\r\n// extend(...args, true)\r\n// }\r\n\r\nexport function wrapWithAttrCheck (fn) {\r\n return function (...args) {\r\n let o = args[args.length - 1]\r\n\r\n if (o && o.constructor === Object && !(o instanceof Array)) {\r\n return fn.apply(this, args.slice(0, -1)).attr(o)\r\n } else {\r\n return fn.apply(this, args)\r\n }\r\n }\r\n}\r\n","import { makeInstance } from '../../utils/adopter.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Get all siblings, including myself\r\nexport function siblings () {\r\n return this.parent().children()\r\n}\r\n\r\n// Get the curent position siblings\r\nexport function position () {\r\n return this.parent().index(this)\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function next () {\r\n return this.siblings()[this.position() + 1]\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function prev () {\r\n return this.siblings()[this.position() - 1]\r\n}\r\n\r\n// Send given element one step forward\r\nexport function forward () {\r\n var i = this.position() + 1\r\n var p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element one step backward\r\nexport function backward () {\r\n var i = this.position()\r\n\r\n if (i > 0) {\r\n this.parent().removeElement(this).add(this, i - 1)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the front\r\nexport function front () {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the back\r\nexport function back () {\r\n if (this.position() > 0) {\r\n this.parent().removeElement(this).add(this, 0)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element before the targeted element\r\nexport function before (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element after the targeted element\r\nexport function after (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n}\r\n\r\nexport function insertBefore (element) {\r\n element = makeInstance(element)\r\n element.before(this)\r\n}\r\n\r\nexport function insertAfter (element) {\r\n element = makeInstance(element)\r\n element.after(this)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n siblings,\r\n position,\r\n next,\r\n prev,\r\n forward,\r\n backward,\r\n front,\r\n back,\r\n before,\r\n after,\r\n insertBefore,\r\n insertAfter\r\n})\r\n","// Parse unit value\r\nexport let numberAndUnit = /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n// Parse hex value\r\nexport let hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n// Parse rgb value\r\nexport let rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n// Parse reference id\r\nexport let reference = /(#[a-z0-9\\-_]+)/i\r\n\r\n// splits a transformation chain\r\nexport let transforms = /\\)\\s*,?\\s*/\r\n\r\n// Whitespace\r\nexport let whitespace = /\\s/g\r\n\r\n// Test hex value\r\nexport let isHex = /^#[a-f0-9]{3,6}$/i\r\n\r\n// Test rgb value\r\nexport let isRgb = /^rgb\\(/\r\n\r\n// Test css declaration\r\nexport let isCss = /[^:]+:[^;]+;?/\r\n\r\n// Test for blank string\r\nexport let isBlank = /^(\\s+)?$/\r\n\r\n// Test for numeric string\r\nexport let isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n// Test for percent value\r\nexport let isPercent = /^-?[\\d.]+%$/\r\n\r\n// Test for image url\r\nexport let isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n// split at whitespace and comma\r\nexport let delimiter = /[\\s,]+/\r\n\r\n// The following regex are used to parse the d attribute of a path\r\n\r\n// Matches all hyphens which are not after an exponent\r\nexport let hyphen = /([^e])-/gi\r\n\r\n// Replaces and tests for all path letters\r\nexport let pathLetters = /[MLHVCSQTAZ]/gi\r\n\r\n// yes we need this one, too\r\nexport let isPathLetter = /[MLHVCSQTAZ]/i\r\n\r\n// matches 0.154.23.45\r\nexport let numbersWithDots = /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n// matches .\r\nexport let dots = /\\./g\r\n","import { delimiter } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Return array of classes on the node\r\nexport function classes () {\r\n var attr = this.attr('class')\r\n return attr == null ? [] : attr.trim().split(delimiter)\r\n}\r\n\r\n// Return true if class exists on the node, false otherwise\r\nexport function hasClass (name) {\r\n return this.classes().indexOf(name) !== -1\r\n}\r\n\r\n// Add class to the node\r\nexport function addClass (name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Remove class from the node\r\nexport function removeClass (name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function (c) {\r\n return c !== name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Toggle the presence of a class on the node\r\nexport function toggleClass (name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n classes, hasClass, addClass, removeClass, toggleClass\r\n})\r\n","import { camelCase } from '../../utils/utils.js'\r\nimport { isBlank } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Dynamic style generator\r\nexport function css (style, val) {\r\n let ret = {}\r\n if (arguments.length === 0) {\r\n // get full style as object\r\n this.node.style.cssText.split(/\\s*;\\s*/)\r\n .filter(function (el) { return !!el.length })\r\n .forEach(function (el) {\r\n let t = el.split(/\\s*:\\s*/)\r\n ret[t[0]] = t[1]\r\n })\r\n return ret\r\n }\r\n\r\n if (arguments.length < 2) {\r\n // get style properties in the array\r\n if (Array.isArray(style)) {\r\n for (let name of style) {\r\n let cased = camelCase(name)\r\n ret[cased] = this.node.style[cased]\r\n }\r\n return ret\r\n }\r\n\r\n // get style for property\r\n if (typeof style === 'string') {\r\n return this.node.style[camelCase(style)]\r\n }\r\n\r\n // set styles in object\r\n if (typeof style === 'object') {\r\n for (let name in style) {\r\n // set empty string if null/undefined/'' was given\r\n this.node.style[camelCase(name)] =\r\n (style[name] == null || isBlank.test(style[name])) ? '' : style[name]\r\n }\r\n }\r\n }\r\n\r\n // set style for property\r\n if (arguments.length === 2) {\r\n this.node.style[camelCase(style)] =\r\n (val == null || isBlank.test(val)) ? '' : val\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Show element\r\nexport function show () {\r\n return this.css('display', '')\r\n}\r\n\r\n// Hide element\r\nexport function hide () {\r\n return this.css('display', 'none')\r\n}\r\n\r\n// Is element visible?\r\nexport function visible () {\r\n return this.css('display') !== 'none'\r\n}\r\n\r\nregisterMethods('Dom', {\r\n css, show, hide, visible\r\n})\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Store data values on svg nodes\r\nexport function data (a, v, r) {\r\n if (typeof a === 'object') {\r\n for (v in a) {\r\n this.data(v, a[v])\r\n }\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch (e) {\r\n return this.attr('data-' + a)\r\n }\r\n } else {\r\n this.attr('data-' + a,\r\n v === null ? null\r\n : r === true || typeof v === 'string' || typeof v === 'number' ? v\r\n : JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n}\r\n\r\nregisterMethods('Dom', { data })\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Remember arbitrary data\r\nexport function remember (k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] === 'object') {\r\n for (var key in k) {\r\n this.remember(key, k[key])\r\n }\r\n } else if (arguments.length === 1) {\r\n // retrieve memory\r\n return this.memory()[k]\r\n } else {\r\n // store memory\r\n this.memory()[k] = v\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Erase a given memory\r\nexport function forget () {\r\n if (arguments.length === 0) {\r\n this._memory = {}\r\n } else {\r\n for (var i = arguments.length - 1; i >= 0; i--) {\r\n delete this.memory()[arguments[i]]\r\n }\r\n }\r\n return this\r\n}\r\n\r\n// This triggers creation of a new hidden class which is not performant\r\n// However, this function is not rarely used so it will not happen frequently\r\n// Return local memory object\r\nexport function memory () {\r\n return (this._memory = this._memory || {})\r\n}\r\n\r\nregisterMethods('Dom', { remember, forget, memory })\r\n","import { delimiter } from './regex.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\n\r\nlet listenerId = 0\r\n\r\nfunction getEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (!n.events) n.events = {}\r\n return n.events\r\n}\r\n\r\nfunction getEventTarget (node) {\r\n return makeInstance(node).getEventTarget()\r\n}\r\n\r\nfunction clearEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (n.events) n.events = {}\r\n}\r\n\r\n// Add event binder in the SVG namespace\r\nexport function on (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // events can be an array of events or a string of events\r\n events = Array.isArray(events) ? events : events.split(delimiter)\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) {\r\n listener._svgjsListenerId = ++listenerId\r\n }\r\n\r\n events.forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nexport function off (node, events, listener, options) {\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n // events can be an array of events or a string or undefined\r\n events = Array.isArray(events) ? events : (events || '').split(delimiter)\r\n\r\n events.forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) { off(n, [ev, ns].join('.'), l) }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) { off(n, [event, ns].join('.')) }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) { off(n, [ev, namespace].join('.')) }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) { off(n, event) }\r\n\r\n clearEvents(node)\r\n }\r\n })\r\n}\r\n\r\nexport function dispatch (node, event, data) {\r\n var n = getEventTarget(node)\r\n\r\n // Dispatch event\r\n if (event instanceof globals.window.Event) {\r\n n.dispatchEvent(event)\r\n } else {\r\n event = new globals.window.CustomEvent(event, { detail: data, cancelable: true })\r\n n.dispatchEvent(event)\r\n }\r\n return event\r\n}\r\n","/*\r\n\r\nColor {\r\n constructor (a, b, c, space) {\r\n space: 'hsl'\r\n a: 30\r\n b: 20\r\n c: 10\r\n },\r\n\r\n toRgb () { return new Color in rgb space }\r\n toHsl () { return new Color in hsl space }\r\n toLab () { return new Color in lab space }\r\n\r\n toArray () { [space, a, b, c] }\r\n fromArray () { convert it back }\r\n}\r\n\r\n// Conversions aren't always exact because of monitor profiles etc...\r\nnew Color(h, s, l, 'hsl') !== new Color(r, g, b).hsl()\r\nnew Color(100, 100, 100, [space])\r\nnew Color('hsl(30, 20, 10)')\r\n\r\n// Sugar\r\nSVG.rgb(30, 20, 50).lab()\r\nSVG.hsl()\r\nSVG.lab('rgb(100, 100, 100)')\r\n*/\r\n\r\nimport { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\r\n\r\n// Ensure to six-based hex\r\nfunction fullHex (hex) {\r\n return hex.length === 4\r\n ? [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2),\r\n hex.substring(2, 3), hex.substring(2, 3),\r\n hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('')\r\n : hex\r\n}\r\n\r\n// Component to hex value\r\nfunction compToHex (comp) {\r\n var hex = comp.toString(16)\r\n return hex.length === 1 ? '0' + hex : hex\r\n}\r\n\r\nexport default class Color {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (color, g, b) {\r\n let match\r\n\r\n // initialize defaults\r\n this.r = 0\r\n this.g = 0\r\n this.b = 0\r\n\r\n if (!color) return\r\n\r\n // parse color\r\n if (typeof color === 'string') {\r\n if (isRgb.test(color)) {\r\n // get rgb values\r\n match = rgb.exec(color.replace(whitespace, ''))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1])\r\n this.g = parseInt(match[2])\r\n this.b = parseInt(match[3])\r\n } else if (isHex.test(color)) {\r\n // get hex values\r\n match = hex.exec(fullHex(color))\r\n\r\n // parse numeric values\r\n this.r = parseInt(match[1], 16)\r\n this.g = parseInt(match[2], 16)\r\n this.b = parseInt(match[3], 16)\r\n }\r\n } else if (Array.isArray(color)) {\r\n this.r = color[0]\r\n this.g = color[1]\r\n this.b = color[2]\r\n } else if (typeof color === 'object') {\r\n this.r = color.r\r\n this.g = color.g\r\n this.b = color.b\r\n } else if (arguments.length === 3) {\r\n this.r = color\r\n this.g = g\r\n this.b = b\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Default to hex conversion\r\n toString () {\r\n return this.toHex()\r\n }\r\n\r\n toArray () {\r\n return [this.r, this.g, this.b]\r\n }\r\n\r\n // Build hex value\r\n toHex () {\r\n return '#' +\r\n compToHex(Math.round(this.r)) +\r\n compToHex(Math.round(this.g)) +\r\n compToHex(Math.round(this.b))\r\n }\r\n\r\n // Build rgb value\r\n toRgb () {\r\n return 'rgb(' + [this.r, this.g, this.b].join() + ')'\r\n }\r\n\r\n // Calculate true brightness\r\n brightness () {\r\n return (this.r / 255 * 0.30) +\r\n (this.g / 255 * 0.59) +\r\n (this.b / 255 * 0.11)\r\n }\r\n\r\n // Testers\r\n\r\n // Test if given value is a color string\r\n static test (color) {\r\n color += ''\r\n return isHex.test(color) || isRgb.test(color)\r\n }\r\n\r\n // Test if given value is a rgb object\r\n static isRgb (color) {\r\n return color && typeof color.r === 'number' &&\r\n typeof color.g === 'number' &&\r\n typeof color.b === 'number'\r\n }\r\n\r\n // Test if given value is a color\r\n static isColor (color) {\r\n return this.isRgb(color) || this.test(color)\r\n }\r\n}\r\n","export default class Point {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (x, y) {\r\n let source\r\n let base = { x: 0, y: 0 }\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ? { x: x[0], y: x[1] }\r\n : typeof x === 'object' ? { x: x.x, y: x.y }\r\n : { x: x, y: y }\r\n\r\n // merge source\r\n this.x = source.x == null ? base.x : source.x\r\n this.y = source.y == null ? base.y : source.y\r\n\r\n return this\r\n }\r\n\r\n // Clone point\r\n clone () {\r\n return new Point(this)\r\n }\r\n\r\n // transform point with matrix\r\n transform (m) {\r\n // Perform the matrix multiplication\r\n var x = m.a * this.x + m.c * this.y + m.e\r\n var y = m.b * this.x + m.d * this.y + m.f\r\n\r\n // Return the required point\r\n return new Point(x, y)\r\n }\r\n\r\n toArray () {\r\n return [this.x, this.y]\r\n }\r\n}\r\n\r\nexport function point (x, y) {\r\n return new Point(x, y).transform(this.screenCTM().inverse())\r\n}\r\n","import { globals } from '../../utils/window.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\n\r\nexport default function parser () {\r\n // Reuse cached element if possible\r\n if (!parser.nodes) {\r\n let svg = makeInstance().size(2, 0)\r\n svg.node.cssText = [\r\n 'opacity: 0',\r\n 'position: absolute',\r\n 'left: -100%',\r\n 'top: -100%',\r\n 'overflow: hidden'\r\n ].join(';')\r\n\r\n let path = svg.path().node\r\n\r\n parser.nodes = { svg, path }\r\n }\r\n\r\n if (!parser.nodes.svg.node.parentNode) {\r\n let b = globals.document.body || globals.document.documentElement\r\n parser.nodes.svg.addTo(b)\r\n }\r\n\r\n return parser.nodes\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Point from './Point.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nfunction isNulledBox (box) {\r\n return !box.w && !box.h && !box.x && !box.y\r\n}\r\n\r\nfunction domContains (node) {\r\n return (globals.document.documentElement.contains || function (node) {\r\n // This is IE - it does not support contains() for top-level SVGs\r\n while (node.parentNode) {\r\n node = node.parentNode\r\n }\r\n return node === document\r\n }).call(globals.document.documentElement, node)\r\n}\r\n\r\nexport default class Box {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (source) {\r\n var base = [0, 0, 0, 0]\r\n source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)\r\n : Array.isArray(source) ? source\r\n : typeof source === 'object' ? [source.left != null ? source.left\r\n : source.x, source.top != null ? source.top : source.y, source.width, source.height]\r\n : arguments.length === 4 ? [].slice.call(arguments)\r\n : base\r\n\r\n this.x = source[0] || 0\r\n this.y = source[1] || 0\r\n this.width = this.w = source[2] || 0\r\n this.height = this.h = source[3] || 0\r\n\r\n // Add more bounding box properties\r\n this.x2 = this.x + this.w\r\n this.y2 = this.y + this.h\r\n this.cx = this.x + this.w / 2\r\n this.cy = this.y + this.h / 2\r\n\r\n return this\r\n }\r\n\r\n // Merge rect box with another, return a new instance\r\n merge (box) {\r\n let x = Math.min(this.x, box.x)\r\n let y = Math.min(this.y, box.y)\r\n let width = Math.max(this.x + this.width, box.x + box.width) - x\r\n let height = Math.max(this.y + this.height, box.y + box.height) - y\r\n\r\n return new Box(x, y, width, height)\r\n }\r\n\r\n transform (m) {\r\n let xMin = Infinity\r\n let xMax = -Infinity\r\n let yMin = Infinity\r\n let yMax = -Infinity\r\n\r\n let pts = [\r\n new Point(this.x, this.y),\r\n new Point(this.x2, this.y),\r\n new Point(this.x, this.y2),\r\n new Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function (p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin, p.x)\r\n xMax = Math.max(xMax, p.x)\r\n yMin = Math.min(yMin, p.y)\r\n yMax = Math.max(yMax, p.y)\r\n })\r\n\r\n return new Box(\r\n xMin, yMin,\r\n xMax - xMin,\r\n yMax - yMin\r\n )\r\n }\r\n\r\n addOffset () {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += globals.window.pageXOffset\r\n this.y += globals.window.pageYOffset\r\n return this\r\n }\r\n\r\n toString () {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n\r\n toArray () {\r\n return [this.x, this.y, this.width, this.height]\r\n }\r\n\r\n isNulled () {\r\n return isNulledBox(this)\r\n }\r\n}\r\n\r\nfunction getBox (cb, retry) {\r\n let box\r\n\r\n try {\r\n box = cb(this.node)\r\n\r\n if (isNulledBox(box) && !domContains(this.node)) {\r\n throw new Error('Element not in the dom')\r\n }\r\n } catch (e) {\r\n box = retry(this)\r\n }\r\n\r\n return box\r\n}\r\n\r\nexport function bbox () {\r\n return new Box(getBox.call(this, (node) => node.getBBox(), (el) => {\r\n try {\r\n let clone = el.clone().addTo(parser().svg).show()\r\n let box = clone.node.getBBox()\r\n clone.remove()\r\n return box\r\n } catch (e) {\r\n throw new Error('Getting bbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }\r\n }))\r\n}\r\n\r\nexport function rbox (el) {\r\n let box = new Box(getBox.call(this, (node) => node.getBoundingClientRect(), (el) => {\r\n throw new Error('Getting rbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }))\r\n if (el) return box.transform(el.screenCTM().inverse())\r\n return box.addOffset()\r\n}\r\n\r\nregisterMethods({\r\n viewbox: {\r\n viewbox (x, y, width, height) {\r\n // act as getter\r\n if (x == null) return new Box(this.attr('viewBox'))\r\n\r\n // act as setter\r\n return this.attr('viewBox', new Box(x, y, width, height))\r\n }\r\n }\r\n})\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { radians } from '../utils/utils.js'\r\nimport Element from '../elements/Element.js'\r\nimport Point from './Point.js'\r\n\r\nfunction closeEnough (a, b, threshold) {\r\n return Math.abs(b - a) < (threshold || 1e-6)\r\n}\r\n\r\nexport default class Matrix {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n // Initialize\r\n init (source) {\r\n var base = Matrix.fromArray([1, 0, 0, 1, 0, 0])\r\n\r\n // ensure source as object\r\n source = source instanceof Element ? source.matrixify()\r\n : typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\r\n : Array.isArray(source) ? Matrix.fromArray(source)\r\n : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source\r\n : (typeof source === 'object') ? new Matrix().transform(source)\r\n : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))\r\n : base\r\n\r\n // Merge the source matrix with the base matrix\r\n this.a = source.a != null ? source.a : base.a\r\n this.b = source.b != null ? source.b : base.b\r\n this.c = source.c != null ? source.c : base.c\r\n this.d = source.d != null ? source.d : base.d\r\n this.e = source.e != null ? source.e : base.e\r\n this.f = source.f != null ? source.f : base.f\r\n\r\n return this\r\n }\r\n\r\n // Clones this matrix\r\n clone () {\r\n return new Matrix(this)\r\n }\r\n\r\n // Transform a matrix into another matrix by manipulating the space\r\n transform (o) {\r\n // Check if o is a matrix and then left multiply it directly\r\n if (Matrix.isMatrixLike(o)) {\r\n var matrix = new Matrix(o)\r\n return matrix.multiplyO(this)\r\n }\r\n\r\n // Get the proposed transformations and the current transformations\r\n var t = Matrix.formatTransforms(o)\r\n var current = this\r\n let { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\r\n\r\n // Construct the resulting matrix\r\n var transformer = new Matrix()\r\n .translateO(t.rx, t.ry)\r\n .lmultiplyO(current)\r\n .translateO(-ox, -oy)\r\n .scaleO(t.scaleX, t.scaleY)\r\n .skewO(t.skewX, t.skewY)\r\n .shearO(t.shear)\r\n .rotateO(t.theta)\r\n .translateO(ox, oy)\r\n\r\n // If we want the origin at a particular place, we force it there\r\n if (isFinite(t.px) || isFinite(t.py)) {\r\n const origin = new Point(ox, oy).transform(transformer)\r\n // TODO: Replace t.px with isFinite(t.px)\r\n const dx = t.px ? t.px - origin.x : 0\r\n const dy = t.py ? t.py - origin.y : 0\r\n transformer.translateO(dx, dy)\r\n }\r\n\r\n // Translate now after positioning\r\n transformer.translateO(t.tx, t.ty)\r\n return transformer\r\n }\r\n\r\n // Applies a matrix defined by its affine parameters\r\n compose (o) {\r\n if (o.origin) {\r\n o.originX = o.origin[0]\r\n o.originY = o.origin[1]\r\n }\r\n // Get the parameters\r\n var ox = o.originX || 0\r\n var oy = o.originY || 0\r\n var sx = o.scaleX || 1\r\n var sy = o.scaleY || 1\r\n var lam = o.shear || 0\r\n var theta = o.rotate || 0\r\n var tx = o.translateX || 0\r\n var ty = o.translateY || 0\r\n\r\n // Apply the standard matrix\r\n var result = new Matrix()\r\n .translateO(-ox, -oy)\r\n .scaleO(sx, sy)\r\n .shearO(lam)\r\n .rotateO(theta)\r\n .translateO(tx, ty)\r\n .lmultiplyO(this)\r\n .translateO(ox, oy)\r\n return result\r\n }\r\n\r\n // Decomposes this matrix into its affine parameters\r\n decompose (cx = 0, cy = 0) {\r\n // Get the parameters from the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Figure out if the winding direction is clockwise or counterclockwise\r\n var determinant = a * d - b * c\r\n var ccw = determinant > 0 ? 1 : -1\r\n\r\n // Since we only shear in x, we can use the x basis to get the x scale\r\n // and the rotation of the resulting matrix\r\n var sx = ccw * Math.sqrt(a * a + b * b)\r\n var thetaRad = Math.atan2(ccw * b, ccw * a)\r\n var theta = 180 / Math.PI * thetaRad\r\n var ct = Math.cos(thetaRad)\r\n var st = Math.sin(thetaRad)\r\n\r\n // We can then solve the y basis vector simultaneously to get the other\r\n // two affine parameters directly from these parameters\r\n var lam = (a * c + b * d) / determinant\r\n var sy = ((c * sx) / (lam * a - b)) || ((d * sx) / (lam * b + a))\r\n\r\n // Use the translations\r\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy)\r\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy)\r\n\r\n // Construct the decomposition and return it\r\n return {\r\n // Return the affine parameters\r\n scaleX: sx,\r\n scaleY: sy,\r\n shear: lam,\r\n rotate: theta,\r\n translateX: tx,\r\n translateY: ty,\r\n originX: cx,\r\n originY: cy,\r\n\r\n // Return the matrix parameters\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n // Left multiplies by the given matrix\r\n multiply (matrix) {\r\n return this.clone().multiplyO(matrix)\r\n }\r\n\r\n multiplyO (matrix) {\r\n // Get the matrices\r\n var l = this\r\n var r = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n lmultiply (matrix) {\r\n return this.clone().lmultiplyO(matrix)\r\n }\r\n\r\n lmultiplyO (matrix) {\r\n var r = this\r\n var l = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n // Inverses matrix\r\n inverseO () {\r\n // Get the current parameters out of the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Invert the 2x2 matrix in the top left\r\n var det = a * d - b * c\r\n if (!det) throw new Error('Cannot invert ' + this)\r\n\r\n // Calculate the top 2x2 matrix\r\n var na = d / det\r\n var nb = -b / det\r\n var nc = -c / det\r\n var nd = a / det\r\n\r\n // Apply the inverted matrix to the top right\r\n var ne = -(na * e + nc * f)\r\n var nf = -(nb * e + nd * f)\r\n\r\n // Construct the inverted matrix\r\n this.a = na\r\n this.b = nb\r\n this.c = nc\r\n this.d = nd\r\n this.e = ne\r\n this.f = nf\r\n\r\n return this\r\n }\r\n\r\n inverse () {\r\n return this.clone().inverseO()\r\n }\r\n\r\n // Translate matrix\r\n translate (x, y) {\r\n return this.clone().translateO(x, y)\r\n }\r\n\r\n translateO (x, y) {\r\n this.e += x || 0\r\n this.f += y || 0\r\n return this\r\n }\r\n\r\n // Scale matrix\r\n scale (x, y, cx, cy) {\r\n return this.clone().scaleO(...arguments)\r\n }\r\n\r\n scaleO (x, y = x, cx = 0, cy = 0) {\r\n // Support uniform scaling\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * x\r\n this.b = b * y\r\n this.c = c * x\r\n this.d = d * y\r\n this.e = e * x - cx * x + cx\r\n this.f = f * y - cy * y + cy\r\n\r\n return this\r\n }\r\n\r\n // Rotate matrix\r\n rotate (r, cx, cy) {\r\n return this.clone().rotateO(r, cx, cy)\r\n }\r\n\r\n rotateO (r, cx = 0, cy = 0) {\r\n // Convert degrees to radians\r\n r = radians(r)\r\n\r\n let cos = Math.cos(r)\r\n let sin = Math.sin(r)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * cos - b * sin\r\n this.b = b * cos + a * sin\r\n this.c = c * cos - d * sin\r\n this.d = d * cos + c * sin\r\n this.e = e * cos - f * sin + cy * sin - cx * cos + cx\r\n this.f = f * cos + e * sin - cx * sin - cy * cos + cy\r\n\r\n return this\r\n }\r\n\r\n // Flip matrix on x or y, at a given offset\r\n flip (axis, around) {\r\n return this.clone().flipO(axis, around)\r\n }\r\n\r\n flipO (axis, around) {\r\n return axis === 'x' ? this.scaleO(-1, 1, around, 0)\r\n : axis === 'y' ? this.scaleO(1, -1, 0, around)\r\n : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\r\n }\r\n\r\n // Shear matrix\r\n shear (a, cx, cy) {\r\n return this.clone().shearO(a, cx, cy)\r\n }\r\n\r\n shearO (lx, cx = 0, cy = 0) {\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.c = c + d * lx\r\n this.e = e + f * lx - cy * lx\r\n\r\n return this\r\n }\r\n\r\n // Skew Matrix\r\n skew (x, y, cx, cy) {\r\n return this.clone().skewO(...arguments)\r\n }\r\n\r\n skewO (x, y = x, cx = 0, cy = 0) {\r\n // support uniformal skew\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // Convert degrees to radians\r\n x = radians(x)\r\n y = radians(y)\r\n\r\n let lx = Math.tan(x)\r\n let ly = Math.tan(y)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.b = b + a * ly\r\n this.c = c + d * lx\r\n this.d = d + c * ly\r\n this.e = e + f * lx - cy * lx\r\n this.f = f + e * ly - cx * ly\r\n\r\n return this\r\n }\r\n\r\n // SkewX\r\n skewX (x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n\r\n skewXO (x, cx, cy) {\r\n return this.skewO(x, 0, cx, cy)\r\n }\r\n\r\n // SkewY\r\n skewY (y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n\r\n skewYO (y, cx, cy) {\r\n return this.skewO(0, y, cx, cy)\r\n }\r\n\r\n // Transform around a center point\r\n aroundO (cx, cy, matrix) {\r\n var dx = cx || 0\r\n var dy = cy || 0\r\n return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\r\n }\r\n\r\n around (cx, cy, matrix) {\r\n return this.clone().aroundO(cx, cy, matrix)\r\n }\r\n\r\n // Check if two matrices are equal\r\n equals (other) {\r\n var comp = new Matrix(other)\r\n return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b) &&\r\n closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d) &&\r\n closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)\r\n }\r\n\r\n // Convert matrix to string\r\n toString () {\r\n return 'matrix(' + this.a + ',' + this.b + ',' + this.c + ',' + this.d + ',' + this.e + ',' + this.f + ')'\r\n }\r\n\r\n toArray () {\r\n return [this.a, this.b, this.c, this.d, this.e, this.f]\r\n }\r\n\r\n valueOf () {\r\n return {\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n static fromArray (a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n }\r\n\r\n static isMatrixLike (o) {\r\n return (\r\n o.a != null ||\r\n o.b != null ||\r\n o.c != null ||\r\n o.d != null ||\r\n o.e != null ||\r\n o.f != null\r\n )\r\n }\r\n\r\n static formatTransforms (o) {\r\n // Get all of the parameters required to form the matrix\r\n var flipBoth = o.flip === 'both' || o.flip === true\r\n var flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\r\n var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\r\n var skewX = o.skew && o.skew.length ? o.skew[0]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewX) ? o.skewX\r\n : 0\r\n var skewY = o.skew && o.skew.length ? o.skew[1]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewY) ? o.skewY\r\n : 0\r\n var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX\r\n : isFinite(o.scale) ? o.scale * flipX\r\n : isFinite(o.scaleX) ? o.scaleX * flipX\r\n : flipX\r\n var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY\r\n : isFinite(o.scale) ? o.scale * flipY\r\n : isFinite(o.scaleY) ? o.scaleY * flipY\r\n : flipY\r\n var shear = o.shear || 0\r\n var theta = o.rotate || o.theta || 0\r\n var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)\r\n var ox = origin.x\r\n var oy = origin.y\r\n var position = new Point(o.position || o.px || o.positionX, o.py || o.positionY)\r\n var px = position.x\r\n var py = position.y\r\n var translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY)\r\n var tx = translate.x\r\n var ty = translate.y\r\n var relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY)\r\n var rx = relative.x\r\n var ry = relative.y\r\n\r\n // Populate all of the values\r\n return {\r\n scaleX, scaleY, skewX, skewY, shear, theta, rx, ry, tx, ty, ox, oy, px, py\r\n }\r\n }\r\n\r\n // left matrix, right matrix, target matrix which is overwritten\r\n static matrixMultiply (l, r, o) {\r\n // Work out the product directly\r\n var a = l.a * r.a + l.c * r.b\r\n var b = l.b * r.a + l.d * r.b\r\n var c = l.a * r.c + l.c * r.d\r\n var d = l.b * r.c + l.d * r.d\r\n var e = l.e + l.a * r.e + l.c * r.f\r\n var f = l.f + l.b * r.e + l.d * r.f\r\n\r\n // make sure to use local variables because l/r and o could be the same\r\n o.a = a\r\n o.b = b\r\n o.c = c\r\n o.d = d\r\n o.e = e\r\n o.f = f\r\n\r\n return o\r\n }\r\n}\r\n\r\nexport function ctm () {\r\n return new Matrix(this.node.getCTM())\r\n}\r\n\r\nexport function screenCTM () {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if (typeof this.isRoot === 'function' && !this.isRoot()) {\r\n var rect = this.rect(1, 1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new Matrix(m)\r\n }\r\n return new Matrix(this.node.getScreenCTM())\r\n}\r\n","/* eslint no-new-func: \"off\" */\r\nexport const subClassArray = (function () {\r\n try {\r\n // try es6 subclassing\r\n return Function('name', 'baseClass', '_constructor', [\r\n 'baseClass = baseClass || Array',\r\n 'return {',\r\n ' [name]: class extends baseClass {',\r\n ' constructor (...args) {',\r\n ' super(...args)',\r\n ' _constructor && _constructor.apply(this, args)',\r\n ' }',\r\n ' }',\r\n '}[name]'\r\n ].join('\\n'))\r\n } catch (e) {\r\n // Use es5 approach\r\n return (name, baseClass = Array, _constructor) => {\r\n const Arr = function () {\r\n baseClass.apply(this, arguments)\r\n _constructor && _constructor.apply(this, arguments)\r\n }\r\n\r\n Arr.prototype = Object.create(baseClass.prototype)\r\n Arr.prototype.constructor = Arr\r\n\r\n Arr.prototype.map = function (fn) {\r\n const arr = new Arr()\r\n arr.push.apply(arr, Array.prototype.map.call(this, fn))\r\n return arr\r\n }\r\n\r\n return Arr\r\n }\r\n }\r\n})()\r\n","import { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst List = subClassArray('List', Array, function (arr = []) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...arr)\r\n})\r\n\r\nexport default List\r\n\r\nextend(List, {\r\n each (fnOrMethodName, ...args) {\r\n if (typeof fnOrMethodName === 'function') {\r\n this.forEach((el) => { fnOrMethodName.call(el, el) })\r\n } else {\r\n return this.map(el => { return el[fnOrMethodName](...args) })\r\n }\r\n\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n }\r\n})\r\n\r\nList.extend = function (methods) {\r\n methods = methods.reduce((obj, name) => {\r\n obj[name] = function (...attrs) {\r\n return this.each(name, ...attrs)\r\n }\r\n return obj\r\n }, {})\r\n\r\n extend(List, methods)\r\n}\r\n","import { adopt } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\nimport { map } from '../../utils/utils.js'\r\nimport List from '../../types/List.js'\r\n\r\nexport default function baseFind (query, parent) {\r\n return new List(map((parent || globals.document).querySelectorAll(query), function (node) {\r\n return adopt(node)\r\n }))\r\n}\r\n\r\n// Scoped find method\r\nexport function find (query) {\r\n return baseFind(query, this.node)\r\n}\r\n","import { dispatch, off, on } from '../modules/core/event.js'\r\nimport Base from './Base.js'\r\n\r\nexport default class EventTarget extends Base {\r\n constructor ({ events = {} } = {}) {\r\n super()\r\n this.events = events\r\n }\r\n\r\n addEventListener () {}\r\n\r\n dispatch (event, data) {\r\n return dispatch(this, event, data)\r\n }\r\n\r\n dispatchEvent (event) {\r\n const bag = this.getEventHolder().events\r\n if (!bag) return true\r\n\r\n const events = bag[event.type]\r\n\r\n for (let i in events) {\r\n for (let j in events[i]) {\r\n events[i][j](event)\r\n }\r\n }\r\n\r\n return !event.defaultPrevented\r\n }\r\n\r\n // Fire given event\r\n fire (event, data) {\r\n this.dispatch(event, data)\r\n return this\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n getEventTarget () {\r\n return this\r\n }\r\n\r\n // Unbind event from listener\r\n off (event, listener) {\r\n off(this, event, listener)\r\n return this\r\n }\r\n\r\n // Bind given event to listener\r\n on (event, listener, binding, options) {\r\n on(this, event, listener, binding, options)\r\n return this\r\n }\r\n\r\n removeEventListener () {}\r\n}\r\n","\r\nexport function noop () {}\r\n\r\n// Default animation values\r\nexport let timeline = {\r\n duration: 400,\r\n ease: '>',\r\n delay: 0\r\n}\r\n\r\n// Default attribute values\r\nexport let attrs = {\r\n\r\n // fill and stroke\r\n 'fill-opacity': 1,\r\n 'stroke-opacity': 1,\r\n 'stroke-width': 0,\r\n 'stroke-linejoin': 'miter',\r\n 'stroke-linecap': 'butt',\r\n fill: '#000000',\r\n stroke: '#000000',\r\n opacity: 1,\r\n\r\n // position\r\n x: 0,\r\n y: 0,\r\n cx: 0,\r\n cy: 0,\r\n\r\n // size\r\n width: 0,\r\n height: 0,\r\n\r\n // radius\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n\r\n // gradient\r\n offset: 0,\r\n 'stop-opacity': 1,\r\n 'stop-color': '#000000',\r\n\r\n // text\r\n 'font-size': 16,\r\n 'font-family': 'Helvetica, Arial, sans-serif',\r\n 'text-anchor': 'start'\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst SVGArray = subClassArray('SVGArray', Array, function (arr) {\r\n this.init(arr)\r\n})\r\n\r\nexport default SVGArray\r\n\r\nextend(SVGArray, {\r\n init (arr) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...this.parse(arr))\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n },\r\n\r\n toString () {\r\n return this.join(' ')\r\n },\r\n\r\n // Flattens the array if needed\r\n valueOf () {\r\n const ret = []\r\n ret.push(...this)\r\n return ret\r\n },\r\n\r\n // Parse whitespace separated string\r\n parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n },\r\n\r\n clone () {\r\n return new this.constructor(this)\r\n },\r\n\r\n toSet () {\r\n return new Set(this)\r\n }\r\n})\r\n","import { numberAndUnit } from '../modules/core/regex.js'\r\n\r\n// Module for unit convertions\r\nexport default class SVGNumber {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (value, unit) {\r\n unit = Array.isArray(value) ? value[1] : unit\r\n value = Array.isArray(value) ? value[0] : value\r\n\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n } else if (typeof value === 'string') {\r\n unit = value.match(numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] === '%') { this.value /= 100 } else if (unit[5] === 's') {\r\n this.value *= 1000\r\n }\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n } else {\r\n if (value instanceof SVGNumber) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n toString () {\r\n return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6\r\n : this.unit === 's' ? this.value / 1e3\r\n : this.value\r\n ) + this.unit\r\n }\r\n\r\n toJSON () {\r\n return this.toString()\r\n }\r\n\r\n toArray () {\r\n return [this.value, this.unit]\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n // Add number\r\n plus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this + number, this.unit || number.unit)\r\n }\r\n\r\n // Subtract number\r\n minus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this - number, this.unit || number.unit)\r\n }\r\n\r\n // Multiply number\r\n times (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this * number, this.unit || number.unit)\r\n }\r\n\r\n // Divide number\r\n divide (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this / number, this.unit || number.unit)\r\n }\r\n}\r\n","import { attrs as defaults } from './defaults.js'\r\nimport { isNumber } from './regex.js'\r\nimport Color from '../../types/Color.js'\r\nimport SVGArray from '../../types/SVGArray.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\nconst hooks = []\r\nexport function registerAttrHook (fn) {\r\n hooks.push(fn)\r\n}\r\n\r\n// Set svg element attribute\r\nexport default function attr (attr, val, ns) {\r\n // act as full getter\r\n if (attr == null) {\r\n // get an object of attributes\r\n attr = {}\r\n val = this.node.attributes\r\n\r\n for (let node of val) {\r\n attr[node.nodeName] = isNumber.test(node.nodeValue)\r\n ? parseFloat(node.nodeValue)\r\n : node.nodeValue\r\n }\r\n\r\n return attr\r\n } else if (attr instanceof Array) {\r\n // loop through array and get all values\r\n return attr.reduce((last, curr) => {\r\n last[curr] = this.attr(curr)\r\n return last\r\n }, {})\r\n } else if (typeof attr === 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (val in attr) this.attr(val, attr[val])\r\n } else if (val === null) {\r\n // remove value\r\n this.node.removeAttribute(attr)\r\n } else if (val == null) {\r\n // act as a getter if the first and only argument is not an object\r\n val = this.node.getAttribute(attr)\r\n return val == null ? defaults[attr]\r\n : isNumber.test(val) ? parseFloat(val)\r\n : val\r\n } else {\r\n // Loop through hooks and execute them to convert value\r\n val = hooks.reduce((_val, hook) => {\r\n return hook(attr, _val, this)\r\n }, val)\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof val === 'number') {\r\n val = new SVGNumber(val)\r\n } else if (Color.isColor(val)) {\r\n // ensure full hex color\r\n val = new Color(val)\r\n } else if (val.constructor === Array) {\r\n // Check for plain arrays and parse array values\r\n val = new SVGArray(val)\r\n }\r\n\r\n // if the passed attribute is leading...\r\n if (attr === 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading) {\r\n this.leading(val)\r\n }\r\n } else {\r\n // set given attribute on node\r\n typeof ns === 'string' ? this.node.setAttributeNS(ns, attr, val.toString())\r\n : this.node.setAttribute(attr, val.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\r\n this.rebuild()\r\n }\r\n }\r\n\r\n return this\r\n}\r\n","import {\r\n adopt,\r\n assignNewId,\r\n eid,\r\n extend,\r\n makeInstance,\r\n makeNode,\r\n register\r\n} from '../utils/adopter.js'\r\nimport { find } from '../modules/core/selector.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { map } from '../utils/utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport List from '../types/List.js'\r\nimport attr from '../modules/core/attr.js'\r\n\r\nexport default class Dom extends EventTarget {\r\n constructor (node, attrs) {\r\n super(node)\r\n this.node = node\r\n this.type = node.nodeName\r\n\r\n if (attrs && node !== attrs) {\r\n this.attr(attrs)\r\n }\r\n }\r\n\r\n // Add given element at a position\r\n add (element, i) {\r\n element = makeInstance(element)\r\n\r\n if (i == null) {\r\n this.node.appendChild(element.node)\r\n } else if (element.node !== this.node.childNodes[i]) {\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Add element to given container and return self\r\n addTo (parent) {\r\n return makeInstance(parent).put(this)\r\n }\r\n\r\n // Returns all child elements\r\n children () {\r\n return new List(map(this.node.children, function (node) {\r\n return adopt(node)\r\n }))\r\n }\r\n\r\n // Remove all elements in this container\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n\r\n // Clone element\r\n clone () {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n return assignNewId(this.node.cloneNode(true))\r\n }\r\n\r\n // Iterates over all children and invokes a given block\r\n each (block, deep) {\r\n var children = this.children()\r\n var i, il\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n block.apply(children[i], [i, children])\r\n\r\n if (deep) {\r\n children[i].each(block, deep)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n element (nodeName) {\r\n return this.put(new Dom(makeNode(nodeName)))\r\n }\r\n\r\n // Get first child\r\n first () {\r\n return adopt(this.node.firstChild)\r\n }\r\n\r\n // Get a element at the given index\r\n get (i) {\r\n return adopt(this.node.childNodes[i])\r\n }\r\n\r\n getEventHolder () {\r\n return this.node\r\n }\r\n\r\n getEventTarget () {\r\n return this.node\r\n }\r\n\r\n // Checks if the given element is a child\r\n has (element) {\r\n return this.index(element) >= 0\r\n }\r\n\r\n // Get / set id\r\n id (id) {\r\n // generate new id if no id set\r\n if (typeof id === 'undefined' && !this.node.id) {\r\n this.node.id = eid(this.type)\r\n }\r\n\r\n // dont't set directly width this.node.id to make `null` work correctly\r\n return this.attr('id', id)\r\n }\r\n\r\n // Gets index of given element\r\n index (element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n\r\n // Get the last child\r\n last () {\r\n return adopt(this.node.lastChild)\r\n }\r\n\r\n // matches the element vs a css selector\r\n matches (selector) {\r\n const el = this.node\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector)\r\n }\r\n\r\n // Returns the parent element instance\r\n parent (type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if (!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = adopt(parent.node.parentNode)\r\n\r\n if (!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while (parent && parent.node instanceof globals.window.SVGElement) { // FIXME: That shouldnt be neccessary\r\n if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n parent = adopt(parent.node.parentNode)\r\n }\r\n }\r\n\r\n // Basically does the same as `add()` but returns the added element instead\r\n put (element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n\r\n // Add element to given container and return container\r\n putIn (parent) {\r\n return makeInstance(parent).add(this)\r\n }\r\n\r\n // Remove element\r\n remove () {\r\n if (this.parent()) {\r\n this.parent().removeElement(this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Remove a given child\r\n removeElement (element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n\r\n // Replace this with element\r\n replace (element) {\r\n element = makeInstance(element)\r\n this.node.parentNode.replaceChild(element.node, this.node)\r\n return element\r\n }\r\n\r\n round (precision = 2, map) {\r\n const factor = 10 ** precision\r\n const attrs = this.attr()\r\n\r\n // If we have no map, build one from attrs\r\n if (!map) {\r\n map = Object.keys(attrs)\r\n }\r\n\r\n // Holds rounded attributes\r\n const newAttrs = {}\r\n map.forEach((key) => {\r\n newAttrs[key] = Math.round(attrs[key] * factor) / factor\r\n })\r\n\r\n this.attr(newAttrs)\r\n return this\r\n }\r\n\r\n // Return id on string conversion\r\n toString () {\r\n return this.id()\r\n }\r\n\r\n // Import raw svg\r\n svg (svgOrFn, outerHTML) {\r\n var well, len, fragment\r\n\r\n if (svgOrFn === false) {\r\n outerHTML = false\r\n svgOrFn = null\r\n }\r\n\r\n // act as getter if no svg string is given\r\n if (svgOrFn == null || typeof svgOrFn === 'function') {\r\n // The default for exports is, that the outerNode is included\r\n outerHTML = outerHTML == null ? true : outerHTML\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n let current = this\r\n\r\n // An export modifier was passed\r\n if (svgOrFn != null) {\r\n current = adopt(current.node.cloneNode(true))\r\n\r\n // If the user wants outerHTML we need to process this node, too\r\n if (outerHTML) {\r\n let result = svgOrFn(current)\r\n current = result || current\r\n\r\n // The user does not want this node? Well, then he gets nothing\r\n if (result === false) return ''\r\n }\r\n\r\n // Deep loop through all children and apply modifier\r\n current.each(function () {\r\n let result = svgOrFn(this)\r\n let _this = result || this\r\n\r\n // If modifier returns false, discard node\r\n if (result === false) {\r\n this.remove()\r\n\r\n // If modifier returns new node, use it\r\n } else if (result && this !== _this) {\r\n this.replace(_this)\r\n }\r\n }, true)\r\n }\r\n\r\n // Return outer or inner content\r\n return outerHTML\r\n ? current.node.outerHTML\r\n : current.node.innerHTML\r\n }\r\n\r\n // Act as setter if we got a string\r\n\r\n // The default for import is, that the current node is not replaced\r\n outerHTML = outerHTML == null ? false : outerHTML\r\n\r\n // Create temporary holder\r\n well = globals.document.createElementNS(ns, 'svg')\r\n fragment = globals.document.createDocumentFragment()\r\n\r\n // Dump raw svg\r\n well.innerHTML = svgOrFn\r\n\r\n // Transplant nodes into the fragment\r\n for (len = well.children.length; len--;) {\r\n fragment.appendChild(well.firstElementChild)\r\n }\r\n\r\n let parent = this.parent()\r\n\r\n // Add the whole fragment at once\r\n return outerHTML\r\n ? this.replace(fragment) && parent\r\n : this.add(fragment)\r\n }\r\n\r\n words (text) {\r\n // This is faster than removing all children and adding a new one\r\n this.node.textContent = text\r\n return this\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // dump variables recursively\r\n this.each(function () {\r\n this.writeDataToDom()\r\n })\r\n\r\n return this\r\n }\r\n}\r\n\r\nextend(Dom, { attr, find })\r\nregister(Dom)\r\n","import { bbox, rbox } from '../types/Box.js'\r\nimport { ctm, screenCTM } from '../types/Matrix.js'\r\nimport {\r\n extend,\r\n getClass,\r\n makeInstance,\r\n register,\r\n root\r\n} from '../utils/adopter.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { point } from '../types/Point.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { reference } from '../modules/core/regex.js'\r\nimport Dom from './Dom.js'\r\nimport List from '../types/List.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nconst Svg = getClass(root)\r\n\r\nexport default class Element extends Dom {\r\n constructor (node, attrs) {\r\n super(node, attrs)\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n this.node.instance = this\r\n\r\n if (node.hasAttribute('svgjs:data')) {\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n this.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n }\r\n }\r\n\r\n // Move element by its center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n\r\n // Move by center over x-axis\r\n cx (x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n\r\n // Move by center over y-axis\r\n cy (y) {\r\n return y == null\r\n ? this.y() + this.height() / 2\r\n : this.y(y - this.height() / 2)\r\n }\r\n\r\n // Get defs\r\n defs () {\r\n return this.root().defs()\r\n }\r\n\r\n // Get parent document\r\n root () {\r\n let p = this.parent(Svg)\r\n return p && p.root()\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('height', height)\r\n }\r\n\r\n // Checks whether the given point inside the bounding box of the element\r\n inside (x, y) {\r\n let box = this.bbox()\r\n\r\n return x > box.x &&\r\n y > box.y &&\r\n x < box.x + box.width &&\r\n y < box.y + box.height\r\n }\r\n\r\n // Move element to given x and y values\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n }\r\n\r\n // return array of all ancestors of given type up to the root svg\r\n parents (until = globals.document) {\r\n until = makeInstance(until)\r\n let parents = new List()\r\n let parent = this\r\n\r\n while (\r\n (parent = parent.parent()) &&\r\n parent.node !== until.node &&\r\n parent.node !== globals.document\r\n ) {\r\n parents.push(parent)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Get referenced element form attribute value\r\n reference (attr) {\r\n attr = this.attr(attr)\r\n if (!attr) return null\r\n\r\n const m = attr.match(reference)\r\n return m ? makeInstance(m[1]) : null\r\n }\r\n\r\n // set given data to the elements data property\r\n setData (o) {\r\n this.dom = o\r\n return this\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVGNumber(p.width))\r\n .height(new SVGNumber(p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('width', width)\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if (Object.keys(this.dom).length) {\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n }\r\n\r\n return super.writeDataToDom()\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n return this.attr('y', y)\r\n }\r\n}\r\n\r\nextend(Element, {\r\n bbox, rbox, point, ctm, screenCTM\r\n})\r\n\r\nregister(Element)\r\n","import { on, off } from '../core/event.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Color from '../../types/Color.js'\r\nimport Element from '../../elements/Element.js'\r\nimport Matrix from '../../types/Matrix.js'\r\nimport Point from '../../types/Point.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'],\r\n fill: ['color', 'opacity', 'rule'],\r\n prefix: function (t, a) {\r\n return a === 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;['fill', 'stroke'].forEach(function (m) {\r\n var extension = {}\r\n var i\r\n\r\n extension[m] = function (o) {\r\n if (typeof o === 'undefined') {\r\n return this.attr(m)\r\n }\r\n if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) {\r\n this.attr(m, o)\r\n } else {\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--) {\r\n if (o[sugar[m][i]] != null) {\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n }\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n registerMethods(['Shape', 'Runner'], extension)\r\n})\r\n\r\nregisterMethods(['Element', 'Runner'], {\r\n // Let the user set the matrix directly\r\n matrix: function (mat, b, c, d, e, f) {\r\n // Act as a getter\r\n if (mat == null) {\r\n return new Matrix(this)\r\n }\r\n\r\n // Act as a setter, the user can pass a matrix or a set of numbers\r\n return this.attr('transform', new Matrix(mat, b, c, d, e, f))\r\n },\r\n\r\n // Map rotation to transform\r\n rotate: function (angle, cx, cy) {\r\n return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map skew to transform\r\n skew: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ skew: x, ox: y, oy: cx }, true)\r\n : this.transform({ skew: [x, y], ox: cx, oy: cy }, true)\r\n },\r\n\r\n shear: function (lam, cx, cy) {\r\n return this.transform({ shear: lam, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map scale to transform\r\n scale: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ scale: x, ox: y, oy: cx }, true)\r\n : this.transform({ scale: [x, y], ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map translate to transform\r\n translate: function (x, y) {\r\n return this.transform({ translate: [x, y] }, true)\r\n },\r\n\r\n // Map relative translations to transform\r\n relative: function (x, y) {\r\n return this.transform({ relative: [x, y] }, true)\r\n },\r\n\r\n // Map flip to transform\r\n flip: function (direction, around) {\r\n var directionString = typeof direction === 'string' ? direction\r\n : isFinite(direction) ? 'both'\r\n : 'both'\r\n var origin = (direction === 'both' && isFinite(around)) ? [around, around]\r\n : (direction === 'x') ? [around, 0]\r\n : (direction === 'y') ? [0, around]\r\n : isFinite(direction) ? [direction, direction]\r\n : [0, 0]\r\n this.transform({ flip: directionString, origin: origin }, true)\r\n },\r\n\r\n // Opacity\r\n opacity: function (value) {\r\n return this.attr('opacity', value)\r\n },\r\n\r\n // Relative move over x and y axes\r\n dmove: function (x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nregisterMethods('Element', {\r\n // Relative move over x axis\r\n dx: function (x) {\r\n return this.x(new SVGNumber(x).plus(this.x()))\r\n },\r\n\r\n // Relative move over y axis\r\n dy: function (y) {\r\n return this.y(new SVGNumber(y).plus(this.y()))\r\n }\r\n})\r\n\r\nregisterMethods('radius', {\r\n // Add x and y radius\r\n radius: function (x, y) {\r\n var type = (this._element || this).type\r\n return type === 'radialGradient' || type === 'radialGradient'\r\n ? this.attr('r', new SVGNumber(x))\r\n : this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nregisterMethods('Path', {\r\n // Get path length\r\n length: function () {\r\n return this.node.getTotalLength()\r\n },\r\n // Get point at length\r\n pointAt: function (length) {\r\n return new Point(this.node.getPointAtLength(length))\r\n }\r\n})\r\n\r\nregisterMethods(['Element', 'Runner'], {\r\n // Set font\r\n font: function (a, v) {\r\n if (typeof a === 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a === 'leading'\r\n ? this.leading(v)\r\n : a === 'anchor'\r\n ? this.attr('text-anchor', v)\r\n : a === 'size' || a === 'family' || a === 'weight' || a === 'stretch' || a === 'variant' || a === 'style'\r\n ? this.attr('font-' + a, v)\r\n : this.attr(a, v)\r\n }\r\n})\r\n\r\nregisterMethods('Text', {\r\n ax (x) {\r\n return this.attr('x', x)\r\n },\r\n ay (y) {\r\n return this.attr('y', y)\r\n },\r\n amove (x, y) {\r\n return this.ax(x).ay(y)\r\n }\r\n})\r\n\r\n// Add events to elements\r\nconst methods = [ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].reduce(function (last, event) {\r\n // add event to Element\r\n const fn = function (f) {\r\n if (f === null) {\r\n off(this, event)\r\n } else {\r\n on(this, event, f)\r\n }\r\n return this\r\n }\r\n\r\n last[event] = fn\r\n return last\r\n}, {})\r\n\r\nregisterMethods('Element', methods)\r\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import { getOrigin } from '../../utils/utils.js'\r\nimport { delimiter, transforms } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Matrix from '../../types/Matrix.js'\r\n\r\n// Reset all transformations\r\nexport function untransform () {\r\n return this.attr('transform', null)\r\n}\r\n\r\n// merge the whole transformation chain into one matrix and returns it\r\nexport function matrixify () {\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(transforms).slice(0, -1).map(function (str) {\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [kv[0],\r\n kv[1].split(delimiter)\r\n .map(function (str) { return parseFloat(str) })\r\n ]\r\n })\r\n .reverse()\r\n // merge every transformation into one matrix\r\n .reduce(function (matrix, transform) {\r\n if (transform[0] === 'matrix') {\r\n return matrix.lmultiply(Matrix.fromArray(transform[1]))\r\n }\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n }, new Matrix())\r\n\r\n return matrix\r\n}\r\n\r\n// add an element to another parent without changing the visual representation on the screen\r\nexport function toParent (parent) {\r\n if (this === parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n}\r\n\r\n// same as above with parent equals root-svg\r\nexport function toRoot () {\r\n return this.toParent(this.root())\r\n}\r\n\r\n// Add transformations\r\nexport function transform (o, relative) {\r\n // Act as a getter if no object was passed\r\n if (o == null || typeof o === 'string') {\r\n var decomposed = new Matrix(this).decompose()\r\n return decomposed[o] || decomposed\r\n }\r\n\r\n if (!Matrix.isMatrixLike(o)) {\r\n // Set the origin according to the defined transform\r\n o = { ...o, origin: getOrigin(o, this) }\r\n }\r\n\r\n // The user can pass a boolean, an Element or an Matrix or nothing\r\n var cleanRelative = relative === true ? this : (relative || false)\r\n var result = new Matrix(cleanRelative).transform(o)\r\n return this.attr('transform', result)\r\n}\r\n\r\nregisterMethods('Element', {\r\n untransform, matrixify, toParent, toRoot, transform\r\n})\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Radius x value\r\nexport function rx (rx) {\r\n return this.attr('rx', rx)\r\n}\r\n\r\n// Radius y value\r\nexport function ry (ry) {\r\n return this.attr('ry', ry)\r\n}\r\n\r\n// Move over x-axis\r\nexport function x (x) {\r\n return x == null\r\n ? this.cx() - this.rx()\r\n : this.cx(x + this.rx())\r\n}\r\n\r\n// Move over y-axis\r\nexport function y (y) {\r\n return y == null\r\n ? this.cy() - this.ry()\r\n : this.cy(y + this.ry())\r\n}\r\n\r\n// Move by center over x-axis\r\nexport function cx (x) {\r\n return x == null\r\n ? this.attr('cx')\r\n : this.attr('cx', x)\r\n}\r\n\r\n// Move by center over y-axis\r\nexport function cy (y) {\r\n return y == null\r\n ? this.attr('cy')\r\n : this.attr('cy', y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n return width == null\r\n ? this.rx() * 2\r\n : this.rx(new SVGNumber(width).divide(2))\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Shape extends Element {}\r\n\r\nregister(Shape)\r\n","import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\r\nimport {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Circle extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('circle', node), node)\r\n }\r\n\r\n radius (r) {\r\n return this.attr('r', r)\r\n }\r\n\r\n // Radius x value\r\n rx (rx) {\r\n return this.attr('r', rx)\r\n }\r\n\r\n // Alias radius x value\r\n ry (ry) {\r\n return this.rx(ry)\r\n }\r\n\r\n size (size) {\r\n return this.radius(new SVGNumber(size).divide(2))\r\n }\r\n}\r\n\r\nextend(Circle, { x, y, cx, cy, width, height })\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create circle element\r\n circle: wrapWithAttrCheck(function (size) {\r\n return this.put(new Circle())\r\n .size(size)\r\n .move(0, 0)\r\n })\r\n }\r\n})\r\n\r\nregister(Circle)\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Container extends Element {\r\n flatten (parent) {\r\n this.each(function () {\r\n if (this instanceof Container) return this.flatten(parent).ungroup(parent)\r\n return this.toParent(parent)\r\n })\r\n\r\n // we need this so that the root does not get removed\r\n this.node.firstElementChild || this.remove()\r\n\r\n return this\r\n }\r\n\r\n ungroup (parent) {\r\n parent = parent || this.parent()\r\n\r\n this.each(function () {\r\n return this.toParent(parent)\r\n })\r\n\r\n this.remove()\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Container)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Defs extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('defs', node), node)\r\n }\r\n\r\n flatten () { return this }\r\n ungroup () { return this }\r\n}\r\n\r\nregister(Defs)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport * as circled from '../modules/core/circled.js'\r\n\r\nexport default class Ellipse extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('ellipse', node), node)\r\n }\r\n\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVGNumber(p.width).divide(2))\r\n .ry(new SVGNumber(p.height).divide(2))\r\n }\r\n}\r\n\r\nextend(Ellipse, circled)\r\n\r\nregisterMethods('Container', {\r\n // Create an ellipse\r\n ellipse: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Ellipse()).size(width, height).move(0, 0)\r\n })\r\n})\r\n\r\nregister(Ellipse)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Stop extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('stop', node), node)\r\n }\r\n\r\n // add color stops\r\n update (o) {\r\n if (typeof o === 'number' || o instanceof SVGNumber) {\r\n o = {\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Stop)\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\nexport function from (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\r\n : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\r\n}\r\n\r\nexport function to (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\r\n : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport Stop from './Stop.js'\r\nimport baseFind from '../modules/core/selector.js'\r\nimport * as gradiented from '../modules/core/gradiented.js'\r\n\r\nexport default class Gradient extends Container {\r\n constructor (type, attrs) {\r\n super(\r\n nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\r\n attrs\r\n )\r\n }\r\n\r\n // Add a color stop\r\n stop (offset, color, opacity) {\r\n return this.put(new Stop()).update(offset, color, opacity)\r\n }\r\n\r\n // Update gradient\r\n update (block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'gradientTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nextend(Gradient, gradiented)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create gradient element in defs\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.defs().gradient(type, block)\r\n })\r\n },\r\n // define gradient\r\n Defs: {\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.put(new Gradient(type)).update(block)\r\n })\r\n }\r\n})\r\n\r\nregister(Gradient)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Pattern extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('pattern', node), node)\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Update pattern by rebuilding\r\n update (block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'patternTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create pattern element in defs\r\n pattern (...args) {\r\n return this.defs().pattern(...args)\r\n }\r\n },\r\n Defs: {\r\n pattern: wrapWithAttrCheck(function (width, height, block) {\r\n return this.put(new Pattern()).update(block).attr({\r\n x: 0,\r\n y: 0,\r\n width: width,\r\n height: height,\r\n patternUnits: 'userSpaceOnUse'\r\n })\r\n })\r\n }\r\n})\r\n\r\nregister(Pattern)\r\n","import { isImage } from '../modules/core/regex.js'\r\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { off, on } from '../modules/core/event.js'\r\nimport { registerAttrHook } from '../modules/core/attr.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Pattern from './Pattern.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Image extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('image', node), node)\r\n }\r\n\r\n // (re)load image\r\n load (url, callback) {\r\n if (!url) return this\r\n\r\n var img = new globals.window.Image()\r\n\r\n on(img, 'load', function (e) {\r\n var p = this.parent(Pattern)\r\n\r\n // ensure image size\r\n if (this.width() === 0 && this.height() === 0) {\r\n this.size(img.width, img.height)\r\n }\r\n\r\n if (p instanceof Pattern) {\r\n // ensure pattern size if not set\r\n if (p.width() === 0 && p.height() === 0) {\r\n p.size(this.width(), this.height())\r\n }\r\n }\r\n\r\n if (typeof callback === 'function') {\r\n callback.call(this, e)\r\n }\r\n }, this)\r\n\r\n on(img, 'load error', function () {\r\n // dont forget to unbind memory leaking events\r\n off(img)\r\n })\r\n\r\n return this.attr('href', (img.src = url), xlink)\r\n }\r\n}\r\n\r\nregisterAttrHook(function (attr, val, _this) {\r\n // convert image fill and stroke to patterns\r\n if (attr === 'fill' || attr === 'stroke') {\r\n if (isImage.test(val)) {\r\n val = _this.root().defs().image(val)\r\n }\r\n }\r\n\r\n if (val instanceof Image) {\r\n val = _this.root().defs().pattern(0, 0, (pattern) => {\r\n pattern.add(val)\r\n })\r\n }\r\n\r\n return val\r\n})\r\n\r\nregisterMethods({\r\n Container: {\r\n // create image element, load image and set its size\r\n image: wrapWithAttrCheck(function (source, callback) {\r\n return this.put(new Image()).size(0, 0).load(source, callback)\r\n })\r\n }\r\n})\r\n\r\nregister(Image)\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport SVGArray from './SVGArray.js'\r\n\r\nconst PointArray = subClassArray('PointArray', SVGArray)\r\n\r\nexport default PointArray\r\n\r\nextend(PointArray, {\r\n // Convert array to string\r\n toString () {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push(this[i].join(','))\r\n }\r\n\r\n return array.join(' ')\r\n },\r\n\r\n // Convert array to line object\r\n toLine () {\r\n return {\r\n x1: this[0][0],\r\n y1: this[0][1],\r\n x2: this[1][0],\r\n y2: this[1][1]\r\n }\r\n },\r\n\r\n // Get morphed array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push([\r\n this[i][0] + (this.destination[i][0] - this[i][0]) * pos,\r\n this[i][1] + (this.destination[i][1] - this[i][1]) * pos\r\n ])\r\n }\r\n\r\n return new PointArray(array)\r\n },\r\n\r\n // Parse point string and flat array\r\n parse (array = [[0, 0]]) {\r\n var points = []\r\n\r\n // if it is an array\r\n if (array instanceof Array) {\r\n // and it is not flat, there is no need to parse it\r\n if (array[0] instanceof Array) {\r\n return array\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for (var i = 0, len = array.length; i < len; i = i + 2) {\r\n points.push([ array[i], array[i + 1] ])\r\n }\r\n\r\n return points\r\n },\r\n\r\n // Move point string\r\n move (x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y)) {\r\n for (var i = this.length - 1; i >= 0; i--) {\r\n this[i] = [this[i][0] + x, this[i][1] + y]\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize poly string\r\n size (width, height) {\r\n var i\r\n var box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n if (box.width) this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\r\n if (box.height) this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get bounding box of points\r\n bbox () {\r\n var maxX = -Infinity\r\n var maxY = -Infinity\r\n var minX = Infinity\r\n var minY = Infinity\r\n this.forEach(function (el) {\r\n maxX = Math.max(el[0], maxX)\r\n maxY = Math.max(el[1], maxY)\r\n minX = Math.min(el[0], minX)\r\n minY = Math.min(el[1], minY)\r\n })\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\r\n }\r\n})\r\n","import PointArray from '../../types/PointArray.js'\r\n\r\nexport let MorphArray = PointArray\r\n\r\n// Move by left top corner over x-axis\r\nexport function x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n}\r\n\r\n// Move by left top corner over y-axis\r\nexport function y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n let b = this.bbox()\r\n return width == null ? b.width : this.size(width, b.height)\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n let b = this.bbox()\r\n return height == null ? b.height : this.size(b.width, height)\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\n\r\nexport default class Line extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('line', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return new PointArray([\r\n [ this.attr('x1'), this.attr('y1') ],\r\n [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n\r\n // Overwrite native plot() method\r\n plot (x1, y1, x2, y2) {\r\n if (x1 == null) {\r\n return this.array()\r\n } else if (typeof y1 !== 'undefined') {\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n } else {\r\n x1 = new PointArray(x1).toLine()\r\n }\r\n\r\n return this.attr(x1)\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n}\r\n\r\nextend(Line, pointed)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a line element\r\n line: wrapWithAttrCheck(function (...args) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a PointArray\r\n return Line.prototype.plot.apply(\r\n this.put(new Line())\r\n , args[0] != null ? args : [0, 0, 0, 0]\r\n )\r\n })\r\n }\r\n})\r\n\r\nregister(Line)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Marker extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('marker', node), node)\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n\r\n // Set marker refX and refY\r\n ref (x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n\r\n // Update marker\r\n update (block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') { block.call(this, this) }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n toString () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n marker (...args) {\r\n // Create marker element in defs\r\n return this.defs().marker(...args)\r\n }\r\n },\r\n Defs: {\r\n // Create marker\r\n marker: wrapWithAttrCheck(function (width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new Marker())\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n })\r\n },\r\n marker: {\r\n // Create and attach markers\r\n marker (marker, width, height, block) {\r\n var attr = ['marker']\r\n\r\n // Build attribute name\r\n if (marker !== 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof Marker\r\n ? arguments[1]\r\n : this.defs().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n }\r\n})\r\n\r\nregister(Marker)\r\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import { timeline } from '../modules/core/defaults.js'\r\nimport { extend } from '../utils/adopter.js'\r\n\r\n/***\r\nBase Class\r\n==========\r\nThe base stepper class that will be\r\n***/\r\n\r\nfunction makeSetterGetter (k, f) {\r\n return function (v) {\r\n if (v == null) return this[v]\r\n this[k] = v\r\n if (f) f.call(this)\r\n return this\r\n }\r\n}\r\n\r\nexport let easing = {\r\n '-': function (pos) { return pos },\r\n '<>': function (pos) { return -Math.cos(pos * Math.PI) / 2 + 0.5 },\r\n '>': function (pos) { return Math.sin(pos * Math.PI / 2) },\r\n '<': function (pos) { return -Math.cos(pos * Math.PI / 2) + 1 },\r\n bezier: function (x1, y1, x2, y2) {\r\n // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\r\n return function (t) {\r\n if (t < 0) {\r\n if (x1 > 0) {\r\n return y1 / x1 * t\r\n } else if (x2 > 0) {\r\n return y2 / x2 * t\r\n } else {\r\n return 0\r\n }\r\n } else if (t > 1) {\r\n if (x2 < 1) {\r\n return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2)\r\n } else if (x1 < 1) {\r\n return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1)\r\n } else {\r\n return 1\r\n }\r\n } else {\r\n return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\r\n }\r\n }\r\n },\r\n // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\r\n steps: function (steps, stepPosition = 'end') {\r\n // deal with \"jump-\" prefix\r\n stepPosition = stepPosition.split('-').reverse()[0]\r\n\r\n let jumps = steps\r\n if (stepPosition === 'none') {\r\n --jumps\r\n } else if (stepPosition === 'both') {\r\n ++jumps\r\n }\r\n\r\n // The beforeFlag is essentially useless\r\n return (t, beforeFlag = false) => {\r\n // Step is called currentStep in referenced url\r\n let step = Math.floor(t * steps)\r\n const jumping = (t * step) % 1 === 0\r\n\r\n if (stepPosition === 'start' || stepPosition === 'both') {\r\n ++step\r\n }\r\n\r\n if (beforeFlag && jumping) {\r\n --step\r\n }\r\n\r\n if (t >= 0 && step < 0) {\r\n step = 0\r\n }\r\n\r\n if (t <= 1 && step > jumps) {\r\n step = jumps\r\n }\r\n\r\n return step / jumps\r\n }\r\n }\r\n}\r\n\r\nexport class Stepper {\r\n done () { return false }\r\n}\r\n\r\n/***\r\nEasing Functions\r\n================\r\n***/\r\n\r\nexport class Ease extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.ease = easing[fn || timeline.ease] || fn\r\n }\r\n\r\n step (from, to, pos) {\r\n if (typeof from !== 'number') {\r\n return pos < 1 ? from : to\r\n }\r\n return from + (to - from) * this.ease(pos)\r\n }\r\n}\r\n\r\n/***\r\nController Types\r\n================\r\n***/\r\n\r\nexport class Controller extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.stepper = fn\r\n }\r\n\r\n step (current, target, dt, c) {\r\n return this.stepper(current, target, dt, c)\r\n }\r\n\r\n done (c) {\r\n return c.done\r\n }\r\n}\r\n\r\nfunction recalculate () {\r\n // Apply the default parameters\r\n var duration = (this._duration || 500) / 1000\r\n var overshoot = this._overshoot || 0\r\n\r\n // Calculate the PID natural response\r\n var eps = 1e-10\r\n var pi = Math.PI\r\n var os = Math.log(overshoot / 100 + eps)\r\n var zeta = -os / Math.sqrt(pi * pi + os * os)\r\n var wn = 3.9 / (zeta * duration)\r\n\r\n // Calculate the Spring values\r\n this.d = 2 * zeta * wn\r\n this.k = wn * wn\r\n}\r\n\r\nexport class Spring extends Controller {\r\n constructor (duration, overshoot) {\r\n super()\r\n this.duration(duration || 500)\r\n .overshoot(overshoot || 0)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n if (dt > 100) dt = 16\r\n\r\n dt /= 1000\r\n\r\n // Get the previous velocity\r\n var velocity = c.velocity || 0\r\n\r\n // Apply the control to get the new position and store it\r\n var acceleration = -this.d * velocity - this.k * (current - target)\r\n var newPosition = current +\r\n velocity * dt +\r\n acceleration * dt * dt / 2\r\n\r\n // Store the velocity\r\n c.velocity = velocity + acceleration * dt\r\n\r\n // Figure out if we have converged, and if so, pass the value\r\n c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\r\n return c.done ? target : newPosition\r\n }\r\n}\r\n\r\nextend(Spring, {\r\n duration: makeSetterGetter('_duration', recalculate),\r\n overshoot: makeSetterGetter('_overshoot', recalculate)\r\n})\r\n\r\nexport class PID extends Controller {\r\n constructor (p, i, d, windup) {\r\n super()\r\n\r\n p = p == null ? 0.1 : p\r\n i = i == null ? 0.01 : i\r\n d = d == null ? 0 : d\r\n windup = windup == null ? 1000 : windup\r\n this.p(p).i(i).d(d).windup(windup)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n var p = target - current\r\n var i = (c.integral || 0) + p * dt\r\n var d = (p - (c.error || 0)) / dt\r\n var windup = this.windup\r\n\r\n // antiwindup\r\n if (windup !== false) {\r\n i = Math.max(-windup, Math.min(i, windup))\r\n }\r\n\r\n c.error = p\r\n c.integral = i\r\n\r\n c.done = Math.abs(p) < 0.001\r\n\r\n return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\r\n }\r\n}\r\n\r\nextend(PID, {\r\n windup: makeSetterGetter('windup'),\r\n p: makeSetterGetter('P'),\r\n i: makeSetterGetter('I'),\r\n d: makeSetterGetter('D')\r\n})\r\n","import {\r\n delimiter,\r\n dots,\r\n hyphen,\r\n isPathLetter,\r\n numbersWithDots,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport Point from './Point.js'\r\nimport SVGArray from './SVGArray.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nconst PathArray = subClassArray('PathArray', SVGArray)\r\n\r\nexport default PathArray\r\n\r\nexport function pathRegReplace (a, b, c, d) {\r\n return c + d.replace(dots, ' .')\r\n}\r\n\r\nfunction arrayToString (a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\nconst pathHandlers = {\r\n M: function (c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return ['M', p.x, p.y]\r\n },\r\n L: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['L', c[0], c[1]]\r\n },\r\n H: function (c, p) {\r\n p.x = c[0]\r\n return ['H', c[0]]\r\n },\r\n V: function (c, p) {\r\n p.y = c[0]\r\n return ['V', c[0]]\r\n },\r\n C: function (c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]\r\n },\r\n S: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['S', c[0], c[1], c[2], c[3]]\r\n },\r\n Q: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return ['Q', c[0], c[1], c[2], c[3]]\r\n },\r\n T: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return ['T', c[0], c[1]]\r\n },\r\n Z: function (c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return ['Z']\r\n },\r\n A: function (c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]\r\n }\r\n}\r\n\r\nlet mlhvqtcsaz = 'mlhvqtcsaz'.split('')\r\n\r\nfor (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\r\n pathHandlers[mlhvqtcsaz[i]] = (function (i) {\r\n return function (c, p, p0) {\r\n if (i === 'H') c[0] = c[0] + p.x\r\n else if (i === 'V') c[0] = c[0] + p.y\r\n else if (i === 'A') {\r\n c[5] = c[5] + p.x\r\n c[6] = c[6] + p.y\r\n } else {\r\n for (var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j % 2 ? p.y : p.x)\r\n }\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsaz[i].toUpperCase())\r\n}\r\n\r\nextend(PathArray, {\r\n // Convert array to string\r\n toString () {\r\n return arrayToString(this)\r\n },\r\n\r\n // Move path string\r\n move (x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n } else if (l === 'H') {\r\n this[i][1] += x\r\n } else if (l === 'V') {\r\n this[i][1] += y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n this[i][3] += x\r\n this[i][4] += y\r\n\r\n if (l === 'C') {\r\n this[i][5] += x\r\n this[i][6] += y\r\n }\r\n } else if (l === 'A') {\r\n this[i][6] += x\r\n this[i][7] += y\r\n }\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize path string\r\n size (width, height) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n var i, l\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n } else if (l === 'H') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n } else if (l === 'V') {\r\n this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\r\n this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l === 'C') {\r\n this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\r\n this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n } else if (l === 'A') {\r\n // resize radii\r\n this[i][1] = (this[i][1] * width) / box.width\r\n this[i][2] = (this[i][2] * height) / box.height\r\n\r\n // move position values\r\n this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\r\n this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Test if the passed path array use the same path data commands as this path array\r\n equalCommands (pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new PathArray(pathArray)\r\n\r\n equalCommands = this.length === pathArray.length\r\n for (i = 0, il = this.length; equalCommands && i < il; i++) {\r\n equalCommands = this[i][0] === pathArray[i][0]\r\n }\r\n\r\n return equalCommands\r\n },\r\n\r\n // Make path array morphable\r\n morph (pathArray) {\r\n pathArray = new PathArray(pathArray)\r\n\r\n if (this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get morphed path array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this\r\n var destinationArray = this.destination.value\r\n var array = []\r\n var pathArray = new PathArray()\r\n var i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [sourceArray[i][0]]\r\n for (j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if (array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] !== 0)\r\n array[i][5] = +(array[i][5] !== 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n },\r\n\r\n // Absolutize and parse path to array\r\n parse (array = [['M', 0, 0]]) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof PathArray) return array\r\n\r\n // prepare for parsing\r\n var s\r\n var paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 }\r\n\r\n if (typeof array === 'string') {\r\n array = array\r\n .replace(numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(delimiter) // split into array\r\n } else {\r\n array = array.reduce(function (prev, curr) {\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var result = []\r\n var p = new Point()\r\n var p0 = new Point()\r\n var index = 0\r\n var len = array.length\r\n\r\n do {\r\n // Test if we have a path letter\r\n if (isPathLetter.test(array[index])) {\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n } else if (s === 'M') {\r\n s = 'L'\r\n } else if (s === 'm') {\r\n s = 'l'\r\n }\r\n\r\n result.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n } while (len > index)\r\n\r\n return result\r\n },\r\n\r\n // Get bounding box of path\r\n bbox () {\r\n parser().path.setAttribute('d', this.toString())\r\n return parser.nodes.path.getBBox()\r\n }\r\n})\r\n","import { Ease } from './Controller.js'\r\nimport {\r\n delimiter,\r\n numberAndUnit,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport Color from '../types/Color.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport SVGArray from '../types/SVGArray.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Morphable {\r\n constructor (stepper) {\r\n this._stepper = stepper || new Ease('-')\r\n\r\n this._from = null\r\n this._to = null\r\n this._type = null\r\n this._context = null\r\n this._morphObj = null\r\n }\r\n\r\n from (val) {\r\n if (val == null) {\r\n return this._from\r\n }\r\n\r\n this._from = this._set(val)\r\n return this\r\n }\r\n\r\n to (val) {\r\n if (val == null) {\r\n return this._to\r\n }\r\n\r\n this._to = this._set(val)\r\n return this\r\n }\r\n\r\n type (type) {\r\n // getter\r\n if (type == null) {\r\n return this._type\r\n }\r\n\r\n // setter\r\n this._type = type\r\n return this\r\n }\r\n\r\n _set (value) {\r\n if (!this._type) {\r\n var type = typeof value\r\n\r\n if (type === 'number') {\r\n this.type(SVGNumber)\r\n } else if (type === 'string') {\r\n if (Color.isColor(value)) {\r\n this.type(Color)\r\n } else if (delimiter.test(value)) {\r\n this.type(pathLetters.test(value)\r\n ? PathArray\r\n : SVGArray\r\n )\r\n } else if (numberAndUnit.test(value)) {\r\n this.type(SVGNumber)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n } else if (morphableTypes.indexOf(value.constructor) > -1) {\r\n this.type(value.constructor)\r\n } else if (Array.isArray(value)) {\r\n this.type(SVGArray)\r\n } else if (type === 'object') {\r\n this.type(ObjectBag)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n }\r\n\r\n var result = (new this._type(value)).toArray()\r\n this._morphObj = this._morphObj || new this._type()\r\n this._context = this._context ||\r\n Array.apply(null, Array(result.length)).map(Object)\r\n return result\r\n }\r\n\r\n stepper (stepper) {\r\n if (stepper == null) return this._stepper\r\n this._stepper = stepper\r\n return this\r\n }\r\n\r\n done () {\r\n var complete = this._context\r\n .map(this._stepper.done)\r\n .reduce(function (last, curr) {\r\n return last && curr\r\n }, true)\r\n return complete\r\n }\r\n\r\n at (pos) {\r\n var _this = this\r\n\r\n return this._morphObj.fromArray(\r\n this._from.map(function (i, index) {\r\n return _this._stepper.step(i, _this._to[index], pos, _this._context[index], _this._context)\r\n })\r\n )\r\n }\r\n}\r\n\r\nexport class NonMorphable {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (val) {\r\n val = Array.isArray(val) ? val[0] : val\r\n this.value = val\r\n return this\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n toArray () {\r\n return [this.value]\r\n }\r\n}\r\n\r\nexport class TransformBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (obj) {\r\n if (Array.isArray(obj)) {\r\n obj = {\r\n scaleX: obj[0],\r\n scaleY: obj[1],\r\n shear: obj[2],\r\n rotate: obj[3],\r\n translateX: obj[4],\r\n translateY: obj[5],\r\n originX: obj[6],\r\n originY: obj[7]\r\n }\r\n }\r\n\r\n Object.assign(this, TransformBag.defaults, obj)\r\n return this\r\n }\r\n\r\n toArray () {\r\n var v = this\r\n\r\n return [\r\n v.scaleX,\r\n v.scaleY,\r\n v.shear,\r\n v.rotate,\r\n v.translateX,\r\n v.translateY,\r\n v.originX,\r\n v.originY\r\n ]\r\n }\r\n}\r\n\r\nTransformBag.defaults = {\r\n scaleX: 1,\r\n scaleY: 1,\r\n shear: 0,\r\n rotate: 0,\r\n translateX: 0,\r\n translateY: 0,\r\n originX: 0,\r\n originY: 0\r\n}\r\n\r\nexport class ObjectBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (objOrArr) {\r\n this.values = []\r\n\r\n if (Array.isArray(objOrArr)) {\r\n this.values = objOrArr\r\n return\r\n }\r\n\r\n objOrArr = objOrArr || {}\r\n var entries = []\r\n\r\n for (let i in objOrArr) {\r\n entries.push([i, objOrArr[i]])\r\n }\r\n\r\n entries.sort((a, b) => {\r\n return a[0] - b[0]\r\n })\r\n\r\n this.values = entries.reduce((last, curr) => last.concat(curr), [])\r\n return this\r\n }\r\n\r\n valueOf () {\r\n var obj = {}\r\n var arr = this.values\r\n\r\n for (var i = 0, len = arr.length; i < len; i += 2) {\r\n obj[arr[i]] = arr[i + 1]\r\n }\r\n\r\n return obj\r\n }\r\n\r\n toArray () {\r\n return this.values\r\n }\r\n}\r\n\r\nconst morphableTypes = [\r\n NonMorphable,\r\n TransformBag,\r\n ObjectBag\r\n]\r\n\r\nexport function registerMorphableType (type = []) {\r\n morphableTypes.push(...[].concat(type))\r\n}\r\n\r\nexport function makeMorphable () {\r\n extend(morphableTypes, {\r\n to (val) {\r\n return new Morphable()\r\n .type(this.constructor)\r\n .from(this.valueOf())\r\n .to(val)\r\n },\r\n fromArray (arr) {\r\n this.init(arr)\r\n return this\r\n }\r\n })\r\n}\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Shape from './Shape.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Path extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('path', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return this._array || (this._array = new PathArray(this.attr('d')))\r\n }\r\n\r\n // Plot new path\r\n plot (d) {\r\n return (d == null) ? this.array()\r\n : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new PathArray(d)))\r\n }\r\n\r\n // Clear array cache\r\n clear () {\r\n delete this._array\r\n return this\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n\r\n // Move by left top corner over x-axis\r\n x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n\r\n // Move by left top corner over y-axis\r\n y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg textpath [href*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\n// Define morphable array\r\nPath.prototype.MorphArray = PathArray\r\n\r\n// Add parent method\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped path element\r\n path: wrapWithAttrCheck(function (d) {\r\n // make sure plot is called as a setter\r\n return this.put(new Path()).plot(d || new PathArray())\r\n })\r\n }\r\n})\r\n\r\nregister(Path)\r\n","import { proportionalSize } from '../../utils/utils.js'\r\nimport PointArray from '../../types/PointArray.js'\r\n\r\n// Get array\r\nexport function array () {\r\n return this._array || (this._array = new PointArray(this.attr('points')))\r\n}\r\n\r\n// Plot new path\r\nexport function plot (p) {\r\n return (p == null) ? this.array()\r\n : this.clear().attr('points', typeof p === 'string' ? p\r\n : (this._array = new PointArray(p)))\r\n}\r\n\r\n// Clear array cache\r\nexport function clear () {\r\n delete this._array\r\n return this\r\n}\r\n\r\n// Move by left top corner\r\nexport function move (x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n}\r\n\r\n// Set element size to given width and height\r\nexport function size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polygon extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polygon', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polygon: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polygon()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polygon, pointed)\r\nextend(Polygon, poly)\r\nregister(Polygon)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polyline extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polyline', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polyline: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polyline()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polyline, pointed)\r\nextend(Polyline, poly)\r\nregister(Polyline)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Rect extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('rect', node), node)\r\n }\r\n}\r\n\r\nextend(Rect, { rx, ry })\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a rect element\r\n rect: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Rect()).size(width, height)\r\n })\r\n }\r\n})\r\n\r\nregister(Rect)\r\n","export default class Queue {\r\n constructor () {\r\n this._first = null\r\n this._last = null\r\n }\r\n\r\n push (value) {\r\n // An item stores an id and the provided value\r\n var item = value.next ? value : { value: value, next: null, prev: null }\r\n\r\n // Deal with the queue being empty or populated\r\n if (this._last) {\r\n item.prev = this._last\r\n this._last.next = item\r\n this._last = item\r\n } else {\r\n this._last = item\r\n this._first = item\r\n }\r\n\r\n // Update the length and return the current item\r\n return item\r\n }\r\n\r\n shift () {\r\n // Check if we have a value\r\n var remove = this._first\r\n if (!remove) return null\r\n\r\n // If we do, remove it and relink things\r\n this._first = remove.next\r\n if (this._first) this._first.prev = null\r\n this._last = this._first ? this._last : null\r\n return remove.value\r\n }\r\n\r\n // Shows us the first item in the list\r\n first () {\r\n return this._first && this._first.value\r\n }\r\n\r\n // Shows us the last item in the list\r\n last () {\r\n return this._last && this._last.value\r\n }\r\n\r\n // Removes the item that was returned from the push\r\n remove (item) {\r\n // Relink the previous item\r\n if (item.prev) item.prev.next = item.next\r\n if (item.next) item.next.prev = item.prev\r\n if (item === this._last) this._last = item.prev\r\n if (item === this._first) this._first = item.next\r\n\r\n // Invalidate item\r\n item.prev = null\r\n item.next = null\r\n }\r\n}\r\n","import { globals } from '../utils/window.js'\r\nimport Queue from './Queue.js'\r\n\r\nconst Animator = {\r\n nextDraw: null,\r\n frames: new Queue(),\r\n timeouts: new Queue(),\r\n timer: () => globals.window.performance || globals.window.Date,\r\n transforms: [],\r\n\r\n frame (fn) {\r\n // Store the node\r\n var node = Animator.frames.push({ run: fn })\r\n\r\n // Request an animation frame if we don't have one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n // Return the node so we can remove it easily\r\n return node\r\n },\r\n\r\n transform_frame (fn, id) {\r\n Animator.transforms[id] = fn\r\n },\r\n\r\n timeout (fn, delay) {\r\n delay = delay || 0\r\n\r\n // Work out when the event should fire\r\n var time = Animator.timer().now() + delay\r\n\r\n // Add the timeout to the end of the queue\r\n var node = Animator.timeouts.push({ run: fn, time: time })\r\n\r\n // Request another animation frame if we need one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n return node\r\n },\r\n\r\n cancelFrame (node) {\r\n node != null && Animator.frames.remove(node)\r\n },\r\n\r\n clearTimeout (node) {\r\n node != null && Animator.timeouts.remove(node)\r\n },\r\n\r\n _draw (now) {\r\n // Run all the timeouts we can run, if they are not ready yet, add them\r\n // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\r\n var nextTimeout = null\r\n var lastTimeout = Animator.timeouts.last()\r\n while ((nextTimeout = Animator.timeouts.shift())) {\r\n // Run the timeout if its time, or push it to the end\r\n if (now >= nextTimeout.time) {\r\n nextTimeout.run()\r\n } else {\r\n Animator.timeouts.push(nextTimeout)\r\n }\r\n\r\n // If we hit the last item, we should stop shifting out more items\r\n if (nextTimeout === lastTimeout) break\r\n }\r\n\r\n // Run all of the animation frames\r\n var nextFrame = null\r\n var lastFrame = Animator.frames.last()\r\n while ((nextFrame !== lastFrame) && (nextFrame = Animator.frames.shift())) {\r\n nextFrame.run()\r\n }\r\n\r\n Animator.transforms.forEach(function (el) { el() })\r\n\r\n // If we have remaining timeouts or frames, draw until we don't anymore\r\n Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()\r\n ? globals.window.requestAnimationFrame(Animator._draw)\r\n : null\r\n }\r\n}\r\n\r\nexport default Animator\r\n","import { globals } from '../utils/window.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Animator from './Animator.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\n\r\nvar makeSchedule = function (runnerInfo) {\r\n var start = runnerInfo.start\r\n var duration = runnerInfo.runner.duration()\r\n var end = start + duration\r\n return { start: start, duration: duration, end: end, runner: runnerInfo.runner }\r\n}\r\n\r\nconst defaultSource = function () {\r\n let w = globals.window\r\n return (w.performance || w.Date).now()\r\n}\r\n\r\nexport default class Timeline extends EventTarget {\r\n // Construct a new timeline on the given element\r\n constructor (timeSource = defaultSource) {\r\n super()\r\n\r\n this._timeSource = timeSource\r\n\r\n // Store the timing variables\r\n this._startTime = 0\r\n this._speed = 1.0\r\n\r\n // Determines how long a runner is hold in memory. Can be a dt or true/false\r\n this._persist = 0\r\n\r\n // Keep track of the running animations and their starting parameters\r\n this._nextFrame = null\r\n this._paused = true\r\n this._runners = []\r\n this._order = []\r\n this._time = 0\r\n this._lastSourceTime = 0\r\n this._lastStepTime = 0\r\n\r\n // Make sure that step is always called in class context\r\n this._step = this._step.bind(this)\r\n }\r\n\r\n // schedules a runner on the timeline\r\n schedule (runner, delay, when) {\r\n if (runner == null) {\r\n return this._runners.map(makeSchedule).sort(function (a, b) {\r\n return a.runner.id - b.runner.id\r\n })\r\n }\r\n\r\n // The start time for the next animation can either be given explicitly,\r\n // derived from the current timeline time or it can be relative to the\r\n // last start time to chain animations direclty\r\n\r\n var absoluteStartTime = 0\r\n var endTime = this.getEndTime()\r\n delay = delay || 0\r\n\r\n // Work out when to start the animation\r\n if (when == null || when === 'last' || when === 'after') {\r\n // Take the last time and increment\r\n absoluteStartTime = endTime\r\n } else if (when === 'absolute' || when === 'start') {\r\n absoluteStartTime = delay\r\n delay = 0\r\n } else if (when === 'now') {\r\n absoluteStartTime = this._time\r\n } else if (when === 'relative') {\r\n let runnerInfo = this._runners[runner.id]\r\n if (runnerInfo) {\r\n absoluteStartTime = runnerInfo.start + delay\r\n delay = 0\r\n }\r\n } else {\r\n throw new Error('Invalid value for the \"when\" parameter')\r\n }\r\n\r\n // Manage runner\r\n runner.unschedule()\r\n runner.timeline(this)\r\n // runner.time(-delay)\r\n\r\n // Save runnerInfo\r\n this._runners[runner.id] = {\r\n persist: this.persist(),\r\n runner: runner,\r\n start: absoluteStartTime + delay\r\n }\r\n\r\n // Save order, update Time if needed and continue\r\n this._order.push(runner.id)\r\n this.updateTime()._continue()\r\n return this\r\n }\r\n\r\n // Remove the runner from this timeline\r\n unschedule (runner) {\r\n var index = this._order.indexOf(runner.id)\r\n if (index < 0) return this\r\n\r\n delete this._runners[runner.id]\r\n this._order.splice(index, 1)\r\n runner.timeline(null)\r\n return this\r\n }\r\n\r\n // Calculates the end of the timeline\r\n getEndTime () {\r\n var lastRunnerInfo = this._runners[this._order[this._order.length - 1]]\r\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\r\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0\r\n return lastStartTime + lastDuration\r\n }\r\n\r\n // Makes sure, that after pausing the time doesn't jump\r\n updateTime () {\r\n if (!this.active()) {\r\n this._lastSourceTime = this._timeSource()\r\n }\r\n return this\r\n }\r\n\r\n play () {\r\n // Now make sure we are not paused and continue the animation\r\n this._paused = false\r\n return this.updateTime()._continue()\r\n }\r\n\r\n pause () {\r\n this._paused = true\r\n return this._continue()\r\n }\r\n\r\n stop () {\r\n // Go to start and pause\r\n this.time(0)\r\n return this.pause()\r\n }\r\n\r\n finish () {\r\n // Go to end and pause\r\n this.time(this.getEndTime() + 1)\r\n return this.pause()\r\n }\r\n\r\n speed (speed) {\r\n if (speed == null) return this._speed\r\n this._speed = speed\r\n return this\r\n }\r\n\r\n reverse (yes) {\r\n var currentSpeed = this.speed()\r\n if (yes == null) return this.speed(-currentSpeed)\r\n\r\n var positive = Math.abs(currentSpeed)\r\n return this.speed(yes ? positive : -positive)\r\n }\r\n\r\n seek (dt) {\r\n return this.time(this._time + dt)\r\n }\r\n\r\n time (time) {\r\n if (time == null) return this._time\r\n this._time = time\r\n return this._continue(true)\r\n }\r\n\r\n persist (dtOrForever) {\r\n if (dtOrForever == null) return this._persist\r\n this._persist = dtOrForever\r\n return this\r\n }\r\n\r\n source (fn) {\r\n if (fn == null) return this._timeSource\r\n this._timeSource = fn\r\n return this\r\n }\r\n\r\n _step (immediateStep = false) {\r\n // Get the time delta from the last time and update the time\r\n var time = this._timeSource()\r\n var dtSource = time - this._lastSourceTime\r\n\r\n if (immediateStep) dtSource = 0\r\n\r\n var dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\r\n this._lastSourceTime = time\r\n\r\n // Only update the time if we use the timeSource.\r\n // Otherwise use the current time\r\n if (!immediateStep) {\r\n // Update the time\r\n this._time += dtTime\r\n this._time = this._time < 0 ? 0 : this._time\r\n }\r\n this._lastStepTime = this._time\r\n this.fire('time', this._time)\r\n\r\n // Run all of the runners directly\r\n var runnersLeft = false\r\n for (var i = 0, len = this._order.length; i < len; i++) {\r\n // Get and run the current runner and ignore it if its inactive\r\n var runnerInfo = this._runners[this._order[i]]\r\n var runner = runnerInfo.runner\r\n let dt = dtTime\r\n\r\n // Make sure that we give the actual difference\r\n // between runner start time and now\r\n let dtToStart = this._time - runnerInfo.start\r\n\r\n // Dont run runner if not started yet\r\n if (dtToStart <= 0) {\r\n runnersLeft = true\r\n\r\n // This is for the case that teh timeline was seeked so that the time\r\n // is now before the startTime of the runner. Thats why we need to set\r\n // the runner to position 0\r\n runner.reset()\r\n continue\r\n } else if (dtToStart < dt) {\r\n // Adjust dt to make sure that animation is on point\r\n dt = dtToStart\r\n }\r\n\r\n if (!runner.active()) continue\r\n\r\n // If this runner is still going, signal that we need another animation\r\n // frame, otherwise, remove the completed runner\r\n var finished = runner.step(dt).done\r\n if (!finished) {\r\n runnersLeft = true\r\n // continue\r\n } else if (runnerInfo.persist !== true) {\r\n // runner is finished. And runner might get removed\r\n\r\n var endTime = runner.duration() - runner.time() + this._time\r\n\r\n if (endTime + this._persist < this._time) {\r\n // Delete runner and correct index\r\n delete this._runners[this._order[i]]\r\n this._order.splice(i--, 1) && --len\r\n runner.timeline(null)\r\n }\r\n }\r\n }\r\n\r\n // Basically: we continue when there are runners right from us in time\r\n // when -->, and when runners are left from us when <--\r\n if ((runnersLeft && !(this._speed < 0 && this._time === 0)) || (this._order.length && this._speed < 0 && this._time > 0)) {\r\n this._continue()\r\n } else {\r\n this.fire('finished')\r\n this.pause()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Checks if we are running and continues the animation\r\n _continue (immediateStep = false) {\r\n Animator.cancelFrame(this._nextFrame)\r\n this._nextFrame = null\r\n\r\n if (immediateStep) return this._step(true)\r\n if (this._paused) return this\r\n\r\n this._nextFrame = Animator.frame(this._step)\r\n return this\r\n }\r\n\r\n active () {\r\n return !!this._nextFrame\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n timeline: function () {\r\n this._timeline = (this._timeline || new Timeline())\r\n return this._timeline\r\n }\r\n }\r\n})\r\n","import { Controller, Ease, Stepper } from './Controller.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { from, to } from '../modules/core/gradiented.js'\r\nimport { getOrigin } from '../utils/utils.js'\r\nimport { noop, timeline } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Animator from './Animator.js'\r\nimport Box from '../types/Box.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport Matrix from '../types/Matrix.js'\r\nimport Morphable, { TransformBag } from './Morphable.js'\r\nimport Point from '../types/Point.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Timeline from './Timeline.js'\r\n\r\nexport default class Runner extends EventTarget {\r\n constructor (options) {\r\n super()\r\n\r\n // Store a unique id on the runner, so that we can identify it later\r\n this.id = Runner.id++\r\n\r\n // Ensure a default value\r\n options = options == null\r\n ? timeline.duration\r\n : options\r\n\r\n // Ensure that we get a controller\r\n options = typeof options === 'function'\r\n ? new Controller(options)\r\n : options\r\n\r\n // Declare all of the variables\r\n this._element = null\r\n this._timeline = null\r\n this.done = false\r\n this._queue = []\r\n\r\n // Work out the stepper and the duration\r\n this._duration = typeof options === 'number' && options\r\n this._isDeclarative = options instanceof Controller\r\n this._stepper = this._isDeclarative ? options : new Ease()\r\n\r\n // We copy the current values from the timeline because they can change\r\n this._history = {}\r\n\r\n // Store the state of the runner\r\n this.enabled = true\r\n this._time = 0\r\n this._lastTime = 0\r\n\r\n // At creation, the runner is in reseted state\r\n this._reseted = true\r\n\r\n // Save transforms applied to this runner\r\n this.transforms = new Matrix()\r\n this.transformId = 1\r\n\r\n // Looping variables\r\n this._haveReversed = false\r\n this._reverse = false\r\n this._loopsDone = 0\r\n this._swing = false\r\n this._wait = 0\r\n this._times = 1\r\n }\r\n\r\n /*\r\n Runner Definitions\r\n ==================\r\n These methods help us define the runtime behaviour of the Runner or they\r\n help us make new runners from the current runner\r\n */\r\n\r\n element (element) {\r\n if (element == null) return this._element\r\n this._element = element\r\n element._prepareRunner()\r\n return this\r\n }\r\n\r\n timeline (timeline) {\r\n // check explicitly for undefined so we can set the timeline to null\r\n if (typeof timeline === 'undefined') return this._timeline\r\n this._timeline = timeline\r\n return this\r\n }\r\n\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var runner = new Runner(o.duration)\r\n if (this._timeline) runner.timeline(this._timeline)\r\n if (this._element) runner.element(this._element)\r\n return runner.loop(o).schedule(delay, when)\r\n }\r\n\r\n schedule (timeline, delay, when) {\r\n // The user doesn't need to pass a timeline if we already have one\r\n if (!(timeline instanceof Timeline)) {\r\n when = delay\r\n delay = timeline\r\n timeline = this.timeline()\r\n }\r\n\r\n // If there is no timeline, yell at the user...\r\n if (!timeline) {\r\n throw Error('Runner cannot be scheduled without timeline')\r\n }\r\n\r\n // Schedule the runner on the timeline provided\r\n timeline.schedule(this, delay, when)\r\n return this\r\n }\r\n\r\n unschedule () {\r\n var timeline = this.timeline()\r\n timeline && timeline.unschedule(this)\r\n return this\r\n }\r\n\r\n loop (times, swing, wait) {\r\n // Deal with the user passing in an object\r\n if (typeof times === 'object') {\r\n swing = times.swing\r\n wait = times.wait\r\n times = times.times\r\n }\r\n\r\n // Sanitise the values and store them\r\n this._times = times || Infinity\r\n this._swing = swing || false\r\n this._wait = wait || 0\r\n return this\r\n }\r\n\r\n delay (delay) {\r\n return this.animate(0, delay)\r\n }\r\n\r\n /*\r\n Basic Functionality\r\n ===================\r\n These methods allow us to attach basic functions to the runner directly\r\n */\r\n\r\n queue (initFn, runFn, retargetFn, isTransform) {\r\n this._queue.push({\r\n initialiser: initFn || noop,\r\n runner: runFn || noop,\r\n retarget: retargetFn,\r\n isTransform: isTransform,\r\n initialised: false,\r\n finished: false\r\n })\r\n var timeline = this.timeline()\r\n timeline && this.timeline()._continue()\r\n return this\r\n }\r\n\r\n during (fn) {\r\n return this.queue(null, fn)\r\n }\r\n\r\n after (fn) {\r\n return this.on('finish', fn)\r\n }\r\n\r\n /*\r\n Runner animation methods\r\n ========================\r\n Control how the animation plays\r\n */\r\n\r\n time (time) {\r\n if (time == null) {\r\n return this._time\r\n }\r\n let dt = time - this._time\r\n this.step(dt)\r\n return this\r\n }\r\n\r\n duration () {\r\n return this._times * (this._wait + this._duration) - this._wait\r\n }\r\n\r\n loops (p) {\r\n var loopDuration = this._duration + this._wait\r\n if (p == null) {\r\n var loopsDone = Math.floor(this._time / loopDuration)\r\n var relativeTime = (this._time - loopsDone * loopDuration)\r\n var position = relativeTime / this._duration\r\n return Math.min(loopsDone + position, this._times)\r\n }\r\n var whole = Math.floor(p)\r\n var partial = p % 1\r\n var time = loopDuration * whole + this._duration * partial\r\n return this.time(time)\r\n }\r\n\r\n position (p) {\r\n // Get all of the variables we need\r\n var x = this._time\r\n var d = this._duration\r\n var w = this._wait\r\n var t = this._times\r\n var s = this._swing\r\n var r = this._reverse\r\n var position\r\n\r\n if (p == null) {\r\n /*\r\n This function converts a time to a position in the range [0, 1]\r\n The full explanation can be found in this desmos demonstration\r\n https://www.desmos.com/calculator/u4fbavgche\r\n The logic is slightly simplified here because we can use booleans\r\n */\r\n\r\n // Figure out the value without thinking about the start or end time\r\n const f = function (x) {\r\n var swinging = s * Math.floor(x % (2 * (w + d)) / (w + d))\r\n var backwards = (swinging && !r) || (!swinging && r)\r\n var uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards\r\n var clipped = Math.max(Math.min(uncliped, 1), 0)\r\n return clipped\r\n }\r\n\r\n // Figure out the value by incorporating the start time\r\n var endTime = t * (w + d) - w\r\n position = x <= 0 ? Math.round(f(1e-5))\r\n : x < endTime ? f(x)\r\n : Math.round(f(endTime - 1e-5))\r\n return position\r\n }\r\n\r\n // Work out the loops done and add the position to the loops done\r\n var loopsDone = Math.floor(this.loops())\r\n var swingForward = s && (loopsDone % 2 === 0)\r\n var forwards = (swingForward && !r) || (r && swingForward)\r\n position = loopsDone + (forwards ? p : 1 - p)\r\n return this.loops(position)\r\n }\r\n\r\n progress (p) {\r\n if (p == null) {\r\n return Math.min(1, this._time / this.duration())\r\n }\r\n return this.time(p * this.duration())\r\n }\r\n\r\n step (dt) {\r\n // If we are inactive, this stepper just gets skipped\r\n if (!this.enabled) return this\r\n\r\n // Update the time and get the new position\r\n dt = dt == null ? 16 : dt\r\n this._time += dt\r\n var position = this.position()\r\n\r\n // Figure out if we need to run the stepper in this frame\r\n var running = this._lastPosition !== position && this._time >= 0\r\n this._lastPosition = position\r\n\r\n // Figure out if we just started\r\n var duration = this.duration()\r\n var justStarted = this._lastTime <= 0 && this._time > 0\r\n var justFinished = this._lastTime < this._time && this.time > duration\r\n this._lastTime = this._time\r\n if (justStarted) {\r\n this.fire('start', this)\r\n }\r\n\r\n // Work out if the runner is finished set the done flag here so animations\r\n // know, that they are running in the last step (this is good for\r\n // transformations which can be merged)\r\n var declarative = this._isDeclarative\r\n this.done = !declarative && !justFinished && this._time >= duration\r\n\r\n // Runner is running. So its not in reseted state anymore\r\n this._reseted = false\r\n\r\n // Call initialise and the run function\r\n if (running || declarative) {\r\n this._initialise(running)\r\n\r\n // clear the transforms on this runner so they dont get added again and again\r\n this.transforms = new Matrix()\r\n var converged = this._run(declarative ? dt : position)\r\n\r\n this.fire('step', this)\r\n }\r\n // correct the done flag here\r\n // declaritive animations itself know when they converged\r\n this.done = this.done || (converged && declarative)\r\n if (this.done) {\r\n this.fire('finish', this)\r\n }\r\n return this\r\n }\r\n\r\n reset () {\r\n if (this._reseted) return this\r\n this.loops(0)\r\n this._reseted = true\r\n return this\r\n }\r\n\r\n finish () {\r\n return this.step(Infinity)\r\n }\r\n\r\n reverse (reverse) {\r\n this._reverse = reverse == null ? !this._reverse : reverse\r\n return this\r\n }\r\n\r\n ease (fn) {\r\n this._stepper = new Ease(fn)\r\n return this\r\n }\r\n\r\n active (enabled) {\r\n if (enabled == null) return this.enabled\r\n this.enabled = enabled\r\n return this\r\n }\r\n\r\n /*\r\n Private Methods\r\n ===============\r\n Methods that shouldn't be used externally\r\n */\r\n\r\n // Save a morpher to the morpher list so that we can retarget it later\r\n _rememberMorpher (method, morpher) {\r\n this._history[method] = {\r\n morpher: morpher,\r\n caller: this._queue[this._queue.length - 1]\r\n }\r\n }\r\n\r\n // Try to set the target for a morpher if the morpher exists, otherwise\r\n // do nothing and return false\r\n _tryRetarget (method, target) {\r\n if (this._history[method]) {\r\n // if the last method wasnt even initialised, throw it away\r\n if (!this._history[method].caller.initialised) {\r\n let index = this._queue.indexOf(this._history[method].caller)\r\n this._queue.splice(index, 1)\r\n return false\r\n }\r\n\r\n // for the case of transformations, we use the special retarget function\r\n // which has access to the outer scope\r\n if (this._history[method].caller.retarget) {\r\n this._history[method].caller.retarget(target)\r\n // for everything else a simple morpher change is sufficient\r\n } else {\r\n this._history[method].morpher.to(target)\r\n }\r\n\r\n this._history[method].caller.finished = false\r\n var timeline = this.timeline()\r\n timeline && timeline._continue()\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n // Run each initialise function in the runner if required\r\n _initialise (running) {\r\n // If we aren't running, we shouldn't initialise when not declarative\r\n if (!running && !this._isDeclarative) return\r\n\r\n // Loop through all of the initialisers\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current initialiser\r\n var current = this._queue[i]\r\n\r\n // Determine whether we need to initialise\r\n var needsIt = this._isDeclarative || (!current.initialised && running)\r\n running = !current.finished\r\n\r\n // Call the initialiser if we need to\r\n if (needsIt && running) {\r\n current.initialiser.call(this)\r\n current.initialised = true\r\n }\r\n }\r\n }\r\n\r\n // Run each run function for the position or dt given\r\n _run (positionOrDt) {\r\n // Run all of the _queue directly\r\n var allfinished = true\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current function to run\r\n var current = this._queue[i]\r\n\r\n // Run the function if its not finished, we keep track of the finished\r\n // flag for the sake of declarative _queue\r\n var converged = current.runner.call(this, positionOrDt)\r\n current.finished = current.finished || (converged === true)\r\n allfinished = allfinished && current.finished\r\n }\r\n\r\n // We report when all of the constructors are finished\r\n return allfinished\r\n }\r\n\r\n addTransform (transform, index) {\r\n this.transforms.lmultiplyO(transform)\r\n return this\r\n }\r\n\r\n clearTransform () {\r\n this.transforms = new Matrix()\r\n return this\r\n }\r\n\r\n // TODO: Keep track of all transformations so that deletion is faster\r\n clearTransformsFromQueue () {\r\n if (!this.done) {\r\n this._queue = this._queue.filter((item) => {\r\n return !item.isTransform\r\n })\r\n }\r\n }\r\n\r\n static sanitise (duration, delay, when) {\r\n // Initialise the default parameters\r\n var times = 1\r\n var swing = false\r\n var wait = 0\r\n duration = duration || timeline.duration\r\n delay = delay || timeline.delay\r\n when = when || 'last'\r\n\r\n // If we have an object, unpack the values\r\n if (typeof duration === 'object' && !(duration instanceof Stepper)) {\r\n delay = duration.delay || delay\r\n when = duration.when || when\r\n swing = duration.swing || swing\r\n times = duration.times || times\r\n wait = duration.wait || wait\r\n duration = duration.duration || timeline.duration\r\n }\r\n\r\n return {\r\n duration: duration,\r\n delay: delay,\r\n swing: swing,\r\n times: times,\r\n wait: wait,\r\n when: when\r\n }\r\n }\r\n}\r\n\r\nRunner.id = 0\r\n\r\nclass FakeRunner {\r\n constructor (transforms = new Matrix(), id = -1, done = true) {\r\n this.transforms = transforms\r\n this.id = id\r\n this.done = done\r\n }\r\n\r\n clearTransformsFromQueue () { }\r\n}\r\n\r\nextend([Runner, FakeRunner], {\r\n mergeWith (runner) {\r\n return new FakeRunner(\r\n runner.transforms.lmultiply(this.transforms),\r\n runner.id\r\n )\r\n }\r\n})\r\n\r\n// FakeRunner.emptyRunner = new FakeRunner()\r\n\r\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\r\nconst getRunnerTransform = (runner) => runner.transforms\r\n\r\nfunction mergeTransforms () {\r\n // Find the matrix to apply to the element and apply it\r\n let runners = this._transformationRunners.runners\r\n let netTransform = runners\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n\r\n this.transform(netTransform)\r\n\r\n this._transformationRunners.merge()\r\n\r\n if (this._transformationRunners.length() === 1) {\r\n this._frameId = null\r\n }\r\n}\r\n\r\nclass RunnerArray {\r\n constructor () {\r\n this.runners = []\r\n this.ids = []\r\n }\r\n\r\n add (runner) {\r\n if (this.runners.includes(runner)) return\r\n\r\n let id = runner.id + 1\r\n\r\n let leftSibling = this.ids.reduce((last, curr) => {\r\n if (curr > last && curr < id) return curr\r\n return last\r\n }, 0)\r\n\r\n let index = this.ids.indexOf(leftSibling) + 1\r\n\r\n this.ids.splice(index, 0, id)\r\n this.runners.splice(index, 0, runner)\r\n\r\n return this\r\n }\r\n\r\n getByID (id) {\r\n return this.runners[this.ids.indexOf(id + 1)]\r\n }\r\n\r\n remove (id) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1)\r\n this.runners.splice(index, 1)\r\n return this\r\n }\r\n\r\n merge () {\r\n let lastRunner = null\r\n this.runners.forEach((runner, i) => {\r\n if (lastRunner && runner.done && lastRunner.done) {\r\n this.remove(runner.id)\r\n this.edit(lastRunner.id, runner.mergeWith(lastRunner))\r\n }\r\n\r\n lastRunner = runner\r\n })\r\n\r\n return this\r\n }\r\n\r\n edit (id, newRunner) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1, id)\r\n this.runners.splice(index, 1, newRunner)\r\n return this\r\n }\r\n\r\n length () {\r\n return this.ids.length\r\n }\r\n\r\n clearBefore (id) {\r\n let deleteCnt = this.ids.indexOf(id + 1) || 1\r\n this.ids.splice(0, deleteCnt, 0)\r\n this.runners.splice(0, deleteCnt, new FakeRunner())\r\n .forEach((r) => r.clearTransformsFromQueue())\r\n return this\r\n }\r\n}\r\n\r\nlet frameId = 0\r\nregisterMethods({\r\n Element: {\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var timeline = this.timeline()\r\n return new Runner(o.duration)\r\n .loop(o)\r\n .element(this)\r\n .timeline(timeline.play())\r\n .schedule(delay, when)\r\n },\r\n\r\n delay (by, when) {\r\n return this.animate(0, by, when)\r\n },\r\n\r\n // this function searches for all runners on the element and deletes the ones\r\n // which run before the current one. This is because absolute transformations\r\n // overwfrite anything anyway so there is no need to waste time computing\r\n // other runners\r\n _clearTransformRunnersBefore (currentRunner) {\r\n this._transformationRunners.clearBefore(currentRunner.id)\r\n },\r\n\r\n _currentTransform (current) {\r\n return this._transformationRunners.runners\r\n // we need the equal sign here to make sure, that also transformations\r\n // on the same runner which execute before the current transformation are\r\n // taken into account\r\n .filter((runner) => runner.id <= current.id)\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n },\r\n\r\n addRunner (runner) {\r\n this._transformationRunners.add(runner)\r\n\r\n Animator.transform_frame(\r\n mergeTransforms.bind(this), this._frameId\r\n )\r\n },\r\n\r\n _prepareRunner () {\r\n if (this._frameId == null) {\r\n this._transformationRunners = new RunnerArray()\r\n .add(new FakeRunner(new Matrix(this)))\r\n\r\n this._frameId = frameId++\r\n }\r\n }\r\n }\r\n})\r\n\r\nextend(Runner, {\r\n attr (a, v) {\r\n return this.styleAttr('attr', a, v)\r\n },\r\n\r\n // Add animatable styles\r\n css (s, v) {\r\n return this.styleAttr('css', s, v)\r\n },\r\n\r\n styleAttr (type, name, val) {\r\n // apply attributes individually\r\n if (typeof name === 'object') {\r\n for (var key in val) {\r\n this.styleAttr(type, key, val[key])\r\n }\r\n }\r\n\r\n var morpher = new Morphable(this._stepper).to(val)\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.element()[type](name))\r\n }, function (pos) {\r\n this.element()[type](name, morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n zoom (level, point) {\r\n var morpher = new Morphable(this._stepper).to(new SVGNumber(level))\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.zoom())\r\n }, function (pos) {\r\n this.element().zoom(morpher.at(pos), point)\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n ** absolute transformations\r\n **/\r\n\r\n //\r\n // M v -----|-----(D M v = F v)------|-----> T v\r\n //\r\n // 1. define the final state (T) and decompose it (once)\r\n // t = [tx, ty, the, lam, sy, sx]\r\n // 2. on every frame: pull the current state of all previous transforms\r\n // (M - m can change)\r\n // and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\r\n // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\r\n // - Note F(0) = M\r\n // - Note F(1) = T\r\n // 4. Now you get the delta matrix as a result: D = F * inv(M)\r\n\r\n transform (transforms, relative, affine) {\r\n // If we have a declarative function, we should retarget it if possible\r\n relative = transforms.relative || relative\r\n if (this._isDeclarative && !relative && this._tryRetarget('transform', transforms)) {\r\n return this\r\n }\r\n\r\n // Parse the parameters\r\n var isMatrix = Matrix.isMatrixLike(transforms)\r\n affine = transforms.affine != null\r\n ? transforms.affine\r\n : (affine != null ? affine : !isMatrix)\r\n\r\n // Create a morepher and set its type\r\n const morpher = new Morphable(this._stepper)\r\n .type(affine ? TransformBag : Matrix)\r\n\r\n let origin\r\n let element\r\n let current\r\n let currentAngle\r\n let startTransform\r\n\r\n function setup () {\r\n // make sure element and origin is defined\r\n element = element || this.element()\r\n origin = origin || getOrigin(transforms, element)\r\n\r\n startTransform = new Matrix(relative ? undefined : element)\r\n\r\n // add the runner to the element so it can merge transformations\r\n element.addRunner(this)\r\n\r\n // Deactivate all transforms that have run so far if we are absolute\r\n if (!relative) {\r\n element._clearTransformRunnersBefore(this)\r\n }\r\n }\r\n\r\n function run (pos) {\r\n // clear all other transforms before this in case something is saved\r\n // on this runner. We are absolute. We dont need these!\r\n if (!relative) this.clearTransform()\r\n\r\n let { x, y } = new Point(origin).transform(element._currentTransform(this))\r\n\r\n let target = new Matrix({ ...transforms, origin: [x, y] })\r\n let start = this._isDeclarative && current\r\n ? current\r\n : startTransform\r\n\r\n if (affine) {\r\n target = target.decompose(x, y)\r\n start = start.decompose(x, y)\r\n\r\n // Get the current and target angle as it was set\r\n const rTarget = target.rotate\r\n const rCurrent = start.rotate\r\n\r\n // Figure out the shortest path to rotate directly\r\n const possibilities = [rTarget - 360, rTarget, rTarget + 360]\r\n const distances = possibilities.map(a => Math.abs(a - rCurrent))\r\n const shortest = Math.min(...distances)\r\n const index = distances.indexOf(shortest)\r\n target.rotate = possibilities[index]\r\n }\r\n\r\n if (relative) {\r\n // we have to be careful here not to overwrite the rotation\r\n // with the rotate method of Matrix\r\n if (!isMatrix) {\r\n target.rotate = transforms.rotate || 0\r\n }\r\n if (this._isDeclarative && currentAngle) {\r\n start.rotate = currentAngle\r\n }\r\n }\r\n\r\n morpher.from(start)\r\n morpher.to(target)\r\n\r\n let affineParameters = morpher.at(pos)\r\n currentAngle = affineParameters.rotate\r\n current = new Matrix(affineParameters)\r\n\r\n this.addTransform(current)\r\n return morpher.done()\r\n }\r\n\r\n function retarget (newTransforms) {\r\n // only get a new origin if it changed since the last call\r\n if (\r\n (newTransforms.origin || 'center').toString() !==\r\n (transforms.origin || 'center').toString()\r\n ) {\r\n origin = getOrigin(transforms, element)\r\n }\r\n\r\n // overwrite the old transformations with the new ones\r\n transforms = { ...newTransforms, origin }\r\n }\r\n\r\n this.queue(setup, run, retarget, true)\r\n this._isDeclarative && this._rememberMorpher('transform', morpher)\r\n return this\r\n },\r\n\r\n // Animatable x-axis\r\n x (x, relative) {\r\n return this._queueNumber('x', x)\r\n },\r\n\r\n // Animatable y-axis\r\n y (y) {\r\n return this._queueNumber('y', y)\r\n },\r\n\r\n dx (x) {\r\n return this._queueNumberDelta('x', x)\r\n },\r\n\r\n dy (y) {\r\n return this._queueNumberDelta('y', y)\r\n },\r\n\r\n _queueNumberDelta (method, to) {\r\n to = new SVGNumber(to)\r\n\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n var from = null\r\n this.queue(function () {\r\n from = this.element()[method]()\r\n morpher.from(from)\r\n morpher.to(from + to)\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n }, function (newTo) {\r\n morpher.to(from + new SVGNumber(newTo))\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueObject (method, to) {\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n this.queue(function () {\r\n morpher.from(this.element()[method]())\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueNumber (method, value) {\r\n return this._queueObject(method, new SVGNumber(value))\r\n },\r\n\r\n // Animatable center x-axis\r\n cx (x) {\r\n return this._queueNumber('cx', x)\r\n },\r\n\r\n // Animatable center y-axis\r\n cy (y) {\r\n return this._queueNumber('cy', y)\r\n },\r\n\r\n // Add animatable move\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n },\r\n\r\n // Add animatable center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n },\r\n\r\n // Add animatable size\r\n size (width, height) {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if (!width || !height) {\r\n box = this._element.bbox()\r\n }\r\n\r\n if (!width) {\r\n width = box.width / box.height * height\r\n }\r\n\r\n if (!height) {\r\n height = box.height / box.width * width\r\n }\r\n\r\n return this\r\n .width(width)\r\n .height(height)\r\n },\r\n\r\n // Add animatable width\r\n width (width) {\r\n return this._queueNumber('width', width)\r\n },\r\n\r\n // Add animatable height\r\n height (height) {\r\n return this._queueNumber('height', height)\r\n },\r\n\r\n // Add animatable plot\r\n plot (a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if (arguments.length === 4) {\r\n return this.plot([a, b, c, d])\r\n }\r\n\r\n var morpher = this._element.MorphArray().to(a)\r\n\r\n this.queue(function () {\r\n morpher.from(this._element.array())\r\n }, function (pos) {\r\n this._element.plot(morpher.at(pos))\r\n })\r\n\r\n return this\r\n },\r\n\r\n // Add leading method\r\n leading (value) {\r\n return this._queueNumber('leading', value)\r\n },\r\n\r\n // Add animatable viewbox\r\n viewbox (x, y, width, height) {\r\n return this._queueObject('viewbox', new Box(x, y, width, height))\r\n },\r\n\r\n update (o) {\r\n if (typeof o !== 'object') {\r\n return this.update({\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n\r\n return this\r\n }\r\n})\r\n\r\nextend(Runner, { rx, ry, from, to })\r\n","import {\r\n adopt,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport Defs from './Defs.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Svg extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('svg', node), node)\r\n this.namespace()\r\n }\r\n\r\n isRoot () {\r\n return !this.node.parentNode ||\r\n !(this.node.parentNode instanceof globals.window.SVGElement) ||\r\n this.node.parentNode.nodeName === '#document'\r\n }\r\n\r\n // Check if this is a root svg\r\n // If not, call docs from this element\r\n root () {\r\n if (this.isRoot()) return this\r\n return super.root()\r\n }\r\n\r\n // Add namespaces\r\n namespace () {\r\n if (!this.isRoot()) return this.root().namespace()\r\n return this\r\n .attr({ xmlns: ns, version: '1.1' })\r\n .attr('xmlns:xlink', xlink, xmlns)\r\n .attr('xmlns:svgjs', svgjs, xmlns)\r\n }\r\n\r\n // Creates and returns defs element\r\n defs () {\r\n if (!this.isRoot()) return this.root().defs()\r\n\r\n return adopt(this.node.getElementsByTagName('defs')[0]) ||\r\n this.put(new Defs())\r\n }\r\n\r\n // custom parent method\r\n parent (type) {\r\n if (this.isRoot()) {\r\n return this.node.parentNode.nodeName === '#document'\r\n ? null\r\n : adopt(this.node.parentNode)\r\n }\r\n\r\n return super.parent(type)\r\n }\r\n\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n return this\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create nested svg document\r\n nested: wrapWithAttrCheck(function () {\r\n return this.put(new Svg())\r\n })\r\n }\r\n})\r\n\r\nregister(Svg, 'Svg', true)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Symbol extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('symbol', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n symbol: wrapWithAttrCheck(function () {\r\n return this.put(new Symbol())\r\n })\r\n }\r\n})\r\n\r\nregister(Symbol)\r\n","import { globals } from '../../utils/window.js'\r\n\r\n// Create plain text node\r\nexport function plain (text) {\r\n // clear if build mode is disabled\r\n if (this._build === false) {\r\n this.clear()\r\n }\r\n\r\n // create text node\r\n this.node.appendChild(globals.document.createTextNode(text))\r\n\r\n return this\r\n}\r\n\r\n// Get length of text element\r\nexport function length () {\r\n return this.node.getComputedTextLength()\r\n}\r\n","import {\r\n adopt,\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { attrs } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Text extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('text', node), node)\r\n\r\n this.dom.leading = new SVGNumber(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', attrs['font-family'])\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n // act as getter\r\n if (x == null) {\r\n return this.attr('x')\r\n }\r\n\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n var oy = this.attr('y')\r\n var o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null) {\r\n return typeof oy === 'number' ? oy - o : oy\r\n }\r\n\r\n return this.attr('y', typeof y === 'number' ? y + o : y)\r\n }\r\n\r\n // Move center over x-axis\r\n cx (x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n\r\n // Move center over y-axis\r\n cy (y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n\r\n // Set the text content\r\n text (text) {\r\n // act as getter\r\n if (text === undefined) {\r\n var children = this.node.childNodes\r\n var firstLine = 0\r\n text = ''\r\n\r\n for (var i = 0, len = children.length; i < len; ++i) {\r\n // skip textPaths - they are no lines\r\n if (children[i].nodeName === 'textPath') {\r\n if (i === 0) firstLine = 1\r\n continue\r\n }\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var j = 0, jl = text.length; j < jl; j++) {\r\n this.tspan(text[j]).newLine()\r\n }\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n\r\n // Set / get leading\r\n leading (value) {\r\n // act as getter\r\n if (value == null) {\r\n return this.dom.leading\r\n }\r\n\r\n // act as setter\r\n this.dom.leading = new SVGNumber(value)\r\n\r\n return this.rebuild()\r\n }\r\n\r\n // Rebuild appearance type\r\n rebuild (rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild === 'boolean') {\r\n this._rebuild = rebuild\r\n }\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n var blankLineOffset = 0\r\n var leading = this.dom.leading\r\n\r\n this.each(function () {\r\n var fontSize = globals.window.getComputedStyle(this.node)\r\n .getPropertyValue('font-size')\r\n var dy = leading * new SVGNumber(fontSize)\r\n\r\n if (this.dom.newLined) {\r\n this.attr('x', self.attr('x'))\r\n\r\n if (this.text() === '\\n') {\r\n blankLineOffset += dy\r\n } else {\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Enable / disable build mode\r\n build (build) {\r\n this._build = !!build\r\n return this\r\n }\r\n\r\n // overwrite method from parent to set data properly\r\n setData (o) {\r\n this.dom = o\r\n this.dom.leading = new SVGNumber(o.leading || 1.3)\r\n return this\r\n }\r\n}\r\n\r\nextend(Text, textable)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create text element\r\n text: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).text(text)\r\n }),\r\n\r\n // Create plain text element\r\n plain: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).plain(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Text)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Text from './Text.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Tspan extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('tspan', node), node)\r\n }\r\n\r\n // Set text content\r\n text (text) {\r\n if (text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n\r\n // Shortcut dx\r\n dx (dx) {\r\n return this.attr('dx', dx)\r\n }\r\n\r\n // Shortcut dy\r\n dy (dy) {\r\n return this.attr('dy', dy)\r\n }\r\n\r\n // Create new line\r\n newLine () {\r\n // fetch text parent\r\n var t = this.parent(Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new position\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n}\r\n\r\nextend(Tspan, textable)\r\n\r\nregisterMethods({\r\n Tspan: {\r\n tspan: wrapWithAttrCheck(function (text) {\r\n var tspan = new Tspan()\r\n\r\n // clear if build mode is disabled\r\n if (!this._build) {\r\n this.clear()\r\n }\r\n\r\n // add new tspan\r\n this.node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Tspan)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class ClipPath extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('clipPath', node), node)\r\n }\r\n\r\n // Unclip all clipped elements and remove itself\r\n remove () {\r\n // unclip all targets\r\n this.targets().forEach(function (el) {\r\n el.unclip()\r\n })\r\n\r\n // remove clipPath from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [clip-path*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create clipping element\r\n clip: wrapWithAttrCheck(function () {\r\n return this.defs().put(new ClipPath())\r\n })\r\n },\r\n Element: {\r\n // Distribute clipPath to svg element\r\n clipWith (element) {\r\n // use given clip or create a new one\r\n let clipper = element instanceof ClipPath\r\n ? element\r\n : this.parent().clip().add(element)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + clipper.id() + '\")')\r\n },\r\n\r\n // Unclip element\r\n unclip () {\r\n return this.attr('clip-path', null)\r\n },\r\n\r\n clipper () {\r\n return this.reference('clip-path')\r\n }\r\n }\r\n})\r\n\r\nregister(ClipPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class G extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('g', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create a group element\r\n group: wrapWithAttrCheck(function () {\r\n return this.put(new G())\r\n })\r\n }\r\n})\r\n\r\nregister(G)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class A extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('a', node), node)\r\n }\r\n\r\n // Link url\r\n to (url) {\r\n return this.attr('href', url, xlink)\r\n }\r\n\r\n // Link target attribute\r\n target (target) {\r\n return this.attr('target', target)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a hyperlink element\r\n link: wrapWithAttrCheck(function (url) {\r\n return this.put(new A()).to(url)\r\n })\r\n },\r\n Element: {\r\n // Create a hyperlink element\r\n linkTo: function (url) {\r\n var link = new A()\r\n\r\n if (typeof url === 'function') { url.call(link, link) } else {\r\n link.to(url)\r\n }\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n }\r\n})\r\n\r\nregister(A)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Mask extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('mask', node), node)\r\n }\r\n\r\n // Unmask all masked elements and remove itself\r\n remove () {\r\n // unmask all targets\r\n this.targets().forEach(function (el) {\r\n el.unmask()\r\n })\r\n\r\n // remove mask from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [mask*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n mask: wrapWithAttrCheck(function () {\r\n return this.defs().put(new Mask())\r\n })\r\n },\r\n Element: {\r\n // Distribute mask to svg element\r\n maskWith (element) {\r\n // use given mask or create a new one\r\n var masker = element instanceof Mask\r\n ? element\r\n : this.parent().mask().add(element)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + masker.id() + '\")')\r\n },\r\n\r\n // Unmask element\r\n unmask () {\r\n return this.attr('mask', null)\r\n },\r\n\r\n masker () {\r\n return this.reference('mask')\r\n }\r\n }\r\n})\r\n\r\nregister(Mask)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { unCamelCase } from '../utils/utils.js'\r\nimport Element from './Element.js'\r\n\r\nfunction cssRule (selector, rule) {\r\n if (!selector) return ''\r\n if (!rule) return selector\r\n\r\n var ret = selector + '{'\r\n\r\n for (var i in rule) {\r\n ret += unCamelCase(i) + ':' + rule[i] + ';'\r\n }\r\n\r\n ret += '}'\r\n\r\n return ret\r\n}\r\n\r\nexport default class Style extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('style', node), node)\r\n }\r\n\r\n addText (w = '') {\r\n this.node.textContent += w\r\n return this\r\n }\r\n\r\n font (name, src, params = {}) {\r\n return this.rule('@font-face', {\r\n fontFamily: name,\r\n src: src,\r\n ...params\r\n })\r\n }\r\n\r\n rule (selector, obj) {\r\n return this.addText(cssRule(selector, obj))\r\n }\r\n}\r\n\r\nregisterMethods('Dom', {\r\n style: wrapWithAttrCheck(function (selector, obj) {\r\n return this.put(new Style()).rule(selector, obj)\r\n }),\r\n fontface: wrapWithAttrCheck(function (name, src, params) {\r\n return this.put(new Style()).font(name, src, params)\r\n })\r\n})\r\n\r\nregister(Style)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Path from './Path.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Text from './Text.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class TextPath extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('textPath', node), node)\r\n }\r\n\r\n // return the array of the path track element\r\n array () {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n\r\n // Plot path if any\r\n plot (d) {\r\n var track = this.track()\r\n var pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n\r\n // Get the path element\r\n track () {\r\n return this.reference('href')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n textPath: wrapWithAttrCheck(function (text, path) {\r\n return this.defs().path(path).text(text).addTo(this)\r\n })\r\n },\r\n Text: {\r\n // Create path for text to run on\r\n path: wrapWithAttrCheck(function (track) {\r\n var path = new TextPath()\r\n\r\n // if track is a path, reuse it\r\n if (!(track instanceof Path)) {\r\n // create path element\r\n track = this.root().defs().path(track)\r\n }\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, xlink)\r\n\r\n // add textPath element as child node and return textPath\r\n return this.put(path)\r\n }),\r\n\r\n // Get the textPath children\r\n textPath () {\r\n return this.find('textPath')[0]\r\n }\r\n },\r\n Path: {\r\n // creates a textPath from this path\r\n text: wrapWithAttrCheck(function (text) {\r\n if (text instanceof Text) {\r\n var txt = text.text()\r\n return text.clear().path(this).text(txt)\r\n }\r\n return this.parent().put(new Text()).path(this).text(text)\r\n }),\r\n\r\n targets () {\r\n return baseFind('svg [href*=\"' + this.id() + '\"]')\r\n }\r\n }\r\n})\r\n\r\nTextPath.prototype.MorphArray = PathArray\r\nregister(TextPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Use extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('use', node), node)\r\n }\r\n\r\n // Use element as a reference\r\n element (element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, xlink)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a use element\r\n use: wrapWithAttrCheck(function (element, file) {\r\n return this.put(new Use()).element(element, file)\r\n })\r\n }\r\n})\r\n\r\nregister(Use)\r\n","/* Optional Modules */\r\nimport './modules/optional/arrange.js'\r\nimport './modules/optional/class.js'\r\nimport './modules/optional/css.js'\r\nimport './modules/optional/data.js'\r\nimport './modules/optional/memory.js'\r\nimport './modules/optional/sugar.js'\r\nimport './modules/optional/transform.js'\r\n\r\nimport { extend, makeInstance } from './utils/adopter.js'\r\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\r\nimport Box from './types/Box.js'\r\nimport Circle from './elements/Circle.js'\r\nimport Color from './types/Color.js'\r\nimport Container from './elements/Container.js'\r\nimport Defs from './elements/Defs.js'\r\nimport Dom from './elements/Dom.js'\r\nimport Element from './elements/Element.js'\r\nimport Ellipse from './elements/Ellipse.js'\r\nimport EventTarget from './types/EventTarget.js'\r\nimport Gradient from './elements/Gradient.js'\r\nimport Image from './elements/Image.js'\r\nimport Line from './elements/Line.js'\r\nimport List from './types/List.js'\r\nimport Marker from './elements/Marker.js'\r\nimport Matrix from './types/Matrix.js'\r\nimport Morphable, {\r\n NonMorphable,\r\n ObjectBag,\r\n TransformBag,\r\n makeMorphable,\r\n registerMorphableType\r\n} from './animation/Morphable.js'\r\nimport Path from './elements/Path.js'\r\nimport PathArray from './types/PathArray.js'\r\nimport Pattern from './elements/Pattern.js'\r\nimport PointArray from './types/PointArray.js'\r\nimport Polygon from './elements/Polygon.js'\r\nimport Polyline from './elements/Polyline.js'\r\nimport Rect from './elements/Rect.js'\r\nimport Runner from './animation/Runner.js'\r\nimport SVGArray from './types/SVGArray.js'\r\nimport SVGNumber from './types/SVGNumber.js'\r\nimport Shape from './elements/Shape.js'\r\nimport Svg from './elements/Svg.js'\r\nimport Symbol from './elements/Symbol.js'\r\nimport Text from './elements/Text.js'\r\nimport Tspan from './elements/Tspan.js'\r\nimport * as defaults from './modules/core/defaults.js'\r\nimport * as utils from './utils/utils.js'\r\nimport * as namespaces from './modules/core/namespaces.js'\r\nimport * as regex from './modules/core/regex.js'\r\n\r\nexport {\r\n Morphable,\r\n registerMorphableType,\r\n makeMorphable,\r\n TransformBag,\r\n ObjectBag,\r\n NonMorphable\r\n}\r\n\r\nexport { defaults, utils, namespaces, regex }\r\nexport const SVG = makeInstance\r\nexport { default as parser } from './modules/core/parser.js'\r\nexport { default as find } from './modules/core/selector.js'\r\nexport * from './modules/core/event.js'\r\nexport * from './utils/adopter.js'\r\nexport { registerWindow } from './utils/window.js'\r\n\r\n/* Animation Modules */\r\nexport { default as Animator } from './animation/Animator.js'\r\nexport { Controller, Ease, PID, Spring, easing } from './animation/Controller.js'\r\nexport { default as Queue } from './animation/Queue.js'\r\nexport { default as Runner } from './animation/Runner.js'\r\nexport { default as Timeline } from './animation/Timeline.js'\r\n\r\n/* Types */\r\nexport { default as Array } from './types/SVGArray.js'\r\nexport { default as Box } from './types/Box.js'\r\nexport { default as Color } from './types/Color.js'\r\nexport { default as EventTarget } from './types/EventTarget.js'\r\nexport { default as Matrix } from './types/Matrix.js'\r\nexport { default as Number } from './types/SVGNumber.js'\r\nexport { default as PathArray } from './types/PathArray.js'\r\nexport { default as Point } from './types/Point.js'\r\nexport { default as PointArray } from './types/PointArray.js'\r\nexport { default as List } from './types/List.js'\r\n\r\n/* Elements */\r\nexport { default as Circle } from './elements/Circle.js'\r\nexport { default as ClipPath } from './elements/ClipPath.js'\r\nexport { default as Container } from './elements/Container.js'\r\nexport { default as Defs } from './elements/Defs.js'\r\nexport { default as Dom } from './elements/Dom.js'\r\nexport { default as Element } from './elements/Element.js'\r\nexport { default as Ellipse } from './elements/Ellipse.js'\r\nexport { default as Gradient } from './elements/Gradient.js'\r\nexport { default as G } from './elements/G.js'\r\nexport { default as A } from './elements/A.js'\r\nexport { default as Image } from './elements/Image.js'\r\nexport { default as Line } from './elements/Line.js'\r\nexport { default as Marker } from './elements/Marker.js'\r\nexport { default as Mask } from './elements/Mask.js'\r\nexport { default as Path } from './elements/Path.js'\r\nexport { default as Pattern } from './elements/Pattern.js'\r\nexport { default as Polygon } from './elements/Polygon.js'\r\nexport { default as Polyline } from './elements/Polyline.js'\r\nexport { default as Rect } from './elements/Rect.js'\r\nexport { default as Shape } from './elements/Shape.js'\r\nexport { default as Stop } from './elements/Stop.js'\r\nexport { default as Style } from './elements/Style.js'\r\nexport { default as Svg } from './elements/Svg.js'\r\nexport { default as Symbol } from './elements/Symbol.js'\r\nexport { default as Text } from './elements/Text.js'\r\nexport { default as TextPath } from './elements/TextPath.js'\r\nexport { default as Tspan } from './elements/Tspan.js'\r\nexport { default as Use } from './elements/Use.js'\r\n\r\nextend([\r\n Svg,\r\n Symbol,\r\n Image,\r\n Pattern,\r\n Marker\r\n], getMethodsFor('viewbox'))\r\n\r\nextend([\r\n Line,\r\n Polyline,\r\n Polygon,\r\n Path\r\n], getMethodsFor('marker'))\r\n\r\nextend(Text, getMethodsFor('Text'))\r\nextend(Path, getMethodsFor('Path'))\r\n\r\nextend(Defs, getMethodsFor('Defs'))\r\n\r\nextend([\r\n Text,\r\n Tspan\r\n], getMethodsFor('Tspan'))\r\n\r\nextend([\r\n Rect,\r\n Ellipse,\r\n Circle,\r\n Gradient\r\n], getMethodsFor('radius'))\r\n\r\nextend(EventTarget, getMethodsFor('EventTarget'))\r\nextend(Dom, getMethodsFor('Dom'))\r\nextend(Element, getMethodsFor('Element'))\r\nextend(Shape, getMethodsFor('Shape'))\r\n// extend(Element, getConstructor('Memory'))\r\nextend(Container, getMethodsFor('Container'))\r\n\r\nextend(Runner, getMethodsFor('Runner'))\r\n\r\nList.extend(getMethodNames())\r\n\r\nregisterMorphableType([\r\n SVGNumber,\r\n Color,\r\n Box,\r\n Matrix,\r\n SVGArray,\r\n PointArray,\r\n PathArray\r\n])\r\n\r\nmakeMorphable()\r\n"],"names":["methods","names","registerMethods","name","m","Array","isArray","_name","addMethodNames","Object","keys","assign","getMethodsFor","getMethodNames","Set","_names","push","map","array","block","i","il","length","result","filter","radians","d","Math","PI","degrees","r","camelCase","s","toLowerCase","replace","g","toUpperCase","unCamelCase","capitalize","charAt","slice","proportionalSize","element","width","height","box","bbox","getOrigin","o","origin","ox","oy","string","trim","x","y","bx","includes","by","ns","xmlns","xlink","svgjs","globals","window","document","registerWindow","win","doc","Base","elements","root","makeNode","createElementNS","makeInstance","adopter","querySelector","node","innerHTML","firstChild","nodeOrNew","Node","adopt","instance","className","nodeName","mockAdopt","mock","register","asRoot","prototype","getClass","did","eid","assignNewId","children","id","extend","modules","attrCheck","key","method","wrapWithAttrCheck","fn","args","constructor","apply","attr","siblings","parent","position","index","next","prev","forward","p","removeElement","add","isRoot","appendChild","defs","backward","front","back","before","remove","after","insertBefore","insertAfter","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isCss","isBlank","isNumber","isPercent","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","classes","split","hasClass","indexOf","addClass","join","removeClass","c","toggleClass","css","style","val","ret","arguments","cssText","el","forEach","t","cased","test","show","hide","visible","data","a","v","JSON","parse","e","stringify","remember","k","memory","forget","_memory","listenerId","getEvents","n","getEventHolder","events","getEventTarget","clearEvents","on","listener","binding","options","l","bind","bag","_svgjsListenerId","event","ev","addEventListener","off","namespace","removeEventListener","dispatch","Event","dispatchEvent","CustomEvent","detail","cancelable","fullHex","substring","compToHex","comp","toString","Color","init","color","b","match","exec","parseInt","toHex","toArray","round","toRgb","brightness","isColor","Point","source","base","clone","transform","f","point","screenCTM","inverse","parser","nodes","svg","size","path","parentNode","body","documentElement","addTo","isNulledBox","w","h","domContains","contains","call","Box","parseFloat","left","top","x2","y2","cx","cy","merge","min","max","xMin","Infinity","xMax","yMin","yMax","pts","addOffset","pageXOffset","pageYOffset","isNulled","getBox","cb","retry","Error","getBBox","rbox","getBoundingClientRect","viewbox","closeEnough","threshold","abs","Matrix","fromArray","Element","matrixify","isMatrixLike","matrix","multiplyO","formatTransforms","current","transformer","translateO","rx","ry","lmultiplyO","scaleO","scaleX","scaleY","skewO","skewX","skewY","shearO","shear","rotateO","theta","isFinite","px","py","dx","dy","tx","ty","compose","originX","originY","sx","sy","lam","rotate","translateX","translateY","decompose","determinant","ccw","sqrt","thetaRad","atan2","ct","cos","st","sin","multiply","matrixMultiply","lmultiply","inverseO","det","na","nb","nc","nd","ne","nf","translate","scale","flip","axis","around","flipO","lx","skew","tan","ly","skewXO","skewYO","aroundO","equals","other","valueOf","flipBoth","flipX","flipY","positionX","positionY","relative","relativeX","relativeY","ctm","getCTM","rect","getScreenCTM","subClassArray","Function","baseClass","_constructor","Arr","create","arr","List","each","fnOrMethodName","concat","reduce","obj","attrs","baseFind","query","querySelectorAll","find","EventTarget","type","j","defaultPrevented","fire","noop","timeline","duration","ease","delay","fill","stroke","opacity","offset","SVGArray","toSet","SVGNumber","value","unit","isNaN","toJSON","plus","number","minus","times","divide","hooks","registerAttrHook","attributes","nodeValue","last","curr","removeAttribute","getAttribute","defaults","_val","hook","leading","setAttributeNS","setAttribute","rebuild","Dom","childNodes","put","clear","hasChildNodes","removeChild","lastChild","_defs","writeDataToDom","cloneNode","deep","first","get","has","matches","selector","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","SVGElement","putIn","replaceChild","precision","factor","newAttrs","svgOrFn","outerHTML","well","len","fragment","_this","createDocumentFragment","firstElementChild","words","text","textContent","Svg","dom","hasAttribute","setData","center","inside","move","parents","until","sugar","prefix","extension","mat","angle","direction","directionString","dmove","radius","_element","getTotalLength","pointAt","getPointAtLength","font","ax","ay","amove","defineProperty","untransform","str","kv","reverse","toParent","pCtm","toRoot","decomposed","cleanRelative","Shape","Circle","circle","Container","flatten","ungroup","Defs","Ellipse","circled","ellipse","Stop","update","from","fx","fy","x1","y1","to","Gradient","stop","url","targets","gradiented","gradient","Pattern","pattern","patternUnits","Image","load","callback","img","src","image","PointArray","toLine","at","pos","destination","points","pop","maxX","maxY","minX","minY","MorphArray","Line","plot","pointed","line","Marker","ref","marker","isObject","require$$0","require$$1","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","global","aFunction","core","ctx","redefine","defined","fails","$export","toObject","makeSetterGetter","easing","bezier","steps","stepPosition","jumps","beforeFlag","step","floor","jumping","Stepper","done","Ease","Controller","stepper","target","dt","recalculate","_duration","overshoot","_overshoot","eps","pi","os","log","zeta","wn","Spring","velocity","acceleration","newPosition","PID","windup","integral","error","P","I","D","PathArray","pathRegReplace","arrayToString","pathHandlers","M","p0","L","H","V","C","S","Q","T","Z","A","mlhvqtcsaz","jl","equalCommands","pathArray","morph","sourceArray","destinationArray","paramCnt","Morphable","_stepper","_from","_to","_type","_context","_morphObj","_set","NonMorphable","morphableTypes","ObjectBag","complete","TransformBag","objOrArr","values","entries","sort","registerMorphableType","makeMorphable","Path","_array","Polygon","polygon","poly","Polyline","polyline","Rect","Queue","_first","_last","item","shift","Animator","nextDraw","frames","timeouts","timer","performance","Date","frame","run","requestAnimationFrame","_draw","transform_frame","timeout","time","now","cancelFrame","clearTimeout","nextTimeout","lastTimeout","nextFrame","lastFrame","makeSchedule","runnerInfo","start","runner","end","defaultSource","Timeline","timeSource","_timeSource","_startTime","_speed","_persist","_nextFrame","_paused","_runners","_order","_time","_lastSourceTime","_lastStepTime","_step","schedule","when","absoluteStartTime","endTime","getEndTime","unschedule","persist","updateTime","_continue","splice","lastRunnerInfo","lastDuration","lastStartTime","active","play","pause","finish","speed","yes","currentSpeed","positive","seek","dtOrForever","immediateStep","dtSource","dtTime","runnersLeft","dtToStart","reset","finished","_timeline","Runner","_queue","_isDeclarative","_history","enabled","_lastTime","_reseted","transformId","_haveReversed","_reverse","_loopsDone","_swing","_wait","_times","_prepareRunner","animate","sanitise","loop","swing","wait","queue","initFn","runFn","retargetFn","isTransform","initialiser","retarget","initialised","during","loops","loopDuration","loopsDone","relativeTime","whole","partial","swinging","backwards","uncliped","pow","clipped","swingForward","forwards","progress","running","_lastPosition","justStarted","justFinished","declarative","_initialise","converged","_run","_rememberMorpher","morpher","caller","_tryRetarget","needsIt","positionOrDt","allfinished","addTransform","clearTransform","clearTransformsFromQueue","FakeRunner","mergeWith","getRunnerTransform","mergeTransforms","runners","_transformationRunners","netTransform","_frameId","RunnerArray","ids","leftSibling","getByID","lastRunner","edit","newRunner","clearBefore","deleteCnt","frameId","_clearTransformRunnersBefore","currentRunner","_currentTransform","addRunner","styleAttr","zoom","level","affine","isMatrix","currentAngle","startTransform","setup","undefined","rTarget","rCurrent","possibilities","distances","shortest","affineParameters","newTransforms","_queueNumber","_queueNumberDelta","newTo","_queueObject","version","getElementsByTagName","nested","Symbol","symbol","plain","_build","createTextNode","getComputedTextLength","Text","_rebuild","firstLine","nodeType","newLined","build","tspan","newLine","self","blankLineOffset","fontSize","getComputedStyle","getPropertyValue","textable","Tspan","ClipPath","unclip","clip","clipWith","clipper","G","group","link","linkTo","Mask","unmask","mask","maskWith","masker","cssRule","rule","Style","addText","params","fontFamily","fontface","TextPath","track","textPath","txt","Use","file","use","SVG"],"mappings":";;;;;;;;;;;;;;AAAA,MAAMA,OAAO,GAAG,EAAhB;AACA,MAAMC,KAAK,GAAG,EAAd;AAEA,AAAO,SAASC,eAAT,CAA0BC,IAA1B,EAAgCC,CAAhC,EAAmC;MACpCC,KAAK,CAACC,OAAN,CAAcH,IAAd,CAAJ,EAAyB;SAClB,IAAII,KAAT,IAAkBJ,IAAlB,EAAwB;MACtBD,eAAe,CAACK,KAAD,EAAQH,CAAR,CAAf;;;;;;MAKA,OAAOD,IAAP,KAAgB,QAApB,EAA8B;SACvB,IAAII,KAAT,IAAkBJ,IAAlB,EAAwB;MACtBD,eAAe,CAACK,KAAD,EAAQJ,IAAI,CAACI,KAAD,CAAZ,CAAf;;;;;;EAKJC,cAAc,CAACC,MAAM,CAACC,IAAP,CAAYN,CAAZ,CAAD,CAAd;EACAJ,OAAO,CAACG,IAAD,CAAP,GAAgBM,MAAM,CAACE,MAAP,CAAcX,OAAO,CAACG,IAAD,CAAP,IAAiB,EAA/B,EAAmCC,CAAnC,CAAhB;;AAGF,AAAO,SAASQ,aAAT,CAAwBT,IAAxB,EAA8B;SAC5BH,OAAO,CAACG,IAAD,CAAP,IAAiB,EAAxB;;AAGF,AAAO,SAASU,cAAT,GAA2B;SACzB,CAAC,GAAG,IAAIC,GAAJ,CAAQb,KAAR,CAAJ,CAAP;;AAGF,AAAO,SAASO,cAAT,CAAyBO,MAAzB,EAAiC;EACtCd,KAAK,CAACe,IAAN,CAAW,GAAGD,MAAd;;;AC/BF;AACA,AAAO,SAASE,GAAT,CAAcC,KAAd,EAAqBC,KAArB,EAA4B;MAC7BC,CAAJ;MACIC,EAAE,GAAGH,KAAK,CAACI,MAAf;MACIC,MAAM,GAAG,EAAb;;OAEKH,CAAC,GAAG,CAAT,EAAYA,CAAC,GAAGC,EAAhB,EAAoBD,CAAC,EAArB,EAAy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D,EAAOpf,aAAa,CAAC,MAAD,CAApB,CAAN;AAEAqF,MAAM,CAAC,CACLovB,IADK,EAELc,KAFK,CAAD,EAGHv1B,aAAa,CAAC,OAAD,CAHV,CAAN;AAKAqF,MAAM,CAAC,CACLsjB,IADK,EAELtJ,OAFK,EAGLN,MAHK,EAILiB,QAJK,CAAD,EAKHhgB,aAAa,CAAC,QAAD,CALV,CAAN;AAOAqF,MAAM,CAACsS,WAAD,EAAc3X,aAAa,CAAC,aAAD,CAA3B,CAAN;AACAqF,MAAM,CAAC+U,GAAD,EAAMpa,aAAa,CAAC,KAAD,CAAnB,CAAN;AACAqF,MAAM,CAAC6L,OAAD,EAAUlR,aAAa,CAAC,SAAD,CAAvB,CAAN;AACAqF,MAAM,CAACyZ,KAAD,EAAQ9e,aAAa,CAAC,OAAD,CAArB,CAAN;;AAEAqF,MAAM,CAAC4Z,SAAD,EAAYjf,aAAa,CAAC,WAAD,CAAzB,CAAN;AAEAqF,MAAM,CAACooB,MAAD,EAASztB,aAAa,CAAC,QAAD,CAAtB,CAAN;AAEAgX,IAAI,CAAC3R,MAAL,CAAYpF,cAAc,EAA1B;AAEAioB,qBAAqB,CAAC,CACpBvP,SADoB,EAEpBhM,KAFoB,EAGpBqC,GAHoB,EAIpBgC,MAJoB,EAKpByH,QALoB,EAMpBsI,UANoB,EAOpB2E,SAPoB,CAAD,CAArB;AAUAyC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file
+{"version":3,"file":"svg.node.js","sources":["../src/utils/methods.js","../src/utils/utils.js","../src/modules/core/namespaces.js","../src/utils/window.js","../src/types/Base.js","../src/utils/adopter.js","../src/modules/optional/arrange.js","../src/modules/core/regex.js","../src/modules/optional/class.js","../src/modules/optional/css.js","../src/modules/optional/data.js","../src/modules/optional/memory.js","../src/modules/core/event.js","../src/types/Color.js","../src/types/Point.js","../src/modules/core/parser.js","../src/types/Box.js","../src/types/Matrix.js","../src/types/ArrayPolyfill.js","../src/types/List.js","../src/modules/core/selector.js","../src/types/EventTarget.js","../src/modules/core/defaults.js","../src/types/SVGArray.js","../src/types/SVGNumber.js","../src/modules/core/attr.js","../src/elements/Dom.js","../src/elements/Element.js","../src/modules/optional/sugar.js","../node_modules/@babel/runtime/helpers/esm/defineProperty.js","../node_modules/@babel/runtime/helpers/esm/objectSpread.js","../src/modules/optional/transform.js","../src/modules/core/circled.js","../src/elements/Shape.js","../src/elements/Circle.js","../src/elements/Container.js","../src/elements/Defs.js","../src/elements/Ellipse.js","../src/elements/Stop.js","../src/modules/core/gradiented.js","../src/elements/Gradient.js","../src/elements/Pattern.js","../src/elements/Image.js","../src/types/PointArray.js","../src/modules/core/pointed.js","../src/elements/Line.js","../src/elements/Marker.js","../node_modules/core-js/modules/_global.js","../node_modules/core-js/modules/_core.js","../node_modules/core-js/modules/_is-object.js","../node_modules/core-js/modules/_an-object.js","../node_modules/core-js/modules/_fails.js","../node_modules/core-js/modules/_descriptors.js","../node_modules/core-js/modules/_dom-create.js","../node_modules/core-js/modules/_ie8-dom-define.js","../node_modules/core-js/modules/_to-primitive.js","../node_modules/core-js/modules/_object-dp.js","../node_modules/core-js/modules/_property-desc.js","../node_modules/core-js/modules/_hide.js","../node_modules/core-js/modules/_has.js","../node_modules/core-js/modules/_uid.js","../node_modules/core-js/modules/_redefine.js","../node_modules/core-js/modules/_a-function.js","../node_modules/core-js/modules/_ctx.js","../node_modules/core-js/modules/_export.js","../node_modules/core-js/modules/_defined.js","../node_modules/core-js/modules/_to-object.js","../node_modules/core-js/modules/_strict-method.js","../node_modules/core-js/modules/es6.array.sort.js","../src/animation/Controller.js","../src/types/PathArray.js","../src/animation/Morphable.js","../src/elements/Path.js","../src/modules/core/poly.js","../src/elements/Polygon.js","../src/elements/Polyline.js","../src/elements/Rect.js","../src/animation/Queue.js","../src/animation/Animator.js","../src/animation/Timeline.js","../src/animation/Runner.js","../src/elements/Svg.js","../src/elements/Symbol.js","../src/modules/core/textable.js","../src/elements/Text.js","../src/elements/Tspan.js","../src/elements/ClipPath.js","../src/elements/G.js","../src/elements/A.js","../src/elements/Mask.js","../src/elements/Style.js","../src/elements/TextPath.js","../src/elements/Use.js","../src/main.js"],"sourcesContent":["const methods = {}\r\nconst names = []\r\n\r\nexport function registerMethods (name, m) {\r\n if (Array.isArray(name)) {\r\n for (let _name of name) {\r\n registerMethods(_name, m)\r\n }\r\n return\r\n }\r\n\r\n if (typeof name === 'object') {\r\n for (let _name in name) {\r\n registerMethods(_name, name[_name])\r\n }\r\n return\r\n }\r\n\r\n addMethodNames(Object.keys(m))\r\n methods[name] = Object.assign(methods[name] || {}, m)\r\n}\r\n\r\nexport function getMethodsFor (name) {\r\n return methods[name] || {}\r\n}\r\n\r\nexport function getMethodNames () {\r\n return [ ...new Set(names) ]\r\n}\r\n\r\nexport function addMethodNames (_names) {\r\n names.push(..._names)\r\n}\r\n","// Map function\r\nexport function map (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n result.push(block(array[i]))\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Filter function\r\nexport function filter (array, block) {\r\n var i\r\n var il = array.length\r\n var result = []\r\n\r\n for (i = 0; i < il; i++) {\r\n if (block(array[i])) {\r\n result.push(array[i])\r\n }\r\n }\r\n\r\n return result\r\n}\r\n\r\n// Degrees to radians\r\nexport function radians (d) {\r\n return d % 360 * Math.PI / 180\r\n}\r\n\r\n// Radians to degrees\r\nexport function degrees (r) {\r\n return r * 180 / Math.PI % 360\r\n}\r\n\r\n// Convert dash-separated-string to camelCase\r\nexport function camelCase (s) {\r\n return s.toLowerCase().replace(/-(.)/g, function (m, g) {\r\n return g.toUpperCase()\r\n })\r\n}\r\n\r\n// Convert camel cased string to string seperated\r\nexport function unCamelCase (s) {\r\n return s.replace(/([A-Z])/g, function (m, g) {\r\n return '-' + g.toLowerCase()\r\n })\r\n}\r\n\r\n// Capitalize first letter of a string\r\nexport function capitalize (s) {\r\n return s.charAt(0).toUpperCase() + s.slice(1)\r\n}\r\n\r\n// Calculate proportional width and height values when necessary\r\nexport function proportionalSize (element, width, height) {\r\n if (width == null || height == null) {\r\n var box = element.bbox()\r\n\r\n if (width == null) {\r\n width = box.width / box.height * height\r\n } else if (height == null) {\r\n height = box.height / box.width * width\r\n }\r\n }\r\n\r\n return {\r\n width: width,\r\n height: height\r\n }\r\n}\r\n\r\nexport function getOrigin (o, element) {\r\n // Allow origin or around as the names\r\n let origin = o.origin // o.around == null ? o.origin : o.around\r\n let ox, oy\r\n\r\n // Allow the user to pass a string to rotate around a given point\r\n if (typeof origin === 'string' || origin == null) {\r\n // Get the bounding box of the element with no transformations applied\r\n const string = (origin || 'center').toLowerCase().trim()\r\n const { height, width, x, y } = element.bbox()\r\n\r\n // Calculate the transformed x and y coordinates\r\n let bx = string.includes('left') ? x\r\n : string.includes('right') ? x + width\r\n : x + width / 2\r\n let by = string.includes('top') ? y\r\n : string.includes('bottom') ? y + height\r\n : y + height / 2\r\n\r\n // Set the bounds eg : \"bottom-left\", \"Top right\", \"middle\" etc...\r\n ox = o.ox != null ? o.ox : bx\r\n oy = o.oy != null ? o.oy : by\r\n } else {\r\n ox = origin[0]\r\n oy = origin[1]\r\n }\r\n\r\n // Return the origin as it is if it wasn't a string\r\n return [ ox, oy ]\r\n}\r\n","// Default namespaces\r\nexport let ns = 'http://www.w3.org/2000/svg'\r\nexport let xmlns = 'http://www.w3.org/2000/xmlns/'\r\nexport let xlink = 'http://www.w3.org/1999/xlink'\r\nexport let svgjs = 'http://svgjs.com/svgjs'\r\n","export const globals = {\r\n window: typeof window === 'undefined' ? null : window,\r\n document: typeof document === 'undefined' ? null : document\r\n}\r\n\r\nexport function registerWindow (win = null, doc = null) {\r\n globals.window = win\r\n globals.document = doc\r\n}\r\n\r\nconst save = {}\r\n\r\nexport function saveWindow () {\r\n save.window = globals.window\r\n save.document = globals.document\r\n}\r\n\r\nexport function restoreWindow () {\r\n globals.window = save.window\r\n globals.document = save.document\r\n}\r\n\r\nexport function withWindow (win, fn) {\r\n saveWindow()\r\n registerWindow(win, win.document)\r\n fn(win, win.document)\r\n restoreWindow()\r\n}\r\n\r\nexport function getWindow () {\r\n return globals.window\r\n}\r\n","export default class Base {\r\n // constructor (node/*, {extensions = []} */) {\r\n // // this.tags = []\r\n // //\r\n // // for (let extension of extensions) {\r\n // // extension.setup.call(this, node)\r\n // // this.tags.push(extension.name)\r\n // // }\r\n // }\r\n}\r\n","import { addMethodNames } from './methods.js'\r\nimport { capitalize } from './utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Base from '../types/Base.js'\r\n\r\nconst elements = {}\r\nexport const root = '___SYMBOL___ROOT___'\r\n\r\n// Method for element creation\r\nexport function makeNode (name) {\r\n // create element\r\n return globals.document.createElementNS(ns, name)\r\n}\r\n\r\nexport function makeInstance (element) {\r\n if (element instanceof Base) return element\r\n\r\n if (typeof element === 'object') {\r\n return adopter(element)\r\n }\r\n\r\n if (element == null) {\r\n return new elements[root]()\r\n }\r\n\r\n if (typeof element === 'string' && element.charAt(0) !== '<') {\r\n return adopter(globals.document.querySelector(element))\r\n }\r\n\r\n var node = makeNode('svg')\r\n node.innerHTML = element\r\n\r\n // We can use firstChild here because we know,\r\n // that the first char is < and thus an element\r\n element = adopter(node.firstChild)\r\n\r\n return element\r\n}\r\n\r\nexport function nodeOrNew (name, node) {\r\n return node instanceof globals.window.Node ? node : makeNode(name)\r\n}\r\n\r\n// Adopt existing svg elements\r\nexport function adopt (node) {\r\n // check for presence of node\r\n if (!node) return null\r\n\r\n // make sure a node isn't already adopted\r\n if (node.instance instanceof Base) return node.instance\r\n\r\n // initialize variables\r\n var className = capitalize(node.nodeName)\r\n\r\n // Make sure that gradients are adopted correctly\r\n if (className === 'LinearGradient' || className === 'RadialGradient') {\r\n className = 'Gradient'\r\n\r\n // Fallback to Dom if element is not known\r\n } else if (!elements[className]) {\r\n className = 'Dom'\r\n }\r\n\r\n return new elements[className](node)\r\n}\r\n\r\nlet adopter = adopt\r\n\r\nexport function mockAdopt (mock = adopt) {\r\n adopter = mock\r\n}\r\n\r\nexport function register (element, name = element.name, asRoot = false) {\r\n elements[name] = element\r\n if (asRoot) elements[root] = element\r\n\r\n addMethodNames(Object.keys(element.prototype))\r\n\r\n return element\r\n}\r\n\r\nexport function getClass (name) {\r\n return elements[name]\r\n}\r\n\r\n// Element id sequence\r\nlet did = 1000\r\n\r\n// Get next named element id\r\nexport function eid (name) {\r\n return 'Svgjs' + capitalize(name) + (did++)\r\n}\r\n\r\n// Deep new id assignment\r\nexport function assignNewId (node) {\r\n // do the same for SVG child nodes as well\r\n for (var i = node.children.length - 1; i >= 0; i--) {\r\n assignNewId(node.children[i])\r\n }\r\n\r\n if (node.id) {\r\n return adopt(node).id(eid(node.nodeName))\r\n }\r\n\r\n return adopt(node)\r\n}\r\n\r\n// Method for extending objects\r\nexport function extend (modules, methods, attrCheck) {\r\n var key, i\r\n\r\n modules = Array.isArray(modules) ? modules : [ modules ]\r\n\r\n for (i = modules.length - 1; i >= 0; i--) {\r\n for (key in methods) {\r\n let method = methods[key]\r\n if (attrCheck) {\r\n method = wrapWithAttrCheck(methods[key])\r\n }\r\n modules[i].prototype[key] = method\r\n }\r\n }\r\n}\r\n\r\n// export function extendWithAttrCheck (...args) {\r\n// extend(...args, true)\r\n// }\r\n\r\nexport function wrapWithAttrCheck (fn) {\r\n return function (...args) {\r\n let o = args[args.length - 1]\r\n\r\n if (o && o.constructor === Object && !(o instanceof Array)) {\r\n return fn.apply(this, args.slice(0, -1)).attr(o)\r\n } else {\r\n return fn.apply(this, args)\r\n }\r\n }\r\n}\r\n","import { makeInstance } from '../../utils/adopter.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Get all siblings, including myself\r\nexport function siblings () {\r\n return this.parent().children()\r\n}\r\n\r\n// Get the curent position siblings\r\nexport function position () {\r\n return this.parent().index(this)\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function next () {\r\n return this.siblings()[this.position() + 1]\r\n}\r\n\r\n// Get the next element (will return null if there is none)\r\nexport function prev () {\r\n return this.siblings()[this.position() - 1]\r\n}\r\n\r\n// Send given element one step forward\r\nexport function forward () {\r\n var i = this.position() + 1\r\n var p = this.parent()\r\n\r\n // move node one step forward\r\n p.removeElement(this).add(this, i)\r\n\r\n // make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element one step backward\r\nexport function backward () {\r\n var i = this.position()\r\n\r\n if (i > 0) {\r\n this.parent().removeElement(this).add(this, i - 1)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the front\r\nexport function front () {\r\n var p = this.parent()\r\n\r\n // Move node forward\r\n p.node.appendChild(this.node)\r\n\r\n // Make sure defs node is always at the top\r\n if (typeof p.isRoot === 'function' && p.isRoot()) {\r\n p.node.appendChild(p.defs().node)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Send given element all the way to the back\r\nexport function back () {\r\n if (this.position() > 0) {\r\n this.parent().removeElement(this).add(this, 0)\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element before the targeted element\r\nexport function before (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i)\r\n\r\n return this\r\n}\r\n\r\n// Inserts a given element after the targeted element\r\nexport function after (element) {\r\n element = makeInstance(element)\r\n element.remove()\r\n\r\n var i = this.position()\r\n\r\n this.parent().add(element, i + 1)\r\n\r\n return this\r\n}\r\n\r\nexport function insertBefore (element) {\r\n element = makeInstance(element)\r\n element.before(this)\r\n}\r\n\r\nexport function insertAfter (element) {\r\n element = makeInstance(element)\r\n element.after(this)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n siblings,\r\n position,\r\n next,\r\n prev,\r\n forward,\r\n backward,\r\n front,\r\n back,\r\n before,\r\n after,\r\n insertBefore,\r\n insertAfter\r\n})\r\n","// Parse unit value\r\nexport let numberAndUnit = /^([+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?)([a-z%]*)$/i\r\n\r\n// Parse hex value\r\nexport let hex = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i\r\n\r\n// Parse rgb value\r\nexport let rgb = /rgb\\((\\d+),(\\d+),(\\d+)\\)/\r\n\r\n// Parse reference id\r\nexport let reference = /(#[a-z0-9\\-_]+)/i\r\n\r\n// splits a transformation chain\r\nexport let transforms = /\\)\\s*,?\\s*/\r\n\r\n// Whitespace\r\nexport let whitespace = /\\s/g\r\n\r\n// Test hex value\r\nexport let isHex = /^#[a-f0-9]{3,6}$/i\r\n\r\n// Test rgb value\r\nexport let isRgb = /^rgb\\(/\r\n\r\n// Test css declaration\r\nexport let isCss = /[^:]+:[^;]+;?/\r\n\r\n// Test for blank string\r\nexport let isBlank = /^(\\s+)?$/\r\n\r\n// Test for numeric string\r\nexport let isNumber = /^[+-]?(\\d+(\\.\\d*)?|\\.\\d+)(e[+-]?\\d+)?$/i\r\n\r\n// Test for percent value\r\nexport let isPercent = /^-?[\\d.]+%$/\r\n\r\n// Test for image url\r\nexport let isImage = /\\.(jpg|jpeg|png|gif|svg)(\\?[^=]+.*)?/i\r\n\r\n// split at whitespace and comma\r\nexport let delimiter = /[\\s,]+/\r\n\r\n// The following regex are used to parse the d attribute of a path\r\n\r\n// Matches all hyphens which are not after an exponent\r\nexport let hyphen = /([^e])-/gi\r\n\r\n// Replaces and tests for all path letters\r\nexport let pathLetters = /[MLHVCSQTAZ]/gi\r\n\r\n// yes we need this one, too\r\nexport let isPathLetter = /[MLHVCSQTAZ]/i\r\n\r\n// matches 0.154.23.45\r\nexport let numbersWithDots = /((\\d?\\.\\d+(?:e[+-]?\\d+)?)((?:\\.\\d+(?:e[+-]?\\d+)?)+))+/gi\r\n\r\n// matches .\r\nexport let dots = /\\./g\r\n","import { delimiter } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Return array of classes on the node\r\nexport function classes () {\r\n var attr = this.attr('class')\r\n return attr == null ? [] : attr.trim().split(delimiter)\r\n}\r\n\r\n// Return true if class exists on the node, false otherwise\r\nexport function hasClass (name) {\r\n return this.classes().indexOf(name) !== -1\r\n}\r\n\r\n// Add class to the node\r\nexport function addClass (name) {\r\n if (!this.hasClass(name)) {\r\n var array = this.classes()\r\n array.push(name)\r\n this.attr('class', array.join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Remove class from the node\r\nexport function removeClass (name) {\r\n if (this.hasClass(name)) {\r\n this.attr('class', this.classes().filter(function (c) {\r\n return c !== name\r\n }).join(' '))\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Toggle the presence of a class on the node\r\nexport function toggleClass (name) {\r\n return this.hasClass(name) ? this.removeClass(name) : this.addClass(name)\r\n}\r\n\r\nregisterMethods('Dom', {\r\n classes, hasClass, addClass, removeClass, toggleClass\r\n})\r\n","import { camelCase } from '../../utils/utils.js'\r\nimport { isBlank } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\n\r\n// Dynamic style generator\r\nexport function css (style, val) {\r\n let ret = {}\r\n if (arguments.length === 0) {\r\n // get full style as object\r\n this.node.style.cssText.split(/\\s*;\\s*/)\r\n .filter(function (el) {\r\n return !!el.length\r\n })\r\n .forEach(function (el) {\r\n let t = el.split(/\\s*:\\s*/)\r\n ret[t[0]] = t[1]\r\n })\r\n return ret\r\n }\r\n\r\n if (arguments.length < 2) {\r\n // get style properties in the array\r\n if (Array.isArray(style)) {\r\n for (let name of style) {\r\n let cased = camelCase(name)\r\n ret[cased] = this.node.style[cased]\r\n }\r\n return ret\r\n }\r\n\r\n // get style for property\r\n if (typeof style === 'string') {\r\n return this.node.style[camelCase(style)]\r\n }\r\n\r\n // set styles in object\r\n if (typeof style === 'object') {\r\n for (let name in style) {\r\n // set empty string if null/undefined/'' was given\r\n this.node.style[camelCase(name)]\r\n = (style[name] == null || isBlank.test(style[name])) ? '' : style[name]\r\n }\r\n }\r\n }\r\n\r\n // set style for property\r\n if (arguments.length === 2) {\r\n this.node.style[camelCase(style)]\r\n = (val == null || isBlank.test(val)) ? '' : val\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Show element\r\nexport function show () {\r\n return this.css('display', '')\r\n}\r\n\r\n// Hide element\r\nexport function hide () {\r\n return this.css('display', 'none')\r\n}\r\n\r\n// Is element visible?\r\nexport function visible () {\r\n return this.css('display') !== 'none'\r\n}\r\n\r\nregisterMethods('Dom', {\r\n css, show, hide, visible\r\n})\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Store data values on svg nodes\r\nexport function data (a, v, r) {\r\n if (typeof a === 'object') {\r\n for (v in a) {\r\n this.data(v, a[v])\r\n }\r\n } else if (arguments.length < 2) {\r\n try {\r\n return JSON.parse(this.attr('data-' + a))\r\n } catch (e) {\r\n return this.attr('data-' + a)\r\n }\r\n } else {\r\n this.attr('data-' + a,\r\n v === null ? null\r\n : r === true || typeof v === 'string' || typeof v === 'number' ? v\r\n : JSON.stringify(v)\r\n )\r\n }\r\n\r\n return this\r\n}\r\n\r\nregisterMethods('Dom', { data })\r\n","import { registerMethods } from '../../utils/methods.js'\r\n\r\n// Remember arbitrary data\r\nexport function remember (k, v) {\r\n // remember every item in an object individually\r\n if (typeof arguments[0] === 'object') {\r\n for (var key in k) {\r\n this.remember(key, k[key])\r\n }\r\n } else if (arguments.length === 1) {\r\n // retrieve memory\r\n return this.memory()[k]\r\n } else {\r\n // store memory\r\n this.memory()[k] = v\r\n }\r\n\r\n return this\r\n}\r\n\r\n// Erase a given memory\r\nexport function forget () {\r\n if (arguments.length === 0) {\r\n this._memory = {}\r\n } else {\r\n for (var i = arguments.length - 1; i >= 0; i--) {\r\n delete this.memory()[arguments[i]]\r\n }\r\n }\r\n return this\r\n}\r\n\r\n// This triggers creation of a new hidden class which is not performant\r\n// However, this function is not rarely used so it will not happen frequently\r\n// Return local memory object\r\nexport function memory () {\r\n return (this._memory = this._memory || {})\r\n}\r\n\r\nregisterMethods('Dom', { remember, forget, memory })\r\n","import { delimiter } from './regex.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\n\r\nlet listenerId = 0\r\n\r\nfunction getEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (!n.events) n.events = {}\r\n return n.events\r\n}\r\n\r\nfunction getEventTarget (node) {\r\n return makeInstance(node).getEventTarget()\r\n}\r\n\r\nfunction clearEvents (node) {\r\n const n = makeInstance(node).getEventHolder()\r\n if (n.events) n.events = {}\r\n}\r\n\r\n// Add event binder in the SVG namespace\r\nexport function on (node, events, listener, binding, options) {\r\n var l = listener.bind(binding || node)\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // events can be an array of events or a string of events\r\n events = Array.isArray(events) ? events : events.split(delimiter)\r\n\r\n // add id to listener\r\n if (!listener._svgjsListenerId) {\r\n listener._svgjsListenerId = ++listenerId\r\n }\r\n\r\n events.forEach(function (event) {\r\n var ev = event.split('.')[0]\r\n var ns = event.split('.')[1] || '*'\r\n\r\n // ensure valid object\r\n bag[ev] = bag[ev] || {}\r\n bag[ev][ns] = bag[ev][ns] || {}\r\n\r\n // reference listener\r\n bag[ev][ns][listener._svgjsListenerId] = l\r\n\r\n // add listener\r\n n.addEventListener(ev, l, options || false)\r\n })\r\n}\r\n\r\n// Add event unbinder in the SVG namespace\r\nexport function off (node, events, listener, options) {\r\n var bag = getEvents(node)\r\n var n = getEventTarget(node)\r\n\r\n // listener can be a function or a number\r\n if (typeof listener === 'function') {\r\n listener = listener._svgjsListenerId\r\n if (!listener) return\r\n }\r\n\r\n // events can be an array of events or a string or undefined\r\n events = Array.isArray(events) ? events : (events || '').split(delimiter)\r\n\r\n events.forEach(function (event) {\r\n var ev = event && event.split('.')[0]\r\n var ns = event && event.split('.')[1]\r\n var namespace, l\r\n\r\n if (listener) {\r\n // remove listener reference\r\n if (bag[ev] && bag[ev][ns || '*']) {\r\n // removeListener\r\n n.removeEventListener(ev, bag[ev][ns || '*'][listener], options || false)\r\n\r\n delete bag[ev][ns || '*'][listener]\r\n }\r\n } else if (ev && ns) {\r\n // remove all listeners for a namespaced event\r\n if (bag[ev] && bag[ev][ns]) {\r\n for (l in bag[ev][ns]) {\r\n off(n, [ ev, ns ].join('.'), l)\r\n }\r\n\r\n delete bag[ev][ns]\r\n }\r\n } else if (ns) {\r\n // remove all listeners for a specific namespace\r\n for (event in bag) {\r\n for (namespace in bag[event]) {\r\n if (ns === namespace) {\r\n off(n, [ event, ns ].join('.'))\r\n }\r\n }\r\n }\r\n } else if (ev) {\r\n // remove all listeners for the event\r\n if (bag[ev]) {\r\n for (namespace in bag[ev]) {\r\n off(n, [ ev, namespace ].join('.'))\r\n }\r\n\r\n delete bag[ev]\r\n }\r\n } else {\r\n // remove all listeners on a given node\r\n for (event in bag) {\r\n off(n, event)\r\n }\r\n\r\n clearEvents(node)\r\n }\r\n })\r\n}\r\n\r\nexport function dispatch (node, event, data) {\r\n var n = getEventTarget(node)\r\n\r\n // Dispatch event\r\n if (event instanceof globals.window.Event) {\r\n n.dispatchEvent(event)\r\n } else {\r\n event = new globals.window.CustomEvent(event, { detail: data, cancelable: true })\r\n n.dispatchEvent(event)\r\n }\r\n return event\r\n}\r\n","\r\nimport { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'\r\n\r\nfunction sixDigitHex (hex) {\r\n return hex.length === 4\r\n ? [ '#',\r\n hex.substring(1, 2), hex.substring(1, 2),\r\n hex.substring(2, 3), hex.substring(2, 3),\r\n hex.substring(3, 4), hex.substring(3, 4)\r\n ].join('')\r\n : hex\r\n}\r\n\r\nfunction componentHex (component) {\r\n const integer = Math.round(component)\r\n const hex = integer.toString(16)\r\n return hex.length === 1 ? '0' + hex : hex\r\n}\r\n\r\nfunction is (object, space) {\r\n for (const key of space) {\r\n if (object[key] == null) {\r\n return false\r\n }\r\n }\r\n return true\r\n}\r\n\r\nfunction getParameters (a, b) {\r\n const params = is(a, 'rgb') ? { _a: a.r, _b: a.g, _c: a.b, space: 'rgb' }\r\n : is(a, 'xyz') ? { _a: a.x, _b: a.y, _c: a.z, _d: 0, space: 'xyz' }\r\n : is(a, 'hsl') ? { _a: a.h, _b: a.s, _c: a.l, _d: 0, space: 'hsl' }\r\n : is(a, 'lab') ? { _a: a.l, _b: a.a, _c: a.b, _d: 0, space: 'lab' }\r\n : is(a, 'lch') ? { _a: a.l, _b: a.c, _c: a.h, _d: 0, space: 'lch' }\r\n : is(a, 'cmyk') ? { _a: a.c, _b: a.m, _c: a.y, _d: a.k, space: 'cmyk' }\r\n : { _a: 0, _b: 0, _c: 0, space: 'rgb' }\r\n\r\n params.space = b || params.space\r\n return params\r\n}\r\n\r\nfunction cieSpace (space) {\r\n if (space === 'lab' || space === 'xyz' || space === 'lch') {\r\n return true\r\n } else {\r\n return false\r\n }\r\n}\r\n\r\nfunction hueToRgb (p, q, t) {\r\n if (t < 0) t += 1\r\n if (t > 1) t -= 1\r\n if (t < 1 / 6) return p + (q - p) * 6 * t\r\n if (t < 1 / 2) return q\r\n if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6\r\n return p\r\n}\r\n\r\nexport default class Color {\r\n constructor (...inputs) {\r\n this.init(...inputs)\r\n }\r\n\r\n init (a = 0, b = 0, c = 0, d = 0, space = 'rgb') {\r\n // Reset all values in case the init function is rerun with new color space\r\n if (this.space) {\r\n for (let component in this.space) {\r\n delete this[this.space[component]]\r\n }\r\n }\r\n\r\n if (typeof a === 'number') {\r\n // Allow for the case that we don't need d...\r\n space = typeof d === 'string' ? d : space\r\n d = typeof d === 'string' ? 0 : d\r\n\r\n // Assign the values straight to the color\r\n Object.assign(this, { _a: a, _b: b, _c: c, _d: d, space })\r\n // If the user gave us an array, make the color from it\r\n } else if (a instanceof Array) {\r\n this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb'\r\n Object.assign(this, { _a: a[0], _b: a[1], _c: a[2], _d: a[3] || 0 })\r\n } else if (a instanceof Object) {\r\n // Set the object up and assign its values directly\r\n const values = getParameters(a, b)\r\n Object.assign(this, values)\r\n } else if (typeof a === 'string') {\r\n if (isRgb.test(a)) {\r\n const noWhitespace = a.replace(whitespace, '')\r\n const [ _a, _b, _c ] = rgb.exec(noWhitespace)\r\n .slice(1, 4).map(v => parseInt(v))\r\n Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\r\n } else if (isHex.test(a)) {\r\n const hexParse = v => parseInt(v, 16)\r\n const [ , _a, _b, _c ] = hex.exec(sixDigitHex(a)).map(hexParse)\r\n Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })\r\n } else throw Error(`Unsupported string format, can't construct Color`)\r\n }\r\n\r\n // Now add the components as a convenience\r\n const { _a, _b, _c, _d } = this\r\n const components = this.space === 'rgb' ? { r: _a, g: _b, b: _c }\r\n : this.space === 'xyz' ? { x: _a, y: _b, z: _c }\r\n : this.space === 'hsl' ? { h: _a, s: _b, l: _c }\r\n : this.space === 'lab' ? { l: _a, a: _b, b: _c }\r\n : this.space === 'lch' ? { l: _a, c: _b, h: _c }\r\n : this.space === 'cmyk' ? { c: _a, m: _b, y: _c, k: _d }\r\n : {}\r\n Object.assign(this, components)\r\n }\r\n\r\n /*\r\n Conversion Methods\r\n */\r\n\r\n rgb () {\r\n if (this.space === 'rgb') {\r\n return this\r\n } else if (cieSpace(this.space)) {\r\n // Convert to the xyz color space\r\n let { x, y, z } = this\r\n if (this.space === 'lab' || this.space === 'lch') {\r\n // Get the values in the lab space\r\n let { l, a, b } = this\r\n if (this.space === 'lch') {\r\n let { c, h } = this\r\n const dToR = Math.PI / 180\r\n a = c * Math.cos(dToR * h)\r\n b = c * Math.sin(dToR * h)\r\n }\r\n\r\n // Undo the nonlinear function\r\n const yL = (l + 16) / 116\r\n const xL = a / 500 + yL\r\n const zL = yL - b / 200\r\n\r\n // Get the xyz values\r\n const ct = 16 / 116\r\n const mx = 0.008856\r\n const nm = 7.787\r\n x = 0.95047 * ((xL ** 3 > mx) ? xL ** 3 : (xL - ct) / nm)\r\n y = 1.00000 * ((yL ** 3 > mx) ? yL ** 3 : (yL - ct) / nm)\r\n z = 1.08883 * ((zL ** 3 > mx) ? zL ** 3 : (zL - ct) / nm)\r\n }\r\n\r\n // Convert xyz to unbounded rgb values\r\n const rU = x * 3.2406 + y * -1.5372 + z * -0.4986\r\n const gU = x * -0.9689 + y * 1.8758 + z * 0.0415\r\n const bU = x * 0.0557 + y * -0.2040 + z * 1.0570\r\n\r\n // Convert the values to true rgb values\r\n let pow = Math.pow\r\n let bd = 0.0031308\r\n const r = (rU > bd) ? (1.055 * pow(rU, 1 / 2.4) - 0.055) : 12.92 * rU\r\n const g = (gU > bd) ? (1.055 * pow(gU, 1 / 2.4) - 0.055) : 12.92 * gU\r\n const b = (bU > bd) ? (1.055 * pow(bU, 1 / 2.4) - 0.055) : 12.92 * bU\r\n\r\n // Make and return the color\r\n const color = new Color(255 * r, 255 * g, 255 * b)\r\n return color\r\n } else if (this.space === 'hsl') {\r\n // https://bgrins.github.io/TinyColor/docs/tinycolor.html\r\n // Get the current hsl values\r\n let { h, s, l } = this\r\n h /= 360\r\n s /= 100\r\n l /= 100\r\n\r\n // If we are grey, then just make the color directly\r\n if (s === 0) {\r\n l *= 255\r\n let color = new Color(l, l, l)\r\n return color\r\n }\r\n\r\n // TODO I have no idea what this does :D If you figure it out, tell me!\r\n const q = l < 0.5 ? l * (1 + s) : l + s - l * s\r\n const p = 2 * l - q\r\n\r\n // Get the rgb values\r\n const r = 255 * hueToRgb(p, q, h + 1 / 3)\r\n const g = 255 * hueToRgb(p, q, h)\r\n const b = 255 * hueToRgb(p, q, h - 1 / 3)\r\n\r\n // Make a new color\r\n const color = new Color(r, g, b)\r\n return color\r\n } else if (this.space === 'cmyk') {\r\n // https://gist.github.com/felipesabino/5066336\r\n // Get the normalised cmyk values\r\n const { c, m, y, k } = this\r\n\r\n // Get the rgb values\r\n const r = 255 * (1 - Math.min(1, c * (1 - k) + k))\r\n const g = 255 * (1 - Math.min(1, m * (1 - k) + k))\r\n const b = 255 * (1 - Math.min(1, y * (1 - k) + k))\r\n\r\n // Form the color and return it\r\n const color = new Color(r, g, b)\r\n return color\r\n } else {\r\n return this\r\n }\r\n }\r\n\r\n lab () {\r\n // Get the xyz color\r\n const { x, y, z } = this.xyz()\r\n\r\n // Get the lab components\r\n const l = (116 * y) - 16\r\n const a = 500 * (x - y)\r\n const b = 200 * (y - z)\r\n\r\n // Construct and return a new color\r\n const color = new Color(l, a, b, 'lab')\r\n return color\r\n }\r\n\r\n xyz () {\r\n\r\n // Normalise the red, green and blue values\r\n const { _a: r255, _b: g255, _c: b255 } = this.rgb()\r\n const [ r, g, b ] = [ r255, g255, b255 ].map(v => v / 255)\r\n\r\n // Convert to the lab rgb space\r\n const rL = (r > 0.04045) ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92\r\n const gL = (g > 0.04045) ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92\r\n const bL = (b > 0.04045) ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92\r\n\r\n // Convert to the xyz color space without bounding the values\r\n const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047\r\n const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.00000\r\n const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883\r\n\r\n // Get the proper xyz values by applying the bounding\r\n const x = (xU > 0.008856) ? Math.pow(xU, 1 / 3) : (7.787 * xU) + 16 / 116\r\n const y = (yU > 0.008856) ? Math.pow(yU, 1 / 3) : (7.787 * yU) + 16 / 116\r\n const z = (zU > 0.008856) ? Math.pow(zU, 1 / 3) : (7.787 * zU) + 16 / 116\r\n\r\n // Make and return the color\r\n const color = new Color(x, y, z, 'xyz')\r\n return color\r\n }\r\n\r\n lch () {\r\n\r\n // Get the lab color directly\r\n const { l, a, b } = this.lab()\r\n\r\n // Get the chromaticity and the hue using polar coordinates\r\n const c = Math.sqrt(a ** 2 + b ** 2)\r\n let h = 180 * Math.atan2(b, a) / Math.PI\r\n if (h < 0) {\r\n h *= -1\r\n h = 360 - h\r\n }\r\n\r\n // Make a new color and return it\r\n const color = new Color(l, c, h, 'lch')\r\n return color\r\n }\r\n\r\n hsl () {\r\n\r\n // Get the rgb values\r\n const { _a, _b, _c } = this.rgb()\r\n const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)\r\n\r\n // Find the maximum and minimum values to get the lightness\r\n const max = Math.max(r, g, b)\r\n const min = Math.min(r, g, b)\r\n const l = (max + min) / 2\r\n\r\n // If the r, g, v values are identical then we are grey\r\n const isGrey = max === min\r\n\r\n // Calculate the hue and saturation\r\n const delta = max - min\r\n const s = isGrey ? 0\r\n : l > 0.5 ? delta / (2 - max - min)\r\n : delta / (max + min)\r\n const h = isGrey ? 0\r\n : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6\r\n : max === g ? ((b - r) / delta + 2) / 6\r\n : max === b ? ((r - g) / delta + 4) / 6\r\n : 0\r\n\r\n // Construct and return the new color\r\n const color = new Color(360 * h, 100 * s, 100 * l, 'hsl')\r\n return color\r\n }\r\n\r\n cmyk () {\r\n\r\n // Get the rgb values for the current color\r\n const { _a, _b, _c } = this.rgb()\r\n const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)\r\n\r\n // Get the cmyk values in an unbounded format\r\n const k = Math.min(1 - r, 1 - g, 1 - b)\r\n\r\n if (k === 1) {\r\n // Catch the black case\r\n return new Color(0, 0, 0, 1, 'cmyk')\r\n }\r\n\r\n const c = (1 - r - k) / (1 - k)\r\n const m = (1 - g - k) / (1 - k)\r\n const y = (1 - b - k) / (1 - k)\r\n\r\n // Construct the new color\r\n const color = new Color(c, m, y, k, 'cmyk')\r\n return color\r\n }\r\n\r\n /*\r\n Input and Output methods\r\n */\r\n\r\n toHex () {\r\n let { _a, _b, _c } = this.rgb()\r\n let [ r, g, b ] = [ _a, _b, _c ].map(componentHex)\r\n return `#${r}${g}${b}`\r\n }\r\n\r\n toString () {\r\n return this.toHex()\r\n }\r\n\r\n toRgb () {\r\n let { r, g, b } = this.rgb()\r\n let { max, min, round } = Math\r\n let format = v => max(0, min(round(v), 255))\r\n let [ rV, gV, bV ] = [ r, g, b ].map(format)\r\n let string = `rgb(${rV},${gV},${bV})`\r\n return string\r\n }\r\n\r\n toArray () {\r\n let { _a, _b, _c, _d, space } = this\r\n return [ _a, _b, _c, _d, space ]\r\n }\r\n\r\n /*\r\n Generating random colors\r\n */\r\n\r\n static random (mode = 'vibrant') {\r\n 'sine'\r\n 'pastel'\r\n 'vibrant'\r\n 'dark'\r\n 'rgb'\r\n 'lab'\r\n 'grey'\r\n }\r\n\r\n /*\r\n Constructing colors\r\n */\r\n\r\n // Test if given value is a color string\r\n static test (color) {\r\n color += ''\r\n return isHex.test(color) || isRgb.test(color)\r\n }\r\n\r\n // Test if given value is a rgb object\r\n static isRgb (color) {\r\n return color && typeof color.r === 'number'\r\n && typeof color.g === 'number'\r\n && typeof color.b === 'number'\r\n }\r\n\r\n // Test if given value is a color\r\n static isColor (color) {\r\n return this.isRgb(color) || this.test(color)\r\n }\r\n}\r\n","export default class Point {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (x, y) {\r\n let source\r\n let base = { x: 0, y: 0 }\r\n\r\n // ensure source as object\r\n source = Array.isArray(x) ? { x: x[0], y: x[1] }\r\n : typeof x === 'object' ? { x: x.x, y: x.y }\r\n : { x: x, y: y }\r\n\r\n // merge source\r\n this.x = source.x == null ? base.x : source.x\r\n this.y = source.y == null ? base.y : source.y\r\n\r\n return this\r\n }\r\n\r\n // Clone point\r\n clone () {\r\n return new Point(this)\r\n }\r\n\r\n // transform point with matrix\r\n transform (m) {\r\n // Perform the matrix multiplication\r\n var x = m.a * this.x + m.c * this.y + m.e\r\n var y = m.b * this.x + m.d * this.y + m.f\r\n\r\n // Return the required point\r\n return new Point(x, y)\r\n }\r\n\r\n toArray () {\r\n return [ this.x, this.y ]\r\n }\r\n}\r\n\r\nexport function point (x, y) {\r\n return new Point(x, y).transform(this.screenCTM().inverse())\r\n}\r\n","import { globals } from '../../utils/window.js'\r\nimport { makeInstance } from '../../utils/adopter.js'\r\n\r\nexport default function parser () {\r\n // Reuse cached element if possible\r\n if (!parser.nodes) {\r\n let svg = makeInstance().size(2, 0)\r\n svg.node.cssText = [\r\n 'opacity: 0',\r\n 'position: absolute',\r\n 'left: -100%',\r\n 'top: -100%',\r\n 'overflow: hidden'\r\n ].join(';')\r\n\r\n let path = svg.path().node\r\n\r\n parser.nodes = { svg, path }\r\n }\r\n\r\n if (!parser.nodes.svg.node.parentNode) {\r\n let b = globals.document.body || globals.document.documentElement\r\n parser.nodes.svg.addTo(b)\r\n }\r\n\r\n return parser.nodes\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { globals } from '../utils/window.js'\r\nimport Point from './Point.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nfunction isNulledBox (box) {\r\n return !box.w && !box.h && !box.x && !box.y\r\n}\r\n\r\nfunction domContains (node) {\r\n return (globals.document.documentElement.contains || function (node) {\r\n // This is IE - it does not support contains() for top-level SVGs\r\n while (node.parentNode) {\r\n node = node.parentNode\r\n }\r\n return node === document\r\n }).call(globals.document.documentElement, node)\r\n}\r\n\r\nexport default class Box {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (source) {\r\n var base = [ 0, 0, 0, 0 ]\r\n source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)\r\n : Array.isArray(source) ? source\r\n : typeof source === 'object' ? [ source.left != null ? source.left\r\n : source.x, source.top != null ? source.top : source.y, source.width, source.height ]\r\n : arguments.length === 4 ? [].slice.call(arguments)\r\n : base\r\n\r\n this.x = source[0] || 0\r\n this.y = source[1] || 0\r\n this.width = this.w = source[2] || 0\r\n this.height = this.h = source[3] || 0\r\n\r\n // Add more bounding box properties\r\n this.x2 = this.x + this.w\r\n this.y2 = this.y + this.h\r\n this.cx = this.x + this.w / 2\r\n this.cy = this.y + this.h / 2\r\n\r\n return this\r\n }\r\n\r\n // Merge rect box with another, return a new instance\r\n merge (box) {\r\n let x = Math.min(this.x, box.x)\r\n let y = Math.min(this.y, box.y)\r\n let width = Math.max(this.x + this.width, box.x + box.width) - x\r\n let height = Math.max(this.y + this.height, box.y + box.height) - y\r\n\r\n return new Box(x, y, width, height)\r\n }\r\n\r\n transform (m) {\r\n let xMin = Infinity\r\n let xMax = -Infinity\r\n let yMin = Infinity\r\n let yMax = -Infinity\r\n\r\n let pts = [\r\n new Point(this.x, this.y),\r\n new Point(this.x2, this.y),\r\n new Point(this.x, this.y2),\r\n new Point(this.x2, this.y2)\r\n ]\r\n\r\n pts.forEach(function (p) {\r\n p = p.transform(m)\r\n xMin = Math.min(xMin, p.x)\r\n xMax = Math.max(xMax, p.x)\r\n yMin = Math.min(yMin, p.y)\r\n yMax = Math.max(yMax, p.y)\r\n })\r\n\r\n return new Box(\r\n xMin, yMin,\r\n xMax - xMin,\r\n yMax - yMin\r\n )\r\n }\r\n\r\n addOffset () {\r\n // offset by window scroll position, because getBoundingClientRect changes when window is scrolled\r\n this.x += globals.window.pageXOffset\r\n this.y += globals.window.pageYOffset\r\n return this\r\n }\r\n\r\n toString () {\r\n return this.x + ' ' + this.y + ' ' + this.width + ' ' + this.height\r\n }\r\n\r\n toArray () {\r\n return [ this.x, this.y, this.width, this.height ]\r\n }\r\n\r\n isNulled () {\r\n return isNulledBox(this)\r\n }\r\n}\r\n\r\nfunction getBox (cb, retry) {\r\n let box\r\n\r\n try {\r\n box = cb(this.node)\r\n\r\n if (isNulledBox(box) && !domContains(this.node)) {\r\n throw new Error('Element not in the dom')\r\n }\r\n } catch (e) {\r\n box = retry(this)\r\n }\r\n\r\n return box\r\n}\r\n\r\nexport function bbox () {\r\n return new Box(getBox.call(this, (node) => node.getBBox(), (el) => {\r\n try {\r\n let clone = el.clone().addTo(parser().svg).show()\r\n let box = clone.node.getBBox()\r\n clone.remove()\r\n return box\r\n } catch (e) {\r\n throw new Error('Getting bbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }\r\n }))\r\n}\r\n\r\nexport function rbox (el) {\r\n let box = new Box(getBox.call(this, (node) => node.getBoundingClientRect(), (el) => {\r\n throw new Error('Getting rbox of element \"' + el.node.nodeName + '\" is not possible')\r\n }))\r\n if (el) return box.transform(el.screenCTM().inverse())\r\n return box.addOffset()\r\n}\r\n\r\nregisterMethods({\r\n viewbox: {\r\n viewbox (x, y, width, height) {\r\n // act as getter\r\n if (x == null) return new Box(this.attr('viewBox'))\r\n\r\n // act as setter\r\n return this.attr('viewBox', new Box(x, y, width, height))\r\n }\r\n }\r\n})\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { radians } from '../utils/utils.js'\r\nimport Element from '../elements/Element.js'\r\nimport Point from './Point.js'\r\n\r\nfunction closeEnough (a, b, threshold) {\r\n return Math.abs(b - a) < (threshold || 1e-6)\r\n}\r\n\r\nexport default class Matrix {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n // Initialize\r\n init (source) {\r\n var base = Matrix.fromArray([ 1, 0, 0, 1, 0, 0 ])\r\n\r\n // ensure source as object\r\n source = source instanceof Element ? source.matrixify()\r\n : typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))\r\n : Array.isArray(source) ? Matrix.fromArray(source)\r\n : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source\r\n : (typeof source === 'object') ? new Matrix().transform(source)\r\n : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))\r\n : base\r\n\r\n // Merge the source matrix with the base matrix\r\n this.a = source.a != null ? source.a : base.a\r\n this.b = source.b != null ? source.b : base.b\r\n this.c = source.c != null ? source.c : base.c\r\n this.d = source.d != null ? source.d : base.d\r\n this.e = source.e != null ? source.e : base.e\r\n this.f = source.f != null ? source.f : base.f\r\n\r\n return this\r\n }\r\n\r\n // Clones this matrix\r\n clone () {\r\n return new Matrix(this)\r\n }\r\n\r\n // Transform a matrix into another matrix by manipulating the space\r\n transform (o) {\r\n // Check if o is a matrix and then left multiply it directly\r\n if (Matrix.isMatrixLike(o)) {\r\n var matrix = new Matrix(o)\r\n return matrix.multiplyO(this)\r\n }\r\n\r\n // Get the proposed transformations and the current transformations\r\n var t = Matrix.formatTransforms(o)\r\n var current = this\r\n let { x: ox, y: oy } = new Point(t.ox, t.oy).transform(current)\r\n\r\n // Construct the resulting matrix\r\n var transformer = new Matrix()\r\n .translateO(t.rx, t.ry)\r\n .lmultiplyO(current)\r\n .translateO(-ox, -oy)\r\n .scaleO(t.scaleX, t.scaleY)\r\n .skewO(t.skewX, t.skewY)\r\n .shearO(t.shear)\r\n .rotateO(t.theta)\r\n .translateO(ox, oy)\r\n\r\n // If we want the origin at a particular place, we force it there\r\n if (isFinite(t.px) || isFinite(t.py)) {\r\n const origin = new Point(ox, oy).transform(transformer)\r\n // TODO: Replace t.px with isFinite(t.px)\r\n const dx = t.px ? t.px - origin.x : 0\r\n const dy = t.py ? t.py - origin.y : 0\r\n transformer.translateO(dx, dy)\r\n }\r\n\r\n // Translate now after positioning\r\n transformer.translateO(t.tx, t.ty)\r\n return transformer\r\n }\r\n\r\n // Applies a matrix defined by its affine parameters\r\n compose (o) {\r\n if (o.origin) {\r\n o.originX = o.origin[0]\r\n o.originY = o.origin[1]\r\n }\r\n // Get the parameters\r\n var ox = o.originX || 0\r\n var oy = o.originY || 0\r\n var sx = o.scaleX || 1\r\n var sy = o.scaleY || 1\r\n var lam = o.shear || 0\r\n var theta = o.rotate || 0\r\n var tx = o.translateX || 0\r\n var ty = o.translateY || 0\r\n\r\n // Apply the standard matrix\r\n var result = new Matrix()\r\n .translateO(-ox, -oy)\r\n .scaleO(sx, sy)\r\n .shearO(lam)\r\n .rotateO(theta)\r\n .translateO(tx, ty)\r\n .lmultiplyO(this)\r\n .translateO(ox, oy)\r\n return result\r\n }\r\n\r\n // Decomposes this matrix into its affine parameters\r\n decompose (cx = 0, cy = 0) {\r\n // Get the parameters from the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Figure out if the winding direction is clockwise or counterclockwise\r\n var determinant = a * d - b * c\r\n var ccw = determinant > 0 ? 1 : -1\r\n\r\n // Since we only shear in x, we can use the x basis to get the x scale\r\n // and the rotation of the resulting matrix\r\n var sx = ccw * Math.sqrt(a * a + b * b)\r\n var thetaRad = Math.atan2(ccw * b, ccw * a)\r\n var theta = 180 / Math.PI * thetaRad\r\n var ct = Math.cos(thetaRad)\r\n var st = Math.sin(thetaRad)\r\n\r\n // We can then solve the y basis vector simultaneously to get the other\r\n // two affine parameters directly from these parameters\r\n var lam = (a * c + b * d) / determinant\r\n var sy = ((c * sx) / (lam * a - b)) || ((d * sx) / (lam * b + a))\r\n\r\n // Use the translations\r\n let tx = e - cx + cx * ct * sx + cy * (lam * ct * sx - st * sy)\r\n let ty = f - cy + cx * st * sx + cy * (lam * st * sx + ct * sy)\r\n\r\n // Construct the decomposition and return it\r\n return {\r\n // Return the affine parameters\r\n scaleX: sx,\r\n scaleY: sy,\r\n shear: lam,\r\n rotate: theta,\r\n translateX: tx,\r\n translateY: ty,\r\n originX: cx,\r\n originY: cy,\r\n\r\n // Return the matrix parameters\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n // Left multiplies by the given matrix\r\n multiply (matrix) {\r\n return this.clone().multiplyO(matrix)\r\n }\r\n\r\n multiplyO (matrix) {\r\n // Get the matrices\r\n var l = this\r\n var r = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n lmultiply (matrix) {\r\n return this.clone().lmultiplyO(matrix)\r\n }\r\n\r\n lmultiplyO (matrix) {\r\n var r = this\r\n var l = matrix instanceof Matrix\r\n ? matrix\r\n : new Matrix(matrix)\r\n\r\n return Matrix.matrixMultiply(l, r, this)\r\n }\r\n\r\n // Inverses matrix\r\n inverseO () {\r\n // Get the current parameters out of the matrix\r\n var a = this.a\r\n var b = this.b\r\n var c = this.c\r\n var d = this.d\r\n var e = this.e\r\n var f = this.f\r\n\r\n // Invert the 2x2 matrix in the top left\r\n var det = a * d - b * c\r\n if (!det) throw new Error('Cannot invert ' + this)\r\n\r\n // Calculate the top 2x2 matrix\r\n var na = d / det\r\n var nb = -b / det\r\n var nc = -c / det\r\n var nd = a / det\r\n\r\n // Apply the inverted matrix to the top right\r\n var ne = -(na * e + nc * f)\r\n var nf = -(nb * e + nd * f)\r\n\r\n // Construct the inverted matrix\r\n this.a = na\r\n this.b = nb\r\n this.c = nc\r\n this.d = nd\r\n this.e = ne\r\n this.f = nf\r\n\r\n return this\r\n }\r\n\r\n inverse () {\r\n return this.clone().inverseO()\r\n }\r\n\r\n // Translate matrix\r\n translate (x, y) {\r\n return this.clone().translateO(x, y)\r\n }\r\n\r\n translateO (x, y) {\r\n this.e += x || 0\r\n this.f += y || 0\r\n return this\r\n }\r\n\r\n // Scale matrix\r\n scale (x, y, cx, cy) {\r\n return this.clone().scaleO(...arguments)\r\n }\r\n\r\n scaleO (x, y = x, cx = 0, cy = 0) {\r\n // Support uniform scaling\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * x\r\n this.b = b * y\r\n this.c = c * x\r\n this.d = d * y\r\n this.e = e * x - cx * x + cx\r\n this.f = f * y - cy * y + cy\r\n\r\n return this\r\n }\r\n\r\n // Rotate matrix\r\n rotate (r, cx, cy) {\r\n return this.clone().rotateO(r, cx, cy)\r\n }\r\n\r\n rotateO (r, cx = 0, cy = 0) {\r\n // Convert degrees to radians\r\n r = radians(r)\r\n\r\n let cos = Math.cos(r)\r\n let sin = Math.sin(r)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a * cos - b * sin\r\n this.b = b * cos + a * sin\r\n this.c = c * cos - d * sin\r\n this.d = d * cos + c * sin\r\n this.e = e * cos - f * sin + cy * sin - cx * cos + cx\r\n this.f = f * cos + e * sin - cx * sin - cy * cos + cy\r\n\r\n return this\r\n }\r\n\r\n // Flip matrix on x or y, at a given offset\r\n flip (axis, around) {\r\n return this.clone().flipO(axis, around)\r\n }\r\n\r\n flipO (axis, around) {\r\n return axis === 'x' ? this.scaleO(-1, 1, around, 0)\r\n : axis === 'y' ? this.scaleO(1, -1, 0, around)\r\n : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point\r\n }\r\n\r\n // Shear matrix\r\n shear (a, cx, cy) {\r\n return this.clone().shearO(a, cx, cy)\r\n }\r\n\r\n shearO (lx, cx = 0, cy = 0) {\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.c = c + d * lx\r\n this.e = e + f * lx - cy * lx\r\n\r\n return this\r\n }\r\n\r\n // Skew Matrix\r\n skew (x, y, cx, cy) {\r\n return this.clone().skewO(...arguments)\r\n }\r\n\r\n skewO (x, y = x, cx = 0, cy = 0) {\r\n // support uniformal skew\r\n if (arguments.length === 3) {\r\n cy = cx\r\n cx = y\r\n y = x\r\n }\r\n\r\n // Convert degrees to radians\r\n x = radians(x)\r\n y = radians(y)\r\n\r\n let lx = Math.tan(x)\r\n let ly = Math.tan(y)\r\n\r\n let { a, b, c, d, e, f } = this\r\n\r\n this.a = a + b * lx\r\n this.b = b + a * ly\r\n this.c = c + d * lx\r\n this.d = d + c * ly\r\n this.e = e + f * lx - cy * lx\r\n this.f = f + e * ly - cx * ly\r\n\r\n return this\r\n }\r\n\r\n // SkewX\r\n skewX (x, cx, cy) {\r\n return this.skew(x, 0, cx, cy)\r\n }\r\n\r\n skewXO (x, cx, cy) {\r\n return this.skewO(x, 0, cx, cy)\r\n }\r\n\r\n // SkewY\r\n skewY (y, cx, cy) {\r\n return this.skew(0, y, cx, cy)\r\n }\r\n\r\n skewYO (y, cx, cy) {\r\n return this.skewO(0, y, cx, cy)\r\n }\r\n\r\n // Transform around a center point\r\n aroundO (cx, cy, matrix) {\r\n var dx = cx || 0\r\n var dy = cy || 0\r\n return this.translateO(-dx, -dy).lmultiplyO(matrix).translateO(dx, dy)\r\n }\r\n\r\n around (cx, cy, matrix) {\r\n return this.clone().aroundO(cx, cy, matrix)\r\n }\r\n\r\n // Check if two matrices are equal\r\n equals (other) {\r\n var comp = new Matrix(other)\r\n return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b)\r\n && closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d)\r\n && closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)\r\n }\r\n\r\n // Convert matrix to string\r\n toString () {\r\n return 'matrix(' + this.a + ',' + this.b + ',' + this.c + ',' + this.d + ',' + this.e + ',' + this.f + ')'\r\n }\r\n\r\n toArray () {\r\n return [ this.a, this.b, this.c, this.d, this.e, this.f ]\r\n }\r\n\r\n valueOf () {\r\n return {\r\n a: this.a,\r\n b: this.b,\r\n c: this.c,\r\n d: this.d,\r\n e: this.e,\r\n f: this.f\r\n }\r\n }\r\n\r\n static fromArray (a) {\r\n return { a: a[0], b: a[1], c: a[2], d: a[3], e: a[4], f: a[5] }\r\n }\r\n\r\n static isMatrixLike (o) {\r\n return (\r\n o.a != null\r\n || o.b != null\r\n || o.c != null\r\n || o.d != null\r\n || o.e != null\r\n || o.f != null\r\n )\r\n }\r\n\r\n static formatTransforms (o) {\r\n // Get all of the parameters required to form the matrix\r\n var flipBoth = o.flip === 'both' || o.flip === true\r\n var flipX = o.flip && (flipBoth || o.flip === 'x') ? -1 : 1\r\n var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1\r\n var skewX = o.skew && o.skew.length ? o.skew[0]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewX) ? o.skewX\r\n : 0\r\n var skewY = o.skew && o.skew.length ? o.skew[1]\r\n : isFinite(o.skew) ? o.skew\r\n : isFinite(o.skewY) ? o.skewY\r\n : 0\r\n var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX\r\n : isFinite(o.scale) ? o.scale * flipX\r\n : isFinite(o.scaleX) ? o.scaleX * flipX\r\n : flipX\r\n var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY\r\n : isFinite(o.scale) ? o.scale * flipY\r\n : isFinite(o.scaleY) ? o.scaleY * flipY\r\n : flipY\r\n var shear = o.shear || 0\r\n var theta = o.rotate || o.theta || 0\r\n var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)\r\n var ox = origin.x\r\n var oy = origin.y\r\n var position = new Point(o.position || o.px || o.positionX, o.py || o.positionY)\r\n var px = position.x\r\n var py = position.y\r\n var translate = new Point(o.translate || o.tx || o.translateX, o.ty || o.translateY)\r\n var tx = translate.x\r\n var ty = translate.y\r\n var relative = new Point(o.relative || o.rx || o.relativeX, o.ry || o.relativeY)\r\n var rx = relative.x\r\n var ry = relative.y\r\n\r\n // Populate all of the values\r\n return {\r\n scaleX, scaleY, skewX, skewY, shear, theta, rx, ry, tx, ty, ox, oy, px, py\r\n }\r\n }\r\n\r\n // left matrix, right matrix, target matrix which is overwritten\r\n static matrixMultiply (l, r, o) {\r\n // Work out the product directly\r\n var a = l.a * r.a + l.c * r.b\r\n var b = l.b * r.a + l.d * r.b\r\n var c = l.a * r.c + l.c * r.d\r\n var d = l.b * r.c + l.d * r.d\r\n var e = l.e + l.a * r.e + l.c * r.f\r\n var f = l.f + l.b * r.e + l.d * r.f\r\n\r\n // make sure to use local variables because l/r and o could be the same\r\n o.a = a\r\n o.b = b\r\n o.c = c\r\n o.d = d\r\n o.e = e\r\n o.f = f\r\n\r\n return o\r\n }\r\n}\r\n\r\nexport function ctm () {\r\n return new Matrix(this.node.getCTM())\r\n}\r\n\r\nexport function screenCTM () {\r\n /* https://bugzilla.mozilla.org/show_bug.cgi?id=1344537\r\n This is needed because FF does not return the transformation matrix\r\n for the inner coordinate system when getScreenCTM() is called on nested svgs.\r\n However all other Browsers do that */\r\n if (typeof this.isRoot === 'function' && !this.isRoot()) {\r\n var rect = this.rect(1, 1)\r\n var m = rect.node.getScreenCTM()\r\n rect.remove()\r\n return new Matrix(m)\r\n }\r\n return new Matrix(this.node.getScreenCTM())\r\n}\r\n","/* eslint no-new-func: \"off\" */\r\nexport const subClassArray = (function () {\r\n try {\r\n // try es6 subclassing\r\n return Function('name', 'baseClass', '_constructor', [\r\n 'baseClass = baseClass || Array',\r\n 'return {',\r\n ' [name]: class extends baseClass {',\r\n ' constructor (...args) {',\r\n ' super(...args)',\r\n ' _constructor && _constructor.apply(this, args)',\r\n ' }',\r\n ' }',\r\n '}[name]'\r\n ].join('\\n'))\r\n } catch (e) {\r\n // Use es5 approach\r\n return (name, baseClass = Array, _constructor) => {\r\n const Arr = function () {\r\n baseClass.apply(this, arguments)\r\n _constructor && _constructor.apply(this, arguments)\r\n }\r\n\r\n Arr.prototype = Object.create(baseClass.prototype)\r\n Arr.prototype.constructor = Arr\r\n\r\n Arr.prototype.map = function (fn) {\r\n const arr = new Arr()\r\n arr.push.apply(arr, Array.prototype.map.call(this, fn))\r\n return arr\r\n }\r\n\r\n return Arr\r\n }\r\n }\r\n})()\r\n","import { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst List = subClassArray('List', Array, function (arr = []) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...arr)\r\n})\r\n\r\nexport default List\r\n\r\nextend(List, {\r\n each (fnOrMethodName, ...args) {\r\n if (typeof fnOrMethodName === 'function') {\r\n this.forEach((el) => {\r\n fnOrMethodName.call(el, el)\r\n })\r\n } else {\r\n return this.map(el => {\r\n return el[fnOrMethodName](...args)\r\n })\r\n }\r\n\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n }\r\n})\r\n\r\nList.extend = function (methods) {\r\n methods = methods.reduce((obj, name) => {\r\n obj[name] = function (...attrs) {\r\n return this.each(name, ...attrs)\r\n }\r\n return obj\r\n }, {})\r\n\r\n extend(List, methods)\r\n}\r\n","import { adopt } from '../../utils/adopter.js'\r\nimport { globals } from '../../utils/window.js'\r\nimport { map } from '../../utils/utils.js'\r\nimport List from '../../types/List.js'\r\n\r\nexport default function baseFind (query, parent) {\r\n return new List(map((parent || globals.document).querySelectorAll(query), function (node) {\r\n return adopt(node)\r\n }))\r\n}\r\n\r\n// Scoped find method\r\nexport function find (query) {\r\n return baseFind(query, this.node)\r\n}\r\n","import { dispatch, off, on } from '../modules/core/event.js'\r\nimport Base from './Base.js'\r\n\r\nexport default class EventTarget extends Base {\r\n constructor ({ events = {} } = {}) {\r\n super()\r\n this.events = events\r\n }\r\n\r\n addEventListener () {}\r\n\r\n dispatch (event, data) {\r\n return dispatch(this, event, data)\r\n }\r\n\r\n dispatchEvent (event) {\r\n const bag = this.getEventHolder().events\r\n if (!bag) return true\r\n\r\n const events = bag[event.type]\r\n\r\n for (let i in events) {\r\n for (let j in events[i]) {\r\n events[i][j](event)\r\n }\r\n }\r\n\r\n return !event.defaultPrevented\r\n }\r\n\r\n // Fire given event\r\n fire (event, data) {\r\n this.dispatch(event, data)\r\n return this\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n getEventTarget () {\r\n return this\r\n }\r\n\r\n // Unbind event from listener\r\n off (event, listener) {\r\n off(this, event, listener)\r\n return this\r\n }\r\n\r\n // Bind given event to listener\r\n on (event, listener, binding, options) {\r\n on(this, event, listener, binding, options)\r\n return this\r\n }\r\n\r\n removeEventListener () {}\r\n}\r\n","\r\nexport function noop () {}\r\n\r\n// Default animation values\r\nexport let timeline = {\r\n duration: 400,\r\n ease: '>',\r\n delay: 0\r\n}\r\n\r\n// Default attribute values\r\nexport let attrs = {\r\n\r\n // fill and stroke\r\n 'fill-opacity': 1,\r\n 'stroke-opacity': 1,\r\n 'stroke-width': 0,\r\n 'stroke-linejoin': 'miter',\r\n 'stroke-linecap': 'butt',\r\n fill: '#000000',\r\n stroke: '#000000',\r\n opacity: 1,\r\n\r\n // position\r\n x: 0,\r\n y: 0,\r\n cx: 0,\r\n cy: 0,\r\n\r\n // size\r\n width: 0,\r\n height: 0,\r\n\r\n // radius\r\n r: 0,\r\n rx: 0,\r\n ry: 0,\r\n\r\n // gradient\r\n offset: 0,\r\n 'stop-opacity': 1,\r\n 'stop-color': '#000000',\r\n\r\n // text\r\n 'font-size': 16,\r\n 'font-family': 'Helvetica, Arial, sans-serif',\r\n 'text-anchor': 'start'\r\n}\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\n\r\nconst SVGArray = subClassArray('SVGArray', Array, function (arr) {\r\n this.init(arr)\r\n})\r\n\r\nexport default SVGArray\r\n\r\nextend(SVGArray, {\r\n init (arr) {\r\n // This catches the case, that native map tries to create an array with new Array(1)\r\n if (typeof arr === 'number') return this\r\n this.length = 0\r\n this.push(...this.parse(arr))\r\n return this\r\n },\r\n\r\n toArray () {\r\n return Array.prototype.concat.apply([], this)\r\n },\r\n\r\n toString () {\r\n return this.join(' ')\r\n },\r\n\r\n // Flattens the array if needed\r\n valueOf () {\r\n const ret = []\r\n ret.push(...this)\r\n return ret\r\n },\r\n\r\n // Parse whitespace separated string\r\n parse (array = []) {\r\n // If already is an array, no need to parse it\r\n if (array instanceof Array) return array\r\n\r\n return array.trim().split(delimiter).map(parseFloat)\r\n },\r\n\r\n clone () {\r\n return new this.constructor(this)\r\n },\r\n\r\n toSet () {\r\n return new Set(this)\r\n }\r\n})\r\n","import { numberAndUnit } from '../modules/core/regex.js'\r\n\r\n// Module for unit convertions\r\nexport default class SVGNumber {\r\n // Initialize\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (value, unit) {\r\n unit = Array.isArray(value) ? value[1] : unit\r\n value = Array.isArray(value) ? value[0] : value\r\n\r\n // initialize defaults\r\n this.value = 0\r\n this.unit = unit || ''\r\n\r\n // parse value\r\n if (typeof value === 'number') {\r\n // ensure a valid numeric value\r\n this.value = isNaN(value) ? 0 : !isFinite(value) ? (value < 0 ? -3.4e+38 : +3.4e+38) : value\r\n } else if (typeof value === 'string') {\r\n unit = value.match(numberAndUnit)\r\n\r\n if (unit) {\r\n // make value numeric\r\n this.value = parseFloat(unit[1])\r\n\r\n // normalize\r\n if (unit[5] === '%') {\r\n this.value /= 100\r\n } else if (unit[5] === 's') {\r\n this.value *= 1000\r\n }\r\n\r\n // store unit\r\n this.unit = unit[5]\r\n }\r\n } else {\r\n if (value instanceof SVGNumber) {\r\n this.value = value.valueOf()\r\n this.unit = value.unit\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n toString () {\r\n return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6\r\n : this.unit === 's' ? this.value / 1e3\r\n : this.value\r\n ) + this.unit\r\n }\r\n\r\n toJSON () {\r\n return this.toString()\r\n }\r\n\r\n toArray () {\r\n return [ this.value, this.unit ]\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n // Add number\r\n plus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this + number, this.unit || number.unit)\r\n }\r\n\r\n // Subtract number\r\n minus (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this - number, this.unit || number.unit)\r\n }\r\n\r\n // Multiply number\r\n times (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this * number, this.unit || number.unit)\r\n }\r\n\r\n // Divide number\r\n divide (number) {\r\n number = new SVGNumber(number)\r\n return new SVGNumber(this / number, this.unit || number.unit)\r\n }\r\n}\r\n","import { attrs as defaults } from './defaults.js'\r\nimport { isNumber } from './regex.js'\r\nimport Color from '../../types/Color.js'\r\nimport SVGArray from '../../types/SVGArray.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\nconst hooks = []\r\nexport function registerAttrHook (fn) {\r\n hooks.push(fn)\r\n}\r\n\r\n// Set svg element attribute\r\nexport default function attr (attr, val, ns) {\r\n // act as full getter\r\n if (attr == null) {\r\n // get an object of attributes\r\n attr = {}\r\n val = this.node.attributes\r\n\r\n for (let node of val) {\r\n attr[node.nodeName] = isNumber.test(node.nodeValue)\r\n ? parseFloat(node.nodeValue)\r\n : node.nodeValue\r\n }\r\n\r\n return attr\r\n } else if (attr instanceof Array) {\r\n // loop through array and get all values\r\n return attr.reduce((last, curr) => {\r\n last[curr] = this.attr(curr)\r\n return last\r\n }, {})\r\n } else if (typeof attr === 'object') {\r\n // apply every attribute individually if an object is passed\r\n for (val in attr) this.attr(val, attr[val])\r\n } else if (val === null) {\r\n // remove value\r\n this.node.removeAttribute(attr)\r\n } else if (val == null) {\r\n // act as a getter if the first and only argument is not an object\r\n val = this.node.getAttribute(attr)\r\n return val == null ? defaults[attr]\r\n : isNumber.test(val) ? parseFloat(val)\r\n : val\r\n } else {\r\n // Loop through hooks and execute them to convert value\r\n val = hooks.reduce((_val, hook) => {\r\n return hook(attr, _val, this)\r\n }, val)\r\n\r\n // ensure correct numeric values (also accepts NaN and Infinity)\r\n if (typeof val === 'number') {\r\n val = new SVGNumber(val)\r\n } else if (Color.isColor(val)) {\r\n // ensure full hex color\r\n val = new Color(val)\r\n } else if (val.constructor === Array) {\r\n // Check for plain arrays and parse array values\r\n val = new SVGArray(val)\r\n }\r\n\r\n // if the passed attribute is leading...\r\n if (attr === 'leading') {\r\n // ... call the leading method instead\r\n if (this.leading) {\r\n this.leading(val)\r\n }\r\n } else {\r\n // set given attribute on node\r\n typeof ns === 'string' ? this.node.setAttributeNS(ns, attr, val.toString())\r\n : this.node.setAttribute(attr, val.toString())\r\n }\r\n\r\n // rebuild if required\r\n if (this.rebuild && (attr === 'font-size' || attr === 'x')) {\r\n this.rebuild()\r\n }\r\n }\r\n\r\n return this\r\n}\r\n","import {\r\n adopt,\r\n assignNewId,\r\n eid,\r\n extend,\r\n makeInstance,\r\n makeNode,\r\n register\r\n} from '../utils/adopter.js'\r\nimport { find } from '../modules/core/selector.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { map } from '../utils/utils.js'\r\nimport { ns } from '../modules/core/namespaces.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport List from '../types/List.js'\r\nimport attr from '../modules/core/attr.js'\r\n\r\nexport default class Dom extends EventTarget {\r\n constructor (node, attrs) {\r\n super(node)\r\n this.node = node\r\n this.type = node.nodeName\r\n\r\n if (attrs && node !== attrs) {\r\n this.attr(attrs)\r\n }\r\n }\r\n\r\n // Add given element at a position\r\n add (element, i) {\r\n element = makeInstance(element)\r\n\r\n if (i == null) {\r\n this.node.appendChild(element.node)\r\n } else if (element.node !== this.node.childNodes[i]) {\r\n this.node.insertBefore(element.node, this.node.childNodes[i])\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Add element to given container and return self\r\n addTo (parent) {\r\n return makeInstance(parent).put(this)\r\n }\r\n\r\n // Returns all child elements\r\n children () {\r\n return new List(map(this.node.children, function (node) {\r\n return adopt(node)\r\n }))\r\n }\r\n\r\n // Remove all elements in this container\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n\r\n // remove defs reference\r\n delete this._defs\r\n\r\n return this\r\n }\r\n\r\n // Clone element\r\n clone () {\r\n // write dom data to the dom so the clone can pickup the data\r\n this.writeDataToDom()\r\n\r\n // clone element and assign new id\r\n return assignNewId(this.node.cloneNode(true))\r\n }\r\n\r\n // Iterates over all children and invokes a given block\r\n each (block, deep) {\r\n var children = this.children()\r\n var i, il\r\n\r\n for (i = 0, il = children.length; i < il; i++) {\r\n block.apply(children[i], [ i, children ])\r\n\r\n if (deep) {\r\n children[i].each(block, deep)\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n element (nodeName) {\r\n return this.put(new Dom(makeNode(nodeName)))\r\n }\r\n\r\n // Get first child\r\n first () {\r\n return adopt(this.node.firstChild)\r\n }\r\n\r\n // Get a element at the given index\r\n get (i) {\r\n return adopt(this.node.childNodes[i])\r\n }\r\n\r\n getEventHolder () {\r\n return this.node\r\n }\r\n\r\n getEventTarget () {\r\n return this.node\r\n }\r\n\r\n // Checks if the given element is a child\r\n has (element) {\r\n return this.index(element) >= 0\r\n }\r\n\r\n // Get / set id\r\n id (id) {\r\n // generate new id if no id set\r\n if (typeof id === 'undefined' && !this.node.id) {\r\n this.node.id = eid(this.type)\r\n }\r\n\r\n // dont't set directly width this.node.id to make `null` work correctly\r\n return this.attr('id', id)\r\n }\r\n\r\n // Gets index of given element\r\n index (element) {\r\n return [].slice.call(this.node.childNodes).indexOf(element.node)\r\n }\r\n\r\n // Get the last child\r\n last () {\r\n return adopt(this.node.lastChild)\r\n }\r\n\r\n // matches the element vs a css selector\r\n matches (selector) {\r\n const el = this.node\r\n return (el.matches || el.matchesSelector || el.msMatchesSelector || el.mozMatchesSelector || el.webkitMatchesSelector || el.oMatchesSelector).call(el, selector)\r\n }\r\n\r\n // Returns the parent element instance\r\n parent (type) {\r\n var parent = this\r\n\r\n // check for parent\r\n if (!parent.node.parentNode) return null\r\n\r\n // get parent element\r\n parent = adopt(parent.node.parentNode)\r\n\r\n if (!type) return parent\r\n\r\n // loop trough ancestors if type is given\r\n while (parent && parent.node instanceof globals.window.SVGElement) { // FIXME: That shouldnt be neccessary\r\n if (typeof type === 'string' ? parent.matches(type) : parent instanceof type) return parent\r\n parent = adopt(parent.node.parentNode)\r\n }\r\n }\r\n\r\n // Basically does the same as `add()` but returns the added element instead\r\n put (element, i) {\r\n this.add(element, i)\r\n return element\r\n }\r\n\r\n // Add element to given container and return container\r\n putIn (parent) {\r\n return makeInstance(parent).add(this)\r\n }\r\n\r\n // Remove element\r\n remove () {\r\n if (this.parent()) {\r\n this.parent().removeElement(this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Remove a given child\r\n removeElement (element) {\r\n this.node.removeChild(element.node)\r\n\r\n return this\r\n }\r\n\r\n // Replace this with element\r\n replace (element) {\r\n element = makeInstance(element)\r\n this.node.parentNode.replaceChild(element.node, this.node)\r\n return element\r\n }\r\n\r\n round (precision = 2, map) {\r\n const factor = 10 ** precision\r\n const attrs = this.attr()\r\n\r\n // If we have no map, build one from attrs\r\n if (!map) {\r\n map = Object.keys(attrs)\r\n }\r\n\r\n // Holds rounded attributes\r\n const newAttrs = {}\r\n map.forEach((key) => {\r\n newAttrs[key] = Math.round(attrs[key] * factor) / factor\r\n })\r\n\r\n this.attr(newAttrs)\r\n return this\r\n }\r\n\r\n // Return id on string conversion\r\n toString () {\r\n return this.id()\r\n }\r\n\r\n // Import raw svg\r\n svg (svgOrFn, outerHTML) {\r\n var well, len, fragment\r\n\r\n if (svgOrFn === false) {\r\n outerHTML = false\r\n svgOrFn = null\r\n }\r\n\r\n // act as getter if no svg string is given\r\n if (svgOrFn == null || typeof svgOrFn === 'function') {\r\n // The default for exports is, that the outerNode is included\r\n outerHTML = outerHTML == null ? true : outerHTML\r\n\r\n // write svgjs data to the dom\r\n this.writeDataToDom()\r\n let current = this\r\n\r\n // An export modifier was passed\r\n if (svgOrFn != null) {\r\n current = adopt(current.node.cloneNode(true))\r\n\r\n // If the user wants outerHTML we need to process this node, too\r\n if (outerHTML) {\r\n let result = svgOrFn(current)\r\n current = result || current\r\n\r\n // The user does not want this node? Well, then he gets nothing\r\n if (result === false) return ''\r\n }\r\n\r\n // Deep loop through all children and apply modifier\r\n current.each(function () {\r\n let result = svgOrFn(this)\r\n let _this = result || this\r\n\r\n // If modifier returns false, discard node\r\n if (result === false) {\r\n this.remove()\r\n\r\n // If modifier returns new node, use it\r\n } else if (result && this !== _this) {\r\n this.replace(_this)\r\n }\r\n }, true)\r\n }\r\n\r\n // Return outer or inner content\r\n return outerHTML\r\n ? current.node.outerHTML\r\n : current.node.innerHTML\r\n }\r\n\r\n // Act as setter if we got a string\r\n\r\n // The default for import is, that the current node is not replaced\r\n outerHTML = outerHTML == null ? false : outerHTML\r\n\r\n // Create temporary holder\r\n well = globals.document.createElementNS(ns, 'svg')\r\n fragment = globals.document.createDocumentFragment()\r\n\r\n // Dump raw svg\r\n well.innerHTML = svgOrFn\r\n\r\n // Transplant nodes into the fragment\r\n for (len = well.children.length; len--;) {\r\n fragment.appendChild(well.firstElementChild)\r\n }\r\n\r\n let parent = this.parent()\r\n\r\n // Add the whole fragment at once\r\n return outerHTML\r\n ? this.replace(fragment) && parent\r\n : this.add(fragment)\r\n }\r\n\r\n words (text) {\r\n // This is faster than removing all children and adding a new one\r\n this.node.textContent = text\r\n return this\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // dump variables recursively\r\n this.each(function () {\r\n this.writeDataToDom()\r\n })\r\n\r\n return this\r\n }\r\n}\r\n\r\nextend(Dom, { attr, find })\r\nregister(Dom)\r\n","import { bbox, rbox } from '../types/Box.js'\r\nimport { ctm, screenCTM } from '../types/Matrix.js'\r\nimport {\r\n extend,\r\n getClass,\r\n makeInstance,\r\n register,\r\n root\r\n} from '../utils/adopter.js'\r\nimport { globals } from '../utils/window.js'\r\nimport { point } from '../types/Point.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { reference } from '../modules/core/regex.js'\r\nimport Dom from './Dom.js'\r\nimport List from '../types/List.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nconst Svg = getClass(root)\r\n\r\nexport default class Element extends Dom {\r\n constructor (node, attrs) {\r\n super(node, attrs)\r\n\r\n // initialize data object\r\n this.dom = {}\r\n\r\n // create circular reference\r\n this.node.instance = this\r\n\r\n if (node.hasAttribute('svgjs:data')) {\r\n // pull svgjs data from the dom (getAttributeNS doesn't work in html5)\r\n this.setData(JSON.parse(node.getAttribute('svgjs:data')) || {})\r\n }\r\n }\r\n\r\n // Move element by its center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n }\r\n\r\n // Move by center over x-axis\r\n cx (x) {\r\n return x == null ? this.x() + this.width() / 2 : this.x(x - this.width() / 2)\r\n }\r\n\r\n // Move by center over y-axis\r\n cy (y) {\r\n return y == null\r\n ? this.y() + this.height() / 2\r\n : this.y(y - this.height() / 2)\r\n }\r\n\r\n // Get defs\r\n defs () {\r\n return this.root().defs()\r\n }\r\n\r\n // Get parent document\r\n root () {\r\n let p = this.parent(Svg)\r\n return p && p.root()\r\n }\r\n\r\n getEventHolder () {\r\n return this\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('height', height)\r\n }\r\n\r\n // Checks whether the given point inside the bounding box of the element\r\n inside (x, y) {\r\n let box = this.bbox()\r\n\r\n return x > box.x\r\n && y > box.y\r\n && x < box.x + box.width\r\n && y < box.y + box.height\r\n }\r\n\r\n // Move element to given x and y values\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n }\r\n\r\n // return array of all ancestors of given type up to the root svg\r\n parents (until = globals.document) {\r\n until = makeInstance(until)\r\n let parents = new List()\r\n let parent = this\r\n\r\n while (\r\n (parent = parent.parent())\r\n && parent.node !== until.node\r\n && parent.node !== globals.document\r\n ) {\r\n parents.push(parent)\r\n }\r\n\r\n return parents\r\n }\r\n\r\n // Get referenced element form attribute value\r\n reference (attr) {\r\n attr = this.attr(attr)\r\n if (!attr) return null\r\n\r\n const m = attr.match(reference)\r\n return m ? makeInstance(m[1]) : null\r\n }\r\n\r\n // set given data to the elements data property\r\n setData (o) {\r\n this.dom = o\r\n return this\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .width(new SVGNumber(p.width))\r\n .height(new SVGNumber(p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('width', width)\r\n }\r\n\r\n // write svgjs data to the dom\r\n writeDataToDom () {\r\n // remove previously set data\r\n this.node.removeAttribute('svgjs:data')\r\n\r\n if (Object.keys(this.dom).length) {\r\n this.node.setAttribute('svgjs:data', JSON.stringify(this.dom)) // see #428\r\n }\r\n\r\n return super.writeDataToDom()\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n return this.attr('y', y)\r\n }\r\n}\r\n\r\nextend(Element, {\r\n bbox, rbox, point, ctm, screenCTM\r\n})\r\n\r\nregister(Element)\r\n","import { on, off } from '../core/event.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Color from '../../types/Color.js'\r\nimport Element from '../../elements/Element.js'\r\nimport Matrix from '../../types/Matrix.js'\r\nimport Point from '../../types/Point.js'\r\nimport SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Define list of available attributes for stroke and fill\r\nvar sugar = {\r\n stroke: [ 'color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset' ],\r\n fill: [ 'color', 'opacity', 'rule' ],\r\n prefix: function (t, a) {\r\n return a === 'color' ? t : t + '-' + a\r\n }\r\n}\r\n\r\n// Add sugar for fill and stroke\r\n;[ 'fill', 'stroke' ].forEach(function (m) {\r\n var extension = {}\r\n var i\r\n\r\n extension[m] = function (o) {\r\n if (typeof o === 'undefined') {\r\n return this.attr(m)\r\n }\r\n if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || (o instanceof Element)) {\r\n this.attr(m, o)\r\n } else {\r\n // set all attributes from sugar.fill and sugar.stroke list\r\n for (i = sugar[m].length - 1; i >= 0; i--) {\r\n if (o[sugar[m][i]] != null) {\r\n this.attr(sugar.prefix(m, sugar[m][i]), o[sugar[m][i]])\r\n }\r\n }\r\n }\r\n\r\n return this\r\n }\r\n\r\n registerMethods([ 'Shape', 'Runner' ], extension)\r\n})\r\n\r\nregisterMethods([ 'Element', 'Runner' ], {\r\n // Let the user set the matrix directly\r\n matrix: function (mat, b, c, d, e, f) {\r\n // Act as a getter\r\n if (mat == null) {\r\n return new Matrix(this)\r\n }\r\n\r\n // Act as a setter, the user can pass a matrix or a set of numbers\r\n return this.attr('transform', new Matrix(mat, b, c, d, e, f))\r\n },\r\n\r\n // Map rotation to transform\r\n rotate: function (angle, cx, cy) {\r\n return this.transform({ rotate: angle, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map skew to transform\r\n skew: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ skew: x, ox: y, oy: cx }, true)\r\n : this.transform({ skew: [ x, y ], ox: cx, oy: cy }, true)\r\n },\r\n\r\n shear: function (lam, cx, cy) {\r\n return this.transform({ shear: lam, ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map scale to transform\r\n scale: function (x, y, cx, cy) {\r\n return arguments.length === 1 || arguments.length === 3\r\n ? this.transform({ scale: x, ox: y, oy: cx }, true)\r\n : this.transform({ scale: [ x, y ], ox: cx, oy: cy }, true)\r\n },\r\n\r\n // Map translate to transform\r\n translate: function (x, y) {\r\n return this.transform({ translate: [ x, y ] }, true)\r\n },\r\n\r\n // Map relative translations to transform\r\n relative: function (x, y) {\r\n return this.transform({ relative: [ x, y ] }, true)\r\n },\r\n\r\n // Map flip to transform\r\n flip: function (direction, around) {\r\n var directionString = typeof direction === 'string' ? direction\r\n : isFinite(direction) ? 'both'\r\n : 'both'\r\n var origin = (direction === 'both' && isFinite(around)) ? [ around, around ]\r\n : (direction === 'x') ? [ around, 0 ]\r\n : (direction === 'y') ? [ 0, around ]\r\n : isFinite(direction) ? [ direction, direction ]\r\n : [ 0, 0 ]\r\n this.transform({ flip: directionString, origin: origin }, true)\r\n },\r\n\r\n // Opacity\r\n opacity: function (value) {\r\n return this.attr('opacity', value)\r\n },\r\n\r\n // Relative move over x and y axes\r\n dmove: function (x, y) {\r\n return this.dx(x).dy(y)\r\n }\r\n})\r\n\r\nregisterMethods('Element', {\r\n // Relative move over x axis\r\n dx: function (x) {\r\n return this.x(new SVGNumber(x).plus(this.x()))\r\n },\r\n\r\n // Relative move over y axis\r\n dy: function (y) {\r\n return this.y(new SVGNumber(y).plus(this.y()))\r\n }\r\n})\r\n\r\nregisterMethods('radius', {\r\n // Add x and y radius\r\n radius: function (x, y) {\r\n var type = (this._element || this).type\r\n return type === 'radialGradient' || type === 'radialGradient'\r\n ? this.attr('r', new SVGNumber(x))\r\n : this.rx(x).ry(y == null ? x : y)\r\n }\r\n})\r\n\r\nregisterMethods('Path', {\r\n // Get path length\r\n length: function () {\r\n return this.node.getTotalLength()\r\n },\r\n // Get point at length\r\n pointAt: function (length) {\r\n return new Point(this.node.getPointAtLength(length))\r\n }\r\n})\r\n\r\nregisterMethods([ 'Element', 'Runner' ], {\r\n // Set font\r\n font: function (a, v) {\r\n if (typeof a === 'object') {\r\n for (v in a) this.font(v, a[v])\r\n }\r\n\r\n return a === 'leading'\r\n ? this.leading(v)\r\n : a === 'anchor'\r\n ? this.attr('text-anchor', v)\r\n : a === 'size' || a === 'family' || a === 'weight' || a === 'stretch' || a === 'variant' || a === 'style'\r\n ? this.attr('font-' + a, v)\r\n : this.attr(a, v)\r\n }\r\n})\r\n\r\nregisterMethods('Text', {\r\n ax (x) {\r\n return this.attr('x', x)\r\n },\r\n ay (y) {\r\n return this.attr('y', y)\r\n },\r\n amove (x, y) {\r\n return this.ax(x).ay(y)\r\n }\r\n})\r\n\r\n// Add events to elements\r\nconst methods = [ 'click',\r\n 'dblclick',\r\n 'mousedown',\r\n 'mouseup',\r\n 'mouseover',\r\n 'mouseout',\r\n 'mousemove',\r\n 'mouseenter',\r\n 'mouseleave',\r\n 'touchstart',\r\n 'touchmove',\r\n 'touchleave',\r\n 'touchend',\r\n 'touchcancel' ].reduce(function (last, event) {\r\n // add event to Element\r\n const fn = function (f) {\r\n if (f === null) {\r\n off(this, event)\r\n } else {\r\n on(this, event, f)\r\n }\r\n return this\r\n }\r\n\r\n last[event] = fn\r\n return last\r\n}, {})\r\n\r\nregisterMethods('Element', methods)\r\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}","import defineProperty from \"./defineProperty\";\nexport default function _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}","import { getOrigin } from '../../utils/utils.js'\r\nimport { delimiter, transforms } from '../core/regex.js'\r\nimport { registerMethods } from '../../utils/methods.js'\r\nimport Matrix from '../../types/Matrix.js'\r\n\r\n// Reset all transformations\r\nexport function untransform () {\r\n return this.attr('transform', null)\r\n}\r\n\r\n// merge the whole transformation chain into one matrix and returns it\r\nexport function matrixify () {\r\n var matrix = (this.attr('transform') || '')\r\n // split transformations\r\n .split(transforms).slice(0, -1).map(function (str) {\r\n // generate key => value pairs\r\n var kv = str.trim().split('(')\r\n return [ kv[0],\r\n kv[1].split(delimiter)\r\n .map(function (str) {\r\n return parseFloat(str)\r\n })\r\n ]\r\n })\r\n .reverse()\r\n // merge every transformation into one matrix\r\n .reduce(function (matrix, transform) {\r\n if (transform[0] === 'matrix') {\r\n return matrix.lmultiply(Matrix.fromArray(transform[1]))\r\n }\r\n return matrix[transform[0]].apply(matrix, transform[1])\r\n }, new Matrix())\r\n\r\n return matrix\r\n}\r\n\r\n// add an element to another parent without changing the visual representation on the screen\r\nexport function toParent (parent) {\r\n if (this === parent) return this\r\n var ctm = this.screenCTM()\r\n var pCtm = parent.screenCTM().inverse()\r\n\r\n this.addTo(parent).untransform().transform(pCtm.multiply(ctm))\r\n\r\n return this\r\n}\r\n\r\n// same as above with parent equals root-svg\r\nexport function toRoot () {\r\n return this.toParent(this.root())\r\n}\r\n\r\n// Add transformations\r\nexport function transform (o, relative) {\r\n // Act as a getter if no object was passed\r\n if (o == null || typeof o === 'string') {\r\n var decomposed = new Matrix(this).decompose()\r\n return decomposed[o] || decomposed\r\n }\r\n\r\n if (!Matrix.isMatrixLike(o)) {\r\n // Set the origin according to the defined transform\r\n o = { ...o, origin: getOrigin(o, this) }\r\n }\r\n\r\n // The user can pass a boolean, an Element or an Matrix or nothing\r\n var cleanRelative = relative === true ? this : (relative || false)\r\n var result = new Matrix(cleanRelative).transform(o)\r\n return this.attr('transform', result)\r\n}\r\n\r\nregisterMethods('Element', {\r\n untransform, matrixify, toParent, toRoot, transform\r\n})\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\n// Radius x value\r\nexport function rx (rx) {\r\n return this.attr('rx', rx)\r\n}\r\n\r\n// Radius y value\r\nexport function ry (ry) {\r\n return this.attr('ry', ry)\r\n}\r\n\r\n// Move over x-axis\r\nexport function x (x) {\r\n return x == null\r\n ? this.cx() - this.rx()\r\n : this.cx(x + this.rx())\r\n}\r\n\r\n// Move over y-axis\r\nexport function y (y) {\r\n return y == null\r\n ? this.cy() - this.ry()\r\n : this.cy(y + this.ry())\r\n}\r\n\r\n// Move by center over x-axis\r\nexport function cx (x) {\r\n return x == null\r\n ? this.attr('cx')\r\n : this.attr('cx', x)\r\n}\r\n\r\n// Move by center over y-axis\r\nexport function cy (y) {\r\n return y == null\r\n ? this.attr('cy')\r\n : this.attr('cy', y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n return width == null\r\n ? this.rx() * 2\r\n : this.rx(new SVGNumber(width).divide(2))\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n return height == null\r\n ? this.ry() * 2\r\n : this.ry(new SVGNumber(height).divide(2))\r\n}\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Shape extends Element {}\r\n\r\nregister(Shape)\r\n","import { cx, cy, height, width, x, y } from '../modules/core/circled.js'\r\nimport {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Circle extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('circle', node), node)\r\n }\r\n\r\n radius (r) {\r\n return this.attr('r', r)\r\n }\r\n\r\n // Radius x value\r\n rx (rx) {\r\n return this.attr('r', rx)\r\n }\r\n\r\n // Alias radius x value\r\n ry (ry) {\r\n return this.rx(ry)\r\n }\r\n\r\n size (size) {\r\n return this.radius(new SVGNumber(size).divide(2))\r\n }\r\n}\r\n\r\nextend(Circle, { x, y, cx, cy, width, height })\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create circle element\r\n circle: wrapWithAttrCheck(function (size) {\r\n return this.put(new Circle())\r\n .size(size)\r\n .move(0, 0)\r\n })\r\n }\r\n})\r\n\r\nregister(Circle)\r\n","import { register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\n\r\nexport default class Container extends Element {\r\n flatten (parent) {\r\n this.each(function () {\r\n if (this instanceof Container) return this.flatten(parent).ungroup(parent)\r\n return this.toParent(parent)\r\n })\r\n\r\n // we need this so that the root does not get removed\r\n this.node.firstElementChild || this.remove()\r\n\r\n return this\r\n }\r\n\r\n ungroup (parent) {\r\n parent = parent || this.parent()\r\n\r\n this.each(function () {\r\n return this.toParent(parent)\r\n })\r\n\r\n this.remove()\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Container)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Defs extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('defs', node), node)\r\n }\r\n\r\n flatten () {\r\n return this\r\n }\r\n ungroup () {\r\n return this\r\n }\r\n}\r\n\r\nregister(Defs)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport * as circled from '../modules/core/circled.js'\r\n\r\nexport default class Ellipse extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('ellipse', node), node)\r\n }\r\n\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n\r\n return this\r\n .rx(new SVGNumber(p.width).divide(2))\r\n .ry(new SVGNumber(p.height).divide(2))\r\n }\r\n}\r\n\r\nextend(Ellipse, circled)\r\n\r\nregisterMethods('Container', {\r\n // Create an ellipse\r\n ellipse: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Ellipse()).size(width, height).move(0, 0)\r\n })\r\n})\r\n\r\nregister(Ellipse)\r\n","import { nodeOrNew, register } from '../utils/adopter.js'\r\nimport Element from './Element.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Stop extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('stop', node), node)\r\n }\r\n\r\n // add color stops\r\n update (o) {\r\n if (typeof o === 'number' || o instanceof SVGNumber) {\r\n o = {\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n }\r\n }\r\n\r\n // set attributes\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', new SVGNumber(o.offset))\r\n\r\n return this\r\n }\r\n}\r\n\r\nregister(Stop)\r\n","import SVGNumber from '../../types/SVGNumber.js'\r\n\r\nexport function from (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ fx: new SVGNumber(x), fy: new SVGNumber(y) })\r\n : this.attr({ x1: new SVGNumber(x), y1: new SVGNumber(y) })\r\n}\r\n\r\nexport function to (x, y) {\r\n return (this._element || this).type === 'radialGradient'\r\n ? this.attr({ cx: new SVGNumber(x), cy: new SVGNumber(y) })\r\n : this.attr({ x2: new SVGNumber(x), y2: new SVGNumber(y) })\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport Stop from './Stop.js'\r\nimport baseFind from '../modules/core/selector.js'\r\nimport * as gradiented from '../modules/core/gradiented.js'\r\n\r\nexport default class Gradient extends Container {\r\n constructor (type, attrs) {\r\n super(\r\n nodeOrNew(type + 'Gradient', typeof type === 'string' ? null : type),\r\n attrs\r\n )\r\n }\r\n\r\n // Add a color stop\r\n stop (offset, color, opacity) {\r\n return this.put(new Stop()).update(offset, color, opacity)\r\n }\r\n\r\n // Update gradient\r\n update (block) {\r\n // remove all stops\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'gradientTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nextend(Gradient, gradiented)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create gradient element in defs\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.defs().gradient(type, block)\r\n })\r\n },\r\n // define gradient\r\n Defs: {\r\n gradient: wrapWithAttrCheck(function (type, block) {\r\n return this.put(new Gradient(type)).update(block)\r\n })\r\n }\r\n})\r\n\r\nregister(Gradient)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Box from '../types/Box.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Pattern extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('pattern', node), node)\r\n }\r\n\r\n // Return the fill id\r\n url () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n\r\n // Update pattern by rebuilding\r\n update (block) {\r\n // remove content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Alias string convertion to fill\r\n toString () {\r\n return this.url()\r\n }\r\n\r\n // custom attr to handle transform\r\n attr (a, b, c) {\r\n if (a === 'transform') a = 'patternTransform'\r\n return super.attr(a, b, c)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [fill*=\"' + this.id() + '\"]')\r\n }\r\n\r\n bbox () {\r\n return new Box()\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create pattern element in defs\r\n pattern (...args) {\r\n return this.defs().pattern(...args)\r\n }\r\n },\r\n Defs: {\r\n pattern: wrapWithAttrCheck(function (width, height, block) {\r\n return this.put(new Pattern()).update(block).attr({\r\n x: 0,\r\n y: 0,\r\n width: width,\r\n height: height,\r\n patternUnits: 'userSpaceOnUse'\r\n })\r\n })\r\n }\r\n})\r\n\r\nregister(Pattern)\r\n","import { isImage } from '../modules/core/regex.js'\r\nimport { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { off, on } from '../modules/core/event.js'\r\nimport { registerAttrHook } from '../modules/core/attr.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Pattern from './Pattern.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Image extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('image', node), node)\r\n }\r\n\r\n // (re)load image\r\n load (url, callback) {\r\n if (!url) return this\r\n\r\n var img = new globals.window.Image()\r\n\r\n on(img, 'load', function (e) {\r\n var p = this.parent(Pattern)\r\n\r\n // ensure image size\r\n if (this.width() === 0 && this.height() === 0) {\r\n this.size(img.width, img.height)\r\n }\r\n\r\n if (p instanceof Pattern) {\r\n // ensure pattern size if not set\r\n if (p.width() === 0 && p.height() === 0) {\r\n p.size(this.width(), this.height())\r\n }\r\n }\r\n\r\n if (typeof callback === 'function') {\r\n callback.call(this, e)\r\n }\r\n }, this)\r\n\r\n on(img, 'load error', function () {\r\n // dont forget to unbind memory leaking events\r\n off(img)\r\n })\r\n\r\n return this.attr('href', (img.src = url), xlink)\r\n }\r\n}\r\n\r\nregisterAttrHook(function (attr, val, _this) {\r\n // convert image fill and stroke to patterns\r\n if (attr === 'fill' || attr === 'stroke') {\r\n if (isImage.test(val)) {\r\n val = _this.root().defs().image(val)\r\n }\r\n }\r\n\r\n if (val instanceof Image) {\r\n val = _this.root().defs().pattern(0, 0, (pattern) => {\r\n pattern.add(val)\r\n })\r\n }\r\n\r\n return val\r\n})\r\n\r\nregisterMethods({\r\n Container: {\r\n // create image element, load image and set its size\r\n image: wrapWithAttrCheck(function (source, callback) {\r\n return this.put(new Image()).size(0, 0).load(source, callback)\r\n })\r\n }\r\n})\r\n\r\nregister(Image)\r\n","import { delimiter } from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport SVGArray from './SVGArray.js'\r\n\r\nconst PointArray = subClassArray('PointArray', SVGArray)\r\n\r\nexport default PointArray\r\n\r\nextend(PointArray, {\r\n // Convert array to string\r\n toString () {\r\n // convert to a poly point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push(this[i].join(','))\r\n }\r\n\r\n return array.join(' ')\r\n },\r\n\r\n // Convert array to line object\r\n toLine () {\r\n return {\r\n x1: this[0][0],\r\n y1: this[0][1],\r\n x2: this[1][0],\r\n y2: this[1][1]\r\n }\r\n },\r\n\r\n // Get morphed array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n // generate morphed point string\r\n for (var i = 0, il = this.length, array = []; i < il; i++) {\r\n array.push([\r\n this[i][0] + (this.destination[i][0] - this[i][0]) * pos,\r\n this[i][1] + (this.destination[i][1] - this[i][1]) * pos\r\n ])\r\n }\r\n\r\n return new PointArray(array)\r\n },\r\n\r\n // Parse point string and flat array\r\n parse (array = [ [ 0, 0 ] ]) {\r\n var points = []\r\n\r\n // if it is an array\r\n if (array instanceof Array) {\r\n // and it is not flat, there is no need to parse it\r\n if (array[0] instanceof Array) {\r\n return array\r\n }\r\n } else { // Else, it is considered as a string\r\n // parse points\r\n array = array.trim().split(delimiter).map(parseFloat)\r\n }\r\n\r\n // validate points - https://svgwg.org/svg2-draft/shapes.html#DataTypePoints\r\n // Odd number of coordinates is an error. In such cases, drop the last odd coordinate.\r\n if (array.length % 2 !== 0) array.pop()\r\n\r\n // wrap points in two-tuples and parse points as floats\r\n for (var i = 0, len = array.length; i < len; i = i + 2) {\r\n points.push([ array[i], array[i + 1] ])\r\n }\r\n\r\n return points\r\n },\r\n\r\n // Move point string\r\n move (x, y) {\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n // move every point\r\n if (!isNaN(x) && !isNaN(y)) {\r\n for (var i = this.length - 1; i >= 0; i--) {\r\n this[i] = [ this[i][0] + x, this[i][1] + y ]\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize poly string\r\n size (width, height) {\r\n var i\r\n var box = this.bbox()\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n if (box.width) this[i][0] = ((this[i][0] - box.x) * width) / box.width + box.x\r\n if (box.height) this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get bounding box of points\r\n bbox () {\r\n var maxX = -Infinity\r\n var maxY = -Infinity\r\n var minX = Infinity\r\n var minY = Infinity\r\n this.forEach(function (el) {\r\n maxX = Math.max(el[0], maxX)\r\n maxY = Math.max(el[1], maxY)\r\n minX = Math.min(el[0], minX)\r\n minY = Math.min(el[1], minY)\r\n })\r\n return { x: minX, y: minY, width: maxX - minX, height: maxY - minY }\r\n }\r\n})\r\n","import PointArray from '../../types/PointArray.js'\r\n\r\nexport let MorphArray = PointArray\r\n\r\n// Move by left top corner over x-axis\r\nexport function x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n}\r\n\r\n// Move by left top corner over y-axis\r\nexport function y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n}\r\n\r\n// Set width of element\r\nexport function width (width) {\r\n let b = this.bbox()\r\n return width == null ? b.width : this.size(width, b.height)\r\n}\r\n\r\n// Set height of element\r\nexport function height (height) {\r\n let b = this.bbox()\r\n return height == null ? b.height : this.size(b.width, height)\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\n\r\nexport default class Line extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('line', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return new PointArray([\r\n [ this.attr('x1'), this.attr('y1') ],\r\n [ this.attr('x2'), this.attr('y2') ]\r\n ])\r\n }\r\n\r\n // Overwrite native plot() method\r\n plot (x1, y1, x2, y2) {\r\n if (x1 == null) {\r\n return this.array()\r\n } else if (typeof y1 !== 'undefined') {\r\n x1 = { x1: x1, y1: y1, x2: x2, y2: y2 }\r\n } else {\r\n x1 = new PointArray(x1).toLine()\r\n }\r\n\r\n return this.attr(x1)\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr(this.array().move(x, y).toLine())\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr(this.array().size(p.width, p.height).toLine())\r\n }\r\n}\r\n\r\nextend(Line, pointed)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a line element\r\n line: wrapWithAttrCheck(function (...args) {\r\n // make sure plot is called as a setter\r\n // x1 is not necessarily a number, it can also be an array, a string and a PointArray\r\n return Line.prototype.plot.apply(\r\n this.put(new Line())\r\n , args[0] != null ? args : [ 0, 0, 0, 0 ]\r\n )\r\n })\r\n }\r\n})\r\n\r\nregister(Line)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Marker extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('marker', node), node)\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return this.attr('markerWidth', width)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return this.attr('markerHeight', height)\r\n }\r\n\r\n // Set marker refX and refY\r\n ref (x, y) {\r\n return this.attr('refX', x).attr('refY', y)\r\n }\r\n\r\n // Update marker\r\n update (block) {\r\n // remove all content\r\n this.clear()\r\n\r\n // invoke passed block\r\n if (typeof block === 'function') {\r\n block.call(this, this)\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Return the fill id\r\n toString () {\r\n return 'url(#' + this.id() + ')'\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n marker (...args) {\r\n // Create marker element in defs\r\n return this.defs().marker(...args)\r\n }\r\n },\r\n Defs: {\r\n // Create marker\r\n marker: wrapWithAttrCheck(function (width, height, block) {\r\n // Set default viewbox to match the width and height, set ref to cx and cy and set orient to auto\r\n return this.put(new Marker())\r\n .size(width, height)\r\n .ref(width / 2, height / 2)\r\n .viewbox(0, 0, width, height)\r\n .attr('orient', 'auto')\r\n .update(block)\r\n })\r\n },\r\n marker: {\r\n // Create and attach markers\r\n marker (marker, width, height, block) {\r\n var attr = [ 'marker' ]\r\n\r\n // Build attribute name\r\n if (marker !== 'all') attr.push(marker)\r\n attr = attr.join('-')\r\n\r\n // Set marker attribute\r\n marker = arguments[1] instanceof Marker\r\n ? arguments[1]\r\n : this.defs().marker(width, height, block)\r\n\r\n return this.attr(attr, marker)\r\n }\r\n }\r\n})\r\n\r\nregister(Marker)\r\n","// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nvar global = module.exports = typeof window != 'undefined' && window.Math == Math\n ? window : typeof self != 'undefined' && self.Math == Math ? self\n // eslint-disable-next-line no-new-func\n : Function('return this')();\nif (typeof __g == 'number') __g = global; // eslint-disable-line no-undef\n","var core = module.exports = { version: '2.5.7' };\nif (typeof __e == 'number') __e = core; // eslint-disable-line no-undef\n","module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n","var isObject = require('./_is-object');\nmodule.exports = function (it) {\n if (!isObject(it)) throw TypeError(it + ' is not an object!');\n return it;\n};\n","module.exports = function (exec) {\n try {\n return !!exec();\n } catch (e) {\n return true;\n }\n};\n","// Thank's IE8 for his funny defineProperty\nmodule.exports = !require('./_fails')(function () {\n return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;\n});\n","var isObject = require('./_is-object');\nvar document = require('./_global').document;\n// typeof document.createElement is 'object' in old IE\nvar is = isObject(document) && isObject(document.createElement);\nmodule.exports = function (it) {\n return is ? document.createElement(it) : {};\n};\n","module.exports = !require('./_descriptors') && !require('./_fails')(function () {\n return Object.defineProperty(require('./_dom-create')('div'), 'a', { get: function () { return 7; } }).a != 7;\n});\n","// 7.1.1 ToPrimitive(input [, PreferredType])\nvar isObject = require('./_is-object');\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (it, S) {\n if (!isObject(it)) return it;\n var fn, val;\n if (S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n if (typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it))) return val;\n if (!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n","var anObject = require('./_an-object');\nvar IE8_DOM_DEFINE = require('./_ie8-dom-define');\nvar toPrimitive = require('./_to-primitive');\nvar dP = Object.defineProperty;\n\nexports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return dP(O, P, Attributes);\n } catch (e) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n","module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n","var dP = require('./_object-dp');\nvar createDesc = require('./_property-desc');\nmodule.exports = require('./_descriptors') ? function (object, key, value) {\n return dP.f(object, key, createDesc(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n","var hasOwnProperty = {}.hasOwnProperty;\nmodule.exports = function (it, key) {\n return hasOwnProperty.call(it, key);\n};\n","var id = 0;\nvar px = Math.random();\nmodule.exports = function (key) {\n return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36));\n};\n","var global = require('./_global');\nvar hide = require('./_hide');\nvar has = require('./_has');\nvar SRC = require('./_uid')('src');\nvar TO_STRING = 'toString';\nvar $toString = Function[TO_STRING];\nvar TPL = ('' + $toString).split(TO_STRING);\n\nrequire('./_core').inspectSource = function (it) {\n return $toString.call(it);\n};\n\n(module.exports = function (O, key, val, safe) {\n var isFunction = typeof val == 'function';\n if (isFunction) has(val, 'name') || hide(val, 'name', key);\n if (O[key] === val) return;\n if (isFunction) has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key)));\n if (O === global) {\n O[key] = val;\n } else if (!safe) {\n delete O[key];\n hide(O, key, val);\n } else if (O[key]) {\n O[key] = val;\n } else {\n hide(O, key, val);\n }\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, TO_STRING, function toString() {\n return typeof this == 'function' && this[SRC] || $toString.call(this);\n});\n","module.exports = function (it) {\n if (typeof it != 'function') throw TypeError(it + ' is not a function!');\n return it;\n};\n","// optional / simple context binding\nvar aFunction = require('./_a-function');\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n","var global = require('./_global');\nvar core = require('./_core');\nvar hide = require('./_hide');\nvar redefine = require('./_redefine');\nvar ctx = require('./_ctx');\nvar PROTOTYPE = 'prototype';\n\nvar $export = function (type, name, source) {\n var IS_FORCED = type & $export.F;\n var IS_GLOBAL = type & $export.G;\n var IS_STATIC = type & $export.S;\n var IS_PROTO = type & $export.P;\n var IS_BIND = type & $export.B;\n var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE];\n var exports = IS_GLOBAL ? core : core[name] || (core[name] = {});\n var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {});\n var key, own, out, exp;\n if (IS_GLOBAL) source = name;\n for (key in source) {\n // contains in native\n own = !IS_FORCED && target && target[key] !== undefined;\n // export native or passed\n out = (own ? target : source)[key];\n // bind timers to global for call from export context\n exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;\n // extend global\n if (target) redefine(target, key, out, type & $export.U);\n // export\n if (exports[key] != out) hide(exports, key, exp);\n if (IS_PROTO && expProto[key] != out) expProto[key] = out;\n }\n};\nglobal.core = core;\n// type bitmap\n$export.F = 1; // forced\n$export.G = 2; // global\n$export.S = 4; // static\n$export.P = 8; // proto\n$export.B = 16; // bind\n$export.W = 32; // wrap\n$export.U = 64; // safe\n$export.R = 128; // real proto method for `library`\nmodule.exports = $export;\n","// 7.2.1 RequireObjectCoercible(argument)\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n","// 7.1.13 ToObject(argument)\nvar defined = require('./_defined');\nmodule.exports = function (it) {\n return Object(defined(it));\n};\n","'use strict';\nvar fails = require('./_fails');\n\nmodule.exports = function (method, arg) {\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call\n arg ? method.call(null, function () { /* empty */ }, 1) : method.call(null);\n });\n};\n","'use strict';\nvar $export = require('./_export');\nvar aFunction = require('./_a-function');\nvar toObject = require('./_to-object');\nvar fails = require('./_fails');\nvar $sort = [].sort;\nvar test = [1, 2, 3];\n\n$export($export.P + $export.F * (fails(function () {\n // IE8-\n test.sort(undefined);\n}) || !fails(function () {\n // V8 bug\n test.sort(null);\n // Old WebKit\n}) || !require('./_strict-method')($sort)), 'Array', {\n // 22.1.3.25 Array.prototype.sort(comparefn)\n sort: function sort(comparefn) {\n return comparefn === undefined\n ? $sort.call(toObject(this))\n : $sort.call(toObject(this), aFunction(comparefn));\n }\n});\n","import { timeline } from '../modules/core/defaults.js'\r\nimport { extend } from '../utils/adopter.js'\r\n\r\n/***\r\nBase Class\r\n==========\r\nThe base stepper class that will be\r\n***/\r\n\r\nfunction makeSetterGetter (k, f) {\r\n return function (v) {\r\n if (v == null) return this[v]\r\n this[k] = v\r\n if (f) f.call(this)\r\n return this\r\n }\r\n}\r\n\r\nexport let easing = {\r\n '-': function (pos) {\r\n return pos\r\n },\r\n '<>': function (pos) {\r\n return -Math.cos(pos * Math.PI) / 2 + 0.5\r\n },\r\n '>': function (pos) {\r\n return Math.sin(pos * Math.PI / 2)\r\n },\r\n '<': function (pos) {\r\n return -Math.cos(pos * Math.PI / 2) + 1\r\n },\r\n bezier: function (x1, y1, x2, y2) {\r\n // see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo\r\n return function (t) {\r\n if (t < 0) {\r\n if (x1 > 0) {\r\n return y1 / x1 * t\r\n } else if (x2 > 0) {\r\n return y2 / x2 * t\r\n } else {\r\n return 0\r\n }\r\n } else if (t > 1) {\r\n if (x2 < 1) {\r\n return (1 - y2) / (1 - x2) * t + (y2 - x2) / (1 - x2)\r\n } else if (x1 < 1) {\r\n return (1 - y1) / (1 - x1) * t + (y1 - x1) / (1 - x1)\r\n } else {\r\n return 1\r\n }\r\n } else {\r\n return 3 * t * (1 - t) ** 2 * y1 + 3 * t ** 2 * (1 - t) * y2 + t ** 3\r\n }\r\n }\r\n },\r\n // see https://www.w3.org/TR/css-easing-1/#step-timing-function-algo\r\n steps: function (steps, stepPosition = 'end') {\r\n // deal with \"jump-\" prefix\r\n stepPosition = stepPosition.split('-').reverse()[0]\r\n\r\n let jumps = steps\r\n if (stepPosition === 'none') {\r\n --jumps\r\n } else if (stepPosition === 'both') {\r\n ++jumps\r\n }\r\n\r\n // The beforeFlag is essentially useless\r\n return (t, beforeFlag = false) => {\r\n // Step is called currentStep in referenced url\r\n let step = Math.floor(t * steps)\r\n const jumping = (t * step) % 1 === 0\r\n\r\n if (stepPosition === 'start' || stepPosition === 'both') {\r\n ++step\r\n }\r\n\r\n if (beforeFlag && jumping) {\r\n --step\r\n }\r\n\r\n if (t >= 0 && step < 0) {\r\n step = 0\r\n }\r\n\r\n if (t <= 1 && step > jumps) {\r\n step = jumps\r\n }\r\n\r\n return step / jumps\r\n }\r\n }\r\n}\r\n\r\nexport class Stepper {\r\n done () {\r\n return false\r\n }\r\n}\r\n\r\n/***\r\nEasing Functions\r\n================\r\n***/\r\n\r\nexport class Ease extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.ease = easing[fn || timeline.ease] || fn\r\n }\r\n\r\n step (from, to, pos) {\r\n if (typeof from !== 'number') {\r\n return pos < 1 ? from : to\r\n }\r\n return from + (to - from) * this.ease(pos)\r\n }\r\n}\r\n\r\n/***\r\nController Types\r\n================\r\n***/\r\n\r\nexport class Controller extends Stepper {\r\n constructor (fn) {\r\n super()\r\n this.stepper = fn\r\n }\r\n\r\n step (current, target, dt, c) {\r\n return this.stepper(current, target, dt, c)\r\n }\r\n\r\n done (c) {\r\n return c.done\r\n }\r\n}\r\n\r\nfunction recalculate () {\r\n // Apply the default parameters\r\n var duration = (this._duration || 500) / 1000\r\n var overshoot = this._overshoot || 0\r\n\r\n // Calculate the PID natural response\r\n var eps = 1e-10\r\n var pi = Math.PI\r\n var os = Math.log(overshoot / 100 + eps)\r\n var zeta = -os / Math.sqrt(pi * pi + os * os)\r\n var wn = 3.9 / (zeta * duration)\r\n\r\n // Calculate the Spring values\r\n this.d = 2 * zeta * wn\r\n this.k = wn * wn\r\n}\r\n\r\nexport class Spring extends Controller {\r\n constructor (duration, overshoot) {\r\n super()\r\n this.duration(duration || 500)\r\n .overshoot(overshoot || 0)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n if (dt > 100) dt = 16\r\n\r\n dt /= 1000\r\n\r\n // Get the previous velocity\r\n var velocity = c.velocity || 0\r\n\r\n // Apply the control to get the new position and store it\r\n var acceleration = -this.d * velocity - this.k * (current - target)\r\n var newPosition = current\r\n + velocity * dt\r\n + acceleration * dt * dt / 2\r\n\r\n // Store the velocity\r\n c.velocity = velocity + acceleration * dt\r\n\r\n // Figure out if we have converged, and if so, pass the value\r\n c.done = Math.abs(target - newPosition) + Math.abs(velocity) < 0.002\r\n return c.done ? target : newPosition\r\n }\r\n}\r\n\r\nextend(Spring, {\r\n duration: makeSetterGetter('_duration', recalculate),\r\n overshoot: makeSetterGetter('_overshoot', recalculate)\r\n})\r\n\r\nexport class PID extends Controller {\r\n constructor (p, i, d, windup) {\r\n super()\r\n\r\n p = p == null ? 0.1 : p\r\n i = i == null ? 0.01 : i\r\n d = d == null ? 0 : d\r\n windup = windup == null ? 1000 : windup\r\n this.p(p).i(i).d(d).windup(windup)\r\n }\r\n\r\n step (current, target, dt, c) {\r\n if (typeof current === 'string') return current\r\n c.done = dt === Infinity\r\n\r\n if (dt === Infinity) return target\r\n if (dt === 0) return current\r\n\r\n var p = target - current\r\n var i = (c.integral || 0) + p * dt\r\n var d = (p - (c.error || 0)) / dt\r\n var windup = this.windup\r\n\r\n // antiwindup\r\n if (windup !== false) {\r\n i = Math.max(-windup, Math.min(i, windup))\r\n }\r\n\r\n c.error = p\r\n c.integral = i\r\n\r\n c.done = Math.abs(p) < 0.001\r\n\r\n return c.done ? target : current + (this.P * p + this.I * i + this.D * d)\r\n }\r\n}\r\n\r\nextend(PID, {\r\n windup: makeSetterGetter('windup'),\r\n p: makeSetterGetter('P'),\r\n i: makeSetterGetter('I'),\r\n d: makeSetterGetter('D')\r\n})\r\n","import {\r\n delimiter,\r\n dots,\r\n hyphen,\r\n isPathLetter,\r\n numbersWithDots,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { subClassArray } from './ArrayPolyfill.js'\r\nimport Point from './Point.js'\r\nimport SVGArray from './SVGArray.js'\r\nimport parser from '../modules/core/parser.js'\r\n\r\nconst PathArray = subClassArray('PathArray', SVGArray)\r\n\r\nexport default PathArray\r\n\r\nexport function pathRegReplace (a, b, c, d) {\r\n return c + d.replace(dots, ' .')\r\n}\r\n\r\nfunction arrayToString (a) {\r\n for (var i = 0, il = a.length, s = ''; i < il; i++) {\r\n s += a[i][0]\r\n\r\n if (a[i][1] != null) {\r\n s += a[i][1]\r\n\r\n if (a[i][2] != null) {\r\n s += ' '\r\n s += a[i][2]\r\n\r\n if (a[i][3] != null) {\r\n s += ' '\r\n s += a[i][3]\r\n s += ' '\r\n s += a[i][4]\r\n\r\n if (a[i][5] != null) {\r\n s += ' '\r\n s += a[i][5]\r\n s += ' '\r\n s += a[i][6]\r\n\r\n if (a[i][7] != null) {\r\n s += ' '\r\n s += a[i][7]\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n return s + ' '\r\n}\r\n\r\nconst pathHandlers = {\r\n M: function (c, p, p0) {\r\n p.x = p0.x = c[0]\r\n p.y = p0.y = c[1]\r\n\r\n return [ 'M', p.x, p.y ]\r\n },\r\n L: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return [ 'L', c[0], c[1] ]\r\n },\r\n H: function (c, p) {\r\n p.x = c[0]\r\n return [ 'H', c[0] ]\r\n },\r\n V: function (c, p) {\r\n p.y = c[0]\r\n return [ 'V', c[0] ]\r\n },\r\n C: function (c, p) {\r\n p.x = c[4]\r\n p.y = c[5]\r\n return [ 'C', c[0], c[1], c[2], c[3], c[4], c[5] ]\r\n },\r\n S: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return [ 'S', c[0], c[1], c[2], c[3] ]\r\n },\r\n Q: function (c, p) {\r\n p.x = c[2]\r\n p.y = c[3]\r\n return [ 'Q', c[0], c[1], c[2], c[3] ]\r\n },\r\n T: function (c, p) {\r\n p.x = c[0]\r\n p.y = c[1]\r\n return [ 'T', c[0], c[1] ]\r\n },\r\n Z: function (c, p, p0) {\r\n p.x = p0.x\r\n p.y = p0.y\r\n return [ 'Z' ]\r\n },\r\n A: function (c, p) {\r\n p.x = c[5]\r\n p.y = c[6]\r\n return [ 'A', c[0], c[1], c[2], c[3], c[4], c[5], c[6] ]\r\n }\r\n}\r\n\r\nlet mlhvqtcsaz = 'mlhvqtcsaz'.split('')\r\n\r\nfor (var i = 0, il = mlhvqtcsaz.length; i < il; ++i) {\r\n pathHandlers[mlhvqtcsaz[i]] = (function (i) {\r\n return function (c, p, p0) {\r\n if (i === 'H') c[0] = c[0] + p.x\r\n else if (i === 'V') c[0] = c[0] + p.y\r\n else if (i === 'A') {\r\n c[5] = c[5] + p.x\r\n c[6] = c[6] + p.y\r\n } else {\r\n for (var j = 0, jl = c.length; j < jl; ++j) {\r\n c[j] = c[j] + (j % 2 ? p.y : p.x)\r\n }\r\n }\r\n\r\n return pathHandlers[i](c, p, p0)\r\n }\r\n })(mlhvqtcsaz[i].toUpperCase())\r\n}\r\n\r\nextend(PathArray, {\r\n // Convert array to string\r\n toString () {\r\n return arrayToString(this)\r\n },\r\n\r\n // Move path string\r\n move (x, y) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n\r\n // get relative offset\r\n x -= box.x\r\n y -= box.y\r\n\r\n if (!isNaN(x) && !isNaN(y)) {\r\n // move every point\r\n for (var l, i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n } else if (l === 'H') {\r\n this[i][1] += x\r\n } else if (l === 'V') {\r\n this[i][1] += y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] += x\r\n this[i][2] += y\r\n this[i][3] += x\r\n this[i][4] += y\r\n\r\n if (l === 'C') {\r\n this[i][5] += x\r\n this[i][6] += y\r\n }\r\n } else if (l === 'A') {\r\n this[i][6] += x\r\n this[i][7] += y\r\n }\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Resize path string\r\n size (width, height) {\r\n // get bounding box of current situation\r\n var box = this.bbox()\r\n var i, l\r\n\r\n // recalculate position of all points according to new size\r\n for (i = this.length - 1; i >= 0; i--) {\r\n l = this[i][0]\r\n\r\n if (l === 'M' || l === 'L' || l === 'T') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n } else if (l === 'H') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n } else if (l === 'V') {\r\n this[i][1] = ((this[i][1] - box.y) * height) / box.height + box.y\r\n } else if (l === 'C' || l === 'S' || l === 'Q') {\r\n this[i][1] = ((this[i][1] - box.x) * width) / box.width + box.x\r\n this[i][2] = ((this[i][2] - box.y) * height) / box.height + box.y\r\n this[i][3] = ((this[i][3] - box.x) * width) / box.width + box.x\r\n this[i][4] = ((this[i][4] - box.y) * height) / box.height + box.y\r\n\r\n if (l === 'C') {\r\n this[i][5] = ((this[i][5] - box.x) * width) / box.width + box.x\r\n this[i][6] = ((this[i][6] - box.y) * height) / box.height + box.y\r\n }\r\n } else if (l === 'A') {\r\n // resize radii\r\n this[i][1] = (this[i][1] * width) / box.width\r\n this[i][2] = (this[i][2] * height) / box.height\r\n\r\n // move position values\r\n this[i][6] = ((this[i][6] - box.x) * width) / box.width + box.x\r\n this[i][7] = ((this[i][7] - box.y) * height) / box.height + box.y\r\n }\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Test if the passed path array use the same path data commands as this path array\r\n equalCommands (pathArray) {\r\n var i, il, equalCommands\r\n\r\n pathArray = new PathArray(pathArray)\r\n\r\n equalCommands = this.length === pathArray.length\r\n for (i = 0, il = this.length; equalCommands && i < il; i++) {\r\n equalCommands = this[i][0] === pathArray[i][0]\r\n }\r\n\r\n return equalCommands\r\n },\r\n\r\n // Make path array morphable\r\n morph (pathArray) {\r\n pathArray = new PathArray(pathArray)\r\n\r\n if (this.equalCommands(pathArray)) {\r\n this.destination = pathArray\r\n } else {\r\n this.destination = null\r\n }\r\n\r\n return this\r\n },\r\n\r\n // Get morphed path array at given position\r\n at (pos) {\r\n // make sure a destination is defined\r\n if (!this.destination) return this\r\n\r\n var sourceArray = this\r\n var destinationArray = this.destination.value\r\n var array = []\r\n var pathArray = new PathArray()\r\n var i, il, j, jl\r\n\r\n // Animate has specified in the SVG spec\r\n // See: https://www.w3.org/TR/SVG11/paths.html#PathElement\r\n for (i = 0, il = sourceArray.length; i < il; i++) {\r\n array[i] = [ sourceArray[i][0] ]\r\n for (j = 1, jl = sourceArray[i].length; j < jl; j++) {\r\n array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos\r\n }\r\n // For the two flags of the elliptical arc command, the SVG spec say:\r\n // Flags and booleans are interpolated as fractions between zero and one, with any non-zero value considered to be a value of one/true\r\n // Elliptical arc command as an array followed by corresponding indexes:\r\n // ['A', rx, ry, x-axis-rotation, large-arc-flag, sweep-flag, x, y]\r\n // 0 1 2 3 4 5 6 7\r\n if (array[i][0] === 'A') {\r\n array[i][4] = +(array[i][4] !== 0)\r\n array[i][5] = +(array[i][5] !== 0)\r\n }\r\n }\r\n\r\n // Directly modify the value of a path array, this is done this way for performance\r\n pathArray.value = array\r\n return pathArray\r\n },\r\n\r\n // Absolutize and parse path to array\r\n parse (array = [ [ 'M', 0, 0 ] ]) {\r\n // if it's already a patharray, no need to parse it\r\n if (array instanceof PathArray) return array\r\n\r\n // prepare for parsing\r\n var s\r\n var paramCnt = { 'M': 2, 'L': 2, 'H': 1, 'V': 1, 'C': 6, 'S': 4, 'Q': 4, 'T': 2, 'A': 7, 'Z': 0 }\r\n\r\n if (typeof array === 'string') {\r\n array = array\r\n .replace(numbersWithDots, pathRegReplace) // convert 45.123.123 to 45.123 .123\r\n .replace(pathLetters, ' $& ') // put some room between letters and numbers\r\n .replace(hyphen, '$1 -') // add space before hyphen\r\n .trim() // trim\r\n .split(delimiter) // split into array\r\n } else {\r\n array = array.reduce(function (prev, curr) {\r\n return [].concat.call(prev, curr)\r\n }, [])\r\n }\r\n\r\n // array now is an array containing all parts of a path e.g. ['M', '0', '0', 'L', '30', '30' ...]\r\n var result = []\r\n var p = new Point()\r\n var p0 = new Point()\r\n var index = 0\r\n var len = array.length\r\n\r\n do {\r\n // Test if we have a path letter\r\n if (isPathLetter.test(array[index])) {\r\n s = array[index]\r\n ++index\r\n // If last letter was a move command and we got no new, it defaults to [L]ine\r\n } else if (s === 'M') {\r\n s = 'L'\r\n } else if (s === 'm') {\r\n s = 'l'\r\n }\r\n\r\n result.push(pathHandlers[s].call(null,\r\n array.slice(index, (index = index + paramCnt[s.toUpperCase()])).map(parseFloat),\r\n p, p0\r\n )\r\n )\r\n } while (len > index)\r\n\r\n return result\r\n },\r\n\r\n // Get bounding box of path\r\n bbox () {\r\n parser().path.setAttribute('d', this.toString())\r\n return parser.nodes.path.getBBox()\r\n }\r\n})\r\n","import { Ease } from './Controller.js'\r\nimport {\r\n delimiter,\r\n numberAndUnit,\r\n pathLetters\r\n} from '../modules/core/regex.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport Color from '../types/Color.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport SVGArray from '../types/SVGArray.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\n\r\nexport default class Morphable {\r\n constructor (stepper) {\r\n this._stepper = stepper || new Ease('-')\r\n\r\n this._from = null\r\n this._to = null\r\n this._type = null\r\n this._context = null\r\n this._morphObj = null\r\n }\r\n\r\n from (val) {\r\n if (val == null) {\r\n return this._from\r\n }\r\n\r\n this._from = this._set(val)\r\n return this\r\n }\r\n\r\n to (val) {\r\n if (val == null) {\r\n return this._to\r\n }\r\n\r\n this._to = this._set(val)\r\n return this\r\n }\r\n\r\n type (type) {\r\n // getter\r\n if (type == null) {\r\n return this._type\r\n }\r\n\r\n // setter\r\n this._type = type\r\n return this\r\n }\r\n\r\n _set (value) {\r\n if (!this._type) {\r\n var type = typeof value\r\n\r\n if (type === 'number') {\r\n this.type(SVGNumber)\r\n } else if (type === 'string') {\r\n if (Color.isColor(value)) {\r\n this.type(Color)\r\n } else if (delimiter.test(value)) {\r\n this.type(pathLetters.test(value)\r\n ? PathArray\r\n : SVGArray\r\n )\r\n } else if (numberAndUnit.test(value)) {\r\n this.type(SVGNumber)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n } else if (morphableTypes.indexOf(value.constructor) > -1) {\r\n this.type(value.constructor)\r\n } else if (Array.isArray(value)) {\r\n this.type(SVGArray)\r\n } else if (type === 'object') {\r\n this.type(ObjectBag)\r\n } else {\r\n this.type(NonMorphable)\r\n }\r\n }\r\n\r\n var result = (new this._type(value))\r\n if (this._type === Color) {\r\n result = this._to ? result[this._to[4]]()\r\n : this._from ? result[this._from[4]]()\r\n : result\r\n }\r\n result = result.toArray()\r\n\r\n this._morphObj = this._morphObj || new this._type()\r\n this._context = this._context\r\n || Array.apply(null, Array(result.length)).map(Object)\r\n return result\r\n }\r\n\r\n stepper (stepper) {\r\n if (stepper == null) return this._stepper\r\n this._stepper = stepper\r\n return this\r\n }\r\n\r\n done () {\r\n var complete = this._context\r\n .map(this._stepper.done)\r\n .reduce(function (last, curr) {\r\n return last && curr\r\n }, true)\r\n return complete\r\n }\r\n\r\n at (pos) {\r\n var _this = this\r\n\r\n return this._morphObj.fromArray(\r\n this._from.map(function (i, index) {\r\n return _this._stepper.step(i, _this._to[index], pos, _this._context[index], _this._context)\r\n })\r\n )\r\n }\r\n}\r\n\r\nexport class NonMorphable {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (val) {\r\n val = Array.isArray(val) ? val[0] : val\r\n this.value = val\r\n return this\r\n }\r\n\r\n valueOf () {\r\n return this.value\r\n }\r\n\r\n toArray () {\r\n return [ this.value ]\r\n }\r\n}\r\n\r\nexport class TransformBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (obj) {\r\n if (Array.isArray(obj)) {\r\n obj = {\r\n scaleX: obj[0],\r\n scaleY: obj[1],\r\n shear: obj[2],\r\n rotate: obj[3],\r\n translateX: obj[4],\r\n translateY: obj[5],\r\n originX: obj[6],\r\n originY: obj[7]\r\n }\r\n }\r\n\r\n Object.assign(this, TransformBag.defaults, obj)\r\n return this\r\n }\r\n\r\n toArray () {\r\n var v = this\r\n\r\n return [\r\n v.scaleX,\r\n v.scaleY,\r\n v.shear,\r\n v.rotate,\r\n v.translateX,\r\n v.translateY,\r\n v.originX,\r\n v.originY\r\n ]\r\n }\r\n}\r\n\r\nTransformBag.defaults = {\r\n scaleX: 1,\r\n scaleY: 1,\r\n shear: 0,\r\n rotate: 0,\r\n translateX: 0,\r\n translateY: 0,\r\n originX: 0,\r\n originY: 0\r\n}\r\n\r\nexport class ObjectBag {\r\n constructor (...args) {\r\n this.init(...args)\r\n }\r\n\r\n init (objOrArr) {\r\n this.values = []\r\n\r\n if (Array.isArray(objOrArr)) {\r\n this.values = objOrArr\r\n return\r\n }\r\n\r\n objOrArr = objOrArr || {}\r\n var entries = []\r\n\r\n for (let i in objOrArr) {\r\n entries.push([i, objOrArr[i]])\r\n }\r\n\r\n entries.sort((a, b) => {\r\n return a[0] - b[0]\r\n })\r\n\r\n this.values = entries.reduce((last, curr) => last.concat(curr), [])\r\n return this\r\n }\r\n\r\n valueOf () {\r\n var obj = {}\r\n var arr = this.values\r\n\r\n for (var i = 0, len = arr.length; i < len; i += 2) {\r\n obj[arr[i]] = arr[i + 1]\r\n }\r\n\r\n return obj\r\n }\r\n\r\n toArray () {\r\n return this.values\r\n }\r\n}\r\n\r\nconst morphableTypes = [\r\n NonMorphable,\r\n TransformBag,\r\n ObjectBag\r\n]\r\n\r\nexport function registerMorphableType (type = []) {\r\n morphableTypes.push(...[].concat(type))\r\n}\r\n\r\nexport function makeMorphable () {\r\n extend(morphableTypes, {\r\n to (val) {\r\n return new Morphable()\r\n .type(this.constructor)\r\n .from(this.valueOf())\r\n .to(val)\r\n },\r\n fromArray (arr) {\r\n this.init(arr)\r\n return this\r\n }\r\n })\r\n}\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { proportionalSize } from '../utils/utils.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Shape from './Shape.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Path extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('path', node), node)\r\n }\r\n\r\n // Get array\r\n array () {\r\n return this._array || (this._array = new PathArray(this.attr('d')))\r\n }\r\n\r\n // Plot new path\r\n plot (d) {\r\n return (d == null) ? this.array()\r\n : this.clear().attr('d', typeof d === 'string' ? d : (this._array = new PathArray(d)))\r\n }\r\n\r\n // Clear array cache\r\n clear () {\r\n delete this._array\r\n return this\r\n }\r\n\r\n // Move by left top corner\r\n move (x, y) {\r\n return this.attr('d', this.array().move(x, y))\r\n }\r\n\r\n // Move by left top corner over x-axis\r\n x (x) {\r\n return x == null ? this.bbox().x : this.move(x, this.bbox().y)\r\n }\r\n\r\n // Move by left top corner over y-axis\r\n y (y) {\r\n return y == null ? this.bbox().y : this.move(this.bbox().x, y)\r\n }\r\n\r\n // Set element size to given width and height\r\n size (width, height) {\r\n var p = proportionalSize(this, width, height)\r\n return this.attr('d', this.array().size(p.width, p.height))\r\n }\r\n\r\n // Set width of element\r\n width (width) {\r\n return width == null ? this.bbox().width : this.size(width, this.bbox().height)\r\n }\r\n\r\n // Set height of element\r\n height (height) {\r\n return height == null ? this.bbox().height : this.size(this.bbox().width, height)\r\n }\r\n\r\n targets () {\r\n return baseFind('svg textpath [href*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\n// Define morphable array\r\nPath.prototype.MorphArray = PathArray\r\n\r\n// Add parent method\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped path element\r\n path: wrapWithAttrCheck(function (d) {\r\n // make sure plot is called as a setter\r\n return this.put(new Path()).plot(d || new PathArray())\r\n })\r\n }\r\n})\r\n\r\nregister(Path)\r\n","import { proportionalSize } from '../../utils/utils.js'\r\nimport PointArray from '../../types/PointArray.js'\r\n\r\n// Get array\r\nexport function array () {\r\n return this._array || (this._array = new PointArray(this.attr('points')))\r\n}\r\n\r\n// Plot new path\r\nexport function plot (p) {\r\n return (p == null) ? this.array()\r\n : this.clear().attr('points', typeof p === 'string' ? p\r\n : (this._array = new PointArray(p)))\r\n}\r\n\r\n// Clear array cache\r\nexport function clear () {\r\n delete this._array\r\n return this\r\n}\r\n\r\n// Move by left top corner\r\nexport function move (x, y) {\r\n return this.attr('points', this.array().move(x, y))\r\n}\r\n\r\n// Set element size to given width and height\r\nexport function size (width, height) {\r\n let p = proportionalSize(this, width, height)\r\n return this.attr('points', this.array().size(p.width, p.height))\r\n}\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polygon extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polygon', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polygon: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polygon()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polygon, pointed)\r\nextend(Polygon, poly)\r\nregister(Polygon)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport PointArray from '../types/PointArray.js'\r\nimport Shape from './Shape.js'\r\nimport * as pointed from '../modules/core/pointed.js'\r\nimport * as poly from '../modules/core/poly.js'\r\n\r\nexport default class Polyline extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('polyline', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a wrapped polygon element\r\n polyline: wrapWithAttrCheck(function (p) {\r\n // make sure plot is called as a setter\r\n return this.put(new Polyline()).plot(p || new PointArray())\r\n })\r\n }\r\n})\r\n\r\nextend(Polyline, pointed)\r\nextend(Polyline, poly)\r\nregister(Polyline)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Rect extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('rect', node), node)\r\n }\r\n}\r\n\r\nextend(Rect, { rx, ry })\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a rect element\r\n rect: wrapWithAttrCheck(function (width, height) {\r\n return this.put(new Rect()).size(width, height)\r\n })\r\n }\r\n})\r\n\r\nregister(Rect)\r\n","export default class Queue {\r\n constructor () {\r\n this._first = null\r\n this._last = null\r\n }\r\n\r\n push (value) {\r\n // An item stores an id and the provided value\r\n var item = value.next ? value : { value: value, next: null, prev: null }\r\n\r\n // Deal with the queue being empty or populated\r\n if (this._last) {\r\n item.prev = this._last\r\n this._last.next = item\r\n this._last = item\r\n } else {\r\n this._last = item\r\n this._first = item\r\n }\r\n\r\n // Update the length and return the current item\r\n return item\r\n }\r\n\r\n shift () {\r\n // Check if we have a value\r\n var remove = this._first\r\n if (!remove) return null\r\n\r\n // If we do, remove it and relink things\r\n this._first = remove.next\r\n if (this._first) this._first.prev = null\r\n this._last = this._first ? this._last : null\r\n return remove.value\r\n }\r\n\r\n // Shows us the first item in the list\r\n first () {\r\n return this._first && this._first.value\r\n }\r\n\r\n // Shows us the last item in the list\r\n last () {\r\n return this._last && this._last.value\r\n }\r\n\r\n // Removes the item that was returned from the push\r\n remove (item) {\r\n // Relink the previous item\r\n if (item.prev) item.prev.next = item.next\r\n if (item.next) item.next.prev = item.prev\r\n if (item === this._last) this._last = item.prev\r\n if (item === this._first) this._first = item.next\r\n\r\n // Invalidate item\r\n item.prev = null\r\n item.next = null\r\n }\r\n}\r\n","import { globals } from '../utils/window.js'\r\nimport Queue from './Queue.js'\r\n\r\nconst Animator = {\r\n nextDraw: null,\r\n frames: new Queue(),\r\n timeouts: new Queue(),\r\n timer: () => globals.window.performance || globals.window.Date,\r\n transforms: [],\r\n\r\n frame (fn) {\r\n // Store the node\r\n var node = Animator.frames.push({ run: fn })\r\n\r\n // Request an animation frame if we don't have one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n // Return the node so we can remove it easily\r\n return node\r\n },\r\n\r\n transform_frame (fn, id) {\r\n Animator.transforms[id] = fn\r\n },\r\n\r\n timeout (fn, delay) {\r\n delay = delay || 0\r\n\r\n // Work out when the event should fire\r\n var time = Animator.timer().now() + delay\r\n\r\n // Add the timeout to the end of the queue\r\n var node = Animator.timeouts.push({ run: fn, time: time })\r\n\r\n // Request another animation frame if we need one\r\n if (Animator.nextDraw === null) {\r\n Animator.nextDraw = globals.window.requestAnimationFrame(Animator._draw)\r\n }\r\n\r\n return node\r\n },\r\n\r\n cancelFrame (node) {\r\n node != null && Animator.frames.remove(node)\r\n },\r\n\r\n clearTimeout (node) {\r\n node != null && Animator.timeouts.remove(node)\r\n },\r\n\r\n _draw (now) {\r\n // Run all the timeouts we can run, if they are not ready yet, add them\r\n // to the end of the queue immediately! (bad timeouts!!! [sarcasm])\r\n var nextTimeout = null\r\n var lastTimeout = Animator.timeouts.last()\r\n while ((nextTimeout = Animator.timeouts.shift())) {\r\n // Run the timeout if its time, or push it to the end\r\n if (now >= nextTimeout.time) {\r\n nextTimeout.run()\r\n } else {\r\n Animator.timeouts.push(nextTimeout)\r\n }\r\n\r\n // If we hit the last item, we should stop shifting out more items\r\n if (nextTimeout === lastTimeout) break\r\n }\r\n\r\n // Run all of the animation frames\r\n var nextFrame = null\r\n var lastFrame = Animator.frames.last()\r\n while ((nextFrame !== lastFrame) && (nextFrame = Animator.frames.shift())) {\r\n nextFrame.run()\r\n }\r\n\r\n Animator.transforms.forEach(function (el) {\r\n el()\r\n })\r\n\r\n // If we have remaining timeouts or frames, draw until we don't anymore\r\n Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()\r\n ? globals.window.requestAnimationFrame(Animator._draw)\r\n : null\r\n }\r\n}\r\n\r\nexport default Animator\r\n","import { globals } from '../utils/window.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Animator from './Animator.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\n\r\nvar makeSchedule = function (runnerInfo) {\r\n var start = runnerInfo.start\r\n var duration = runnerInfo.runner.duration()\r\n var end = start + duration\r\n return { start: start, duration: duration, end: end, runner: runnerInfo.runner }\r\n}\r\n\r\nconst defaultSource = function () {\r\n let w = globals.window\r\n return (w.performance || w.Date).now()\r\n}\r\n\r\nexport default class Timeline extends EventTarget {\r\n // Construct a new timeline on the given element\r\n constructor (timeSource = defaultSource) {\r\n super()\r\n\r\n this._timeSource = timeSource\r\n\r\n // Store the timing variables\r\n this._startTime = 0\r\n this._speed = 1.0\r\n\r\n // Determines how long a runner is hold in memory. Can be a dt or true/false\r\n this._persist = 0\r\n\r\n // Keep track of the running animations and their starting parameters\r\n this._nextFrame = null\r\n this._paused = true\r\n this._runners = []\r\n this._order = []\r\n this._time = 0\r\n this._lastSourceTime = 0\r\n this._lastStepTime = 0\r\n\r\n // Make sure that step is always called in class context\r\n this._step = this._step.bind(this)\r\n }\r\n\r\n // schedules a runner on the timeline\r\n schedule (runner, delay, when) {\r\n if (runner == null) {\r\n return this._runners.map(makeSchedule).sort(function (a, b) {\r\n return a.runner.id - b.runner.id\r\n })\r\n }\r\n\r\n // The start time for the next animation can either be given explicitly,\r\n // derived from the current timeline time or it can be relative to the\r\n // last start time to chain animations direclty\r\n\r\n var absoluteStartTime = 0\r\n var endTime = this.getEndTime()\r\n delay = delay || 0\r\n\r\n // Work out when to start the animation\r\n if (when == null || when === 'last' || when === 'after') {\r\n // Take the last time and increment\r\n absoluteStartTime = endTime\r\n } else if (when === 'absolute' || when === 'start') {\r\n absoluteStartTime = delay\r\n delay = 0\r\n } else if (when === 'now') {\r\n absoluteStartTime = this._time\r\n } else if (when === 'relative') {\r\n let runnerInfo = this._runners[runner.id]\r\n if (runnerInfo) {\r\n absoluteStartTime = runnerInfo.start + delay\r\n delay = 0\r\n }\r\n } else {\r\n throw new Error('Invalid value for the \"when\" parameter')\r\n }\r\n\r\n // Manage runner\r\n runner.unschedule()\r\n runner.timeline(this)\r\n // runner.time(-delay)\r\n\r\n // Save runnerInfo\r\n this._runners[runner.id] = {\r\n persist: this.persist(),\r\n runner: runner,\r\n start: absoluteStartTime + delay\r\n }\r\n\r\n // Save order, update Time if needed and continue\r\n this._order.push(runner.id)\r\n this.updateTime()._continue()\r\n return this\r\n }\r\n\r\n // Remove the runner from this timeline\r\n unschedule (runner) {\r\n var index = this._order.indexOf(runner.id)\r\n if (index < 0) return this\r\n\r\n delete this._runners[runner.id]\r\n this._order.splice(index, 1)\r\n runner.timeline(null)\r\n return this\r\n }\r\n\r\n // Calculates the end of the timeline\r\n getEndTime () {\r\n var lastRunnerInfo = this._runners[this._order[this._order.length - 1]]\r\n var lastDuration = lastRunnerInfo ? lastRunnerInfo.runner.duration() : 0\r\n var lastStartTime = lastRunnerInfo ? lastRunnerInfo.start : 0\r\n return lastStartTime + lastDuration\r\n }\r\n\r\n // Makes sure, that after pausing the time doesn't jump\r\n updateTime () {\r\n if (!this.active()) {\r\n this._lastSourceTime = this._timeSource()\r\n }\r\n return this\r\n }\r\n\r\n play () {\r\n // Now make sure we are not paused and continue the animation\r\n this._paused = false\r\n return this.updateTime()._continue()\r\n }\r\n\r\n pause () {\r\n this._paused = true\r\n return this._continue()\r\n }\r\n\r\n stop () {\r\n // Go to start and pause\r\n this.time(0)\r\n return this.pause()\r\n }\r\n\r\n finish () {\r\n // Go to end and pause\r\n this.time(this.getEndTime() + 1)\r\n return this.pause()\r\n }\r\n\r\n speed (speed) {\r\n if (speed == null) return this._speed\r\n this._speed = speed\r\n return this\r\n }\r\n\r\n reverse (yes) {\r\n var currentSpeed = this.speed()\r\n if (yes == null) return this.speed(-currentSpeed)\r\n\r\n var positive = Math.abs(currentSpeed)\r\n return this.speed(yes ? positive : -positive)\r\n }\r\n\r\n seek (dt) {\r\n return this.time(this._time + dt)\r\n }\r\n\r\n time (time) {\r\n if (time == null) return this._time\r\n this._time = time\r\n return this._continue(true)\r\n }\r\n\r\n persist (dtOrForever) {\r\n if (dtOrForever == null) return this._persist\r\n this._persist = dtOrForever\r\n return this\r\n }\r\n\r\n source (fn) {\r\n if (fn == null) return this._timeSource\r\n this._timeSource = fn\r\n return this\r\n }\r\n\r\n _step (immediateStep = false) {\r\n // Get the time delta from the last time and update the time\r\n var time = this._timeSource()\r\n var dtSource = time - this._lastSourceTime\r\n\r\n if (immediateStep) dtSource = 0\r\n\r\n var dtTime = this._speed * dtSource + (this._time - this._lastStepTime)\r\n this._lastSourceTime = time\r\n\r\n // Only update the time if we use the timeSource.\r\n // Otherwise use the current time\r\n if (!immediateStep) {\r\n // Update the time\r\n this._time += dtTime\r\n this._time = this._time < 0 ? 0 : this._time\r\n }\r\n this._lastStepTime = this._time\r\n this.fire('time', this._time)\r\n\r\n // Run all of the runners directly\r\n var runnersLeft = false\r\n for (var i = 0, len = this._order.length; i < len; i++) {\r\n // Get and run the current runner and ignore it if its inactive\r\n var runnerInfo = this._runners[this._order[i]]\r\n var runner = runnerInfo.runner\r\n let dt = dtTime\r\n\r\n // Make sure that we give the actual difference\r\n // between runner start time and now\r\n let dtToStart = this._time - runnerInfo.start\r\n\r\n // Dont run runner if not started yet\r\n if (dtToStart <= 0) {\r\n runnersLeft = true\r\n\r\n // This is for the case that teh timeline was seeked so that the time\r\n // is now before the startTime of the runner. Thats why we need to set\r\n // the runner to position 0\r\n runner.reset()\r\n continue\r\n } else if (dtToStart < dt) {\r\n // Adjust dt to make sure that animation is on point\r\n dt = dtToStart\r\n }\r\n\r\n if (!runner.active()) continue\r\n\r\n // If this runner is still going, signal that we need another animation\r\n // frame, otherwise, remove the completed runner\r\n var finished = runner.step(dt).done\r\n if (!finished) {\r\n runnersLeft = true\r\n // continue\r\n } else if (runnerInfo.persist !== true) {\r\n // runner is finished. And runner might get removed\r\n\r\n var endTime = runner.duration() - runner.time() + this._time\r\n\r\n if (endTime + this._persist < this._time) {\r\n // Delete runner and correct index\r\n delete this._runners[this._order[i]]\r\n this._order.splice(i--, 1) && --len\r\n runner.timeline(null)\r\n }\r\n }\r\n }\r\n\r\n // Basically: we continue when there are runners right from us in time\r\n // when -->, and when runners are left from us when <--\r\n if ((runnersLeft && !(this._speed < 0 && this._time === 0)) || (this._order.length && this._speed < 0 && this._time > 0)) {\r\n this._continue()\r\n } else {\r\n this.fire('finished')\r\n this.pause()\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Checks if we are running and continues the animation\r\n _continue (immediateStep = false) {\r\n Animator.cancelFrame(this._nextFrame)\r\n this._nextFrame = null\r\n\r\n if (immediateStep) return this._step(true)\r\n if (this._paused) return this\r\n\r\n this._nextFrame = Animator.frame(this._step)\r\n return this\r\n }\r\n\r\n active () {\r\n return !!this._nextFrame\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n timeline: function () {\r\n this._timeline = (this._timeline || new Timeline())\r\n return this._timeline\r\n }\r\n }\r\n})\r\n","import { Controller, Ease, Stepper } from './Controller.js'\r\nimport { extend } from '../utils/adopter.js'\r\nimport { from, to } from '../modules/core/gradiented.js'\r\nimport { getOrigin } from '../utils/utils.js'\r\nimport { noop, timeline } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { rx, ry } from '../modules/core/circled.js'\r\nimport Animator from './Animator.js'\r\nimport Box from '../types/Box.js'\r\nimport EventTarget from '../types/EventTarget.js'\r\nimport Matrix from '../types/Matrix.js'\r\nimport Morphable, { TransformBag } from './Morphable.js'\r\nimport Point from '../types/Point.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Timeline from './Timeline.js'\r\n\r\nexport default class Runner extends EventTarget {\r\n constructor (options) {\r\n super()\r\n\r\n // Store a unique id on the runner, so that we can identify it later\r\n this.id = Runner.id++\r\n\r\n // Ensure a default value\r\n options = options == null\r\n ? timeline.duration\r\n : options\r\n\r\n // Ensure that we get a controller\r\n options = typeof options === 'function'\r\n ? new Controller(options)\r\n : options\r\n\r\n // Declare all of the variables\r\n this._element = null\r\n this._timeline = null\r\n this.done = false\r\n this._queue = []\r\n\r\n // Work out the stepper and the duration\r\n this._duration = typeof options === 'number' && options\r\n this._isDeclarative = options instanceof Controller\r\n this._stepper = this._isDeclarative ? options : new Ease()\r\n\r\n // We copy the current values from the timeline because they can change\r\n this._history = {}\r\n\r\n // Store the state of the runner\r\n this.enabled = true\r\n this._time = 0\r\n this._lastTime = 0\r\n\r\n // At creation, the runner is in reseted state\r\n this._reseted = true\r\n\r\n // Save transforms applied to this runner\r\n this.transforms = new Matrix()\r\n this.transformId = 1\r\n\r\n // Looping variables\r\n this._haveReversed = false\r\n this._reverse = false\r\n this._loopsDone = 0\r\n this._swing = false\r\n this._wait = 0\r\n this._times = 1\r\n }\r\n\r\n /*\r\n Runner Definitions\r\n ==================\r\n These methods help us define the runtime behaviour of the Runner or they\r\n help us make new runners from the current runner\r\n */\r\n\r\n element (element) {\r\n if (element == null) return this._element\r\n this._element = element\r\n element._prepareRunner()\r\n return this\r\n }\r\n\r\n timeline (timeline) {\r\n // check explicitly for undefined so we can set the timeline to null\r\n if (typeof timeline === 'undefined') return this._timeline\r\n this._timeline = timeline\r\n return this\r\n }\r\n\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var runner = new Runner(o.duration)\r\n if (this._timeline) runner.timeline(this._timeline)\r\n if (this._element) runner.element(this._element)\r\n return runner.loop(o).schedule(delay, when)\r\n }\r\n\r\n schedule (timeline, delay, when) {\r\n // The user doesn't need to pass a timeline if we already have one\r\n if (!(timeline instanceof Timeline)) {\r\n when = delay\r\n delay = timeline\r\n timeline = this.timeline()\r\n }\r\n\r\n // If there is no timeline, yell at the user...\r\n if (!timeline) {\r\n throw Error('Runner cannot be scheduled without timeline')\r\n }\r\n\r\n // Schedule the runner on the timeline provided\r\n timeline.schedule(this, delay, when)\r\n return this\r\n }\r\n\r\n unschedule () {\r\n var timeline = this.timeline()\r\n timeline && timeline.unschedule(this)\r\n return this\r\n }\r\n\r\n loop (times, swing, wait) {\r\n // Deal with the user passing in an object\r\n if (typeof times === 'object') {\r\n swing = times.swing\r\n wait = times.wait\r\n times = times.times\r\n }\r\n\r\n // Sanitise the values and store them\r\n this._times = times || Infinity\r\n this._swing = swing || false\r\n this._wait = wait || 0\r\n return this\r\n }\r\n\r\n delay (delay) {\r\n return this.animate(0, delay)\r\n }\r\n\r\n /*\r\n Basic Functionality\r\n ===================\r\n These methods allow us to attach basic functions to the runner directly\r\n */\r\n\r\n queue (initFn, runFn, retargetFn, isTransform) {\r\n this._queue.push({\r\n initialiser: initFn || noop,\r\n runner: runFn || noop,\r\n retarget: retargetFn,\r\n isTransform: isTransform,\r\n initialised: false,\r\n finished: false\r\n })\r\n var timeline = this.timeline()\r\n timeline && this.timeline()._continue()\r\n return this\r\n }\r\n\r\n during (fn) {\r\n return this.queue(null, fn)\r\n }\r\n\r\n after (fn) {\r\n return this.on('finish', fn)\r\n }\r\n\r\n /*\r\n Runner animation methods\r\n ========================\r\n Control how the animation plays\r\n */\r\n\r\n time (time) {\r\n if (time == null) {\r\n return this._time\r\n }\r\n let dt = time - this._time\r\n this.step(dt)\r\n return this\r\n }\r\n\r\n duration () {\r\n return this._times * (this._wait + this._duration) - this._wait\r\n }\r\n\r\n loops (p) {\r\n var loopDuration = this._duration + this._wait\r\n if (p == null) {\r\n var loopsDone = Math.floor(this._time / loopDuration)\r\n var relativeTime = (this._time - loopsDone * loopDuration)\r\n var position = relativeTime / this._duration\r\n return Math.min(loopsDone + position, this._times)\r\n }\r\n var whole = Math.floor(p)\r\n var partial = p % 1\r\n var time = loopDuration * whole + this._duration * partial\r\n return this.time(time)\r\n }\r\n\r\n position (p) {\r\n // Get all of the variables we need\r\n var x = this._time\r\n var d = this._duration\r\n var w = this._wait\r\n var t = this._times\r\n var s = this._swing\r\n var r = this._reverse\r\n var position\r\n\r\n if (p == null) {\r\n /*\r\n This function converts a time to a position in the range [0, 1]\r\n The full explanation can be found in this desmos demonstration\r\n https://www.desmos.com/calculator/u4fbavgche\r\n The logic is slightly simplified here because we can use booleans\r\n */\r\n\r\n // Figure out the value without thinking about the start or end time\r\n const f = function (x) {\r\n var swinging = s * Math.floor(x % (2 * (w + d)) / (w + d))\r\n var backwards = (swinging && !r) || (!swinging && r)\r\n var uncliped = Math.pow(-1, backwards) * (x % (w + d)) / d + backwards\r\n var clipped = Math.max(Math.min(uncliped, 1), 0)\r\n return clipped\r\n }\r\n\r\n // Figure out the value by incorporating the start time\r\n var endTime = t * (w + d) - w\r\n position = x <= 0 ? Math.round(f(1e-5))\r\n : x < endTime ? f(x)\r\n : Math.round(f(endTime - 1e-5))\r\n return position\r\n }\r\n\r\n // Work out the loops done and add the position to the loops done\r\n var loopsDone = Math.floor(this.loops())\r\n var swingForward = s && (loopsDone % 2 === 0)\r\n var forwards = (swingForward && !r) || (r && swingForward)\r\n position = loopsDone + (forwards ? p : 1 - p)\r\n return this.loops(position)\r\n }\r\n\r\n progress (p) {\r\n if (p == null) {\r\n return Math.min(1, this._time / this.duration())\r\n }\r\n return this.time(p * this.duration())\r\n }\r\n\r\n step (dt) {\r\n // If we are inactive, this stepper just gets skipped\r\n if (!this.enabled) return this\r\n\r\n // Update the time and get the new position\r\n dt = dt == null ? 16 : dt\r\n this._time += dt\r\n var position = this.position()\r\n\r\n // Figure out if we need to run the stepper in this frame\r\n var running = this._lastPosition !== position && this._time >= 0\r\n this._lastPosition = position\r\n\r\n // Figure out if we just started\r\n var duration = this.duration()\r\n var justStarted = this._lastTime <= 0 && this._time > 0\r\n var justFinished = this._lastTime < this._time && this.time > duration\r\n this._lastTime = this._time\r\n if (justStarted) {\r\n this.fire('start', this)\r\n }\r\n\r\n // Work out if the runner is finished set the done flag here so animations\r\n // know, that they are running in the last step (this is good for\r\n // transformations which can be merged)\r\n var declarative = this._isDeclarative\r\n this.done = !declarative && !justFinished && this._time >= duration\r\n\r\n // Runner is running. So its not in reseted state anymore\r\n this._reseted = false\r\n\r\n // Call initialise and the run function\r\n if (running || declarative) {\r\n this._initialise(running)\r\n\r\n // clear the transforms on this runner so they dont get added again and again\r\n this.transforms = new Matrix()\r\n var converged = this._run(declarative ? dt : position)\r\n\r\n this.fire('step', this)\r\n }\r\n // correct the done flag here\r\n // declaritive animations itself know when they converged\r\n this.done = this.done || (converged && declarative)\r\n if (this.done) {\r\n this.fire('finish', this)\r\n }\r\n return this\r\n }\r\n\r\n reset () {\r\n if (this._reseted) return this\r\n this.loops(0)\r\n this._reseted = true\r\n return this\r\n }\r\n\r\n finish () {\r\n return this.step(Infinity)\r\n }\r\n\r\n reverse (reverse) {\r\n this._reverse = reverse == null ? !this._reverse : reverse\r\n return this\r\n }\r\n\r\n ease (fn) {\r\n this._stepper = new Ease(fn)\r\n return this\r\n }\r\n\r\n active (enabled) {\r\n if (enabled == null) return this.enabled\r\n this.enabled = enabled\r\n return this\r\n }\r\n\r\n /*\r\n Private Methods\r\n ===============\r\n Methods that shouldn't be used externally\r\n */\r\n\r\n // Save a morpher to the morpher list so that we can retarget it later\r\n _rememberMorpher (method, morpher) {\r\n this._history[method] = {\r\n morpher: morpher,\r\n caller: this._queue[this._queue.length - 1]\r\n }\r\n }\r\n\r\n // Try to set the target for a morpher if the morpher exists, otherwise\r\n // do nothing and return false\r\n _tryRetarget (method, target) {\r\n if (this._history[method]) {\r\n // if the last method wasnt even initialised, throw it away\r\n if (!this._history[method].caller.initialised) {\r\n let index = this._queue.indexOf(this._history[method].caller)\r\n this._queue.splice(index, 1)\r\n return false\r\n }\r\n\r\n // for the case of transformations, we use the special retarget function\r\n // which has access to the outer scope\r\n if (this._history[method].caller.retarget) {\r\n this._history[method].caller.retarget(target)\r\n // for everything else a simple morpher change is sufficient\r\n } else {\r\n this._history[method].morpher.to(target)\r\n }\r\n\r\n this._history[method].caller.finished = false\r\n var timeline = this.timeline()\r\n timeline && timeline._continue()\r\n return true\r\n }\r\n return false\r\n }\r\n\r\n // Run each initialise function in the runner if required\r\n _initialise (running) {\r\n // If we aren't running, we shouldn't initialise when not declarative\r\n if (!running && !this._isDeclarative) return\r\n\r\n // Loop through all of the initialisers\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current initialiser\r\n var current = this._queue[i]\r\n\r\n // Determine whether we need to initialise\r\n var needsIt = this._isDeclarative || (!current.initialised && running)\r\n running = !current.finished\r\n\r\n // Call the initialiser if we need to\r\n if (needsIt && running) {\r\n current.initialiser.call(this)\r\n current.initialised = true\r\n }\r\n }\r\n }\r\n\r\n // Run each run function for the position or dt given\r\n _run (positionOrDt) {\r\n // Run all of the _queue directly\r\n var allfinished = true\r\n for (var i = 0, len = this._queue.length; i < len; ++i) {\r\n // Get the current function to run\r\n var current = this._queue[i]\r\n\r\n // Run the function if its not finished, we keep track of the finished\r\n // flag for the sake of declarative _queue\r\n var converged = current.runner.call(this, positionOrDt)\r\n current.finished = current.finished || (converged === true)\r\n allfinished = allfinished && current.finished\r\n }\r\n\r\n // We report when all of the constructors are finished\r\n return allfinished\r\n }\r\n\r\n addTransform (transform, index) {\r\n this.transforms.lmultiplyO(transform)\r\n return this\r\n }\r\n\r\n clearTransform () {\r\n this.transforms = new Matrix()\r\n return this\r\n }\r\n\r\n // TODO: Keep track of all transformations so that deletion is faster\r\n clearTransformsFromQueue () {\r\n if (!this.done) {\r\n this._queue = this._queue.filter((item) => {\r\n return !item.isTransform\r\n })\r\n }\r\n }\r\n\r\n static sanitise (duration, delay, when) {\r\n // Initialise the default parameters\r\n var times = 1\r\n var swing = false\r\n var wait = 0\r\n duration = duration || timeline.duration\r\n delay = delay || timeline.delay\r\n when = when || 'last'\r\n\r\n // If we have an object, unpack the values\r\n if (typeof duration === 'object' && !(duration instanceof Stepper)) {\r\n delay = duration.delay || delay\r\n when = duration.when || when\r\n swing = duration.swing || swing\r\n times = duration.times || times\r\n wait = duration.wait || wait\r\n duration = duration.duration || timeline.duration\r\n }\r\n\r\n return {\r\n duration: duration,\r\n delay: delay,\r\n swing: swing,\r\n times: times,\r\n wait: wait,\r\n when: when\r\n }\r\n }\r\n}\r\n\r\nRunner.id = 0\r\n\r\nclass FakeRunner {\r\n constructor (transforms = new Matrix(), id = -1, done = true) {\r\n this.transforms = transforms\r\n this.id = id\r\n this.done = done\r\n }\r\n\r\n clearTransformsFromQueue () { }\r\n}\r\n\r\nextend([ Runner, FakeRunner ], {\r\n mergeWith (runner) {\r\n return new FakeRunner(\r\n runner.transforms.lmultiply(this.transforms),\r\n runner.id\r\n )\r\n }\r\n})\r\n\r\n// FakeRunner.emptyRunner = new FakeRunner()\r\n\r\nconst lmultiply = (last, curr) => last.lmultiplyO(curr)\r\nconst getRunnerTransform = (runner) => runner.transforms\r\n\r\nfunction mergeTransforms () {\r\n // Find the matrix to apply to the element and apply it\r\n let runners = this._transformationRunners.runners\r\n let netTransform = runners\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n\r\n this.transform(netTransform)\r\n\r\n this._transformationRunners.merge()\r\n\r\n if (this._transformationRunners.length() === 1) {\r\n this._frameId = null\r\n }\r\n}\r\n\r\nclass RunnerArray {\r\n constructor () {\r\n this.runners = []\r\n this.ids = []\r\n }\r\n\r\n add (runner) {\r\n if (this.runners.includes(runner)) return\r\n\r\n let id = runner.id + 1\r\n\r\n let leftSibling = this.ids.reduce((last, curr) => {\r\n if (curr > last && curr < id) return curr\r\n return last\r\n }, 0)\r\n\r\n let index = this.ids.indexOf(leftSibling) + 1\r\n\r\n this.ids.splice(index, 0, id)\r\n this.runners.splice(index, 0, runner)\r\n\r\n return this\r\n }\r\n\r\n getByID (id) {\r\n return this.runners[this.ids.indexOf(id + 1)]\r\n }\r\n\r\n remove (id) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1)\r\n this.runners.splice(index, 1)\r\n return this\r\n }\r\n\r\n merge () {\r\n let lastRunner = null\r\n this.runners.forEach((runner, i) => {\r\n if (lastRunner && runner.done && lastRunner.done) {\r\n this.remove(runner.id)\r\n this.edit(lastRunner.id, runner.mergeWith(lastRunner))\r\n }\r\n\r\n lastRunner = runner\r\n })\r\n\r\n return this\r\n }\r\n\r\n edit (id, newRunner) {\r\n let index = this.ids.indexOf(id + 1)\r\n this.ids.splice(index, 1, id)\r\n this.runners.splice(index, 1, newRunner)\r\n return this\r\n }\r\n\r\n length () {\r\n return this.ids.length\r\n }\r\n\r\n clearBefore (id) {\r\n let deleteCnt = this.ids.indexOf(id + 1) || 1\r\n this.ids.splice(0, deleteCnt, 0)\r\n this.runners.splice(0, deleteCnt, new FakeRunner())\r\n .forEach((r) => r.clearTransformsFromQueue())\r\n return this\r\n }\r\n}\r\n\r\nlet frameId = 0\r\nregisterMethods({\r\n Element: {\r\n animate (duration, delay, when) {\r\n var o = Runner.sanitise(duration, delay, when)\r\n var timeline = this.timeline()\r\n return new Runner(o.duration)\r\n .loop(o)\r\n .element(this)\r\n .timeline(timeline.play())\r\n .schedule(delay, when)\r\n },\r\n\r\n delay (by, when) {\r\n return this.animate(0, by, when)\r\n },\r\n\r\n // this function searches for all runners on the element and deletes the ones\r\n // which run before the current one. This is because absolute transformations\r\n // overwfrite anything anyway so there is no need to waste time computing\r\n // other runners\r\n _clearTransformRunnersBefore (currentRunner) {\r\n this._transformationRunners.clearBefore(currentRunner.id)\r\n },\r\n\r\n _currentTransform (current) {\r\n return this._transformationRunners.runners\r\n // we need the equal sign here to make sure, that also transformations\r\n // on the same runner which execute before the current transformation are\r\n // taken into account\r\n .filter((runner) => runner.id <= current.id)\r\n .map(getRunnerTransform)\r\n .reduce(lmultiply, new Matrix())\r\n },\r\n\r\n addRunner (runner) {\r\n this._transformationRunners.add(runner)\r\n\r\n Animator.transform_frame(\r\n mergeTransforms.bind(this), this._frameId\r\n )\r\n },\r\n\r\n _prepareRunner () {\r\n if (this._frameId == null) {\r\n this._transformationRunners = new RunnerArray()\r\n .add(new FakeRunner(new Matrix(this)))\r\n\r\n this._frameId = frameId++\r\n }\r\n }\r\n }\r\n})\r\n\r\nextend(Runner, {\r\n attr (a, v) {\r\n return this.styleAttr('attr', a, v)\r\n },\r\n\r\n // Add animatable styles\r\n css (s, v) {\r\n return this.styleAttr('css', s, v)\r\n },\r\n\r\n styleAttr (type, name, val) {\r\n // apply attributes individually\r\n if (typeof name === 'object') {\r\n for (var key in val) {\r\n this.styleAttr(type, key, val[key])\r\n }\r\n }\r\n\r\n var morpher = new Morphable(this._stepper).to(val)\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.element()[type](name))\r\n }, function (pos) {\r\n this.element()[type](name, morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n zoom (level, point) {\r\n var morpher = new Morphable(this._stepper).to(new SVGNumber(level))\r\n\r\n this.queue(function () {\r\n morpher = morpher.from(this.zoom())\r\n }, function (pos) {\r\n this.element().zoom(morpher.at(pos), point)\r\n return morpher.done()\r\n })\r\n\r\n return this\r\n },\r\n\r\n /**\r\n ** absolute transformations\r\n **/\r\n\r\n //\r\n // M v -----|-----(D M v = F v)------|-----> T v\r\n //\r\n // 1. define the final state (T) and decompose it (once)\r\n // t = [tx, ty, the, lam, sy, sx]\r\n // 2. on every frame: pull the current state of all previous transforms\r\n // (M - m can change)\r\n // and then write this as m = [tx0, ty0, the0, lam0, sy0, sx0]\r\n // 3. Find the interpolated matrix F(pos) = m + pos * (t - m)\r\n // - Note F(0) = M\r\n // - Note F(1) = T\r\n // 4. Now you get the delta matrix as a result: D = F * inv(M)\r\n\r\n transform (transforms, relative, affine) {\r\n // If we have a declarative function, we should retarget it if possible\r\n relative = transforms.relative || relative\r\n if (this._isDeclarative && !relative && this._tryRetarget('transform', transforms)) {\r\n return this\r\n }\r\n\r\n // Parse the parameters\r\n var isMatrix = Matrix.isMatrixLike(transforms)\r\n affine = transforms.affine != null\r\n ? transforms.affine\r\n : (affine != null ? affine : !isMatrix)\r\n\r\n // Create a morepher and set its type\r\n const morpher = new Morphable(this._stepper)\r\n .type(affine ? TransformBag : Matrix)\r\n\r\n let origin\r\n let element\r\n let current\r\n let currentAngle\r\n let startTransform\r\n\r\n function setup () {\r\n // make sure element and origin is defined\r\n element = element || this.element()\r\n origin = origin || getOrigin(transforms, element)\r\n\r\n startTransform = new Matrix(relative ? undefined : element)\r\n\r\n // add the runner to the element so it can merge transformations\r\n element.addRunner(this)\r\n\r\n // Deactivate all transforms that have run so far if we are absolute\r\n if (!relative) {\r\n element._clearTransformRunnersBefore(this)\r\n }\r\n }\r\n\r\n function run (pos) {\r\n // clear all other transforms before this in case something is saved\r\n // on this runner. We are absolute. We dont need these!\r\n if (!relative) this.clearTransform()\r\n\r\n let { x, y } = new Point(origin).transform(element._currentTransform(this))\r\n\r\n let target = new Matrix({ ...transforms, origin: [ x, y ] })\r\n let start = this._isDeclarative && current\r\n ? current\r\n : startTransform\r\n\r\n if (affine) {\r\n target = target.decompose(x, y)\r\n start = start.decompose(x, y)\r\n\r\n // Get the current and target angle as it was set\r\n const rTarget = target.rotate\r\n const rCurrent = start.rotate\r\n\r\n // Figure out the shortest path to rotate directly\r\n const possibilities = [ rTarget - 360, rTarget, rTarget + 360 ]\r\n const distances = possibilities.map(a => Math.abs(a - rCurrent))\r\n const shortest = Math.min(...distances)\r\n const index = distances.indexOf(shortest)\r\n target.rotate = possibilities[index]\r\n }\r\n\r\n if (relative) {\r\n // we have to be careful here not to overwrite the rotation\r\n // with the rotate method of Matrix\r\n if (!isMatrix) {\r\n target.rotate = transforms.rotate || 0\r\n }\r\n if (this._isDeclarative && currentAngle) {\r\n start.rotate = currentAngle\r\n }\r\n }\r\n\r\n morpher.from(start)\r\n morpher.to(target)\r\n\r\n let affineParameters = morpher.at(pos)\r\n currentAngle = affineParameters.rotate\r\n current = new Matrix(affineParameters)\r\n\r\n this.addTransform(current)\r\n return morpher.done()\r\n }\r\n\r\n function retarget (newTransforms) {\r\n // only get a new origin if it changed since the last call\r\n if (\r\n (newTransforms.origin || 'center').toString()\r\n !== (transforms.origin || 'center').toString()\r\n ) {\r\n origin = getOrigin(transforms, element)\r\n }\r\n\r\n // overwrite the old transformations with the new ones\r\n transforms = { ...newTransforms, origin }\r\n }\r\n\r\n this.queue(setup, run, retarget, true)\r\n this._isDeclarative && this._rememberMorpher('transform', morpher)\r\n return this\r\n },\r\n\r\n // Animatable x-axis\r\n x (x, relative) {\r\n return this._queueNumber('x', x)\r\n },\r\n\r\n // Animatable y-axis\r\n y (y) {\r\n return this._queueNumber('y', y)\r\n },\r\n\r\n dx (x) {\r\n return this._queueNumberDelta('x', x)\r\n },\r\n\r\n dy (y) {\r\n return this._queueNumberDelta('y', y)\r\n },\r\n\r\n _queueNumberDelta (method, to) {\r\n to = new SVGNumber(to)\r\n\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n var from = null\r\n this.queue(function () {\r\n from = this.element()[method]()\r\n morpher.from(from)\r\n morpher.to(from + to)\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n }, function (newTo) {\r\n morpher.to(from + new SVGNumber(newTo))\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueObject (method, to) {\r\n // Try to change the target if we have this method already registerd\r\n if (this._tryRetarget(method, to)) return this\r\n\r\n // Make a morpher and queue the animation\r\n var morpher = new Morphable(this._stepper).to(to)\r\n this.queue(function () {\r\n morpher.from(this.element()[method]())\r\n }, function (pos) {\r\n this.element()[method](morpher.at(pos))\r\n return morpher.done()\r\n })\r\n\r\n // Register the morpher so that if it is changed again, we can retarget it\r\n this._rememberMorpher(method, morpher)\r\n return this\r\n },\r\n\r\n _queueNumber (method, value) {\r\n return this._queueObject(method, new SVGNumber(value))\r\n },\r\n\r\n // Animatable center x-axis\r\n cx (x) {\r\n return this._queueNumber('cx', x)\r\n },\r\n\r\n // Animatable center y-axis\r\n cy (y) {\r\n return this._queueNumber('cy', y)\r\n },\r\n\r\n // Add animatable move\r\n move (x, y) {\r\n return this.x(x).y(y)\r\n },\r\n\r\n // Add animatable center\r\n center (x, y) {\r\n return this.cx(x).cy(y)\r\n },\r\n\r\n // Add animatable size\r\n size (width, height) {\r\n // animate bbox based size for all other elements\r\n var box\r\n\r\n if (!width || !height) {\r\n box = this._element.bbox()\r\n }\r\n\r\n if (!width) {\r\n width = box.width / box.height * height\r\n }\r\n\r\n if (!height) {\r\n height = box.height / box.width * width\r\n }\r\n\r\n return this\r\n .width(width)\r\n .height(height)\r\n },\r\n\r\n // Add animatable width\r\n width (width) {\r\n return this._queueNumber('width', width)\r\n },\r\n\r\n // Add animatable height\r\n height (height) {\r\n return this._queueNumber('height', height)\r\n },\r\n\r\n // Add animatable plot\r\n plot (a, b, c, d) {\r\n // Lines can be plotted with 4 arguments\r\n if (arguments.length === 4) {\r\n return this.plot([ a, b, c, d ])\r\n }\r\n\r\n var morpher = this._element.MorphArray().to(a)\r\n\r\n this.queue(function () {\r\n morpher.from(this._element.array())\r\n }, function (pos) {\r\n this._element.plot(morpher.at(pos))\r\n })\r\n\r\n return this\r\n },\r\n\r\n // Add leading method\r\n leading (value) {\r\n return this._queueNumber('leading', value)\r\n },\r\n\r\n // Add animatable viewbox\r\n viewbox (x, y, width, height) {\r\n return this._queueObject('viewbox', new Box(x, y, width, height))\r\n },\r\n\r\n update (o) {\r\n if (typeof o !== 'object') {\r\n return this.update({\r\n offset: arguments[0],\r\n color: arguments[1],\r\n opacity: arguments[2]\r\n })\r\n }\r\n\r\n if (o.opacity != null) this.attr('stop-opacity', o.opacity)\r\n if (o.color != null) this.attr('stop-color', o.color)\r\n if (o.offset != null) this.attr('offset', o.offset)\r\n\r\n return this\r\n }\r\n})\r\n\r\nextend(Runner, { rx, ry, from, to })\r\n","import {\r\n adopt,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { ns, svgjs, xlink, xmlns } from '../modules/core/namespaces.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport Defs from './Defs.js'\r\nimport { globals } from '../utils/window.js'\r\n\r\nexport default class Svg extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('svg', node), node)\r\n this.namespace()\r\n }\r\n\r\n isRoot () {\r\n return !this.node.parentNode\r\n || !(this.node.parentNode instanceof globals.window.SVGElement)\r\n || this.node.parentNode.nodeName === '#document'\r\n }\r\n\r\n // Check if this is a root svg\r\n // If not, call docs from this element\r\n root () {\r\n if (this.isRoot()) return this\r\n return super.root()\r\n }\r\n\r\n // Add namespaces\r\n namespace () {\r\n if (!this.isRoot()) return this.root().namespace()\r\n return this\r\n .attr({ xmlns: ns, version: '1.1' })\r\n .attr('xmlns:xlink', xlink, xmlns)\r\n .attr('xmlns:svgjs', svgjs, xmlns)\r\n }\r\n\r\n // Creates and returns defs element\r\n defs () {\r\n if (!this.isRoot()) return this.root().defs()\r\n\r\n return adopt(this.node.getElementsByTagName('defs')[0])\r\n || this.put(new Defs())\r\n }\r\n\r\n // custom parent method\r\n parent (type) {\r\n if (this.isRoot()) {\r\n return this.node.parentNode.nodeName === '#document'\r\n ? null\r\n : adopt(this.node.parentNode)\r\n }\r\n\r\n return super.parent(type)\r\n }\r\n\r\n clear () {\r\n // remove children\r\n while (this.node.hasChildNodes()) {\r\n this.node.removeChild(this.node.lastChild)\r\n }\r\n return this\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create nested svg document\r\n nested: wrapWithAttrCheck(function () {\r\n return this.put(new Svg())\r\n })\r\n }\r\n})\r\n\r\nregister(Svg, 'Svg', true)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class Symbol extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('symbol', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n symbol: wrapWithAttrCheck(function () {\r\n return this.put(new Symbol())\r\n })\r\n }\r\n})\r\n\r\nregister(Symbol)\r\n","import { globals } from '../../utils/window.js'\r\n\r\n// Create plain text node\r\nexport function plain (text) {\r\n // clear if build mode is disabled\r\n if (this._build === false) {\r\n this.clear()\r\n }\r\n\r\n // create text node\r\n this.node.appendChild(globals.document.createTextNode(text))\r\n\r\n return this\r\n}\r\n\r\n// Get length of text element\r\nexport function length () {\r\n return this.node.getComputedTextLength()\r\n}\r\n","import {\r\n adopt,\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { attrs } from '../modules/core/defaults.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport SVGNumber from '../types/SVGNumber.js'\r\nimport Shape from './Shape.js'\r\nimport { globals } from '../utils/window.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Text extends Shape {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('text', node), node)\r\n\r\n this.dom.leading = new SVGNumber(1.3) // store leading value for rebuilding\r\n this._rebuild = true // enable automatic updating of dy values\r\n this._build = false // disable build mode for adding multiple lines\r\n\r\n // set default font\r\n this.attr('font-family', attrs['font-family'])\r\n }\r\n\r\n // Move over x-axis\r\n x (x) {\r\n // act as getter\r\n if (x == null) {\r\n return this.attr('x')\r\n }\r\n\r\n return this.attr('x', x)\r\n }\r\n\r\n // Move over y-axis\r\n y (y) {\r\n var oy = this.attr('y')\r\n var o = typeof oy === 'number' ? oy - this.bbox().y : 0\r\n\r\n // act as getter\r\n if (y == null) {\r\n return typeof oy === 'number' ? oy - o : oy\r\n }\r\n\r\n return this.attr('y', typeof y === 'number' ? y + o : y)\r\n }\r\n\r\n // Move center over x-axis\r\n cx (x) {\r\n return x == null ? this.bbox().cx : this.x(x - this.bbox().width / 2)\r\n }\r\n\r\n // Move center over y-axis\r\n cy (y) {\r\n return y == null ? this.bbox().cy : this.y(y - this.bbox().height / 2)\r\n }\r\n\r\n // Set the text content\r\n text (text) {\r\n // act as getter\r\n if (text === undefined) {\r\n var children = this.node.childNodes\r\n var firstLine = 0\r\n text = ''\r\n\r\n for (var i = 0, len = children.length; i < len; ++i) {\r\n // skip textPaths - they are no lines\r\n if (children[i].nodeName === 'textPath') {\r\n if (i === 0) firstLine = 1\r\n continue\r\n }\r\n\r\n // add newline if its not the first child and newLined is set to true\r\n if (i !== firstLine && children[i].nodeType !== 3 && adopt(children[i]).dom.newLined === true) {\r\n text += '\\n'\r\n }\r\n\r\n // add content of this node\r\n text += children[i].textContent\r\n }\r\n\r\n return text\r\n }\r\n\r\n // remove existing content\r\n this.clear().build(true)\r\n\r\n if (typeof text === 'function') {\r\n // call block\r\n text.call(this, this)\r\n } else {\r\n // store text and make sure text is not blank\r\n text = text.split('\\n')\r\n\r\n // build new lines\r\n for (var j = 0, jl = text.length; j < jl; j++) {\r\n this.tspan(text[j]).newLine()\r\n }\r\n }\r\n\r\n // disable build mode and rebuild lines\r\n return this.build(false).rebuild()\r\n }\r\n\r\n // Set / get leading\r\n leading (value) {\r\n // act as getter\r\n if (value == null) {\r\n return this.dom.leading\r\n }\r\n\r\n // act as setter\r\n this.dom.leading = new SVGNumber(value)\r\n\r\n return this.rebuild()\r\n }\r\n\r\n // Rebuild appearance type\r\n rebuild (rebuild) {\r\n // store new rebuild flag if given\r\n if (typeof rebuild === 'boolean') {\r\n this._rebuild = rebuild\r\n }\r\n\r\n // define position of all lines\r\n if (this._rebuild) {\r\n var self = this\r\n var blankLineOffset = 0\r\n var leading = this.dom.leading\r\n\r\n this.each(function () {\r\n var fontSize = globals.window.getComputedStyle(this.node)\r\n .getPropertyValue('font-size')\r\n var dy = leading * new SVGNumber(fontSize)\r\n\r\n if (this.dom.newLined) {\r\n this.attr('x', self.attr('x'))\r\n\r\n if (this.text() === '\\n') {\r\n blankLineOffset += dy\r\n } else {\r\n this.attr('dy', dy + blankLineOffset)\r\n blankLineOffset = 0\r\n }\r\n }\r\n })\r\n\r\n this.fire('rebuild')\r\n }\r\n\r\n return this\r\n }\r\n\r\n // Enable / disable build mode\r\n build (build) {\r\n this._build = !!build\r\n return this\r\n }\r\n\r\n // overwrite method from parent to set data properly\r\n setData (o) {\r\n this.dom = o\r\n this.dom.leading = new SVGNumber(o.leading || 1.3)\r\n return this\r\n }\r\n}\r\n\r\nextend(Text, textable)\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create text element\r\n text: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).text(text)\r\n }),\r\n\r\n // Create plain text element\r\n plain: wrapWithAttrCheck(function (text) {\r\n return this.put(new Text()).plain(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Text)\r\n","import {\r\n extend,\r\n nodeOrNew,\r\n register,\r\n wrapWithAttrCheck\r\n} from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Text from './Text.js'\r\nimport * as textable from '../modules/core/textable.js'\r\n\r\nexport default class Tspan extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('tspan', node), node)\r\n }\r\n\r\n // Set text content\r\n text (text) {\r\n if (text == null) return this.node.textContent + (this.dom.newLined ? '\\n' : '')\r\n\r\n typeof text === 'function' ? text.call(this, this) : this.plain(text)\r\n\r\n return this\r\n }\r\n\r\n // Shortcut dx\r\n dx (dx) {\r\n return this.attr('dx', dx)\r\n }\r\n\r\n // Shortcut dy\r\n dy (dy) {\r\n return this.attr('dy', dy)\r\n }\r\n\r\n // Create new line\r\n newLine () {\r\n // fetch text parent\r\n var t = this.parent(Text)\r\n\r\n // mark new line\r\n this.dom.newLined = true\r\n\r\n // apply new position\r\n return this.dy(t.dom.leading * t.attr('font-size')).attr('x', t.x())\r\n }\r\n}\r\n\r\nextend(Tspan, textable)\r\n\r\nregisterMethods({\r\n Tspan: {\r\n tspan: wrapWithAttrCheck(function (text) {\r\n var tspan = new Tspan()\r\n\r\n // clear if build mode is disabled\r\n if (!this._build) {\r\n this.clear()\r\n }\r\n\r\n // add new tspan\r\n this.node.appendChild(tspan.node)\r\n\r\n return tspan.text(text)\r\n })\r\n }\r\n})\r\n\r\nregister(Tspan)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class ClipPath extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('clipPath', node), node)\r\n }\r\n\r\n // Unclip all clipped elements and remove itself\r\n remove () {\r\n // unclip all targets\r\n this.targets().forEach(function (el) {\r\n el.unclip()\r\n })\r\n\r\n // remove clipPath from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [clip-path*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create clipping element\r\n clip: wrapWithAttrCheck(function () {\r\n return this.defs().put(new ClipPath())\r\n })\r\n },\r\n Element: {\r\n // Distribute clipPath to svg element\r\n clipWith (element) {\r\n // use given clip or create a new one\r\n let clipper = element instanceof ClipPath\r\n ? element\r\n : this.parent().clip().add(element)\r\n\r\n // apply mask\r\n return this.attr('clip-path', 'url(\"#' + clipper.id() + '\")')\r\n },\r\n\r\n // Unclip element\r\n unclip () {\r\n return this.attr('clip-path', null)\r\n },\r\n\r\n clipper () {\r\n return this.reference('clip-path')\r\n }\r\n }\r\n})\r\n\r\nregister(ClipPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class G extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('g', node), node)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Element: {\r\n // Create a group element\r\n group: wrapWithAttrCheck(function () {\r\n return this.put(new G())\r\n })\r\n }\r\n})\r\n\r\nregister(G)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Container from './Container.js'\r\n\r\nexport default class A extends Container {\r\n constructor (node) {\r\n super(nodeOrNew('a', node), node)\r\n }\r\n\r\n // Link url\r\n to (url) {\r\n return this.attr('href', url, xlink)\r\n }\r\n\r\n // Link target attribute\r\n target (target) {\r\n return this.attr('target', target)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a hyperlink element\r\n link: wrapWithAttrCheck(function (url) {\r\n return this.put(new A()).to(url)\r\n })\r\n },\r\n Element: {\r\n // Create a hyperlink element\r\n linkTo: function (url) {\r\n var link = new A()\r\n\r\n if (typeof url === 'function') {\r\n url.call(link, link)\r\n } else {\r\n link.to(url)\r\n }\r\n\r\n return this.parent().put(link).put(this)\r\n }\r\n }\r\n})\r\n\r\nregister(A)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport Container from './Container.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class Mask extends Container {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('mask', node), node)\r\n }\r\n\r\n // Unmask all masked elements and remove itself\r\n remove () {\r\n // unmask all targets\r\n this.targets().forEach(function (el) {\r\n el.unmask()\r\n })\r\n\r\n // remove mask from parent\r\n return super.remove()\r\n }\r\n\r\n targets () {\r\n return baseFind('svg [mask*=\"' + this.id() + '\"]')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n mask: wrapWithAttrCheck(function () {\r\n return this.defs().put(new Mask())\r\n })\r\n },\r\n Element: {\r\n // Distribute mask to svg element\r\n maskWith (element) {\r\n // use given mask or create a new one\r\n var masker = element instanceof Mask\r\n ? element\r\n : this.parent().mask().add(element)\r\n\r\n // apply mask\r\n return this.attr('mask', 'url(\"#' + masker.id() + '\")')\r\n },\r\n\r\n // Unmask element\r\n unmask () {\r\n return this.attr('mask', null)\r\n },\r\n\r\n masker () {\r\n return this.reference('mask')\r\n }\r\n }\r\n})\r\n\r\nregister(Mask)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { unCamelCase } from '../utils/utils.js'\r\nimport Element from './Element.js'\r\n\r\nfunction cssRule (selector, rule) {\r\n if (!selector) return ''\r\n if (!rule) return selector\r\n\r\n var ret = selector + '{'\r\n\r\n for (var i in rule) {\r\n ret += unCamelCase(i) + ':' + rule[i] + ';'\r\n }\r\n\r\n ret += '}'\r\n\r\n return ret\r\n}\r\n\r\nexport default class Style extends Element {\r\n constructor (node) {\r\n super(nodeOrNew('style', node), node)\r\n }\r\n\r\n addText (w = '') {\r\n this.node.textContent += w\r\n return this\r\n }\r\n\r\n font (name, src, params = {}) {\r\n return this.rule('@font-face', {\r\n fontFamily: name,\r\n src: src,\r\n ...params\r\n })\r\n }\r\n\r\n rule (selector, obj) {\r\n return this.addText(cssRule(selector, obj))\r\n }\r\n}\r\n\r\nregisterMethods('Dom', {\r\n style: wrapWithAttrCheck(function (selector, obj) {\r\n return this.put(new Style()).rule(selector, obj)\r\n }),\r\n fontface: wrapWithAttrCheck(function (name, src, params) {\r\n return this.put(new Style()).font(name, src, params)\r\n })\r\n})\r\n\r\nregister(Style)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Path from './Path.js'\r\nimport PathArray from '../types/PathArray.js'\r\nimport Text from './Text.js'\r\nimport baseFind from '../modules/core/selector.js'\r\n\r\nexport default class TextPath extends Text {\r\n // Initialize node\r\n constructor (node) {\r\n super(nodeOrNew('textPath', node), node)\r\n }\r\n\r\n // return the array of the path track element\r\n array () {\r\n var track = this.track()\r\n\r\n return track ? track.array() : null\r\n }\r\n\r\n // Plot path if any\r\n plot (d) {\r\n var track = this.track()\r\n var pathArray = null\r\n\r\n if (track) {\r\n pathArray = track.plot(d)\r\n }\r\n\r\n return (d == null) ? pathArray : this\r\n }\r\n\r\n // Get the path element\r\n track () {\r\n return this.reference('href')\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n textPath: wrapWithAttrCheck(function (text, path) {\r\n return this.defs().path(path).text(text).addTo(this)\r\n })\r\n },\r\n Text: {\r\n // Create path for text to run on\r\n path: wrapWithAttrCheck(function (track) {\r\n var path = new TextPath()\r\n\r\n // if track is a path, reuse it\r\n if (!(track instanceof Path)) {\r\n // create path element\r\n track = this.root().defs().path(track)\r\n }\r\n\r\n // link textPath to path and add content\r\n path.attr('href', '#' + track, xlink)\r\n\r\n // add textPath element as child node and return textPath\r\n return this.put(path)\r\n }),\r\n\r\n // Get the textPath children\r\n textPath () {\r\n return this.find('textPath')[0]\r\n }\r\n },\r\n Path: {\r\n // creates a textPath from this path\r\n text: wrapWithAttrCheck(function (text) {\r\n if (text instanceof Text) {\r\n var txt = text.text()\r\n return text.clear().path(this).text(txt)\r\n }\r\n return this.parent().put(new Text()).path(this).text(text)\r\n }),\r\n\r\n targets () {\r\n return baseFind('svg [href*=\"' + this.id() + '\"]')\r\n }\r\n }\r\n})\r\n\r\nTextPath.prototype.MorphArray = PathArray\r\nregister(TextPath)\r\n","import { nodeOrNew, register, wrapWithAttrCheck } from '../utils/adopter.js'\r\nimport { registerMethods } from '../utils/methods.js'\r\nimport { xlink } from '../modules/core/namespaces.js'\r\nimport Shape from './Shape.js'\r\n\r\nexport default class Use extends Shape {\r\n constructor (node) {\r\n super(nodeOrNew('use', node), node)\r\n }\r\n\r\n // Use element as a reference\r\n element (element, file) {\r\n // Set lined element\r\n return this.attr('href', (file || '') + '#' + element, xlink)\r\n }\r\n}\r\n\r\nregisterMethods({\r\n Container: {\r\n // Create a use element\r\n use: wrapWithAttrCheck(function (element, file) {\r\n return this.put(new Use()).element(element, file)\r\n })\r\n }\r\n})\r\n\r\nregister(Use)\r\n","/* Optional Modules */\r\nimport './modules/optional/arrange.js'\r\nimport './modules/optional/class.js'\r\nimport './modules/optional/css.js'\r\nimport './modules/optional/data.js'\r\nimport './modules/optional/memory.js'\r\nimport './modules/optional/sugar.js'\r\nimport './modules/optional/transform.js'\r\n\r\nimport { extend, makeInstance } from './utils/adopter.js'\r\nimport { getMethodNames, getMethodsFor } from './utils/methods.js'\r\nimport Box from './types/Box.js'\r\nimport Circle from './elements/Circle.js'\r\nimport Color from './types/Color.js'\r\nimport Container from './elements/Container.js'\r\nimport Defs from './elements/Defs.js'\r\nimport Dom from './elements/Dom.js'\r\nimport Element from './elements/Element.js'\r\nimport Ellipse from './elements/Ellipse.js'\r\nimport EventTarget from './types/EventTarget.js'\r\nimport Gradient from './elements/Gradient.js'\r\nimport Image from './elements/Image.js'\r\nimport Line from './elements/Line.js'\r\nimport List from './types/List.js'\r\nimport Marker from './elements/Marker.js'\r\nimport Matrix from './types/Matrix.js'\r\nimport Morphable, {\r\n NonMorphable,\r\n ObjectBag,\r\n TransformBag,\r\n makeMorphable,\r\n registerMorphableType\r\n} from './animation/Morphable.js'\r\nimport Path from './elements/Path.js'\r\nimport PathArray from './types/PathArray.js'\r\nimport Pattern from './elements/Pattern.js'\r\nimport PointArray from './types/PointArray.js'\r\nimport Polygon from './elements/Polygon.js'\r\nimport Polyline from './elements/Polyline.js'\r\nimport Rect from './elements/Rect.js'\r\nimport Runner from './animation/Runner.js'\r\nimport SVGArray from './types/SVGArray.js'\r\nimport SVGNumber from './types/SVGNumber.js'\r\nimport Shape from './elements/Shape.js'\r\nimport Svg from './elements/Svg.js'\r\nimport Symbol from './elements/Symbol.js'\r\nimport Text from './elements/Text.js'\r\nimport Tspan from './elements/Tspan.js'\r\nimport * as defaults from './modules/core/defaults.js'\r\nimport * as utils from './utils/utils.js'\r\nimport * as namespaces from './modules/core/namespaces.js'\r\nimport * as regex from './modules/core/regex.js'\r\n\r\nexport {\r\n Morphable,\r\n registerMorphableType,\r\n makeMorphable,\r\n TransformBag,\r\n ObjectBag,\r\n NonMorphable\r\n}\r\n\r\nexport { defaults, utils, namespaces, regex }\r\nexport const SVG = makeInstance\r\nexport { default as parser } from './modules/core/parser.js'\r\nexport { default as find } from './modules/core/selector.js'\r\nexport * from './modules/core/event.js'\r\nexport * from './utils/adopter.js'\r\nexport { registerWindow } from './utils/window.js'\r\n\r\n/* Animation Modules */\r\nexport { default as Animator } from './animation/Animator.js'\r\nexport { Controller, Ease, PID, Spring, easing } from './animation/Controller.js'\r\nexport { default as Queue } from './animation/Queue.js'\r\nexport { default as Runner } from './animation/Runner.js'\r\nexport { default as Timeline } from './animation/Timeline.js'\r\n\r\n/* Types */\r\nexport { default as Array } from './types/SVGArray.js'\r\nexport { default as Box } from './types/Box.js'\r\nexport { default as Color } from './types/Color.js'\r\nexport { default as EventTarget } from './types/EventTarget.js'\r\nexport { default as Matrix } from './types/Matrix.js'\r\nexport { default as Number } from './types/SVGNumber.js'\r\nexport { default as PathArray } from './types/PathArray.js'\r\nexport { default as Point } from './types/Point.js'\r\nexport { default as PointArray } from './types/PointArray.js'\r\nexport { default as List } from './types/List.js'\r\n\r\n/* Elements */\r\nexport { default as Circle } from './elements/Circle.js'\r\nexport { default as ClipPath } from './elements/ClipPath.js'\r\nexport { default as Container } from './elements/Container.js'\r\nexport { default as Defs } from './elements/Defs.js'\r\nexport { default as Dom } from './elements/Dom.js'\r\nexport { default as Element } from './elements/Element.js'\r\nexport { default as Ellipse } from './elements/Ellipse.js'\r\nexport { default as Gradient } from './elements/Gradient.js'\r\nexport { default as G } from './elements/G.js'\r\nexport { default as A } from './elements/A.js'\r\nexport { default as Image } from './elements/Image.js'\r\nexport { default as Line } from './elements/Line.js'\r\nexport { default as Marker } from './elements/Marker.js'\r\nexport { default as Mask } from './elements/Mask.js'\r\nexport { default as Path } from './elements/Path.js'\r\nexport { default as Pattern } from './elements/Pattern.js'\r\nexport { default as Polygon } from './elements/Polygon.js'\r\nexport { default as Polyline } from './elements/Polyline.js'\r\nexport { default as Rect } from './elements/Rect.js'\r\nexport { default as Shape } from './elements/Shape.js'\r\nexport { default as Stop } from './elements/Stop.js'\r\nexport { default as Style } from './elements/Style.js'\r\nexport { default as Svg } from './elements/Svg.js'\r\nexport { default as Symbol } from './elements/Symbol.js'\r\nexport { default as Text } from './elements/Text.js'\r\nexport { default as TextPath } from './elements/TextPath.js'\r\nexport { default as Tspan } from './elements/Tspan.js'\r\nexport { default as Use } from './elements/Use.js'\r\n\r\nextend([\r\n Svg,\r\n Symbol,\r\n Image,\r\n Pattern,\r\n Marker\r\n], getMethodsFor('viewbox'))\r\n\r\nextend([\r\n Line,\r\n Polyline,\r\n Polygon,\r\n Path\r\n], getMethodsFor('marker'))\r\n\r\nextend(Text, getMethodsFor('Text'))\r\nextend(Path, getMethodsFor('Path'))\r\n\r\nextend(Defs, getMethodsFor('Defs'))\r\n\r\nextend([\r\n Text,\r\n Tspan\r\n], getMethodsFor('Tspan'))\r\n\r\nextend([\r\n Rect,\r\n Ellipse,\r\n Circle,\r\n Gradient\r\n], getMethodsFor('radius'))\r\n\r\nextend(EventTarget, getMethodsFor('EventTarget'))\r\nextend(Dom, getMethodsFor('Dom'))\r\nextend(Element, getMethodsFor('Element'))\r\nextend(Shape, getMethodsFor('Shape'))\r\n// extend(Element, getConstructor('Memory'))\r\nextend(Container, getMethodsFor('Container'))\r\n\r\nextend(Runner, getMethodsFor('Runner'))\r\n\r\nList.extend(getMethodNames())\r\n\r\nregisterMorphableType([\r\n SVGNumber,\r\n Color,\r\n Box,\r\n Matrix,\r\n SVGArray,\r\n PointArray,\r\n PathArray\r\n])\r\n\r\nmakeMorphable()\r\n"],"names":["methods","names","registerMethods","name","m","Array","isArray","_name","addMethodNames","Object","keys","assign","getMethodsFor","getMethodNames","Set","_names","push","map","array","block","i","il","length","result","filter","radians","d","Math","PI","degrees","r","camelCase","s","toLowerCase","replace","g","toUpperCase","unCamelCase","capitalize","charAt","slice","proportionalSize","element","width","height","box","bbox","getOrigin","o","origin","ox","oy","string","trim","x","y","bx","includes","by","ns","xmlns","xlink","svgjs","globals","window","document","registerWindow","win","doc","Base","elements","root","makeNode","createElementNS","makeInstance","adopter","querySelector","node","innerHTML","firstChild","nodeOrNew","Node","adopt","instance","className","nodeName","mockAdopt","mock","register","asRoot","prototype","getClass","did","eid","assignNewId","children","id","extend","modules","attrCheck","key","method","wrapWithAttrCheck","fn","args","constructor","apply","attr","siblings","parent","position","index","next","prev","forward","p","removeElement","add","isRoot","appendChild","defs","backward","front","back","before","remove","after","insertBefore","insertAfter","numberAndUnit","hex","rgb","reference","transforms","whitespace","isHex","isRgb","isCss","isBlank","isNumber","isPercent","isImage","delimiter","hyphen","pathLetters","isPathLetter","numbersWithDots","dots","classes","split","hasClass","indexOf","addClass","join","removeClass","c","toggleClass","css","style","val","ret","arguments","cssText","el","forEach","t","cased","test","show","hide","visible","data","a","v","JSON","parse","e","stringify","remember","k","memory","forget","_memory","listenerId","getEvents","n","getEventHolder","events","getEventTarget","clearEvents","on","listener","binding","options","l","bind","bag","_svgjsListenerId","event","ev","addEventListener","off","namespace","removeEventListener","dispatch","Event","dispatchEvent","CustomEvent","detail","cancelable","sixDigitHex","substring","componentHex","component","integer","round","toString","is","object","space","getParameters","b","params","_a","_b","_c","z","_d","h","cieSpace","hueToRgb","q","Color","inputs","init","values","noWhitespace","exec","parseInt","hexParse","Error","components","dToR","cos","sin","yL","xL","zL","ct","mx","nm","rU","gU","bU","pow","bd","color","min","lab","xyz","r255","g255","b255","rL","gL","bL","xU","yU","zU","lch","sqrt","atan2","hsl","max","isGrey","delta","cmyk","toHex","toRgb","format","rV","gV","bV","toArray","random","mode","isColor","Point","source","base","clone","transform","f","point","screenCTM","inverse","parser","nodes","svg","size","path","parentNode","body","documentElement","addTo","isNulledBox","w","domContains","contains","call","Box","parseFloat","left","top","x2","y2","cx","cy","merge","xMin","Infinity","xMax","yMin","yMax","pts","addOffset","pageXOffset","pageYOffset","isNulled","getBox","cb","retry","getBBox","rbox","getBoundingClientRect","viewbox","closeEnough","threshold","abs","Matrix","fromArray","Element","matrixify","isMatrixLike","matrix","multiplyO","formatTransforms","current","transformer","translateO","rx","ry","lmultiplyO","scaleO","scaleX","scaleY","skewO","skewX","skewY","shearO","shear","rotateO","theta","isFinite","px","py","dx","dy","tx","ty","compose","originX","originY","sx","sy","lam","rotate","translateX","translateY","decompose","determinant","ccw","thetaRad","st","multiply","matrixMultiply","lmultiply","inverseO","det","na","nb","nc","nd","ne","nf","translate","scale","flip","axis","around","flipO","lx","skew","tan","ly","skewXO","skewYO","aroundO","equals","other","comp","valueOf","flipBoth","flipX","flipY","positionX","positionY","relative","relativeX","relativeY","ctm","getCTM","rect","getScreenCTM","subClassArray","Function","baseClass","_constructor","Arr","create","arr","List","each","fnOrMethodName","concat","reduce","obj","attrs","baseFind","query","querySelectorAll","find","EventTarget","type","j","defaultPrevented","fire","noop","timeline","duration","ease","delay","fill","stroke","opacity","offset","SVGArray","toSet","SVGNumber","value","unit","isNaN","match","toJSON","plus","number","minus","times","divide","hooks","registerAttrHook","attributes","nodeValue","last","curr","removeAttribute","getAttribute","defaults","_val","hook","leading","setAttributeNS","setAttribute","rebuild","Dom","childNodes","put","clear","hasChildNodes","removeChild","lastChild","_defs","writeDataToDom","cloneNode","deep","first","get","has","matches","selector","matchesSelector","msMatchesSelector","mozMatchesSelector","webkitMatchesSelector","oMatchesSelector","SVGElement","putIn","replaceChild","precision","factor","newAttrs","svgOrFn","outerHTML","well","len","fragment","_this","createDocumentFragment","firstElementChild","words","text","textContent","Svg","dom","hasAttribute","setData","center","inside","move","parents","until","sugar","prefix","extension","mat","angle","direction","directionString","dmove","radius","_element","getTotalLength","pointAt","getPointAtLength","font","ax","ay","amove","defineProperty","untransform","str","kv","reverse","toParent","pCtm","toRoot","decomposed","cleanRelative","Shape","Circle","circle","Container","flatten","ungroup","Defs","Ellipse","circled","ellipse","Stop","update","from","fx","fy","x1","y1","to","Gradient","stop","url","targets","gradiented","gradient","Pattern","pattern","patternUnits","Image","load","callback","img","src","image","PointArray","toLine","at","pos","destination","points","pop","maxX","maxY","minX","minY","MorphArray","Line","plot","pointed","line","Marker","ref","marker","isObject","require$$0","require$$1","require$$2","anObject","toPrimitive","IE8_DOM_DEFINE","dP","createDesc","global","aFunction","core","ctx","redefine","defined","fails","$export","toObject","makeSetterGetter","easing","bezier","steps","stepPosition","jumps","beforeFlag","step","floor","jumping","Stepper","done","Ease","Controller","stepper","target","dt","recalculate","_duration","overshoot","_overshoot","eps","pi","os","log","zeta","wn","Spring","velocity","acceleration","newPosition","PID","windup","integral","error","P","I","D","PathArray","pathRegReplace","arrayToString","pathHandlers","M","p0","L","H","V","C","S","Q","T","Z","A","mlhvqtcsaz","jl","equalCommands","pathArray","morph","sourceArray","destinationArray","paramCnt","Morphable","_stepper","_from","_to","_type","_context","_morphObj","_set","NonMorphable","morphableTypes","ObjectBag","complete","TransformBag","objOrArr","entries","sort","registerMorphableType","makeMorphable","Path","_array","Polygon","polygon","poly","Polyline","polyline","Rect","Queue","_first","_last","item","shift","Animator","nextDraw","frames","timeouts","timer","performance","Date","frame","run","requestAnimationFrame","_draw","transform_frame","timeout","time","now","cancelFrame","clearTimeout","nextTimeout","lastTimeout","nextFrame","lastFrame","makeSchedule","runnerInfo","start","runner","end","defaultSource","Timeline","timeSource","_timeSource","_startTime","_speed","_persist","_nextFrame","_paused","_runners","_order","_time","_lastSourceTime","_lastStepTime","_step","schedule","when","absoluteStartTime","endTime","getEndTime","unschedule","persist","updateTime","_continue","splice","lastRunnerInfo","lastDuration","lastStartTime","active","play","pause","finish","speed","yes","currentSpeed","positive","seek","dtOrForever","immediateStep","dtSource","dtTime","runnersLeft","dtToStart","reset","finished","_timeline","Runner","_queue","_isDeclarative","_history","enabled","_lastTime","_reseted","transformId","_haveReversed","_reverse","_loopsDone","_swing","_wait","_times","_prepareRunner","animate","sanitise","loop","swing","wait","queue","initFn","runFn","retargetFn","isTransform","initialiser","retarget","initialised","during","loops","loopDuration","loopsDone","relativeTime","whole","partial","swinging","backwards","uncliped","clipped","swingForward","forwards","progress","running","_lastPosition","justStarted","justFinished","declarative","_initialise","converged","_run","_rememberMorpher","morpher","caller","_tryRetarget","needsIt","positionOrDt","allfinished","addTransform","clearTransform","clearTransformsFromQueue","FakeRunner","mergeWith","getRunnerTransform","mergeTransforms","runners","_transformationRunners","netTransform","_frameId","RunnerArray","ids","leftSibling","getByID","lastRunner","edit","newRunner","clearBefore","deleteCnt","frameId","_clearTransformRunnersBefore","currentRunner","_currentTransform","addRunner","styleAttr","zoom","level","affine","isMatrix","currentAngle","startTransform","setup","undefined","rTarget","rCurrent","possibilities","distances","shortest","affineParameters","newTransforms","_queueNumber","_queueNumberDelta","newTo","_queueObject","version","getElementsByTagName","nested","Symbol","symbol","plain","_build","createTextNode","getComputedTextLength","Text","_rebuild","firstLine","nodeType","newLined","build","tspan","newLine","self","blankLineOffset","fontSize","getComputedStyle","getPropertyValue","textable","Tspan","ClipPath","unclip","clip","clipWith","clipper","G","group","link","linkTo","Mask","unmask","mask","maskWith","masker","cssRule","rule","Style","addText","fontFamily","fontface","TextPath","track","textPath","txt","Use","file","use","SVG"],"mappings":";;;;;;;;;;;;;;AAAA,MAAMA,OAAO,GAAG,EAAhB;AACA,MAAMC,KAAK,GAAG,EAAd;AAEA,AAAO,SAASC,eAAT,CAA0BC,IAA1B,EAAgCC,CAAhC,EAAmC;MACpCC,KAAK,CAACC,OAAN,CAAcH,IAAd,CAAJ,EAAyB;SAClB,IAAII,KAAT,IAAkBJ,IAAlB,EAAwB;MACtBD,eAAe,CAACK,KAAD,EAAQH,CAAR,CAAf;;;;;;MAKA,OAAOD,IAAP,KAAgB,QAApB,EAA8B;SACvB,IAAII,KAAT,IAAkBJ,IAAlB,EAAwB;MACtBD,eAAe,CAACK,KAAD,EAAQJ,IAAI,CAACI,KAAD,CAAZ,CAAf;;;;;;EAKJC,cAAc,CAACC,MAAM,CAACC,IAAP,CAAYN,CAAZ,CAAD,CAAd;EACAJ,OAAO,CAACG,IAAD,CAAP,GAAgBM,MAAM,CAACE,MAAP,CAAcX,OA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AM,CAACyV,WAAD,EAAc9a,aAAa,CAAC,aAAD,CAA3B,CAAN;AACAqF,MAAM,CAACmY,GAAD,EAAMxd,aAAa,CAAC,KAAD,CAAnB,CAAN;AACAqF,MAAM,CAACoP,OAAD,EAAUzU,aAAa,CAAC,SAAD,CAAvB,CAAN;AACAqF,MAAM,CAAC6c,KAAD,EAAQliB,aAAa,CAAC,OAAD,CAArB,CAAN;;AAEAqF,MAAM,CAACgd,SAAD,EAAYriB,aAAa,CAAC,WAAD,CAAzB,CAAN;AAEAqF,MAAM,CAACurB,MAAD,EAAS5wB,aAAa,CAAC,QAAD,CAAtB,CAAN;AAEAma,IAAI,CAAC9U,MAAL,CAAYpF,cAAc,EAA1B;AAEAorB,qBAAqB,CAAC,CACpBvP,SADoB,EAEpBlO,KAFoB,EAGpB8E,GAHoB,EAIpB6B,MAJoB,EAKpBqH,QALoB,EAMpBuI,UANoB,EAOpB2E,SAPoB,CAAD,CAArB;AAUAwC,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file
diff --git a/spec/SpecRunner.html b/spec/SpecRunner.html
index e757924..1f8dae8 100644
--- a/spec/SpecRunner.html
+++ b/spec/SpecRunner.html
@@ -58,15 +58,15 @@
<!--<script src="es5TestBundle.js"></script>-->
- <script src="spec/adopter.js"></script>
+ <!-- <script src="spec/adopter.js"></script>
<script src="spec/arrange.js"></script>
<script src="spec/array.js"></script>
<script src="spec/bare.js"></script>
<script src="spec/boxes.js"></script>
<script src="spec/circle.js"></script>
- <script src="spec/clip.js"></script>
+ <script src="spec/clip.js"></script> -->
<script src="spec/color.js"></script>
- <script src="spec/container.js"></script>
+ <!-- <script src="spec/container.js"></script>
<script src="spec/defs.js"></script>
<script src="spec/doc.js"></script>
<script src="spec/easing.js"></script>
@@ -104,6 +104,6 @@
<script src="spec/morphing.js"></script>
<script src="spec/animator.js"></script>
<script src="spec/runner.js"></script>
- <script src="spec/queue.js"></script>
+ <script src="spec/queue.js"></script> -->
</body>
</html>
diff --git a/spec/spec/color.js b/spec/spec/color.js
index 410577f..973e323 100644
--- a/spec/spec/color.js
+++ b/spec/spec/color.js
@@ -1,3 +1,4 @@
+
describe('Color', function() {
var color
@@ -5,42 +6,257 @@ describe('Color', function() {
color = new SVG.Color({ r: 0, g: 102, b: 255 })
})
- it('correclty parses a rgb string', function() {
- color = new SVG.Color('rgb(255,0,128)')
- expect(color.r).toBe(255)
- expect(color.g).toBe(0)
- expect(color.b).toBe(128)
- })
+ describe ('construct: constructs a color in different formats', () => {
- it('correclty parses a 3 digit hex string', function() {
- color = new SVG.Color('#f06')
- expect(color.r).toBe(255)
- expect(color.g).toBe(0)
- expect(color.b).toBe(102)
- })
+ it ('constructs a color from an object in the correct color space', () => {
- it('correclty parses a 6 digit hex string', function() {
- color = new SVG.Color('#0066ff')
- expect(color.r).toBe(0)
- expect(color.g).toBe(102)
- expect(color.b).toBe(255)
- })
+ // Try in rgb
+ let color = new SVG.Color({ r: 255, g: 0, b: 128 })
+ expect(color.r).toBe(255)
+ expect(color.g).toBe(0)
+ expect(color.b).toBe(128)
+ expect(color.space).toBe('rgb')
+
+ // Try in cmyk
+ let color2 = new SVG.Color({ c: 20, y: 15, m: 10, k: 5 })
+ expect(color2.c).toBe(20)
+ expect(color2.m).toBe(10)
+ expect(color2.y).toBe(15)
+ expect(color2.k).toBe(5)
+ expect(color2.space).toBe('cmyk')
+ })
+
+ it ('constructs a color from an array', () => {
+ let color = new SVG.Color([ 30, 24, 50 ])
+ expect( color.r ).toBe( 30 )
+ expect( color.g ).toBe( 24 )
+ expect( color.b ).toBe( 50 )
+ expect( color.space ).toBe('rgb')
+ })
+
+ it ('constructs a color from an array with space in array', () => {
+ let color = new SVG.Color([ 50, 50, 5, 'lab' ])
+ expect( color.l ).toBe( 50 )
+ expect( color.a ).toBe( 50 )
+ expect( color.b ).toBe( 5 )
+ expect( color.space ).toBe('lab')
+ })
+
+ it ('constructs a color from an array with space given', () => {
+ let color = new SVG.Color([ 50, 50, 5], 'lab' )
+ expect( color.l ).toBe( 50 )
+ expect( color.a ).toBe( 50 )
+ expect( color.b ).toBe( 5 )
+ expect( color.space ).toBe('lab')
+ })
- describe('toHex()', function() {
- it('returns a hex color', function() {
- expect(color.toHex()).toBe('#0066ff')
+ it('correclty parses an rgb string', () => {
+ let color = new SVG.Color('rgb(255,0,128)')
+ expect(color.r).toBe(255)
+ expect(color.g).toBe(0)
+ expect(color.b).toBe(128)
})
+
+ it('correclty parses a 3 digit hex string', () => {
+ color = new SVG.Color('#f06')
+ expect(color.r).toBe(255)
+ expect(color.g).toBe(0)
+ expect(color.b).toBe(102)
+ })
+
+ it('correclty parses a 6 digit hex string', () => {
+ color = new SVG.Color('#0066ff')
+ expect(color.r).toBe(0)
+ expect(color.g).toBe(102)
+ expect(color.b).toBe(255)
+ })
+
})
- describe('toRgb()', function() {
- it('returns a rgb string color', function() {
- expect(color.toRgb()).toBe('rgb(0,102,255)')
+ describe ('input and output: Importing and exporting colors', () => {
+ describe('toHex()', function() {
+ it('returns a hex color', function() {
+ expect(color.toHex()).toBe('#0066ff')
+ })
+ })
+
+ describe('toRgb()', function() {
+ it('returns a rgb string color', function() {
+ expect(color.toRgb()).toBe('rgb(0,102,255)')
+ })
})
})
- describe('brightness()', function() {
- it('returns the percieved brightness value of a color', function() {
- expect(color.brightness()).toBe(0.346)
+ describe('color spaces: The color spaces supported by our library', () => {
+
+ describe('lab()', () => {
+ it ('can convert rgb to lab', () => {
+ let color = new SVG.Color( 255, 0, 128 )
+ let lab = color.lab()
+ expect( lab.l ).toBeCloseTo( 54.88, 1 )
+ expect( lab.a ).toBeCloseTo( 84.55, 1 )
+ expect( lab.b ).toBeCloseTo( 4.065, 1 )
+ expect( lab.space ).toBe('lab')
+ })
+
+ it ('can convert from lab to rgb', () => {
+ let lab = new SVG.Color( 54.88, 84.55, 4.065, 'lab' )
+ let rgb = lab.rgb()
+ expect( rgb.r ).toBeCloseTo( 255, 0 )
+ expect( rgb.g ).toBeCloseTo( 0, 0 )
+ expect( rgb.b ).toBeCloseTo( 128, 0 )
+ expect( rgb.space ).toBe('rgb')
+ })
+
+ it ('is invertable', () => {
+ let { r, g, b } = new SVG.Color( 255, 0, 128 ).lab().rgb()
+ expect ( r ).toBeCloseTo( 255, 0 )
+ expect ( g ).toBeCloseTo( 0, 0 )
+ expect ( b ).toBeCloseTo( 128, 0 )
+ })
+
+ it('handles black', () => {
+ let {r, g, b} = new SVG.Color(0, 0, 0).lab().rgb()
+ expect( r ).toBeCloseTo(0, 0)
+ expect( g ).toBeCloseTo(0, 0)
+ expect( b ).toBeCloseTo(0, 0)
+ })
+
+ it('handles white', () => {
+ let {r, g, b} = new SVG.Color(255, 255, 255).lab().rgb()
+ expect( r ).toBeCloseTo(255, 0)
+ expect( g ).toBeCloseTo(255, 0)
+ expect( b ).toBeCloseTo(255, 0)
+ })
})
+
+ describe('lch()', () => {
+ it ('can convert rgb to lch', () => {
+ let color = new SVG.Color( 255, 0, 128 )
+ let lch = color.lch()
+ expect( lch.l ).toBeCloseTo( 54.88, 1 )
+ expect( lch.c ).toBeCloseTo( 84.65, 1 )
+ expect( lch.h ).toBeCloseTo( 2.75, 1 )
+ expect( lch.space ).toBe('lch')
+ })
+
+ it ('can convert from lch to rgb', () => {
+ let lch = new SVG.Color( 54.88, 84.65, 2.75, 'lch' )
+ let rgb = lch.rgb()
+ expect( rgb.r ).toBeCloseTo( 255, 0 )
+ expect( rgb.g ).toBeCloseTo( 0, 0 )
+ expect( rgb.b ).toBeCloseTo( 128, 0 )
+ expect( rgb.space ).toBe('rgb')
+ })
+
+ it ('is invertable', () => {
+ let { r, g, b } = new SVG.Color( 255, 0, 128 ).lch().rgb()
+ expect ( r ).toBeCloseTo( 255, 0 )
+ expect ( g ).toBeCloseTo( 0, 0 )
+ expect ( b ).toBeCloseTo( 128, 0 )
+ })
+
+ it('handles black', () => {
+ let {r, g, b} = new SVG.Color(0, 0, 0).lch().rgb()
+ expect( r ).toBeCloseTo(0, 0)
+ expect( g ).toBeCloseTo(0, 0)
+ expect( b ).toBeCloseTo(0, 0)
+ })
+
+ it('handles white', () => {
+ let {r, g, b} = new SVG.Color(255, 255, 255).lch().rgb()
+ expect( r ).toBeCloseTo(255, 0)
+ expect( g ).toBeCloseTo(255, 0)
+ expect( b ).toBeCloseTo(255, 0)
+ })
+ })
+
+ describe('hsl()', () => {
+
+ it ('can convert from rgb to hsl', () => {
+ let color = new SVG.Color( 255, 0, 128 )
+ let hsl = color.hsl()
+ expect( hsl.h ).toBeCloseTo( 329.88, 1 )
+ expect( hsl.s ).toBeCloseTo( 100, 1 )
+ expect( hsl.l ).toBeCloseTo( 50, 1 )
+ expect( hsl.space ).toBe('hsl')
+ })
+
+ it ('can convert from hsl to rgb', () => {
+ let hsl = new SVG.Color( 329.88, 100, 50, 'hsl' )
+ let rgb = hsl.rgb()
+ expect( rgb.r ).toBeCloseTo( 255, 0 )
+ expect( rgb.g ).toBeCloseTo( 0, 0 )
+ expect( rgb.b ).toBeCloseTo( 128, 0 )
+ expect( rgb.space ).toBe('rgb')
+ })
+
+ it ('is invertable', () => {
+ let { r, g, b } = new SVG.Color( 255, 0, 128 ).hsl().rgb()
+ expect ( r ).toBeCloseTo( 255, 0 )
+ expect ( g ).toBeCloseTo( 0, 0 )
+ expect ( b ).toBeCloseTo( 128, 0 )
+ })
+
+ it('handles black', () => {
+ let {r, g, b} = new SVG.Color(0, 0, 0).hsl().rgb()
+ expect( r ).toBeCloseTo(0, 0)
+ expect( g ).toBeCloseTo(0, 0)
+ expect( b ).toBeCloseTo(0, 0)
+ })
+
+ it('handles white', () => {
+ let {r, g, b} = new SVG.Color(255, 255, 255).hsl().rgb()
+ expect( r ).toBeCloseTo(255, 0)
+ expect( g ).toBeCloseTo(255, 0)
+ expect( b ).toBeCloseTo(255, 0)
+ })
+ })
+
+ describe('cmyk()', () => {
+
+ it ('can convert from rgb to cmyk', () => {
+ let color = new SVG.Color( 255, 0, 128 )
+ let cmyk = color.cmyk()
+ expect( cmyk.c ).toBeCloseTo( 0, 1 )
+ expect( cmyk.m ).toBeCloseTo( 1, 1 )
+ expect( cmyk.y ).toBeCloseTo( 0.49, 1 )
+ expect( cmyk.k ).toBeCloseTo( 0, 1 )
+ expect( cmyk.space ).toBe('cmyk')
+ })
+
+ it ('can convert from cmyk to rgb', () => {
+ let color = new SVG.Color( 0, 1, 0.49, 0, 'cmyk' )
+ let rgb = color.rgb()
+ expect( rgb.r ).toBeCloseTo( 255, -1 )
+ expect( rgb.g ).toBeCloseTo( 0, -1 )
+ expect( rgb.b ).toBeCloseTo( 128, -1 )
+ expect( rgb.space ).toBe('rgb')
+ })
+
+ it ('is invertable', () => {
+ let { r, g, b } = new SVG.Color( 255, 0, 128 ).cmyk().rgb()
+ expect ( r ).toBeCloseTo( 255, 0 )
+ expect ( g ).toBeCloseTo( 0, 0 )
+ expect ( b ).toBeCloseTo( 128, 0 )
+ })
+
+ it('handles black', () => {
+ let {r, g, b} = new SVG.Color(0, 0, 0).cmyk().rgb()
+ expect( r ).toBeCloseTo(0, 0)
+ expect( g ).toBeCloseTo(0, 0)
+ expect( b ).toBeCloseTo(0, 0)
+ })
+
+ it('handles white', () => {
+ let {r, g, b} = new SVG.Color(255, 255, 255).cmyk().rgb()
+ expect( r ).toBeCloseTo(255, 0)
+ expect( g ).toBeCloseTo(255, 0)
+ expect( b ).toBeCloseTo(255, 0)
+ })
+
+ })
+
})
+
})
diff --git a/src/animation/Animator.js b/src/animation/Animator.js
index 0119cba..2786602 100644
--- a/src/animation/Animator.js
+++ b/src/animation/Animator.js
@@ -74,7 +74,9 @@ const Animator = {
nextFrame.run()
}
- Animator.transforms.forEach(function (el) { el() })
+ Animator.transforms.forEach(function (el) {
+ el()
+ })
// If we have remaining timeouts or frames, draw until we don't anymore
Animator.nextDraw = Animator.timeouts.first() || Animator.frames.first()
diff --git a/src/animation/Controller.js b/src/animation/Controller.js
index cee7115..6cf58cd 100644
--- a/src/animation/Controller.js
+++ b/src/animation/Controller.js
@@ -17,10 +17,18 @@ function makeSetterGetter (k, f) {
}
export let easing = {
- '-': function (pos) { return pos },
- '<>': function (pos) { return -Math.cos(pos * Math.PI) / 2 + 0.5 },
- '>': function (pos) { return Math.sin(pos * Math.PI / 2) },
- '<': function (pos) { return -Math.cos(pos * Math.PI / 2) + 1 },
+ '-': function (pos) {
+ return pos
+ },
+ '<>': function (pos) {
+ return -Math.cos(pos * Math.PI) / 2 + 0.5
+ },
+ '>': function (pos) {
+ return Math.sin(pos * Math.PI / 2)
+ },
+ '<': function (pos) {
+ return -Math.cos(pos * Math.PI / 2) + 1
+ },
bezier: function (x1, y1, x2, y2) {
// see https://www.w3.org/TR/css-easing-1/#cubic-bezier-algo
return function (t) {
@@ -85,7 +93,9 @@ export let easing = {
}
export class Stepper {
- done () { return false }
+ done () {
+ return false
+ }
}
/***
@@ -166,9 +176,9 @@ export class Spring extends Controller {
// Apply the control to get the new position and store it
var acceleration = -this.d * velocity - this.k * (current - target)
- var newPosition = current +
- velocity * dt +
- acceleration * dt * dt / 2
+ var newPosition = current
+ + velocity * dt
+ + acceleration * dt * dt / 2
// Store the velocity
c.velocity = velocity + acceleration * dt
diff --git a/src/animation/Morphable.js b/src/animation/Morphable.js
index 4d52066..56ffe95 100644
--- a/src/animation/Morphable.js
+++ b/src/animation/Morphable.js
@@ -80,10 +80,17 @@ export default class Morphable {
}
}
- var result = (new this._type(value)).toArray()
+ var result = (new this._type(value))
+ if (this._type === Color) {
+ result = this._to ? result[this._to[4]]()
+ : this._from ? result[this._from[4]]()
+ : result
+ }
+ result = result.toArray()
+
this._morphObj = this._morphObj || new this._type()
- this._context = this._context ||
- Array.apply(null, Array(result.length)).map(Object)
+ this._context = this._context
+ || Array.apply(null, Array(result.length)).map(Object)
return result
}
@@ -129,7 +136,7 @@ export class NonMorphable {
}
toArray () {
- return [this.value]
+ return [ this.value ]
}
}
diff --git a/src/animation/Runner.js b/src/animation/Runner.js
index 125c4c5..3af5823 100644
--- a/src/animation/Runner.js
+++ b/src/animation/Runner.js
@@ -230,7 +230,7 @@ export default class Runner extends EventTarget {
var endTime = t * (w + d) - w
position = x <= 0 ? Math.round(f(1e-5))
: x < endTime ? f(x)
- : Math.round(f(endTime - 1e-5))
+ : Math.round(f(endTime - 1e-5))
return position
}
@@ -355,7 +355,7 @@ export default class Runner extends EventTarget {
// which has access to the outer scope
if (this._history[method].caller.retarget) {
this._history[method].caller.retarget(target)
- // for everything else a simple morpher change is sufficient
+ // for everything else a simple morpher change is sufficient
} else {
this._history[method].morpher.to(target)
}
@@ -470,7 +470,7 @@ class FakeRunner {
clearTransformsFromQueue () { }
}
-extend([Runner, FakeRunner], {
+extend([ Runner, FakeRunner ], {
mergeWith (runner) {
return new FakeRunner(
runner.transforms.lmultiply(this.transforms),
@@ -729,7 +729,7 @@ extend(Runner, {
let { x, y } = new Point(origin).transform(element._currentTransform(this))
- let target = new Matrix({ ...transforms, origin: [x, y] })
+ let target = new Matrix({ ...transforms, origin: [ x, y ] })
let start = this._isDeclarative && current
? current
: startTransform
@@ -743,7 +743,7 @@ extend(Runner, {
const rCurrent = start.rotate
// Figure out the shortest path to rotate directly
- const possibilities = [rTarget - 360, rTarget, rTarget + 360]
+ const possibilities = [ rTarget - 360, rTarget, rTarget + 360 ]
const distances = possibilities.map(a => Math.abs(a - rCurrent))
const shortest = Math.min(...distances)
const index = distances.indexOf(shortest)
@@ -775,8 +775,8 @@ extend(Runner, {
function retarget (newTransforms) {
// only get a new origin if it changed since the last call
if (
- (newTransforms.origin || 'center').toString() !==
- (transforms.origin || 'center').toString()
+ (newTransforms.origin || 'center').toString()
+ !== (transforms.origin || 'center').toString()
) {
origin = getOrigin(transforms, element)
}
@@ -911,7 +911,7 @@ extend(Runner, {
plot (a, b, c, d) {
// Lines can be plotted with 4 arguments
if (arguments.length === 4) {
- return this.plot([a, b, c, d])
+ return this.plot([ a, b, c, d ])
}
var morpher = this._element.MorphArray().to(a)
diff --git a/src/elements/A.js b/src/elements/A.js
index 722deed..ef047a2 100644
--- a/src/elements/A.js
+++ b/src/elements/A.js
@@ -31,7 +31,9 @@ registerMethods({
linkTo: function (url) {
var link = new A()
- if (typeof url === 'function') { url.call(link, link) } else {
+ if (typeof url === 'function') {
+ url.call(link, link)
+ } else {
link.to(url)
}
diff --git a/src/elements/Defs.js b/src/elements/Defs.js
index 2826611..6b486ca 100644
--- a/src/elements/Defs.js
+++ b/src/elements/Defs.js
@@ -6,8 +6,12 @@ export default class Defs extends Container {
super(nodeOrNew('defs', node), node)
}
- flatten () { return this }
- ungroup () { return this }
+ flatten () {
+ return this
+ }
+ ungroup () {
+ return this
+ }
}
register(Defs)
diff --git a/src/elements/Dom.js b/src/elements/Dom.js
index f6e72c9..ff8542e 100644
--- a/src/elements/Dom.js
+++ b/src/elements/Dom.js
@@ -79,7 +79,7 @@ export default class Dom extends EventTarget {
var i, il
for (i = 0, il = children.length; i < il; i++) {
- block.apply(children[i], [i, children])
+ block.apply(children[i], [ i, children ])
if (deep) {
children[i].each(block, deep)
@@ -260,7 +260,7 @@ export default class Dom extends EventTarget {
if (result === false) {
this.remove()
- // If modifier returns new node, use it
+ // If modifier returns new node, use it
} else if (result && this !== _this) {
this.replace(_this)
}
diff --git a/src/elements/Element.js b/src/elements/Element.js
index 91aa3e0..594daa1 100644
--- a/src/elements/Element.js
+++ b/src/elements/Element.js
@@ -74,10 +74,10 @@ export default class Element extends Dom {
inside (x, y) {
let box = this.bbox()
- return x > box.x &&
- y > box.y &&
- x < box.x + box.width &&
- y < box.y + box.height
+ return x > box.x
+ && y > box.y
+ && x < box.x + box.width
+ && y < box.y + box.height
}
// Move element to given x and y values
@@ -92,9 +92,9 @@ export default class Element extends Dom {
let parent = this
while (
- (parent = parent.parent()) &&
- parent.node !== until.node &&
- parent.node !== globals.document
+ (parent = parent.parent())
+ && parent.node !== until.node
+ && parent.node !== globals.document
) {
parents.push(parent)
}
diff --git a/src/elements/Line.js b/src/elements/Line.js
index 99e7497..edf10e7 100644
--- a/src/elements/Line.js
+++ b/src/elements/Line.js
@@ -59,7 +59,7 @@ registerMethods({
// x1 is not necessarily a number, it can also be an array, a string and a PointArray
return Line.prototype.plot.apply(
this.put(new Line())
- , args[0] != null ? args : [0, 0, 0, 0]
+ , args[0] != null ? args : [ 0, 0, 0, 0 ]
)
})
}
diff --git a/src/elements/Marker.js b/src/elements/Marker.js
index d40d13b..238f559 100644
--- a/src/elements/Marker.js
+++ b/src/elements/Marker.js
@@ -29,7 +29,9 @@ export default class Marker extends Container {
this.clear()
// invoke passed block
- if (typeof block === 'function') { block.call(this, this) }
+ if (typeof block === 'function') {
+ block.call(this, this)
+ }
return this
}
@@ -62,7 +64,7 @@ registerMethods({
marker: {
// Create and attach markers
marker (marker, width, height, block) {
- var attr = ['marker']
+ var attr = [ 'marker' ]
// Build attribute name
if (marker !== 'all') attr.push(marker)
diff --git a/src/elements/Svg.js b/src/elements/Svg.js
index 6172454..ab7d89f 100644
--- a/src/elements/Svg.js
+++ b/src/elements/Svg.js
@@ -17,9 +17,9 @@ export default class Svg extends Container {
}
isRoot () {
- return !this.node.parentNode ||
- !(this.node.parentNode instanceof globals.window.SVGElement) ||
- this.node.parentNode.nodeName === '#document'
+ return !this.node.parentNode
+ || !(this.node.parentNode instanceof globals.window.SVGElement)
+ || this.node.parentNode.nodeName === '#document'
}
// Check if this is a root svg
@@ -42,8 +42,8 @@ export default class Svg extends Container {
defs () {
if (!this.isRoot()) return this.root().defs()
- return adopt(this.node.getElementsByTagName('defs')[0]) ||
- this.put(new Defs())
+ return adopt(this.node.getElementsByTagName('defs')[0])
+ || this.put(new Defs())
}
// custom parent method
diff --git a/src/modules/core/attr.js b/src/modules/core/attr.js
index f90dcb9..79dd0d7 100644
--- a/src/modules/core/attr.js
+++ b/src/modules/core/attr.js
@@ -41,7 +41,7 @@ export default function attr (attr, val, ns) {
val = this.node.getAttribute(attr)
return val == null ? defaults[attr]
: isNumber.test(val) ? parseFloat(val)
- : val
+ : val
} else {
// Loop through hooks and execute them to convert value
val = hooks.reduce((_val, hook) => {
diff --git a/src/modules/core/event.js b/src/modules/core/event.js
index a52a744..507e91f 100644
--- a/src/modules/core/event.js
+++ b/src/modules/core/event.js
@@ -79,7 +79,9 @@ export function off (node, events, listener, options) {
} else if (ev && ns) {
// remove all listeners for a namespaced event
if (bag[ev] && bag[ev][ns]) {
- for (l in bag[ev][ns]) { off(n, [ev, ns].join('.'), l) }
+ for (l in bag[ev][ns]) {
+ off(n, [ ev, ns ].join('.'), l)
+ }
delete bag[ev][ns]
}
@@ -87,19 +89,25 @@ export function off (node, events, listener, options) {
// remove all listeners for a specific namespace
for (event in bag) {
for (namespace in bag[event]) {
- if (ns === namespace) { off(n, [event, ns].join('.')) }
+ if (ns === namespace) {
+ off(n, [ event, ns ].join('.'))
+ }
}
}
} else if (ev) {
// remove all listeners for the event
if (bag[ev]) {
- for (namespace in bag[ev]) { off(n, [ev, namespace].join('.')) }
+ for (namespace in bag[ev]) {
+ off(n, [ ev, namespace ].join('.'))
+ }
delete bag[ev]
}
} else {
// remove all listeners on a given node
- for (event in bag) { off(n, event) }
+ for (event in bag) {
+ off(n, event)
+ }
clearEvents(node)
}
diff --git a/src/modules/core/poly.js b/src/modules/core/poly.js
index ad12020..f23b70b 100644
--- a/src/modules/core/poly.js
+++ b/src/modules/core/poly.js
@@ -10,7 +10,7 @@ export function array () {
export function plot (p) {
return (p == null) ? this.array()
: this.clear().attr('points', typeof p === 'string' ? p
- : (this._array = new PointArray(p)))
+ : (this._array = new PointArray(p)))
}
// Clear array cache
diff --git a/src/modules/optional/css.js b/src/modules/optional/css.js
index babee7a..2c97f3e 100644
--- a/src/modules/optional/css.js
+++ b/src/modules/optional/css.js
@@ -8,7 +8,9 @@ export function css (style, val) {
if (arguments.length === 0) {
// get full style as object
this.node.style.cssText.split(/\s*;\s*/)
- .filter(function (el) { return !!el.length })
+ .filter(function (el) {
+ return !!el.length
+ })
.forEach(function (el) {
let t = el.split(/\s*:\s*/)
ret[t[0]] = t[1]
@@ -35,16 +37,16 @@ export function css (style, val) {
if (typeof style === 'object') {
for (let name in style) {
// set empty string if null/undefined/'' was given
- this.node.style[camelCase(name)] =
- (style[name] == null || isBlank.test(style[name])) ? '' : style[name]
+ this.node.style[camelCase(name)]
+ = (style[name] == null || isBlank.test(style[name])) ? '' : style[name]
}
}
}
// set style for property
if (arguments.length === 2) {
- this.node.style[camelCase(style)] =
- (val == null || isBlank.test(val)) ? '' : val
+ this.node.style[camelCase(style)]
+ = (val == null || isBlank.test(val)) ? '' : val
}
return this
diff --git a/src/modules/optional/data.js b/src/modules/optional/data.js
index 341d129..4c163c0 100644
--- a/src/modules/optional/data.js
+++ b/src/modules/optional/data.js
@@ -15,8 +15,8 @@ export function data (a, v, r) {
} else {
this.attr('data-' + a,
v === null ? null
- : r === true || typeof v === 'string' || typeof v === 'number' ? v
- : JSON.stringify(v)
+ : r === true || typeof v === 'string' || typeof v === 'number' ? v
+ : JSON.stringify(v)
)
}
diff --git a/src/modules/optional/sugar.js b/src/modules/optional/sugar.js
index 6001631..18f3e78 100644
--- a/src/modules/optional/sugar.js
+++ b/src/modules/optional/sugar.js
@@ -8,15 +8,15 @@ import SVGNumber from '../../types/SVGNumber.js'
// Define list of available attributes for stroke and fill
var sugar = {
- stroke: ['color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset'],
- fill: ['color', 'opacity', 'rule'],
+ stroke: [ 'color', 'width', 'opacity', 'linecap', 'linejoin', 'miterlimit', 'dasharray', 'dashoffset' ],
+ fill: [ 'color', 'opacity', 'rule' ],
prefix: function (t, a) {
return a === 'color' ? t : t + '-' + a
}
}
// Add sugar for fill and stroke
-;['fill', 'stroke'].forEach(function (m) {
+;[ 'fill', 'stroke' ].forEach(function (m) {
var extension = {}
var i
@@ -24,7 +24,7 @@ var sugar = {
if (typeof o === 'undefined') {
return this.attr(m)
}
- if (typeof o === 'string' || Color.isRgb(o) || (o instanceof Element)) {
+ if (typeof o === 'string' || o instanceof Color || Color.isRgb(o) || (o instanceof Element)) {
this.attr(m, o)
} else {
// set all attributes from sugar.fill and sugar.stroke list
@@ -38,10 +38,10 @@ var sugar = {
return this
}
- registerMethods(['Shape', 'Runner'], extension)
+ registerMethods([ 'Shape', 'Runner' ], extension)
})
-registerMethods(['Element', 'Runner'], {
+registerMethods([ 'Element', 'Runner' ], {
// Let the user set the matrix directly
matrix: function (mat, b, c, d, e, f) {
// Act as a getter
@@ -62,7 +62,7 @@ registerMethods(['Element', 'Runner'], {
skew: function (x, y, cx, cy) {
return arguments.length === 1 || arguments.length === 3
? this.transform({ skew: x, ox: y, oy: cx }, true)
- : this.transform({ skew: [x, y], ox: cx, oy: cy }, true)
+ : this.transform({ skew: [ x, y ], ox: cx, oy: cy }, true)
},
shear: function (lam, cx, cy) {
@@ -73,29 +73,29 @@ registerMethods(['Element', 'Runner'], {
scale: function (x, y, cx, cy) {
return arguments.length === 1 || arguments.length === 3
? this.transform({ scale: x, ox: y, oy: cx }, true)
- : this.transform({ scale: [x, y], ox: cx, oy: cy }, true)
+ : this.transform({ scale: [ x, y ], ox: cx, oy: cy }, true)
},
// Map translate to transform
translate: function (x, y) {
- return this.transform({ translate: [x, y] }, true)
+ return this.transform({ translate: [ x, y ] }, true)
},
// Map relative translations to transform
relative: function (x, y) {
- return this.transform({ relative: [x, y] }, true)
+ return this.transform({ relative: [ x, y ] }, true)
},
// Map flip to transform
flip: function (direction, around) {
var directionString = typeof direction === 'string' ? direction
: isFinite(direction) ? 'both'
- : 'both'
- var origin = (direction === 'both' && isFinite(around)) ? [around, around]
- : (direction === 'x') ? [around, 0]
- : (direction === 'y') ? [0, around]
- : isFinite(direction) ? [direction, direction]
- : [0, 0]
+ : 'both'
+ var origin = (direction === 'both' && isFinite(around)) ? [ around, around ]
+ : (direction === 'x') ? [ around, 0 ]
+ : (direction === 'y') ? [ 0, around ]
+ : isFinite(direction) ? [ direction, direction ]
+ : [ 0, 0 ]
this.transform({ flip: directionString, origin: origin }, true)
},
@@ -143,7 +143,7 @@ registerMethods('Path', {
}
})
-registerMethods(['Element', 'Runner'], {
+registerMethods([ 'Element', 'Runner' ], {
// Set font
font: function (a, v) {
if (typeof a === 'object') {
diff --git a/src/modules/optional/transform.js b/src/modules/optional/transform.js
index b8f4c74..0d0c7e3 100644
--- a/src/modules/optional/transform.js
+++ b/src/modules/optional/transform.js
@@ -15,9 +15,11 @@ export function matrixify () {
.split(transforms).slice(0, -1).map(function (str) {
// generate key => value pairs
var kv = str.trim().split('(')
- return [kv[0],
+ return [ kv[0],
kv[1].split(delimiter)
- .map(function (str) { return parseFloat(str) })
+ .map(function (str) {
+ return parseFloat(str)
+ })
]
})
.reverse()
diff --git a/src/types/Box.js b/src/types/Box.js
index a08ad67..d2ddcdd 100644
--- a/src/types/Box.js
+++ b/src/types/Box.js
@@ -24,13 +24,13 @@ export default class Box {
}
init (source) {
- var base = [0, 0, 0, 0]
+ var base = [ 0, 0, 0, 0 ]
source = typeof source === 'string' ? source.split(delimiter).map(parseFloat)
: Array.isArray(source) ? source
- : typeof source === 'object' ? [source.left != null ? source.left
- : source.x, source.top != null ? source.top : source.y, source.width, source.height]
- : arguments.length === 4 ? [].slice.call(arguments)
- : base
+ : typeof source === 'object' ? [ source.left != null ? source.left
+ : source.x, source.top != null ? source.top : source.y, source.width, source.height ]
+ : arguments.length === 4 ? [].slice.call(arguments)
+ : base
this.x = source[0] || 0
this.y = source[1] || 0
@@ -96,7 +96,7 @@ export default class Box {
}
toArray () {
- return [this.x, this.y, this.width, this.height]
+ return [ this.x, this.y, this.width, this.height ]
}
isNulled () {
diff --git a/src/types/Color.js b/src/types/Color.js
index a96958b..b745bfd 100644
--- a/src/types/Color.js
+++ b/src/types/Color.js
@@ -1,36 +1,7 @@
-/*
-
-Color {
- constructor (a, b, c, space) {
- space: 'hsl'
- a: 30
- b: 20
- c: 10
- },
-
- toRgb () { return new Color in rgb space }
- toHsl () { return new Color in hsl space }
- toLab () { return new Color in lab space }
-
- toArray () { [space, a, b, c] }
- fromArray () { convert it back }
-}
-
-// Conversions aren't always exact because of monitor profiles etc...
-new Color(h, s, l, 'hsl') !== new Color(r, g, b).hsl()
-new Color(100, 100, 100, [space])
-new Color('hsl(30, 20, 10)')
-
-// Sugar
-SVG.rgb(30, 20, 50).lab()
-SVG.hsl()
-SVG.lab('rgb(100, 100, 100)')
-*/
import { hex, isHex, isRgb, rgb, whitespace } from '../modules/core/regex.js'
-// Ensure to six-based hex
-function fullHex (hex) {
+function sixDigitHex (hex) {
return hex.length === 4
? [ '#',
hex.substring(1, 2), hex.substring(1, 2),
@@ -40,93 +11,354 @@ function fullHex (hex) {
: hex
}
-// Component to hex value
-function compToHex (comp) {
- var hex = comp.toString(16)
+function componentHex (component) {
+ const integer = Math.round(component)
+ const hex = integer.toString(16)
return hex.length === 1 ? '0' + hex : hex
}
+function is (object, space) {
+ for (const key of space) {
+ if (object[key] == null) {
+ return false
+ }
+ }
+ return true
+}
+
+function getParameters (a, b) {
+ const params = is(a, 'rgb') ? { _a: a.r, _b: a.g, _c: a.b, space: 'rgb' }
+ : is(a, 'xyz') ? { _a: a.x, _b: a.y, _c: a.z, _d: 0, space: 'xyz' }
+ : is(a, 'hsl') ? { _a: a.h, _b: a.s, _c: a.l, _d: 0, space: 'hsl' }
+ : is(a, 'lab') ? { _a: a.l, _b: a.a, _c: a.b, _d: 0, space: 'lab' }
+ : is(a, 'lch') ? { _a: a.l, _b: a.c, _c: a.h, _d: 0, space: 'lch' }
+ : is(a, 'cmyk') ? { _a: a.c, _b: a.m, _c: a.y, _d: a.k, space: 'cmyk' }
+ : { _a: 0, _b: 0, _c: 0, space: 'rgb' }
+
+ params.space = b || params.space
+ return params
+}
+
+function cieSpace (space) {
+ if (space === 'lab' || space === 'xyz' || space === 'lch') {
+ return true
+ } else {
+ return false
+ }
+}
+
+function hueToRgb (p, q, t) {
+ if (t < 0) t += 1
+ if (t > 1) t -= 1
+ if (t < 1 / 6) return p + (q - p) * 6 * t
+ if (t < 1 / 2) return q
+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6
+ return p
+}
+
export default class Color {
- constructor (...args) {
- this.init(...args)
- }
-
- init (color, g, b) {
- let match
-
- // initialize defaults
- this.r = 0
- this.g = 0
- this.b = 0
-
- if (!color) return
-
- // parse color
- if (typeof color === 'string') {
- if (isRgb.test(color)) {
- // get rgb values
- match = rgb.exec(color.replace(whitespace, ''))
-
- // parse numeric values
- this.r = parseInt(match[1])
- this.g = parseInt(match[2])
- this.b = parseInt(match[3])
- } else if (isHex.test(color)) {
- // get hex values
- match = hex.exec(fullHex(color))
-
- // parse numeric values
- this.r = parseInt(match[1], 16)
- this.g = parseInt(match[2], 16)
- this.b = parseInt(match[3], 16)
+ constructor (...inputs) {
+ this.init(...inputs)
+ }
+
+ init (a = 0, b = 0, c = 0, d = 0, space = 'rgb') {
+ // Reset all values in case the init function is rerun with new color space
+ if (this.space) {
+ for (let component in this.space) {
+ delete this[this.space[component]]
}
- } else if (Array.isArray(color)) {
- this.r = color[0]
- this.g = color[1]
- this.b = color[2]
- } else if (typeof color === 'object') {
- this.r = color.r
- this.g = color.g
- this.b = color.b
- } else if (arguments.length === 3) {
- this.r = color
- this.g = g
- this.b = b
}
- return this
+ if (typeof a === 'number') {
+ // Allow for the case that we don't need d...
+ space = typeof d === 'string' ? d : space
+ d = typeof d === 'string' ? 0 : d
+
+ // Assign the values straight to the color
+ Object.assign(this, { _a: a, _b: b, _c: c, _d: d, space })
+ // If the user gave us an array, make the color from it
+ } else if (a instanceof Array) {
+ this.space = b || (typeof a[3] === 'string' ? a[3] : a[4]) || 'rgb'
+ Object.assign(this, { _a: a[0], _b: a[1], _c: a[2], _d: a[3] || 0 })
+ } else if (a instanceof Object) {
+ // Set the object up and assign its values directly
+ const values = getParameters(a, b)
+ Object.assign(this, values)
+ } else if (typeof a === 'string') {
+ if (isRgb.test(a)) {
+ const noWhitespace = a.replace(whitespace, '')
+ const [ _a, _b, _c ] = rgb.exec(noWhitespace)
+ .slice(1, 4).map(v => parseInt(v))
+ Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })
+ } else if (isHex.test(a)) {
+ const hexParse = v => parseInt(v, 16)
+ const [ , _a, _b, _c ] = hex.exec(sixDigitHex(a)).map(hexParse)
+ Object.assign(this, { _a, _b, _c, _d: 0, space: 'rgb' })
+ } else throw Error(`Unsupported string format, can't construct Color`)
+ }
+
+ // Now add the components as a convenience
+ const { _a, _b, _c, _d } = this
+ const components = this.space === 'rgb' ? { r: _a, g: _b, b: _c }
+ : this.space === 'xyz' ? { x: _a, y: _b, z: _c }
+ : this.space === 'hsl' ? { h: _a, s: _b, l: _c }
+ : this.space === 'lab' ? { l: _a, a: _b, b: _c }
+ : this.space === 'lch' ? { l: _a, c: _b, h: _c }
+ : this.space === 'cmyk' ? { c: _a, m: _b, y: _c, k: _d }
+ : {}
+ Object.assign(this, components)
}
- // Default to hex conversion
- toString () {
- return this.toHex()
+ /*
+ Conversion Methods
+ */
+
+ rgb () {
+ if (this.space === 'rgb') {
+ return this
+ } else if (cieSpace(this.space)) {
+ // Convert to the xyz color space
+ let { x, y, z } = this
+ if (this.space === 'lab' || this.space === 'lch') {
+ // Get the values in the lab space
+ let { l, a, b } = this
+ if (this.space === 'lch') {
+ let { c, h } = this
+ const dToR = Math.PI / 180
+ a = c * Math.cos(dToR * h)
+ b = c * Math.sin(dToR * h)
+ }
+
+ // Undo the nonlinear function
+ const yL = (l + 16) / 116
+ const xL = a / 500 + yL
+ const zL = yL - b / 200
+
+ // Get the xyz values
+ const ct = 16 / 116
+ const mx = 0.008856
+ const nm = 7.787
+ x = 0.95047 * ((xL ** 3 > mx) ? xL ** 3 : (xL - ct) / nm)
+ y = 1.00000 * ((yL ** 3 > mx) ? yL ** 3 : (yL - ct) / nm)
+ z = 1.08883 * ((zL ** 3 > mx) ? zL ** 3 : (zL - ct) / nm)
+ }
+
+ // Convert xyz to unbounded rgb values
+ const rU = x * 3.2406 + y * -1.5372 + z * -0.4986
+ const gU = x * -0.9689 + y * 1.8758 + z * 0.0415
+ const bU = x * 0.0557 + y * -0.2040 + z * 1.0570
+
+ // Convert the values to true rgb values
+ let pow = Math.pow
+ let bd = 0.0031308
+ const r = (rU > bd) ? (1.055 * pow(rU, 1 / 2.4) - 0.055) : 12.92 * rU
+ const g = (gU > bd) ? (1.055 * pow(gU, 1 / 2.4) - 0.055) : 12.92 * gU
+ const b = (bU > bd) ? (1.055 * pow(bU, 1 / 2.4) - 0.055) : 12.92 * bU
+
+ // Make and return the color
+ const color = new Color(255 * r, 255 * g, 255 * b)
+ return color
+ } else if (this.space === 'hsl') {
+ // https://bgrins.github.io/TinyColor/docs/tinycolor.html
+ // Get the current hsl values
+ let { h, s, l } = this
+ h /= 360
+ s /= 100
+ l /= 100
+
+ // If we are grey, then just make the color directly
+ if (s === 0) {
+ l *= 255
+ let color = new Color(l, l, l)
+ return color
+ }
+
+ // TODO I have no idea what this does :D If you figure it out, tell me!
+ const q = l < 0.5 ? l * (1 + s) : l + s - l * s
+ const p = 2 * l - q
+
+ // Get the rgb values
+ const r = 255 * hueToRgb(p, q, h + 1 / 3)
+ const g = 255 * hueToRgb(p, q, h)
+ const b = 255 * hueToRgb(p, q, h - 1 / 3)
+
+ // Make a new color
+ const color = new Color(r, g, b)
+ return color
+ } else if (this.space === 'cmyk') {
+ // https://gist.github.com/felipesabino/5066336
+ // Get the normalised cmyk values
+ const { c, m, y, k } = this
+
+ // Get the rgb values
+ const r = 255 * (1 - Math.min(1, c * (1 - k) + k))
+ const g = 255 * (1 - Math.min(1, m * (1 - k) + k))
+ const b = 255 * (1 - Math.min(1, y * (1 - k) + k))
+
+ // Form the color and return it
+ const color = new Color(r, g, b)
+ return color
+ } else {
+ return this
+ }
}
- toArray () {
- return [this.r, this.g, this.b]
+ lab () {
+ // Get the xyz color
+ const { x, y, z } = this.xyz()
+
+ // Get the lab components
+ const l = (116 * y) - 16
+ const a = 500 * (x - y)
+ const b = 200 * (y - z)
+
+ // Construct and return a new color
+ const color = new Color(l, a, b, 'lab')
+ return color
+ }
+
+ xyz () {
+
+ // Normalise the red, green and blue values
+ const { _a: r255, _b: g255, _c: b255 } = this.rgb()
+ const [ r, g, b ] = [ r255, g255, b255 ].map(v => v / 255)
+
+ // Convert to the lab rgb space
+ const rL = (r > 0.04045) ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92
+ const gL = (g > 0.04045) ? Math.pow((g + 0.055) / 1.055, 2.4) : g / 12.92
+ const bL = (b > 0.04045) ? Math.pow((b + 0.055) / 1.055, 2.4) : b / 12.92
+
+ // Convert to the xyz color space without bounding the values
+ const xU = (rL * 0.4124 + gL * 0.3576 + bL * 0.1805) / 0.95047
+ const yU = (rL * 0.2126 + gL * 0.7152 + bL * 0.0722) / 1.00000
+ const zU = (rL * 0.0193 + gL * 0.1192 + bL * 0.9505) / 1.08883
+
+ // Get the proper xyz values by applying the bounding
+ const x = (xU > 0.008856) ? Math.pow(xU, 1 / 3) : (7.787 * xU) + 16 / 116
+ const y = (yU > 0.008856) ? Math.pow(yU, 1 / 3) : (7.787 * yU) + 16 / 116
+ const z = (zU > 0.008856) ? Math.pow(zU, 1 / 3) : (7.787 * zU) + 16 / 116
+
+ // Make and return the color
+ const color = new Color(x, y, z, 'xyz')
+ return color
+ }
+
+ lch () {
+
+ // Get the lab color directly
+ const { l, a, b } = this.lab()
+
+ // Get the chromaticity and the hue using polar coordinates
+ const c = Math.sqrt(a ** 2 + b ** 2)
+ let h = 180 * Math.atan2(b, a) / Math.PI
+ if (h < 0) {
+ h *= -1
+ h = 360 - h
+ }
+
+ // Make a new color and return it
+ const color = new Color(l, c, h, 'lch')
+ return color
+ }
+
+ hsl () {
+
+ // Get the rgb values
+ const { _a, _b, _c } = this.rgb()
+ const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)
+
+ // Find the maximum and minimum values to get the lightness
+ const max = Math.max(r, g, b)
+ const min = Math.min(r, g, b)
+ const l = (max + min) / 2
+
+ // If the r, g, v values are identical then we are grey
+ const isGrey = max === min
+
+ // Calculate the hue and saturation
+ const delta = max - min
+ const s = isGrey ? 0
+ : l > 0.5 ? delta / (2 - max - min)
+ : delta / (max + min)
+ const h = isGrey ? 0
+ : max === r ? ((g - b) / delta + (g < b ? 6 : 0)) / 6
+ : max === g ? ((b - r) / delta + 2) / 6
+ : max === b ? ((r - g) / delta + 4) / 6
+ : 0
+
+ // Construct and return the new color
+ const color = new Color(360 * h, 100 * s, 100 * l, 'hsl')
+ return color
+ }
+
+ cmyk () {
+
+ // Get the rgb values for the current color
+ const { _a, _b, _c } = this.rgb()
+ const [ r, g, b ] = [ _a, _b, _c ].map(v => v / 255)
+
+ // Get the cmyk values in an unbounded format
+ const k = Math.min(1 - r, 1 - g, 1 - b)
+
+ if (k === 1) {
+ // Catch the black case
+ return new Color(0, 0, 0, 1, 'cmyk')
+ }
+
+ const c = (1 - r - k) / (1 - k)
+ const m = (1 - g - k) / (1 - k)
+ const y = (1 - b - k) / (1 - k)
+
+ // Construct the new color
+ const color = new Color(c, m, y, k, 'cmyk')
+ return color
}
- // Build hex value
+ /*
+ Input and Output methods
+ */
+
toHex () {
- return '#' +
- compToHex(Math.round(this.r)) +
- compToHex(Math.round(this.g)) +
- compToHex(Math.round(this.b))
+ let { _a, _b, _c } = this.rgb()
+ let [ r, g, b ] = [ _a, _b, _c ].map(componentHex)
+ return `#${r}${g}${b}`
+ }
+
+ toString () {
+ return this.toHex()
}
- // Build rgb value
toRgb () {
- return 'rgb(' + [this.r, this.g, this.b].join() + ')'
+ let { r, g, b } = this.rgb()
+ let { max, min, round } = Math
+ let format = v => max(0, min(round(v), 255))
+ let [ rV, gV, bV ] = [ r, g, b ].map(format)
+ let string = `rgb(${rV},${gV},${bV})`
+ return string
}
- // Calculate true brightness
- brightness () {
- return (this.r / 255 * 0.30) +
- (this.g / 255 * 0.59) +
- (this.b / 255 * 0.11)
+ toArray () {
+ let { _a, _b, _c, _d, space } = this
+ return [ _a, _b, _c, _d, space ]
+ }
+
+ /*
+ Generating random colors
+ */
+
+ static random (mode = 'vibrant') {
+ 'sine'
+ 'pastel'
+ 'vibrant'
+ 'dark'
+ 'rgb'
+ 'lab'
+ 'grey'
}
- // Testers
+ /*
+ Constructing colors
+ */
// Test if given value is a color string
static test (color) {
@@ -136,9 +368,9 @@ export default class Color {
// Test if given value is a rgb object
static isRgb (color) {
- return color && typeof color.r === 'number' &&
- typeof color.g === 'number' &&
- typeof color.b === 'number'
+ return color && typeof color.r === 'number'
+ && typeof color.g === 'number'
+ && typeof color.b === 'number'
}
// Test if given value is a color
diff --git a/src/types/List.js b/src/types/List.js
index 8bd3985..ccdf11d 100644
--- a/src/types/List.js
+++ b/src/types/List.js
@@ -13,9 +13,13 @@ export default List
extend(List, {
each (fnOrMethodName, ...args) {
if (typeof fnOrMethodName === 'function') {
- this.forEach((el) => { fnOrMethodName.call(el, el) })
+ this.forEach((el) => {
+ fnOrMethodName.call(el, el)
+ })
} else {
- return this.map(el => { return el[fnOrMethodName](...args) })
+ return this.map(el => {
+ return el[fnOrMethodName](...args)
+ })
}
return this
diff --git a/src/types/Matrix.js b/src/types/Matrix.js
index a1eb317..102192b 100644
--- a/src/types/Matrix.js
+++ b/src/types/Matrix.js
@@ -14,16 +14,16 @@ export default class Matrix {
// Initialize
init (source) {
- var base = Matrix.fromArray([1, 0, 0, 1, 0, 0])
+ var base = Matrix.fromArray([ 1, 0, 0, 1, 0, 0 ])
// ensure source as object
source = source instanceof Element ? source.matrixify()
: typeof source === 'string' ? Matrix.fromArray(source.split(delimiter).map(parseFloat))
- : Array.isArray(source) ? Matrix.fromArray(source)
- : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source
- : (typeof source === 'object') ? new Matrix().transform(source)
- : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))
- : base
+ : Array.isArray(source) ? Matrix.fromArray(source)
+ : (typeof source === 'object' && Matrix.isMatrixLike(source)) ? source
+ : (typeof source === 'object') ? new Matrix().transform(source)
+ : arguments.length === 6 ? Matrix.fromArray([].slice.call(arguments))
+ : base
// Merge the source matrix with the base matrix
this.a = source.a != null ? source.a : base.a
@@ -295,7 +295,7 @@ export default class Matrix {
flipO (axis, around) {
return axis === 'x' ? this.scaleO(-1, 1, around, 0)
: axis === 'y' ? this.scaleO(1, -1, 0, around)
- : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point
+ : this.scaleO(-1, -1, axis, around || axis) // Define an x, y flip point
}
// Shear matrix
@@ -377,9 +377,9 @@ export default class Matrix {
// Check if two matrices are equal
equals (other) {
var comp = new Matrix(other)
- return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b) &&
- closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d) &&
- closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)
+ return closeEnough(this.a, comp.a) && closeEnough(this.b, comp.b)
+ && closeEnough(this.c, comp.c) && closeEnough(this.d, comp.d)
+ && closeEnough(this.e, comp.e) && closeEnough(this.f, comp.f)
}
// Convert matrix to string
@@ -388,7 +388,7 @@ export default class Matrix {
}
toArray () {
- return [this.a, this.b, this.c, this.d, this.e, this.f]
+ return [ this.a, this.b, this.c, this.d, this.e, this.f ]
}
valueOf () {
@@ -408,12 +408,12 @@ export default class Matrix {
static isMatrixLike (o) {
return (
- o.a != null ||
- o.b != null ||
- o.c != null ||
- o.d != null ||
- o.e != null ||
- o.f != null
+ o.a != null
+ || o.b != null
+ || o.c != null
+ || o.d != null
+ || o.e != null
+ || o.f != null
)
}
@@ -424,20 +424,20 @@ export default class Matrix {
var flipY = o.flip && (flipBoth || o.flip === 'y') ? -1 : 1
var skewX = o.skew && o.skew.length ? o.skew[0]
: isFinite(o.skew) ? o.skew
- : isFinite(o.skewX) ? o.skewX
- : 0
+ : isFinite(o.skewX) ? o.skewX
+ : 0
var skewY = o.skew && o.skew.length ? o.skew[1]
: isFinite(o.skew) ? o.skew
- : isFinite(o.skewY) ? o.skewY
- : 0
+ : isFinite(o.skewY) ? o.skewY
+ : 0
var scaleX = o.scale && o.scale.length ? o.scale[0] * flipX
: isFinite(o.scale) ? o.scale * flipX
- : isFinite(o.scaleX) ? o.scaleX * flipX
- : flipX
+ : isFinite(o.scaleX) ? o.scaleX * flipX
+ : flipX
var scaleY = o.scale && o.scale.length ? o.scale[1] * flipY
: isFinite(o.scale) ? o.scale * flipY
- : isFinite(o.scaleY) ? o.scaleY * flipY
- : flipY
+ : isFinite(o.scaleY) ? o.scaleY * flipY
+ : flipY
var shear = o.shear || 0
var theta = o.rotate || o.theta || 0
var origin = new Point(o.origin || o.around || o.ox || o.originX, o.oy || o.originY)
diff --git a/src/types/PathArray.js b/src/types/PathArray.js
index 989cd8f..764d05c 100644
--- a/src/types/PathArray.js
+++ b/src/types/PathArray.js
@@ -61,50 +61,50 @@ const pathHandlers = {
p.x = p0.x = c[0]
p.y = p0.y = c[1]
- return ['M', p.x, p.y]
+ return [ 'M', p.x, p.y ]
},
L: function (c, p) {
p.x = c[0]
p.y = c[1]
- return ['L', c[0], c[1]]
+ return [ 'L', c[0], c[1] ]
},
H: function (c, p) {
p.x = c[0]
- return ['H', c[0]]
+ return [ 'H', c[0] ]
},
V: function (c, p) {
p.y = c[0]
- return ['V', c[0]]
+ return [ 'V', c[0] ]
},
C: function (c, p) {
p.x = c[4]
p.y = c[5]
- return ['C', c[0], c[1], c[2], c[3], c[4], c[5]]
+ return [ 'C', c[0], c[1], c[2], c[3], c[4], c[5] ]
},
S: function (c, p) {
p.x = c[2]
p.y = c[3]
- return ['S', c[0], c[1], c[2], c[3]]
+ return [ 'S', c[0], c[1], c[2], c[3] ]
},
Q: function (c, p) {
p.x = c[2]
p.y = c[3]
- return ['Q', c[0], c[1], c[2], c[3]]
+ return [ 'Q', c[0], c[1], c[2], c[3] ]
},
T: function (c, p) {
p.x = c[0]
p.y = c[1]
- return ['T', c[0], c[1]]
+ return [ 'T', c[0], c[1] ]
},
Z: function (c, p, p0) {
p.x = p0.x
p.y = p0.y
- return ['Z']
+ return [ 'Z' ]
},
A: function (c, p) {
p.x = c[5]
p.y = c[6]
- return ['A', c[0], c[1], c[2], c[3], c[4], c[5], c[6]]
+ return [ 'A', c[0], c[1], c[2], c[3], c[4], c[5], c[6] ]
}
}
@@ -258,7 +258,7 @@ extend(PathArray, {
// Animate has specified in the SVG spec
// See: https://www.w3.org/TR/SVG11/paths.html#PathElement
for (i = 0, il = sourceArray.length; i < il; i++) {
- array[i] = [sourceArray[i][0]]
+ array[i] = [ sourceArray[i][0] ]
for (j = 1, jl = sourceArray[i].length; j < jl; j++) {
array[i][j] = sourceArray[i][j] + (destinationArray[i][j] - sourceArray[i][j]) * pos
}
@@ -279,7 +279,7 @@ extend(PathArray, {
},
// Absolutize and parse path to array
- parse (array = [['M', 0, 0]]) {
+ parse (array = [ [ 'M', 0, 0 ] ]) {
// if it's already a patharray, no need to parse it
if (array instanceof PathArray) return array
@@ -312,7 +312,7 @@ extend(PathArray, {
if (isPathLetter.test(array[index])) {
s = array[index]
++index
- // If last letter was a move command and we got no new, it defaults to [L]ine
+ // If last letter was a move command and we got no new, it defaults to [L]ine
} else if (s === 'M') {
s = 'L'
} else if (s === 'm') {
diff --git a/src/types/Point.js b/src/types/Point.js
index 27d81ea..f1c85a1 100644
--- a/src/types/Point.js
+++ b/src/types/Point.js
@@ -11,7 +11,7 @@ export default class Point {
// ensure source as object
source = Array.isArray(x) ? { x: x[0], y: x[1] }
: typeof x === 'object' ? { x: x.x, y: x.y }
- : { x: x, y: y }
+ : { x: x, y: y }
// merge source
this.x = source.x == null ? base.x : source.x
@@ -36,7 +36,7 @@ export default class Point {
}
toArray () {
- return [this.x, this.y]
+ return [ this.x, this.y ]
}
}
diff --git a/src/types/PointArray.js b/src/types/PointArray.js
index b246b2f..9e7406d 100644
--- a/src/types/PointArray.js
+++ b/src/types/PointArray.js
@@ -45,7 +45,7 @@ extend(PointArray, {
},
// Parse point string and flat array
- parse (array = [[0, 0]]) {
+ parse (array = [ [ 0, 0 ] ]) {
var points = []
// if it is an array
@@ -82,7 +82,7 @@ extend(PointArray, {
// move every point
if (!isNaN(x) && !isNaN(y)) {
for (var i = this.length - 1; i >= 0; i--) {
- this[i] = [this[i][0] + x, this[i][1] + y]
+ this[i] = [ this[i][0] + x, this[i][1] + y ]
}
}
diff --git a/src/types/SVGNumber.js b/src/types/SVGNumber.js
index ea21cbd..a152667 100644
--- a/src/types/SVGNumber.js
+++ b/src/types/SVGNumber.js
@@ -27,7 +27,9 @@ export default class SVGNumber {
this.value = parseFloat(unit[1])
// normalize
- if (unit[5] === '%') { this.value /= 100 } else if (unit[5] === 's') {
+ if (unit[5] === '%') {
+ this.value /= 100
+ } else if (unit[5] === 's') {
this.value *= 1000
}
@@ -47,7 +49,7 @@ export default class SVGNumber {
toString () {
return (this.unit === '%' ? ~~(this.value * 1e8) / 1e6
: this.unit === 's' ? this.value / 1e3
- : this.value
+ : this.value
) + this.unit
}
@@ -56,7 +58,7 @@ export default class SVGNumber {
}
toArray () {
- return [this.value, this.unit]
+ return [ this.value, this.unit ]
}
valueOf () {
diff --git a/src/utils/adopter.js b/src/utils/adopter.js
index a826607..5830f5c 100644
--- a/src/utils/adopter.js
+++ b/src/utils/adopter.js
@@ -110,7 +110,7 @@ export function assignNewId (node) {
export function extend (modules, methods, attrCheck) {
var key, i
- modules = Array.isArray(modules) ? modules : [modules]
+ modules = Array.isArray(modules) ? modules : [ modules ]
for (i = modules.length - 1; i >= 0; i--) {
for (key in methods) {
diff --git a/src/utils/methods.js b/src/utils/methods.js
index bf30a1e..bc05a70 100644
--- a/src/utils/methods.js
+++ b/src/utils/methods.js
@@ -25,7 +25,7 @@ export function getMethodsFor (name) {
}
export function getMethodNames () {
- return [...new Set(names)]
+ return [ ...new Set(names) ]
}
export function addMethodNames (_names) {
diff --git a/src/utils/utils.js b/src/utils/utils.js
index 64c0eed..3bac0de 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -18,7 +18,9 @@ export function filter (array, block) {
var result = []
for (i = 0; i < il; i++) {
- if (block(array[i])) { result.push(array[i]) }
+ if (block(array[i])) {
+ result.push(array[i])
+ }
}
return result
@@ -85,10 +87,10 @@ export function getOrigin (o, element) {
// Calculate the transformed x and y coordinates
let bx = string.includes('left') ? x
: string.includes('right') ? x + width
- : x + width / 2
+ : x + width / 2
let by = string.includes('top') ? y
: string.includes('bottom') ? y + height
- : y + height / 2
+ : y + height / 2
// Set the bounds eg : "bottom-left", "Top right", "middle" etc...
ox = o.ox != null ? o.ox : bx