aboutsummaryrefslogtreecommitdiffstats
path: root/dist/svg.node.js.map
diff options
context:
space:
mode:
Diffstat (limited to 'dist/svg.node.js.map')
-rw-r--r--dist/svg.node.js.map2
1 files changed, 1 insertions, 1 deletions
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,EA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OAqF,MAAM,CAACovB,IAAD,EAAOz0B,aAAa,CAAC,MAAD,CAApB,CAAN;AACAqF,MAAM,CAAC+iB,IAAD,EAAOpoB,aAAa,CAAC,MAAD,CAApB,CAAN;AAEAqF,MAAM,CAAC+Z,IAAD,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,C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