-
Notifications
You must be signed in to change notification settings - Fork 68
/
indexRollup.js.map
1 lines (1 loc) · 238 KB
/
indexRollup.js.map
1
{"version":3,"file":"indexRollup.js","sources":["src/Annotation.js","src/AnnotationCollection.js","node_modules/d3-selection/src/namespaces.js","node_modules/d3-selection/src/namespace.js","node_modules/d3-selection/src/creator.js","node_modules/d3-selection/src/selector.js","node_modules/d3-selection/src/selection/select.js","node_modules/d3-selection/src/selectorAll.js","node_modules/d3-selection/src/selection/selectAll.js","node_modules/d3-selection/src/matcher.js","node_modules/d3-selection/src/selection/filter.js","node_modules/d3-selection/src/selection/sparse.js","node_modules/d3-selection/src/selection/enter.js","node_modules/d3-selection/src/constant.js","node_modules/d3-selection/src/selection/data.js","node_modules/d3-selection/src/selection/exit.js","node_modules/d3-selection/src/selection/join.js","node_modules/d3-selection/src/selection/merge.js","node_modules/d3-selection/src/selection/order.js","node_modules/d3-selection/src/selection/sort.js","node_modules/d3-selection/src/selection/call.js","node_modules/d3-selection/src/selection/nodes.js","node_modules/d3-selection/src/selection/node.js","node_modules/d3-selection/src/selection/size.js","node_modules/d3-selection/src/selection/empty.js","node_modules/d3-selection/src/selection/each.js","node_modules/d3-selection/src/selection/attr.js","node_modules/d3-selection/src/window.js","node_modules/d3-selection/src/selection/style.js","node_modules/d3-selection/src/selection/property.js","node_modules/d3-selection/src/selection/classed.js","node_modules/d3-selection/src/selection/text.js","node_modules/d3-selection/src/selection/html.js","node_modules/d3-selection/src/selection/raise.js","node_modules/d3-selection/src/selection/lower.js","node_modules/d3-selection/src/selection/append.js","node_modules/d3-selection/src/selection/insert.js","node_modules/d3-selection/src/selection/remove.js","node_modules/d3-selection/src/selection/clone.js","node_modules/d3-selection/src/selection/datum.js","node_modules/d3-selection/src/selection/on.js","node_modules/d3-selection/src/selection/dispatch.js","node_modules/d3-selection/src/selection/index.js","node_modules/d3-selection/src/select.js","node_modules/d3-selection/src/sourceEvent.js","node_modules/d3-selection/src/point.js","node_modules/d3-selection/src/mouse.js","node_modules/d3-selection/src/touch.js","node_modules/d3-drag/node_modules/d3-dispatch/src/dispatch.js","node_modules/d3-drag/src/noevent.js","node_modules/d3-drag/src/nodrag.js","node_modules/d3-drag/src/constant.js","node_modules/d3-drag/src/event.js","node_modules/d3-drag/src/drag.js","src/Handles.js","src/Note/alignment.js","node_modules/d3-path/src/path.js","node_modules/d3-shape/src/constant.js","node_modules/d3-shape/src/math.js","node_modules/d3-shape/src/arc.js","node_modules/d3-shape/src/curve/linear.js","node_modules/d3-shape/src/point.js","node_modules/d3-shape/src/line.js","node_modules/d3-shape/src/curve/cardinal.js","node_modules/d3-shape/src/curve/catmullRom.js","node_modules/d3-shape/src/curve/monotone.js","src/Builder.js","src/Note/lineType-vertical.js","src/Note/lineType-horizontal.js","src/Connector/type-line.js","src/Connector/type-elbow.js","src/Connector/type-curve.js","src/Connector/end-arrow.js","src/Connector/end-dot.js","src/Subject/circle.js","src/Subject/rect.js","src/Subject/threshold.js","src/Subject/badge.js","src/Types-d3.js","node_modules/d3-dispatch/src/dispatch.js","src/Adapter-d3.js","index.js"],"sourcesContent":["export default class Annotation {\n constructor({\n x = 0,\n y = 0,\n nx,\n ny,\n dy = 0,\n dx = 0,\n color = \"grey\",\n data,\n type,\n subject,\n connector,\n note,\n disable,\n id,\n className\n }) {\n this._dx = nx !== undefined ? nx - x : dx\n this._dy = ny !== undefined ? ny - y : dy\n this._x = x\n this._y = y\n this._color = color\n this.id = id\n this._className = className || \"\"\n\n this._type = type || \"\"\n this.data = data\n\n this.note = note || {}\n this.connector = connector || {}\n this.subject = subject || {}\n\n this.disable = disable || []\n }\n\n updatePosition() {\n if (this.type.setPosition) {\n this.type.setPosition()\n if (\n this.type.subject &&\n this.type.subject.selectAll(\":not(.handle)\").nodes().length !== 0\n ) {\n this.type.redrawSubject()\n }\n }\n }\n\n clearComponents() {\n this.type.clearComponents && this.type.clearComponents()\n }\n\n get className() {\n return this._className\n }\n\n set className(className) {\n this._className = className\n if (this.type.setClassName) this.type.setClassName()\n }\n\n updateOffset() {\n if (this.type.setOffset) {\n this.type.setOffset()\n\n if (this.type.connector.selectAll(\":not(.handle)\").nodes().length !== 0) {\n this.type.redrawConnector()\n }\n\n this.type.redrawNote()\n }\n }\n\n get type() {\n return this._type\n }\n\n set type(type) {\n this._type = type\n this.clearComponents()\n }\n\n get x() {\n return this._x\n }\n set x(x) {\n this._x = x\n this.updatePosition()\n }\n\n get y() {\n return this._y\n }\n set y(y) {\n this._y = y\n this.updatePosition()\n }\n\n get color() {\n return this._color\n }\n set color(color) {\n this._color = color\n this.updatePosition()\n }\n\n get dx() {\n return this._dx\n }\n set dx(dx) {\n this._dx = dx\n this.updateOffset()\n }\n\n get dy() {\n return this._dy\n }\n set dy(dy) {\n this._dy = dy\n this.updateOffset()\n }\n\n set nx(nx) {\n this._dx = nx - this._x\n this.updateOffset()\n }\n\n set ny(ny) {\n this._dy = ny - this._y\n this.updateOffset()\n }\n\n get offset() {\n return { x: this._dx, y: this._dy }\n }\n\n set offset({ x, y }) {\n this._dx = x\n this._dy = y\n this.updateOffset()\n }\n\n get position() {\n return { x: this._x, y: this._y }\n }\n\n set position({ x, y }) {\n this._x = x\n this._y = y\n this.updatePosition()\n }\n\n get translation() {\n return {\n x: this._x + this._dx,\n y: this._y + this._dy\n }\n }\n\n get json() {\n const json = {\n x: this._x,\n y: this._y,\n dx: this._dx,\n dy: this._dy\n }\n\n if (this.data && Object.keys(this.data).length > 0) json.data = this.data\n if (this.type) json.type = this.type\n if (this._className) json.className = this._className\n\n if (Object.keys(this.connector).length > 0) json.connector = this.connector\n if (Object.keys(this.subject).length > 0) json.subject = this.subject\n if (Object.keys(this.note).length > 0) json.note = this.note\n\n return json\n }\n}\n","export default class AnnotationCollection {\n\n constructor ({ annotations, accessors, accessorsInverse }) {\n this.accessors = accessors\n this.accessorsInverse = accessorsInverse\n this.annotations = annotations\n }\n\n clearTypes (newSettings) {\n this.annotations.forEach(d => {\n d.type = undefined\n d.subject = newSettings && newSettings.subject || d.subject\n d.connector = newSettings && newSettings.connector || d.connector\n d.note = newSettings && newSettings.note || d.note\n })\n }\n\n setPositionWithAccessors () {\n this.annotations.forEach(d => {\n d.type.setPositionWithAccessors(this.accessors)\n })\n }\n\n editMode (editMode) { this.annotations.forEach(a => {\n if (a.type) {\n a.type.editMode = editMode\n a.type.updateEditMode()\n }\n })\n }\n\n updateDisable (disable) {\n this.annotations.forEach(a => {\n a.disable = disable\n if (a.type) {\n disable.forEach(d => {\n if (a.type[d]) {\n a.type[d].remove && a.type[d].remove()\n a.type[d] = undefined\n }\n })\n }\n })\n }\n\n updateTextWrap (textWrap) {\n this.annotations.forEach(a => {\n if (a.type && a.type.updateTextWrap) {\n a.type.updateTextWrap(textWrap)\n }\n })\n }\n\n updateText () {\n this.annotations.forEach(a => {\n if (a.type && a.type.drawText) {\n a.type.drawText()\n }\n })\n }\n\n updateNotePadding (notePadding) {\n this.annotations.forEach(a => {\n if (a.type) {\n a.type.notePadding = notePadding\n }\n })\n }\n\n get json () { \n return this.annotations.map(a => { \n const json = a.json\n if (this.accessorsInverse && a.data) {\n json.data = {}\n Object.keys(this.accessorsInverse).forEach(k => {\n json.data[k] = this.accessorsInverse[k]({ x: a.x, y: a.y})\n\n //TODO make this feasible to map back to data for other types of subjects\n })\n }\n return json\n })\n }\n\n get noteNodes () {\n return this.annotations.map(a => ({ ...a.type.getNoteBBoxOffset(), positionX: a.x, positionY: a.y }))\n }\n\n //TODO: come back and rethink if a.x and a.y are applicable in all situations\n // get connectorNodes() {\n // return this.annotations.map(a => ({ ...a.type.getConnectorBBox(), startX: a.x, startY: a.y}))\n // }\n\n // get subjectNodes() {\n // return this.annotations.map(a => ({ ...a.type.getSubjectBBox(), startX: a.x, startY: a.y}))\n // }\n\n // get annotationNodes() {\n // return this.annotations.map(a => ({ ...a.type.getAnnotationBBox(), startX: a.x, startY: a.y}))\n // }\n}\n","export var xhtml = \"http://www.w3.org/1999/xhtml\";\n\nexport default {\n svg: \"http://www.w3.org/2000/svg\",\n xhtml: xhtml,\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n","import namespaces from \"./namespaces\";\n\nexport default function(name) {\n var prefix = name += \"\", i = prefix.indexOf(\":\");\n if (i >= 0 && (prefix = name.slice(0, i)) !== \"xmlns\") name = name.slice(i + 1);\n return namespaces.hasOwnProperty(prefix) ? {space: namespaces[prefix], local: name} : name;\n}\n","import namespace from \"./namespace\";\nimport {xhtml} from \"./namespaces\";\n\nfunction creatorInherit(name) {\n return function() {\n var document = this.ownerDocument,\n uri = this.namespaceURI;\n return uri === xhtml && document.documentElement.namespaceURI === xhtml\n ? document.createElement(name)\n : document.createElementNS(uri, name);\n };\n}\n\nfunction creatorFixed(fullname) {\n return function() {\n return this.ownerDocument.createElementNS(fullname.space, fullname.local);\n };\n}\n\nexport default function(name) {\n var fullname = namespace(name);\n return (fullname.local\n ? creatorFixed\n : creatorInherit)(fullname);\n}\n","function none() {}\n\nexport default function(selector) {\n return selector == null ? none : function() {\n return this.querySelector(selector);\n };\n}\n","import {Selection} from \"./index\";\nimport selector from \"../selector\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selector(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {\n if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {\n if (\"__data__\" in node) subnode.__data__ = node.__data__;\n subgroup[i] = subnode;\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","function empty() {\n return [];\n}\n\nexport default function(selector) {\n return selector == null ? empty : function() {\n return this.querySelectorAll(selector);\n };\n}\n","import {Selection} from \"./index\";\nimport selectorAll from \"../selectorAll\";\n\nexport default function(select) {\n if (typeof select !== \"function\") select = selectorAll(select);\n\n for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n subgroups.push(select.call(node, node.__data__, i, group));\n parents.push(node);\n }\n }\n }\n\n return new Selection(subgroups, parents);\n}\n","export default function(selector) {\n return function() {\n return this.matches(selector);\n };\n}\n","import {Selection} from \"./index\";\nimport matcher from \"../matcher\";\n\nexport default function(match) {\n if (typeof match !== \"function\") match = matcher(match);\n\n for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {\n if ((node = group[i]) && match.call(node, node.__data__, i, group)) {\n subgroup.push(node);\n }\n }\n }\n\n return new Selection(subgroups, this._parents);\n}\n","export default function(update) {\n return new Array(update.length);\n}\n","import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n return new Selection(this._enter || this._groups.map(sparse), this._parents);\n}\n\nexport function EnterNode(parent, datum) {\n this.ownerDocument = parent.ownerDocument;\n this.namespaceURI = parent.namespaceURI;\n this._next = null;\n this._parent = parent;\n this.__data__ = datum;\n}\n\nEnterNode.prototype = {\n constructor: EnterNode,\n appendChild: function(child) { return this._parent.insertBefore(child, this._next); },\n insertBefore: function(child, next) { return this._parent.insertBefore(child, next); },\n querySelector: function(selector) { return this._parent.querySelector(selector); },\n querySelectorAll: function(selector) { return this._parent.querySelectorAll(selector); }\n};\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","import {Selection} from \"./index\";\nimport {EnterNode} from \"./enter\";\nimport constant from \"../constant\";\n\nvar keyPrefix = \"$\"; // Protect against keys like “__proto__”.\n\nfunction bindIndex(parent, group, enter, update, exit, data) {\n var i = 0,\n node,\n groupLength = group.length,\n dataLength = data.length;\n\n // Put any non-null nodes that fit into update.\n // Put any null nodes into enter.\n // Put any remaining data into enter.\n for (; i < dataLength; ++i) {\n if (node = group[i]) {\n node.__data__ = data[i];\n update[i] = node;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Put any non-null nodes that don’t fit into exit.\n for (; i < groupLength; ++i) {\n if (node = group[i]) {\n exit[i] = node;\n }\n }\n}\n\nfunction bindKey(parent, group, enter, update, exit, data, key) {\n var i,\n node,\n nodeByKeyValue = {},\n groupLength = group.length,\n dataLength = data.length,\n keyValues = new Array(groupLength),\n keyValue;\n\n // Compute the key for each node.\n // If multiple nodes have the same key, the duplicates are added to exit.\n for (i = 0; i < groupLength; ++i) {\n if (node = group[i]) {\n keyValues[i] = keyValue = keyPrefix + key.call(node, node.__data__, i, group);\n if (keyValue in nodeByKeyValue) {\n exit[i] = node;\n } else {\n nodeByKeyValue[keyValue] = node;\n }\n }\n }\n\n // Compute the key for each datum.\n // If there a node associated with this key, join and add it to update.\n // If there is not (or the key is a duplicate), add it to enter.\n for (i = 0; i < dataLength; ++i) {\n keyValue = keyPrefix + key.call(parent, data[i], i, data);\n if (node = nodeByKeyValue[keyValue]) {\n update[i] = node;\n node.__data__ = data[i];\n nodeByKeyValue[keyValue] = null;\n } else {\n enter[i] = new EnterNode(parent, data[i]);\n }\n }\n\n // Add any remaining nodes that were not bound to data to exit.\n for (i = 0; i < groupLength; ++i) {\n if ((node = group[i]) && (nodeByKeyValue[keyValues[i]] === node)) {\n exit[i] = node;\n }\n }\n}\n\nexport default function(value, key) {\n if (!value) {\n data = new Array(this.size()), j = -1;\n this.each(function(d) { data[++j] = d; });\n return data;\n }\n\n var bind = key ? bindKey : bindIndex,\n parents = this._parents,\n groups = this._groups;\n\n if (typeof value !== \"function\") value = constant(value);\n\n for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {\n var parent = parents[j],\n group = groups[j],\n groupLength = group.length,\n data = value.call(parent, parent && parent.__data__, j, parents),\n dataLength = data.length,\n enterGroup = enter[j] = new Array(dataLength),\n updateGroup = update[j] = new Array(dataLength),\n exitGroup = exit[j] = new Array(groupLength);\n\n bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);\n\n // Now connect the enter nodes to their following update node, such that\n // appendChild can insert the materialized enter node before this node,\n // rather than at the end of the parent node.\n for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {\n if (previous = enterGroup[i0]) {\n if (i0 >= i1) i1 = i0 + 1;\n while (!(next = updateGroup[i1]) && ++i1 < dataLength);\n previous._next = next || null;\n }\n }\n }\n\n update = new Selection(update, parents);\n update._enter = enter;\n update._exit = exit;\n return update;\n}\n","import sparse from \"./sparse\";\nimport {Selection} from \"./index\";\n\nexport default function() {\n return new Selection(this._exit || this._groups.map(sparse), this._parents);\n}\n","export default function(onenter, onupdate, onexit) {\n var enter = this.enter(), update = this, exit = this.exit();\n enter = typeof onenter === \"function\" ? onenter(enter) : enter.append(onenter + \"\");\n if (onupdate != null) update = onupdate(update);\n if (onexit == null) exit.remove(); else onexit(exit);\n return enter && update ? enter.merge(update).order() : update;\n}\n","import {Selection} from \"./index\";\n\nexport default function(selection) {\n\n for (var groups0 = this._groups, groups1 = selection._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {\n for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group0[i] || group1[i]) {\n merge[i] = node;\n }\n }\n }\n\n for (; j < m0; ++j) {\n merges[j] = groups0[j];\n }\n\n return new Selection(merges, this._parents);\n}\n","export default function() {\n\n for (var groups = this._groups, j = -1, m = groups.length; ++j < m;) {\n for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0;) {\n if (node = group[i]) {\n if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);\n next = node;\n }\n }\n }\n\n return this;\n}\n","import {Selection} from \"./index\";\n\nexport default function(compare) {\n if (!compare) compare = ascending;\n\n function compareNode(a, b) {\n return a && b ? compare(a.__data__, b.__data__) : !a - !b;\n }\n\n for (var groups = this._groups, m = groups.length, sortgroups = new Array(m), j = 0; j < m; ++j) {\n for (var group = groups[j], n = group.length, sortgroup = sortgroups[j] = new Array(n), node, i = 0; i < n; ++i) {\n if (node = group[i]) {\n sortgroup[i] = node;\n }\n }\n sortgroup.sort(compareNode);\n }\n\n return new Selection(sortgroups, this._parents).order();\n}\n\nfunction ascending(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","export default function() {\n var callback = arguments[0];\n arguments[0] = this;\n callback.apply(null, arguments);\n return this;\n}\n","export default function() {\n var nodes = new Array(this.size()), i = -1;\n this.each(function() { nodes[++i] = this; });\n return nodes;\n}\n","export default function() {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {\n var node = group[i];\n if (node) return node;\n }\n }\n\n return null;\n}\n","export default function() {\n var size = 0;\n this.each(function() { ++size; });\n return size;\n}\n","export default function() {\n return !this.node();\n}\n","export default function(callback) {\n\n for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {\n for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {\n if (node = group[i]) callback.call(node, node.__data__, i, group);\n }\n }\n\n return this;\n}\n","import namespace from \"../namespace\";\n\nfunction attrRemove(name) {\n return function() {\n this.removeAttribute(name);\n };\n}\n\nfunction attrRemoveNS(fullname) {\n return function() {\n this.removeAttributeNS(fullname.space, fullname.local);\n };\n}\n\nfunction attrConstant(name, value) {\n return function() {\n this.setAttribute(name, value);\n };\n}\n\nfunction attrConstantNS(fullname, value) {\n return function() {\n this.setAttributeNS(fullname.space, fullname.local, value);\n };\n}\n\nfunction attrFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttribute(name);\n else this.setAttribute(name, v);\n };\n}\n\nfunction attrFunctionNS(fullname, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.removeAttributeNS(fullname.space, fullname.local);\n else this.setAttributeNS(fullname.space, fullname.local, v);\n };\n}\n\nexport default function(name, value) {\n var fullname = namespace(name);\n\n if (arguments.length < 2) {\n var node = this.node();\n return fullname.local\n ? node.getAttributeNS(fullname.space, fullname.local)\n : node.getAttribute(fullname);\n }\n\n return this.each((value == null\n ? (fullname.local ? attrRemoveNS : attrRemove) : (typeof value === \"function\"\n ? (fullname.local ? attrFunctionNS : attrFunction)\n : (fullname.local ? attrConstantNS : attrConstant)))(fullname, value));\n}\n","export default function(node) {\n return (node.ownerDocument && node.ownerDocument.defaultView) // node is a Node\n || (node.document && node) // node is a Window\n || node.defaultView; // node is a Document\n}\n","import defaultView from \"../window\";\n\nfunction styleRemove(name) {\n return function() {\n this.style.removeProperty(name);\n };\n}\n\nfunction styleConstant(name, value, priority) {\n return function() {\n this.style.setProperty(name, value, priority);\n };\n}\n\nfunction styleFunction(name, value, priority) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) this.style.removeProperty(name);\n else this.style.setProperty(name, v, priority);\n };\n}\n\nexport default function(name, value, priority) {\n return arguments.length > 1\n ? this.each((value == null\n ? styleRemove : typeof value === \"function\"\n ? styleFunction\n : styleConstant)(name, value, priority == null ? \"\" : priority))\n : styleValue(this.node(), name);\n}\n\nexport function styleValue(node, name) {\n return node.style.getPropertyValue(name)\n || defaultView(node).getComputedStyle(node, null).getPropertyValue(name);\n}\n","function propertyRemove(name) {\n return function() {\n delete this[name];\n };\n}\n\nfunction propertyConstant(name, value) {\n return function() {\n this[name] = value;\n };\n}\n\nfunction propertyFunction(name, value) {\n return function() {\n var v = value.apply(this, arguments);\n if (v == null) delete this[name];\n else this[name] = v;\n };\n}\n\nexport default function(name, value) {\n return arguments.length > 1\n ? this.each((value == null\n ? propertyRemove : typeof value === \"function\"\n ? propertyFunction\n : propertyConstant)(name, value))\n : this.node()[name];\n}\n","function classArray(string) {\n return string.trim().split(/^|\\s+/);\n}\n\nfunction classList(node) {\n return node.classList || new ClassList(node);\n}\n\nfunction ClassList(node) {\n this._node = node;\n this._names = classArray(node.getAttribute(\"class\") || \"\");\n}\n\nClassList.prototype = {\n add: function(name) {\n var i = this._names.indexOf(name);\n if (i < 0) {\n this._names.push(name);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n remove: function(name) {\n var i = this._names.indexOf(name);\n if (i >= 0) {\n this._names.splice(i, 1);\n this._node.setAttribute(\"class\", this._names.join(\" \"));\n }\n },\n contains: function(name) {\n return this._names.indexOf(name) >= 0;\n }\n};\n\nfunction classedAdd(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.add(names[i]);\n}\n\nfunction classedRemove(node, names) {\n var list = classList(node), i = -1, n = names.length;\n while (++i < n) list.remove(names[i]);\n}\n\nfunction classedTrue(names) {\n return function() {\n classedAdd(this, names);\n };\n}\n\nfunction classedFalse(names) {\n return function() {\n classedRemove(this, names);\n };\n}\n\nfunction classedFunction(names, value) {\n return function() {\n (value.apply(this, arguments) ? classedAdd : classedRemove)(this, names);\n };\n}\n\nexport default function(name, value) {\n var names = classArray(name + \"\");\n\n if (arguments.length < 2) {\n var list = classList(this.node()), i = -1, n = names.length;\n while (++i < n) if (!list.contains(names[i])) return false;\n return true;\n }\n\n return this.each((typeof value === \"function\"\n ? classedFunction : value\n ? classedTrue\n : classedFalse)(names, value));\n}\n","function textRemove() {\n this.textContent = \"\";\n}\n\nfunction textConstant(value) {\n return function() {\n this.textContent = value;\n };\n}\n\nfunction textFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.textContent = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? textRemove : (typeof value === \"function\"\n ? textFunction\n : textConstant)(value))\n : this.node().textContent;\n}\n","function htmlRemove() {\n this.innerHTML = \"\";\n}\n\nfunction htmlConstant(value) {\n return function() {\n this.innerHTML = value;\n };\n}\n\nfunction htmlFunction(value) {\n return function() {\n var v = value.apply(this, arguments);\n this.innerHTML = v == null ? \"\" : v;\n };\n}\n\nexport default function(value) {\n return arguments.length\n ? this.each(value == null\n ? htmlRemove : (typeof value === \"function\"\n ? htmlFunction\n : htmlConstant)(value))\n : this.node().innerHTML;\n}\n","function raise() {\n if (this.nextSibling) this.parentNode.appendChild(this);\n}\n\nexport default function() {\n return this.each(raise);\n}\n","function lower() {\n if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);\n}\n\nexport default function() {\n return this.each(lower);\n}\n","import creator from \"../creator\";\n\nexport default function(name) {\n var create = typeof name === \"function\" ? name : creator(name);\n return this.select(function() {\n return this.appendChild(create.apply(this, arguments));\n });\n}\n","import creator from \"../creator\";\nimport selector from \"../selector\";\n\nfunction constantNull() {\n return null;\n}\n\nexport default function(name, before) {\n var create = typeof name === \"function\" ? name : creator(name),\n select = before == null ? constantNull : typeof before === \"function\" ? before : selector(before);\n return this.select(function() {\n return this.insertBefore(create.apply(this, arguments), select.apply(this, arguments) || null);\n });\n}\n","function remove() {\n var parent = this.parentNode;\n if (parent) parent.removeChild(this);\n}\n\nexport default function() {\n return this.each(remove);\n}\n","function selection_cloneShallow() {\n return this.parentNode.insertBefore(this.cloneNode(false), this.nextSibling);\n}\n\nfunction selection_cloneDeep() {\n return this.parentNode.insertBefore(this.cloneNode(true), this.nextSibling);\n}\n\nexport default function(deep) {\n return this.select(deep ? selection_cloneDeep : selection_cloneShallow);\n}\n","export default function(value) {\n return arguments.length\n ? this.property(\"__data__\", value)\n : this.node().__data__;\n}\n","var filterEvents = {};\n\nexport var event = null;\n\nif (typeof document !== \"undefined\") {\n var element = document.documentElement;\n if (!(\"onmouseenter\" in element)) {\n filterEvents = {mouseenter: \"mouseover\", mouseleave: \"mouseout\"};\n }\n}\n\nfunction filterContextListener(listener, index, group) {\n listener = contextListener(listener, index, group);\n return function(event) {\n var related = event.relatedTarget;\n if (!related || (related !== this && !(related.compareDocumentPosition(this) & 8))) {\n listener.call(this, event);\n }\n };\n}\n\nfunction contextListener(listener, index, group) {\n return function(event1) {\n var event0 = event; // Events can be reentrant (e.g., focus).\n event = event1;\n try {\n listener.call(this, this.__data__, index, group);\n } finally {\n event = event0;\n }\n };\n}\n\nfunction parseTypenames(typenames) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n return {type: t, name: name};\n });\n}\n\nfunction onRemove(typename) {\n return function() {\n var on = this.__on;\n if (!on) return;\n for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {\n if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n } else {\n on[++i] = o;\n }\n }\n if (++i) on.length = i;\n else delete this.__on;\n };\n}\n\nfunction onAdd(typename, value, capture) {\n var wrap = filterEvents.hasOwnProperty(typename.type) ? filterContextListener : contextListener;\n return function(d, i, group) {\n var on = this.__on, o, listener = wrap(value, i, group);\n if (on) for (var j = 0, m = on.length; j < m; ++j) {\n if ((o = on[j]).type === typename.type && o.name === typename.name) {\n this.removeEventListener(o.type, o.listener, o.capture);\n this.addEventListener(o.type, o.listener = listener, o.capture = capture);\n o.value = value;\n return;\n }\n }\n this.addEventListener(typename.type, listener, capture);\n o = {type: typename.type, name: typename.name, value: value, listener: listener, capture: capture};\n if (!on) this.__on = [o];\n else on.push(o);\n };\n}\n\nexport default function(typename, value, capture) {\n var typenames = parseTypenames(typename + \"\"), i, n = typenames.length, t;\n\n if (arguments.length < 2) {\n var on = this.node().__on;\n if (on) for (var j = 0, m = on.length, o; j < m; ++j) {\n for (i = 0, o = on[j]; i < n; ++i) {\n if ((t = typenames[i]).type === o.type && t.name === o.name) {\n return o.value;\n }\n }\n }\n return;\n }\n\n on = value ? onAdd : onRemove;\n if (capture == null) capture = false;\n for (i = 0; i < n; ++i) this.each(on(typenames[i], value, capture));\n return this;\n}\n\nexport function customEvent(event1, listener, that, args) {\n var event0 = event;\n event1.sourceEvent = event;\n event = event1;\n try {\n return listener.apply(that, args);\n } finally {\n event = event0;\n }\n}\n","import defaultView from \"../window\";\n\nfunction dispatchEvent(node, type, params) {\n var window = defaultView(node),\n event = window.CustomEvent;\n\n if (typeof event === \"function\") {\n event = new event(type, params);\n } else {\n event = window.document.createEvent(\"Event\");\n if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;\n else event.initEvent(type, false, false);\n }\n\n node.dispatchEvent(event);\n}\n\nfunction dispatchConstant(type, params) {\n return function() {\n return dispatchEvent(this, type, params);\n };\n}\n\nfunction dispatchFunction(type, params) {\n return function() {\n return dispatchEvent(this, type, params.apply(this, arguments));\n };\n}\n\nexport default function(type, params) {\n return this.each((typeof params === \"function\"\n ? dispatchFunction\n : dispatchConstant)(type, params));\n}\n","import selection_select from \"./select\";\nimport selection_selectAll from \"./selectAll\";\nimport selection_filter from \"./filter\";\nimport selection_data from \"./data\";\nimport selection_enter from \"./enter\";\nimport selection_exit from \"./exit\";\nimport selection_join from \"./join\";\nimport selection_merge from \"./merge\";\nimport selection_order from \"./order\";\nimport selection_sort from \"./sort\";\nimport selection_call from \"./call\";\nimport selection_nodes from \"./nodes\";\nimport selection_node from \"./node\";\nimport selection_size from \"./size\";\nimport selection_empty from \"./empty\";\nimport selection_each from \"./each\";\nimport selection_attr from \"./attr\";\nimport selection_style from \"./style\";\nimport selection_property from \"./property\";\nimport selection_classed from \"./classed\";\nimport selection_text from \"./text\";\nimport selection_html from \"./html\";\nimport selection_raise from \"./raise\";\nimport selection_lower from \"./lower\";\nimport selection_append from \"./append\";\nimport selection_insert from \"./insert\";\nimport selection_remove from \"./remove\";\nimport selection_clone from \"./clone\";\nimport selection_datum from \"./datum\";\nimport selection_on from \"./on\";\nimport selection_dispatch from \"./dispatch\";\n\nexport var root = [null];\n\nexport function Selection(groups, parents) {\n this._groups = groups;\n this._parents = parents;\n}\n\nfunction selection() {\n return new Selection([[document.documentElement]], root);\n}\n\nSelection.prototype = selection.prototype = {\n constructor: Selection,\n select: selection_select,\n selectAll: selection_selectAll,\n filter: selection_filter,\n data: selection_data,\n enter: selection_enter,\n exit: selection_exit,\n join: selection_join,\n merge: selection_merge,\n order: selection_order,\n sort: selection_sort,\n call: selection_call,\n nodes: selection_nodes,\n node: selection_node,\n size: selection_size,\n empty: selection_empty,\n each: selection_each,\n attr: selection_attr,\n style: selection_style,\n property: selection_property,\n classed: selection_classed,\n text: selection_text,\n html: selection_html,\n raise: selection_raise,\n lower: selection_lower,\n append: selection_append,\n insert: selection_insert,\n remove: selection_remove,\n clone: selection_clone,\n datum: selection_datum,\n on: selection_on,\n dispatch: selection_dispatch\n};\n\nexport default selection;\n","import {Selection, root} from \"./selection/index\";\n\nexport default function(selector) {\n return typeof selector === \"string\"\n ? new Selection([[document.querySelector(selector)]], [document.documentElement])\n : new Selection([[selector]], root);\n}\n","import {event} from \"./selection/on\";\n\nexport default function() {\n var current = event, source;\n while (source = current.sourceEvent) current = source;\n return current;\n}\n","export default function(node, event) {\n var svg = node.ownerSVGElement || node;\n\n if (svg.createSVGPoint) {\n var point = svg.createSVGPoint();\n point.x = event.clientX, point.y = event.clientY;\n point = point.matrixTransform(node.getScreenCTM().inverse());\n return [point.x, point.y];\n }\n\n var rect = node.getBoundingClientRect();\n return [event.clientX - rect.left - node.clientLeft, event.clientY - rect.top - node.clientTop];\n}\n","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node) {\n var event = sourceEvent();\n if (event.changedTouches) event = event.changedTouches[0];\n return point(node, event);\n}\n","import sourceEvent from \"./sourceEvent\";\nimport point from \"./point\";\n\nexport default function(node, touches, identifier) {\n if (arguments.length < 3) identifier = touches, touches = sourceEvent().changedTouches;\n\n for (var i = 0, n = touches ? touches.length : 0, touch; i < n; ++i) {\n if ((touch = touches[i]).identifier === identifier) {\n return point(node, touch);\n }\n }\n\n return null;\n}\n","var noop = {value: function() {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","import {event} from \"d3-selection\";\n\nexport function nopropagation() {\n event.stopImmediatePropagation();\n}\n\nexport default function() {\n event.preventDefault();\n event.stopImmediatePropagation();\n}\n","import {select} from \"d3-selection\";\nimport noevent from \"./noevent\";\n\nexport default function(view) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", noevent, true);\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", noevent, true);\n } else {\n root.__noselect = root.style.MozUserSelect;\n root.style.MozUserSelect = \"none\";\n }\n}\n\nexport function yesdrag(view, noclick) {\n var root = view.document.documentElement,\n selection = select(view).on(\"dragstart.drag\", null);\n if (noclick) {\n selection.on(\"click.drag\", noevent, true);\n setTimeout(function() { selection.on(\"click.drag\", null); }, 0);\n }\n if (\"onselectstart\" in root) {\n selection.on(\"selectstart.drag\", null);\n } else {\n root.style.MozUserSelect = root.__noselect;\n delete root.__noselect;\n }\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {\n this.target = target;\n this.type = type;\n this.subject = subject;\n this.identifier = id;\n this.active = active;\n this.x = x;\n this.y = y;\n this.dx = dx;\n this.dy = dy;\n this._ = dispatch;\n}\n\nDragEvent.prototype.on = function() {\n var value = this._.on.apply(this._, arguments);\n return value === this._ ? this : value;\n};\n","import {dispatch} from \"d3-dispatch\";\nimport {event, customEvent, select, mouse, touch} from \"d3-selection\";\nimport nodrag, {yesdrag} from \"./nodrag\";\nimport noevent, {nopropagation} from \"./noevent\";\nimport constant from \"./constant\";\nimport DragEvent from \"./event\";\n\n// Ignore right-click, since that should open the context menu.\nfunction defaultFilter() {\n return !event.button;\n}\n\nfunction defaultContainer() {\n return this.parentNode;\n}\n\nfunction defaultSubject(d) {\n return d == null ? {x: event.x, y: event.y} : d;\n}\n\nfunction defaultTouchable() {\n return \"ontouchstart\" in this;\n}\n\nexport default function() {\n var filter = defaultFilter,\n container = defaultContainer,\n subject = defaultSubject,\n touchable = defaultTouchable,\n gestures = {},\n listeners = dispatch(\"start\", \"drag\", \"end\"),\n active = 0,\n mousedownx,\n mousedowny,\n mousemoving,\n touchending,\n clickDistance2 = 0;\n\n function drag(selection) {\n selection\n .on(\"mousedown.drag\", mousedowned)\n .filter(touchable)\n .on(\"touchstart.drag\", touchstarted)\n .on(\"touchmove.drag\", touchmoved)\n .on(\"touchend.drag touchcancel.drag\", touchended)\n .style(\"touch-action\", \"none\")\n .style(\"-webkit-tap-highlight-color\", \"rgba(0,0,0,0)\");\n }\n\n function mousedowned() {\n if (touchending || !filter.apply(this, arguments)) return;\n var gesture = beforestart(\"mouse\", container.apply(this, arguments), mouse, this, arguments);\n if (!gesture) return;\n select(event.view).on(\"mousemove.drag\", mousemoved, true).on(\"mouseup.drag\", mouseupped, true);\n nodrag(event.view);\n nopropagation();\n mousemoving = false;\n mousedownx = event.clientX;\n mousedowny = event.clientY;\n gesture(\"start\");\n }\n\n function mousemoved() {\n noevent();\n if (!mousemoving) {\n var dx = event.clientX - mousedownx, dy = event.clientY - mousedowny;\n mousemoving = dx * dx + dy * dy > clickDistance2;\n }\n gestures.mouse(\"drag\");\n }\n\n function mouseupped() {\n select(event.view).on(\"mousemove.drag mouseup.drag\", null);\n yesdrag(event.view, mousemoving);\n noevent();\n gestures.mouse(\"end\");\n }\n\n function touchstarted() {\n if (!filter.apply(this, arguments)) return;\n var touches = event.changedTouches,\n c = container.apply(this, arguments),\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = beforestart(touches[i].identifier, c, touch, this, arguments)) {\n nopropagation();\n gesture(\"start\");\n }\n }\n }\n\n function touchmoved() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n noevent();\n gesture(\"drag\");\n }\n }\n }\n\n function touchended() {\n var touches = event.changedTouches,\n n = touches.length, i, gesture;\n\n if (touchending) clearTimeout(touchending);\n touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!\n for (i = 0; i < n; ++i) {\n if (gesture = gestures[touches[i].identifier]) {\n nopropagation();\n gesture(\"end\");\n }\n }\n }\n\n function beforestart(id, container, point, that, args) {\n var p = point(container, id), s, dx, dy,\n sublisteners = listeners.copy();\n\n if (!customEvent(new DragEvent(drag, \"beforestart\", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {\n if ((event.subject = s = subject.apply(that, args)) == null) return false;\n dx = s.x - p[0] || 0;\n dy = s.y - p[1] || 0;\n return true;\n })) return;\n\n return function gesture(type) {\n var p0 = p, n;\n switch (type) {\n case \"start\": gestures[id] = gesture, n = active++; break;\n case \"end\": delete gestures[id], --active; // nobreak\n case \"drag\": p = point(container, id), n = active; break;\n }\n customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);\n };\n }\n\n drag.filter = function(_) {\n return arguments.length ? (filter = typeof _ === \"function\" ? _ : constant(!!_), drag) : filter;\n };\n\n drag.container = function(_) {\n return arguments.length ? (container = typeof _ === \"function\" ? _ : constant(_), drag) : container;\n };\n\n drag.subject = function(_) {\n return arguments.length ? (subject = typeof _ === \"function\" ? _ : constant(_), drag) : subject;\n };\n\n drag.touchable = function(_) {\n return arguments.length ? (touchable = typeof _ === \"function\" ? _ : constant(!!_), drag) : touchable;\n };\n\n drag.on = function() {\n var value = listeners.on.apply(listeners, arguments);\n return value === listeners ? drag : value;\n };\n\n drag.clickDistance = function(_) {\n return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);\n };\n\n return drag;\n}\n","import { select } from \"d3-selection\"\nimport { drag } from \"d3-drag\"\n\nexport const pointHandle = ({ cx = 0, cy = 0 }) => {\n return { move: { x: cx, y: cy } }\n}\n\nexport const circleHandles = ({ cx = 0, cy = 0, r1, r2, padding }) => {\n const h = { move: { x: cx, y: cy } }\n\n if (r1 !== undefined) {\n h.r1 = { x: cx + r1 / Math.sqrt(2), y: cy + r1 / Math.sqrt(2) }\n }\n\n if (r2 !== undefined) {\n h.r2 = { x: cx + r2 / Math.sqrt(2), y: cy + r2 / Math.sqrt(2) }\n }\n\n if (padding !== undefined) {\n h.padding = { x: cx + r1 + padding, y: cy }\n }\n\n return h\n}\n\nexport const rectHandles = ({\n x1 = 0,\n y1 = 0,\n x2 = x1,\n y2 = y1,\n width,\n height\n}) => {\n const w = width || Math.abs(x2 - x1)\n const h = height || Math.abs(y2 - y1)\n\n return {\n move: {\n x: Math.min(x1, x2) + w / 2,\n y: Math.min(y1, y2) - 10\n },\n width: {\n x: Math.max(x1, x2),\n y: Math.min(y1, y2) + h / 2\n },\n height: {\n x: Math.min(x1, x2) + w / 2,\n y: Math.max(y1, y2)\n }\n }\n}\n\nexport const lineHandles = ({ x1, y1, x2, y2, x, y }) => {\n const minY = Math.min(y1, y2)\n const minX = Math.min(x1, x2)\n\n const height = Math.abs(y2 - y1)\n const width = Math.abs(x2 - x1)\n\n return {\n move: {\n x: x || minX + width / 2,\n y: y || minY + height / 2\n }\n }\n}\n\n//arc handles\nexport const addHandles = ({ group, handles, r = 10 }) => {\n //give it a group and x,y to draw handles\n //then give it instructions on what the handles change\n const h = group.selectAll(\"circle.handle\").data(handles)\n\n h\n .enter()\n .append(\"circle\")\n .attr(\"class\", \"handle\")\n .attr(\"fill\", \"grey\")\n .attr(\"fill-opacity\", 0.1)\n .attr(\"cursor\", \"move\")\n .attr(\"stroke-dasharray\", 5)\n .attr(\"stroke\", \"grey\")\n .call(\n drag()\n .container(select(\"g.annotations\").node())\n .on(\"start\", d => d.start && d.start(d))\n .on(\"drag\", d => d.drag && d.drag(d))\n .on(\"end\", d => d.end && d.end(d))\n )\n\n group\n .selectAll(\"circle.handle\")\n .attr(\"cx\", d => d.x)\n .attr(\"cy\", d => d.y)\n .attr(\"r\", d => d.r || r)\n .attr(\"class\", d => `handle ${d.className || \"\"}`)\n\n h.exit().remove()\n}\n","\nexport const leftRightDynamic = (align, y) => {\n if (align === \"dynamic\" || align === \"left\" || align === \"right\") {\n if (y < 0) { align = \"top\" }\n else { align = \"bottom\" } \n }\n return align\n}\n\nexport const topBottomDynamic = (align, x) => {\n if (align === \"dynamic\" || align === \"top\" || align === \"bottom\") {\n if (x < 0) { align = \"right\" }\n else { align = \"left\" } \n }\n return align\n}\n\nconst orientationTopBottom = [\"topBottom\", \"top\", \"bottom\"]\nconst orientationLeftRight = [\"leftRight\", \"left\", \"right\"]\n\nexport default ({ padding=0, bbox={x:0, y:0, width:0, height:0}, align, orientation, offset={x:0, y:0} }) => {\n let x = -bbox.x \n let y = 0//-bbox.y\n if ( orientationTopBottom.indexOf(orientation) !== -1 ) {\n align = topBottomDynamic(align, offset.x)\n if (offset.y < 0 && orientation === \"topBottom\" || orientation === \"top\") { \n y -= bbox.height + padding\n } else {\n y += padding\n }\n\n if ( align === \"middle\" ) {\n x -= bbox.width/2\n } else if (align === \"right\" ) {\n x -= bbox.width\n } \n\n } else if ( orientationLeftRight.indexOf(orientation) !== -1 ) {\n align = leftRightDynamic(align, offset.y)\n if (offset.x < 0 && orientation === \"leftRight\" || orientation === \"left\") { \n x -= bbox.width + padding\n } else {\n x += padding\n }\n\n if ( align === \"middle\" ) {\n y -= bbox.height/2\n } else if (align === \"top\" ) {\n y -= bbox.height\n }\n } \n\n return { x, y }\n}","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n","import {path} from \"d3-path\";\nimport constant from \"./constant\";\nimport {epsilon, pi, halfPi, tau} from \"./math\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / (y32 * x10 - x32 * y10);\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / Math.sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * Math.sqrt(Math.max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = Math.abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * Math.cos(a0), r1 * Math.sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * Math.cos(a1), r0 * Math.sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : Math.sqrt(r0 * r0 + r1 * r1)),\n rc = Math.min(Math.abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * Math.sin(ap)),\n p1 = asin(rp / r1 * Math.sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * Math.cos(a01),\n y01 = r1 * Math.sin(a01),\n x10 = r0 * Math.cos(a10),\n y10 = r0 * Math.sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * Math.cos(a11),\n y11 = r1 * Math.sin(a11),\n x00 = r0 * Math.cos(a00),\n y00 = r0 * Math.sin(a00);\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi) {\n var oc = da0 > epsilon ? intersect(x01, y01, x00, y00, x11, y11, x10, y10) : [x10, y10],\n ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / Math.sin(Math.acos((ax * bx + ay * by) / (Math.sqrt(ax * ax + ay * ay) * Math.sqrt(bx * bx + by * by))) / 2),\n lc = Math.sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = Math.min(rc, (r0 - lc) / (kc - 1));\n rc1 = Math.min(rc, (r1 - lc) / (kc + 1));\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Math.atan2(t0.y01, t0.x01), Math.atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, Math.atan2(t0.y01, t0.x01), Math.atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, Math.atan2(t0.cy + t0.y11, t0.cx + t0.x11), Math.atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, Math.atan2(t1.y11, t1.x11), Math.atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Math.atan2(t0.y01, t0.x01), Math.atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, Math.atan2(t0.y01, t0.x01), Math.atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, Math.atan2(t0.cy + t0.y11, t0.cx + t0.x11), Math.atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, Math.atan2(t1.y11, t1.x11), Math.atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [Math.cos(a) * r, Math.sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant\";\nimport curveLinear from \"./curve/linear\";\nimport {x as pointX, y as pointY} from \"./point\";\n\nexport default function() {\n var x = pointX,\n y = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function line(data) {\n var i,\n n = data.length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math\";\nimport {Cardinal} from \"./cardinal\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","import { line, arc, curveLinear } from \"d3-shape\"\n\nexport const lineBuilder = ({ data, curve=curveLinear, canvasContext, className, classID }) => { \n const lineGen = line()\n .curve(curve)\n\n const builder = {\n type: 'path',\n className,\n classID,\n data\n }\n\n if (canvasContext) {\n lineGen.context(canvasContext)\n builder.pathMethods = lineGen\n\n } else {\n builder.attrs = {\n d: lineGen(data)\n }\n }\n\n return builder\n}\n\nexport const arcBuilder = ({ data, canvasContext, className, classID }) => {\n\n const builder = {\n type: 'path',\n className,\n classID,\n data\n }\n\n const arcShape = arc()\n .innerRadius(data.innerRadius || 0)\n .outerRadius(data.outerRadius || data.radius || 2)\n .startAngle(data.startAngle || 0)\n .endAngle(data.endAngle || 2*Math.PI)\n\n if (canvasContext) {\n arcShape.context(canvasContext)\n builder.pathMethods = lineGen\n\n } else {\n \n builder.attrs = {\n d: arcShape()\n }\n }\n\n return builder\n}","import { lineBuilder } from '../Builder'\nimport { leftRightDynamic } from './alignment'\n\nexport default ({ align, x=0, y=0, bbox, offset }) => {\n align = leftRightDynamic(align, offset.y)\n\n if (align === \"top\") { y -= bbox.height } \n else if (align === \"middle\") { y -= bbox.height/2 }\n\n const data = [[x, y], [x, y + bbox.height]]\n return { components: [lineBuilder({ data, className : \"note-line\" })] }\n}","import { lineBuilder } from '../Builder'\nimport { topBottomDynamic } from './alignment'\n\nexport default ({ align, x=0, y=0, offset, bbox }) => {\n align = topBottomDynamic(align, offset.x)\n\n if (align === \"right\") { x -= bbox.width }\n else if (align === \"middle\") { x -= bbox.width/2 }\n\n const data = [[x, y], [x + bbox.width, y]]\n return { components: [lineBuilder({ data, className : \"note-line\" })] }\n}","import { lineBuilder } from '../Builder'\n\nexport const lineSetup = ({ type, subjectType }) => {\n let annotation = type.annotation\n let offset = annotation.position\n \n let x1 = annotation.x - offset.x,\n x2 = x1 + annotation.dx,\n y1 = annotation.y - offset.y,\n y2 = y1 + annotation.dy\n\n\n const subjectData = annotation.subject\n\n if (subjectType === \"circle\" && (subjectData.outerRadius || subjectData.radius)) {\n const h = Math.sqrt((x1 - x2)*(x1 - x2) + (y1 - y2)*(y1 - y2))\n const angle = Math.asin(-y2/h)\n const r = subjectData.outerRadius || subjectData.radius + (subjectData.radiusPadding || 0)\n\n x1 = Math.abs(Math.cos(angle)*r)*(x2 < 0 ? -1 : 1)\n y1 = Math.abs(Math.sin(angle)*r)*(y2 < 0 ? -1 : 1)\n\n }\n\n if (subjectType === \"rect\") {\n const { width, height } = subjectData\n \n if (width > 0 && annotation.dx > 0 || width < 0 && annotation.dx < 0) {\n if (Math.abs(width) > Math.abs(annotation.dx)) x1 = width/2\n else x1 = width\n } \n if (height > 0 && annotation.dy > 0 || height < 0 && annotation.dy < 0) {\n if (Math.abs(height) > Math.abs(annotation.dy)) y1 = height/2\n else y1 = height\n }\n if (x1 === width/2 && y1 === height/2) { x1 = x2; y1 = y2;}\n }\n\n\n return [[x1, y1], [x2, y2]]\n}\n\nexport default (connectorData) => {\n const data = lineSetup(connectorData)\n return { components: [lineBuilder({ data, className : \"connector\" })]} \n}","import { lineBuilder } from '../Builder'\n\nexport default ({ type, subjectType }) => {\n\n const annotation = type.annotation\n const offset = annotation.position\n\n let x1 = annotation.x - offset.x,\n x2 = x1 + annotation.dx,\n y1 = annotation.y - offset.y,\n y2 = y1 + annotation.dy\n\n const subjectData = annotation.subject\n\n if (subjectType === \"rect\") {\n const { width, height } = subjectData\n \n if (width > 0 && annotation.dx > 0 || width < 0 && annotation.dx < 0) {\n if (Math.abs(width) > Math.abs(annotation.dx)) x1 = width/2\n else x1 = width\n } \n if (height > 0 && annotation.dy > 0 || height < 0 && annotation.dy < 0) {\n if (Math.abs(height) > Math.abs(annotation.dy)) y1 = height/2\n else y1 = height\n }\n if (x1 === width/2 && y1 === height/2) { x1 = x2; y1 = y2;}\n }\n\n let data = [[x1, y1], [x2, y2]]\n\n let diffY = y2 - y1\n let diffX = x2 - x1\n let xe = x2 \n let ye = y2\n let opposite = y2 < y1 && x2 > x1 || x2 < x1 && y2 > y1 ? -1 : 1\n\n if (Math.abs(diffX) < Math.abs(diffY)) {\n xe = x2\n ye = y1 + diffX*opposite\n } else {\n ye = y2\n xe = x1 + diffY*opposite\n }\n \n if (subjectType === \"circle\" && (subjectData.outerRadius || subjectData.radius)) {\n const r = (subjectData.outerRadius || subjectData.radius) + (subjectData.radiusPadding || 0)\n const length = r/Math.sqrt(2)\n\n if (Math.abs(diffX) > length && Math.abs(diffY) > length) {\n x1 = length*(x2 < 0 ? -1 : 1)\n y1 = length*(y2 < 0 ? -1 : 1)\n data = [[x1, y1], [xe , ye ], [x2, y2]]\n\n } else if (Math.abs(diffX) > Math.abs(diffY)) {\n const angle = Math.asin(-y2/r)\n x1 = Math.abs(Math.cos(angle)*r)*(x2 < 0 ? -1 : 1)\n data = [[ x1, y2], [x2, y2]]\n } else {\n const angle = Math.acos(x2/r)\n y1 = Math.abs(Math.sin(angle)*r)*(y2 < 0 ? -1 : 1)\n data = [[ x2, y1], [x2, y2]]\n }\n } else {\n data = [[x1, y1], [xe , ye], [x2, y2]]\n }\n\n return { components: [lineBuilder({ data, className: \"connector\"})]}\n}\n","import { lineBuilder } from '../Builder'\nimport { event } from 'd3-selection'\nimport { lineSetup } from './type-line'\nimport { curveCatmullRom } from 'd3-shape'\nimport { pointHandle } from '../Handles'\n\nexport default ({ type, connectorData, subjectType }) => {\n\n if (!connectorData) { connectorData = {} }\n if (!connectorData.points || typeof connectorData.points === \"number\") { \n connectorData.points = createPoints(type.annotation.offset, connectorData.points) \n }\n if (!connectorData.curve) { connectorData.curve = curveCatmullRom }\n\n let handles = []\n\n if (type.editMode) {\n const cHandles = connectorData.points\n .map((c,i) => ({...pointHandle({cx: c[0], cy: c[1]}), index: i}))\n\n const updatePoint = (index) => { \n connectorData.points[index][0] += event.dx\n connectorData.points[index][1] += event.dy\n type.redrawConnector()\n }\n \n handles = type.mapHandles(cHandles\n .map(h => ({ ...h.move, drag: updatePoint.bind(type, h.index)})))\n\n }\n\n let data = lineSetup({ type, subjectType })\n data = [data[0], ...connectorData.points, data[1]]\n const components = [lineBuilder({ data, curve: connectorData.curve, className: \"connector\" })]\n\n return { components , handles }\n}\n\nconst createPoints = function ( offset, anchors=2) {\n const diff = { x: offset.x/(anchors + 1), y: offset.y/(anchors + 1) }\n const p = []\n\n let i = 1 \n for (; i <= anchors; i++) {\n p.push([diff.x*i + i%2*20, diff.y*i - i%2*20])\n }\n return p\n}","import { lineBuilder } from \"../Builder\"\n\nexport default ({ annotation, start, end, scale = 1 }) => {\n const offset = annotation.position\n if (!start) {\n start = [annotation.dx, annotation.dy]\n } else {\n start = [-end[0] + start[0], -end[1] + start[1]]\n }\n if (!end) {\n end = [annotation.x - offset.x, annotation.y - offset.y]\n }\n\n let x1 = end[0],\n y1 = end[1]\n\n let dx = start[0]\n let dy = start[1]\n\n let size = 10 * scale\n let angleOffset = 16 / 180 * Math.PI\n let angle = Math.atan(dy / dx)\n\n if (dx < 0) {\n angle += Math.PI\n }\n\n const data = [\n [x1, y1],\n [\n Math.cos(angle + angleOffset) * size + x1,\n Math.sin(angle + angleOffset) * size + y1\n ],\n [\n Math.cos(angle - angleOffset) * size + x1,\n Math.sin(angle - angleOffset) * size + y1\n ],\n [x1, y1]\n ]\n\n //TODO add in reverse\n // if (canvasContext.arrowReverse){\n // data = [[x1, y1],\n // [Math.cos(angle + angleOffset)*size, Math.sin(angle + angleOffset)*size],\n // [Math.cos(angle - angleOffset)*size, Math.sin(angle - angleOffset)*size],\n // [x1, y1]\n // ]\n // } else {\n // data = [[x1, y1],\n // [Math.cos(angle + angleOffset)*size, Math.sin(angle + angleOffset)*size],\n // [Math.cos(angle - angleOffset)*size, Math.sin(angle - angleOffset)*size],\n // [x1, y1]\n // ]\n // }\n\n return {\n components: [\n lineBuilder({\n data,\n className: \"connector-end connector-arrow\",\n classID: \"connector-end\"\n })\n ]\n }\n}\n","import { arcBuilder } from \"../Builder\"\n\nexport default ({ line, scale = 1 }) => {\n let dot = arcBuilder({\n className: \"connector-end connector-dot\",\n classID: \"connector-end\",\n data: { radius: 3 * Math.sqrt(scale) }\n })\n dot.attrs.transform = `translate(${line.data[0][0]}, ${line.data[0][1]})`\n\n return { components: [dot] }\n}\n","import { circleHandles } from \"../Handles\"\nimport { arcBuilder } from \"../Builder\"\nimport { event } from \"d3-selection\"\n\nexport default ({ subjectData, type }) => {\n if (!subjectData.radius && !subjectData.outerRadius) {\n subjectData.radius = 20\n }\n\n let handles = []\n const c = arcBuilder({ data: subjectData, className: \"subject\" })\n if (type.editMode) {\n const h = circleHandles({\n r1: c.data.outerRadius || c.data.radius,\n r2: c.data.innerRadius,\n padding: subjectData.radiusPadding\n })\n\n const updateRadius = attr => {\n const r = subjectData[attr] + event.dx * Math.sqrt(2)\n subjectData[attr] = r\n type.redrawSubject()\n type.redrawConnector()\n }\n\n const cHandles = [\n {\n ...h.r1,\n drag: updateRadius.bind(\n type,\n subjectData.outerRadius !== undefined ? \"outerRadius\" : \"radius\"\n )\n }\n ]\n\n if (subjectData.innerRadius) {\n cHandles.push({ ...h.r2, drag: updateRadius.bind(type, \"innerRadius\") })\n }\n handles = type.mapHandles(cHandles)\n }\n\n c.attrs[\"fill-opacity\"] = 0\n\n return { components: [c], handles }\n}\n","import { lineBuilder } from \"../Builder\"\nimport { event } from \"d3-selection\"\n\nexport default ({ subjectData, type }) => {\n if (!subjectData.width) {\n subjectData.width = 100\n }\n if (!subjectData.height) {\n subjectData.height = 100\n }\n\n let handles = []\n let { width, height } = subjectData\n\n const data = [[0, 0], [width, 0], [width, height], [0, height], [0, 0]]\n let rect = lineBuilder({ data, className: \"subject\" })\n\n if (type.editMode) {\n const updateWidth = () => {\n subjectData.width = event.x\n type.redrawSubject()\n type.redrawConnector()\n }\n\n const updateHeight = () => {\n subjectData.height = event.y\n type.redrawSubject()\n type.redrawConnector()\n }\n\n const rHandles = [\n { x: width, y: height / 2, drag: updateWidth.bind(type) },\n { x: width / 2, y: height, drag: updateHeight.bind(type) }\n ]\n\n handles = type.mapHandles(rHandles)\n }\n rect.attrs[\"fill-opacity\"] = 0.1\n return { components: [rect], handles }\n}\n","import { lineBuilder } from '../Builder'\n\n\nexport default ({ subjectData, type }) => {\n const offset = type.annotation.position\n\n let x1 = (subjectData.x1 !== undefined ? subjectData.x1 : offset.x) - offset.x,\n x2 = (subjectData.x2 !== undefined ? subjectData.x2 : offset.x) - offset.x,\n y1 = (subjectData.y1 !== undefined ? subjectData.y1 : offset.y) - offset.y,\n y2 = (subjectData.y2 !== undefined ? subjectData.y2 : offset.y) - offset.y\n\n const data = [[x1, y1], [x2, y2]]\n return { components: [lineBuilder({ data, className : 'subject'})]}\n}","import { lineBuilder, arcBuilder } from \"../Builder\"\nimport { event } from \"d3-selection\"\n\nexport default ({ subjectData = {}, type = {} }, annotation = {}) => {\n const typeSettings = type.typeSettings && type.typeSettings.subject\n\n if (!subjectData.radius) {\n if (typeSettings && typeSettings.radius) {\n subjectData.radius = typeSettings.radius\n } else {\n subjectData.radius = 14\n }\n }\n if (!subjectData.x) {\n if (typeSettings && typeSettings.x) {\n subjectData.x = typeSettings.x\n }\n }\n if (!subjectData.y) {\n if (typeSettings && typeSettings.y) {\n subjectData.y = typeSettings.y\n }\n }\n\n let handles = []\n const components = []\n const radius = subjectData.radius\n const innerRadius = radius * 0.7\n let x = 0\n let y = 0\n\n const notCornerOffset = Math.sqrt(2) * radius\n const placement = {\n xleftcorner: -radius,\n xrightcorner: radius,\n ytopcorner: -radius,\n ybottomcorner: radius,\n xleft: -notCornerOffset,\n xright: notCornerOffset,\n ytop: -notCornerOffset,\n ybottom: notCornerOffset\n }\n\n if (subjectData.x && !subjectData.y) {\n x = placement[`x${subjectData.x}`]\n } else if (subjectData.y && !subjectData.x) {\n y = placement[`y${subjectData.y}`]\n } else if (subjectData.x && subjectData.y) {\n x = placement[`x${subjectData.x}corner`]\n y = placement[`y${subjectData.y}corner`]\n }\n\n const transform = `translate(${x}, ${y})`\n const circlebg = arcBuilder({ className: \"subject\", data: { radius } })\n circlebg.attrs.transform = transform\n circlebg.attrs.fill = annotation.color\n circlebg.attrs[\"stroke-linecap\"] = \"round\"\n circlebg.attrs[\"stroke-width\"] = \"3px\"\n\n const circle = arcBuilder({\n className: \"subject-ring\",\n data: { outerRadius: radius, innerRadius }\n })\n\n circle.attrs.transform = transform\n // circle.attrs.fill = annotation.color\n circle.attrs[\"stroke-width\"] = \"3px\"\n circle.attrs.fill = \"white\"\n\n let pointer\n if (x && y || !x && !y) {\n pointer = lineBuilder({\n className: \"subject-pointer\",\n data: [[0, 0], [x || 0, 0], [0, y || 0], [0, 0]]\n })\n } else if (x || y) {\n const notCornerPointerXY = (v, sign = 1) =>\n v && v / Math.sqrt(2) / Math.sqrt(2) || sign * radius / Math.sqrt(2)\n\n pointer = lineBuilder({\n className: \"subject-pointer\",\n data: [\n [0, 0],\n [notCornerPointerXY(x), notCornerPointerXY(y)],\n [notCornerPointerXY(x, -1), notCornerPointerXY(y, -1)],\n [0, 0]\n ]\n })\n }\n\n if (pointer) {\n pointer.attrs.fill = annotation.color\n pointer.attrs[\"stroke-linecap\"] = \"round\"\n pointer.attrs[\"stroke-width\"] = \"3px\"\n components.push(pointer)\n }\n\n if (type.editMode) {\n const dragBadge = () => {\n subjectData.x =\n event.x < -radius * 2\n ? \"left\"\n : event.x > radius * 2 ? \"right\" : undefined\n subjectData.y =\n event.y < -radius * 2\n ? \"top\"\n : event.y > radius * 2 ? \"bottom\" : undefined\n\n type.redrawSubject()\n }\n\n const bHandles = { x: x * 2, y: y * 2, drag: dragBadge.bind(type) }\n if (!bHandles.x && !bHandles.y) {\n bHandles.y = -radius\n }\n\n handles = type.mapHandles([bHandles])\n }\n\n let text\n if (subjectData.text) {\n text = {\n type: \"text\",\n className: \"badge-text\",\n attrs: {\n fill: \"white\",\n stroke: \"none\",\n \"font-size\": \".7em\",\n text: subjectData.text,\n \"text-anchor\": \"middle\",\n dy: \".25em\",\n x,\n y\n }\n }\n }\n\n components.push(circlebg)\n components.push(circle)\n components.push(text)\n\n return { components, handles }\n}\n","import { select, event } from \"d3-selection\"\nimport { drag } from \"d3-drag\"\nimport { addHandles } from \"./Handles\"\n\n//Note options\nimport noteAlignment from \"./Note/alignment\"\nimport noteVertical from \"./Note/lineType-vertical\"\nimport noteHorizontal from \"./Note/lineType-horizontal\"\n\n//Connector options\nimport connectorLine from \"./Connector/type-line\"\nimport connectorElbow from \"./Connector/type-elbow\"\nimport connectorCurve from \"./Connector/type-curve\"\nimport connectorArrow from \"./Connector/end-arrow\"\nimport connectorDot from \"./Connector/end-dot\"\n\n//Subject options\nimport subjectCircle from \"./Subject/circle\"\nimport subjectRect from \"./Subject/rect\"\nimport subjectThreshold from \"./Subject/threshold\"\nimport subjectBadge from \"./Subject/badge\"\n\nexport class Type {\n constructor({ a, annotation, editMode, dispatcher, notePadding, accessors }) {\n this.a = a\n\n this.note =\n annotation.disable.indexOf(\"note\") === -1 && a.select(\"g.annotation-note\")\n this.noteContent = this.note && a.select(\"g.annotation-note-content\")\n this.connector =\n annotation.disable.indexOf(\"connector\") === -1 &&\n a.select(\"g.annotation-connector\")\n this.subject =\n annotation.disable.indexOf(\"subject\") === -1 &&\n a.select(\"g.annotation-subject\")\n this.dispatcher = dispatcher\n\n if (dispatcher) {\n const handler = addHandlers.bind(null, dispatcher, annotation)\n handler({ component: this.note, name: \"note\" })\n handler({ component: this.connector, name: \"connector\" })\n handler({ component: this.subject, name: \"subject\" })\n }\n\n this.annotation = annotation\n this.editMode = annotation.editMode || editMode\n this.notePadding = notePadding !== undefined ? notePadding : 3\n this.offsetCornerX = 0\n this.offsetCornerY = 0\n\n if (accessors && annotation.data) {\n this.init(accessors)\n }\n }\n\n init(accessors) {\n if (!this.annotation.x) {\n this.mapX(accessors)\n }\n if (!this.annotation.y) {\n this.mapY(accessors)\n }\n }\n\n mapY(accessors) {\n if (accessors.y) {\n this.annotation.y = accessors.y(this.annotation.data)\n }\n }\n\n mapX(accessors) {\n if (accessors.x) {\n this.annotation.x = accessors.x(this.annotation.data)\n }\n }\n\n updateEditMode() {\n this.a.selectAll(\"circle.handle\").remove()\n }\n\n drawOnSVG(component, builders) {\n if (!Array.isArray(builders)) {\n builders = [builders]\n }\n\n builders\n .filter(b => b)\n .forEach(({ type, className, attrs, handles, classID }) => {\n if (type === \"handle\") {\n addHandles({ group: component, r: attrs && attrs.r, handles })\n } else {\n newWithClass(component, [this.annotation], type, className, classID)\n const el = component.select(`${type}.${classID || className}`)\n const addAttrs = Object.keys(attrs)\n const removeAttrs = []\n\n const currentAttrs = el.node().attributes\n for (let i = currentAttrs.length - 1; i >= 0; i--) {\n const name = currentAttrs[i].name\n if (addAttrs.indexOf(name) === -1 && name !== \"class\")\n removeAttrs.push(name)\n }\n\n addAttrs.forEach(attr => {\n if (attr === \"text\") {\n el.text(attrs[attr])\n } else {\n el.attr(attr, attrs[attr])\n }\n })\n\n removeAttrs.forEach(attr => el.attr(attr, null))\n }\n })\n }\n\n //TODO: how to extend this to a drawOnCanvas mode?\n\n getNoteBBox() {\n return bboxWithoutHandles(this.note, \".annotation-note-content text\")\n }\n getNoteBBoxOffset() {\n const bbox = bboxWithoutHandles(this.note, \".annotation-note-content\")\n const transform = this.noteContent.attr(\"transform\").split(/\\(|\\,|\\)/g)\n bbox.offsetCornerX = parseFloat(transform[1]) + this.annotation.dx\n bbox.offsetCornerY = parseFloat(transform[2]) + this.annotation.dy\n bbox.offsetX = this.annotation.dx\n bbox.offsetY = this.annotation.dy\n return bbox\n }\n\n drawSubject(context = {}) {\n const subjectData = this.annotation.subject\n const type = context.type\n const subjectParams = { type: this, subjectData }\n\n let subject = {}\n if (type === \"circle\") subject = subjectCircle(subjectParams)\n else if (type === \"rect\") subject = subjectRect(subjectParams)\n else if (type === \"threshold\") subject = subjectThreshold(subjectParams)\n else if (type === \"badge\")\n subject = subjectBadge(subjectParams, this.annotation)\n\n let { components = [], handles = [] } = subject\n components.forEach(c => {\n if (c && c.attrs && !c.attrs.stroke) {\n c.attrs.stroke = this.annotation.color\n }\n })\n\n if (this.editMode) {\n handles = handles.concat(\n this.mapHandles([{ drag: this.dragSubject.bind(this) }])\n )\n components.push({ type: \"handle\", handles })\n }\n\n return components\n }\n\n drawConnector(context = {}) {\n const connectorData = this.annotation.connector\n const type = connectorData.type || context.type\n const connectorParams = { type: this, connectorData }\n connectorParams.subjectType =\n this.typeSettings &&\n this.typeSettings.subject &&\n this.typeSettings.subject.type\n\n let connector = {}\n if (type === \"curve\") connector = connectorCurve(connectorParams)\n else if (type === \"elbow\") connector = connectorElbow(connectorParams)\n else connector = connectorLine(connectorParams)\n let { components = [], handles = [] } = connector\n const line = components[0]\n //TODO: genericize this into fill t/f stroke t/f\n if (line) {\n line.attrs.stroke = this.annotation.color\n line.attrs.fill = \"none\"\n }\n const endType = connectorData.end || context.end\n let end = {}\n if (endType === \"arrow\") {\n let s = line.data[1]\n const e = line.data[0]\n const distance = Math.sqrt(\n Math.pow(s[0] - e[0], 2) + Math.pow(s[1] - e[1], 2)\n )\n if (distance < 5 && line.data[2]) {\n s = line.data[2]\n }\n end = connectorArrow({\n annotation: this.annotation,\n start: s,\n end: e,\n scale: connectorData.endScale\n })\n } else if (endType === \"dot\") {\n end = connectorDot({ line, scale: connectorData.endScale })\n } else if (!endType || endType === \"none\") {\n this.connector && this.connector.select(\".connector-end\").remove()\n }\n\n if (end.components) {\n end.components.forEach(c => {\n c.attrs.fill = this.annotation.color\n c.attrs.stroke = this.annotation.color\n })\n components = components.concat(end.components)\n }\n\n if (this.editMode) {\n if (handles.length !== 0) components.push({ type: \"handle\", handles })\n }\n return components\n }\n\n drawNote(context = {}) {\n const noteData = this.annotation.note\n const align = noteData.align || context.align || \"dynamic\"\n const noteParams = {\n bbox: context.bbox,\n align,\n offset: this.annotation.offset\n }\n const lineType = noteData.lineType || context.lineType\n let note = {}\n if (lineType === \"vertical\") note = noteVertical(noteParams)\n else if (lineType === \"horizontal\") note = noteHorizontal(noteParams)\n\n let { components = [], handles = [] } = note\n components.forEach(c => {\n c.attrs.stroke = this.annotation.color\n })\n\n if (this.editMode) {\n handles = this.mapHandles([\n { x: 0, y: 0, drag: this.dragNote.bind(this) }\n ])\n components.push({ type: \"handle\", handles })\n\n const dragging = this.dragNote.bind(this),\n start = this.dragstarted.bind(this),\n end = this.dragended.bind(this)\n this.note.call(\n drag()\n .container(select(\"g.annotations\").node())\n .on(\"start\", d => start(d))\n .on(\"drag\", d => dragging(d))\n .on(\"end\", d => end(d))\n )\n } else {\n this.note.on(\"mousedown.drag\", null)\n }\n return components\n }\n\n drawNoteContent(context) {\n const noteData = this.annotation.note\n const padding =\n noteData.padding !== undefined ? noteData.padding : this.notePadding\n let orientation = noteData.orientation || context.orientation || \"topBottom\"\n const lineType = noteData.lineType || context.lineType\n const align = noteData.align || context.align || \"dynamic\"\n\n if (lineType === \"vertical\") orientation = \"leftRight\"\n else if (lineType === \"horizontal\") orientation = \"topBottom\"\n\n const noteParams = {\n padding,\n bbox: context.bbox,\n offset: this.annotation.offset,\n orientation,\n align\n }\n const { x, y } = noteAlignment(noteParams)\n this.offsetCornerX = x + this.annotation.dx\n this.offsetCornerY = y + this.annotation.dy\n this.note && this.noteContent.attr(\"transform\", `translate(${x}, ${y})`)\n\n return []\n }\n\n drawOnScreen(component, drawFunction) {\n return this.drawOnSVG(component, drawFunction)\n }\n\n redrawSubject() {\n this.subject && this.drawOnScreen(this.subject, this.drawSubject())\n }\n\n redrawConnector() {\n this.connector && this.drawOnScreen(this.connector, this.drawConnector())\n }\n\n redrawNote(bbox = this.getNoteBBox()) {\n this.noteContent &&\n this.drawOnScreen(this.noteContent, this.drawNoteContent({ bbox }))\n this.note && this.drawOnScreen(this.note, this.drawNote({ bbox }))\n }\n\n setPosition() {\n const position = this.annotation.position\n this.a.attr(\"transform\", `translate(${position.x}, ${position.y})`)\n }\n\n clearComponents() {\n this.subject && this.subject.select(\"*\").remove()\n this.connector && this.connector.select(\"*\").remove()\n // this.note && this.note.select(\"*\").remove()\n }\n\n setOffset() {\n if (this.note) {\n const offset = this.annotation.offset\n this.note.attr(\"transform\", `translate(${offset.x}, ${offset.y})`)\n }\n }\n\n setPositionWithAccessors(accessors) {\n if (accessors && this.annotation.data) {\n this.mapX(accessors)\n this.mapY(accessors)\n }\n this.setPosition()\n }\n\n setClassName() {\n this.a.attr(\n \"class\",\n `annotation ${this.className && this.className()} ${\n this.editMode ? \"editable\" : \"\"\n } ${this.annotation.className || \"\"}`\n )\n }\n\n draw() {\n this.setClassName()\n this.setPosition()\n this.setOffset()\n this.redrawSubject()\n this.redrawConnector()\n this.redrawNote()\n }\n\n dragstarted() {\n event.sourceEvent.stopPropagation()\n this.dispatcher &&\n this.dispatcher.call(\"dragstart\", this.a, this.annotation)\n this.a.classed(\"dragging\", true)\n this.a.selectAll(\"circle.handle\").style(\"pointer-events\", \"none\")\n }\n dragended() {\n this.dispatcher && this.dispatcher.call(\"dragend\", this.a, this.annotation)\n this.a.classed(\"dragging\", false)\n this.a.selectAll(\"circle.handle\").style(\"pointer-events\", \"all\")\n }\n\n dragSubject() {\n const position = this.annotation.position\n position.x += event.dx\n position.y += event.dy\n this.annotation.position = position\n }\n\n dragNote() {\n const offset = this.annotation.offset\n offset.x += event.dx\n offset.y += event.dy\n this.annotation.offset = offset\n }\n\n mapHandles(handles) {\n return handles.map(h => ({\n ...h,\n start: this.dragstarted.bind(this),\n end: this.dragended.bind(this)\n }))\n }\n}\n\nexport const customType = (initialType, typeSettings, init) => {\n return class customType extends initialType {\n constructor(settings) {\n super(settings)\n this.typeSettings = typeSettings\n\n if (typeSettings.disable) {\n typeSettings.disable.forEach(d => {\n this[d] && this[d].remove()\n\n this[d] = undefined\n if (d === \"note\") {\n this.noteContent = undefined\n }\n })\n }\n }\n\n static init(annotation, accessors) {\n super.init(annotation, accessors)\n if (init) {\n annotation = init(annotation, accessors)\n }\n return annotation\n }\n\n className() {\n return `${typeSettings.className ||\n super.className && super.className() ||\n \"\"}`\n }\n\n drawSubject(context) {\n this.typeSettings.subject = Object.assign(\n {},\n typeSettings.subject,\n this.typeSettings.subject\n )\n return super.drawSubject({ ...context, ...this.typeSettings.subject })\n }\n\n drawConnector(context) {\n this.typeSettings.connector = Object.assign(\n {},\n typeSettings.connector,\n this.typeSettings.connector\n )\n return super.drawConnector({\n ...context,\n ...typeSettings.connector,\n ...this.typeSettings.connector\n })\n }\n\n drawNote(context) {\n this.typeSettings.note = Object.assign(\n {},\n typeSettings.note,\n this.typeSettings.note\n )\n return super.drawNote({\n ...context,\n ...typeSettings.note,\n ...this.typeSettings.note\n })\n }\n\n drawNoteContent(context) {\n return super.drawNoteContent({\n ...context,\n ...typeSettings.note,\n ...this.typeSettings.note\n })\n }\n }\n}\n\nexport class d3NoteText extends Type {\n constructor(params) {\n super(params)\n this.textWrap = params.textWrap || 120\n this.drawText()\n }\n\n updateTextWrap(textWrap) {\n this.textWrap = textWrap\n this.drawText()\n }\n\n //TODO: add update text functionality\n\n drawText() {\n if (this.note) {\n newWithClass(this.note, [this.annotation], \"g\", \"annotation-note-content\")\n\n const noteContent = this.note.select(\"g.annotation-note-content\")\n newWithClass(noteContent, [this.annotation], \"rect\", \"annotation-note-bg\")\n newWithClass(\n noteContent,\n [this.annotation],\n \"text\",\n \"annotation-note-label\"\n )\n newWithClass(\n noteContent,\n [this.annotation],\n \"text\",\n \"annotation-note-title\"\n )\n\n let titleBBox = { height: 0 }\n const label = this.a.select(\"text.annotation-note-label\")\n const wrapLength =\n this.annotation.note && this.annotation.note.wrap ||\n this.typeSettings &&\n this.typeSettings.note &&\n this.typeSettings.note.wrap ||\n this.textWrap\n\n const wrapSplitter =\n this.annotation.note && this.annotation.note.wrapSplitter ||\n this.typeSettings &&\n this.typeSettings.note &&\n this.typeSettings.note.wrapSplitter\n\n let bgPadding =\n this.annotation.note && this.annotation.note.bgPadding ||\n this.typeSettings &&\n this.typeSettings.note &&\n this.typeSettings.note.bgPadding\n\n let bgPaddingFinal = { top: 0, bottom: 0, left: 0, right: 0 }\n if (typeof bgPadding === \"number\") {\n bgPaddingFinal = {\n top: bgPadding,\n bottom: bgPadding,\n left: bgPadding,\n right: bgPadding\n }\n } else if (bgPadding && typeof bgPadding === \"object\") {\n bgPaddingFinal = Object.assign(bgPaddingFinal, bgPadding)\n }\n\n if (this.annotation.note.title) {\n const title = this.a.select(\"text.annotation-note-title\")\n title.text(this.annotation.note.title)\n title.attr(\"fill\", this.annotation.color)\n title.attr(\"font-weight\", \"bold\")\n title.call(wrap, wrapLength, wrapSplitter)\n titleBBox = title.node().getBBox()\n }\n\n label.text(this.annotation.note.label).attr(\"dx\", \"0\")\n label.call(wrap, wrapLength, wrapSplitter)\n\n label.attr(\"y\", titleBBox.height * 1.1 || 0)\n label.attr(\"fill\", this.annotation.color)\n\n const bbox = this.getNoteBBox()\n\n this.a\n .select(\"rect.annotation-note-bg\")\n .attr(\"width\", bbox.width + bgPaddingFinal.left + bgPaddingFinal.right)\n .attr(\n \"height\",\n bbox.height + bgPaddingFinal.top + bgPaddingFinal.bottom\n )\n .attr(\"x\", bbox.x - bgPaddingFinal.left)\n .attr(\"y\", -bgPaddingFinal.top)\n .attr(\"fill\", \"white\")\n .attr(\"fill-opacity\", 0)\n }\n }\n}\n\nexport const d3Label = customType(d3NoteText, {\n className: \"label\",\n note: { align: \"middle\" }\n})\n\nexport const d3Callout = customType(d3NoteText, {\n className: \"callout\",\n note: { lineType: \"horizontal\" }\n})\n\nexport const d3CalloutElbow = customType(d3Callout, {\n className: \"callout elbow\",\n connector: { type: \"elbow\" }\n})\n\nexport const d3CalloutCurve = customType(d3Callout, {\n className: \"callout curve\",\n connector: { type: \"curve\" }\n})\n\nexport const d3Badge = customType(Type, {\n className: \"badge\",\n subject: { type: \"badge\" },\n disable: [\"connector\", \"note\"]\n})\n\nexport const d3CalloutCircle = customType(d3NoteText, {\n className: \"callout circle\",\n subject: { type: \"circle\" },\n note: { lineType: \"horizontal\" },\n connector: { type: \"elbow\" }\n})\n\nexport const d3CalloutRect = customType(d3NoteText, {\n className: \"callout rect\",\n subject: { type: \"rect\" },\n note: { lineType: \"horizontal\" },\n connector: { type: \"elbow\" }\n})\n\nclass ThresholdMap extends d3Callout {\n mapY(accessors) {\n super.mapY(accessors)\n const a = this.annotation\n if ((a.subject.x1 || a.subject.x2) && a.data && accessors.y) {\n a.y = accessors.y(a.data)\n }\n if ((a.subject.x1 || a.subject.x2) && !a.x) {\n a.x = a.subject.x1 || a.subject.x2\n }\n }\n\n mapX(accessors) {\n super.mapX(accessors)\n const a = this.annotation\n if ((a.subject.y1 || a.subject.y2) && a.data && accessors.x) {\n a.x = accessors.x(a.data)\n }\n if ((a.subject.y1 || a.subject.y2) && !a.y) {\n a.y = a.subject.y1 || a.subject.y2\n }\n }\n}\n\nexport const d3XYThreshold = customType(ThresholdMap, {\n className: \"callout xythreshold\",\n subject: { type: \"threshold\" }\n})\n\nexport const newWithClass = (a, d, type, className, classID) => {\n const group = a.selectAll(`${type}.${classID || className}`).data(d)\n group\n .enter()\n .append(type)\n .merge(group)\n .attr(\"class\", className)\n\n group.exit().remove()\n return a\n}\n\nconst addHandlers = (dispatcher, annotation, { component, name }) => {\n if (component) {\n component\n .on(\"mouseover.annotations\", () => {\n dispatcher.call(`${name}over`, component, annotation)\n })\n .on(\"mouseout.annotations\", () =>\n dispatcher.call(`${name}out`, component, annotation)\n )\n .on(\"click.annotations\", () =>\n dispatcher.call(`${name}click`, component, annotation)\n )\n }\n}\n\n//Text wrapping code adapted from Mike Bostock\nconst wrap = (text, width, wrapSplitter, lineHeight = 1.2) => {\n text.each(function() {\n const text = select(this),\n words = text\n .text()\n .split(wrapSplitter || /[ \\t\\r\\n]+/)\n .reverse()\n .filter(w => w !== \"\")\n let word,\n line = [],\n tspan = text\n .text(null)\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", 0.8 + \"em\")\n\n while (word = words.pop()) {\n line.push(word)\n tspan.text(line.join(\" \"))\n if (tspan.node().getComputedTextLength() > width && line.length > 1) {\n line.pop()\n tspan.text(line.join(\" \"))\n line = [word]\n tspan = text\n .append(\"tspan\")\n .attr(\"x\", 0)\n .attr(\"dy\", lineHeight + \"em\")\n .text(word)\n }\n }\n })\n}\n\nconst bboxWithoutHandles = (selection, selector = \":not(.handle)\") => {\n if (!selection) {\n return { x: 0, y: 0, width: 0, height: 0 }\n }\n\n return selection\n .selectAll(selector)\n .nodes()\n .reduce(\n (p, c) => {\n const bbox = c.getBBox()\n p.x = Math.min(p.x, bbox.x)\n p.y = Math.min(p.y, bbox.y)\n p.width = Math.max(p.width, bbox.width)\n\n const yOffset = c && c.attributes && c.attributes.y\n p.height = Math.max(\n p.height,\n (yOffset && parseFloat(yOffset.value) || 0) + bbox.height\n )\n return p\n },\n { x: 0, y: 0, width: 0, height: 0 }\n )\n}\n\nexport default {\n Type,\n d3Label,\n d3Callout,\n d3CalloutElbow,\n d3CalloutCurve,\n d3CalloutCircle,\n d3CalloutRect,\n d3XYThreshold,\n d3Badge,\n customType\n}\n","var noop = {value: function() {}};\n\nfunction dispatch() {\n for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {\n if (!(t = arguments[i] + \"\") || (t in _)) throw new Error(\"illegal type: \" + t);\n _[t] = [];\n }\n return new Dispatch(_);\n}\n\nfunction Dispatch(_) {\n this._ = _;\n}\n\nfunction parseTypenames(typenames, types) {\n return typenames.trim().split(/^|\\s+/).map(function(t) {\n var name = \"\", i = t.indexOf(\".\");\n if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);\n if (t && !types.hasOwnProperty(t)) throw new Error(\"unknown type: \" + t);\n return {type: t, name: name};\n });\n}\n\nDispatch.prototype = dispatch.prototype = {\n constructor: Dispatch,\n on: function(typename, callback) {\n var _ = this._,\n T = parseTypenames(typename + \"\", _),\n t,\n i = -1,\n n = T.length;\n\n // If no callback was specified, return the callback of the given type and name.\n if (arguments.length < 2) {\n while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;\n return;\n }\n\n // If a type was specified, set the callback for the given type and name.\n // Otherwise, if a null callback was specified, remove callbacks of the given name.\n if (callback != null && typeof callback !== \"function\") throw new Error(\"invalid callback: \" + callback);\n while (++i < n) {\n if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);\n else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);\n }\n\n return this;\n },\n copy: function() {\n var copy = {}, _ = this._;\n for (var t in _) copy[t] = _[t].slice();\n return new Dispatch(copy);\n },\n call: function(type, that) {\n if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n },\n apply: function(type, that, args) {\n if (!this._.hasOwnProperty(type)) throw new Error(\"unknown type: \" + type);\n for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);\n }\n};\n\nfunction get(type, name) {\n for (var i = 0, n = type.length, c; i < n; ++i) {\n if ((c = type[i]).name === name) {\n return c.value;\n }\n }\n}\n\nfunction set(type, name, callback) {\n for (var i = 0, n = type.length; i < n; ++i) {\n if (type[i].name === name) {\n type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));\n break;\n }\n }\n if (callback != null) type.push({name: name, value: callback});\n return type;\n}\n\nexport default dispatch;\n","import Annotation from \"./Annotation\"\nimport AnnotationCollection from \"./AnnotationCollection\"\nimport { newWithClass, d3Callout } from \"./Types-d3\"\nimport { select } from \"d3-selection\"\nimport { dispatch } from \"d3-dispatch\"\n\nexport default function annotation() {\n let annotations = [],\n collection,\n context, //TODO: add canvas functionality\n disable = [],\n accessors = {},\n accessorsInverse = {},\n editMode = false,\n ids,\n type = d3Callout,\n textWrap,\n notePadding,\n annotationDispatcher = dispatch(\n \"subjectover\",\n \"subjectout\",\n \"subjectclick\",\n \"connectorover\",\n \"connectorout\",\n \"connectorclick\",\n \"noteover\",\n \"noteout\",\n \"noteclick\",\n \"dragend\",\n \"dragstart\"\n ),\n sel\n\n const annotation = function(selection) {\n sel = selection\n //TODO: check to see if this is still needed\n if (!editMode) {\n selection.selectAll(\"circle.handle\").remove()\n }\n\n const translatedAnnotations = annotations.map(a => {\n if (!a.type) {\n a.type = type\n }\n if (!a.disable) {\n a.disable = disable\n }\n return new Annotation(a)\n })\n\n collection =\n collection ||\n new AnnotationCollection({\n annotations: translatedAnnotations,\n accessors,\n accessorsInverse,\n ids\n })\n\n const annotationG = selection.selectAll(\"g\").data([collection])\n annotationG.enter().append(\"g\").attr(\"class\", `annotations`)\n\n const group = selection.select(\"g.annotations\")\n newWithClass(group, collection.annotations, \"g\", \"annotation\")\n\n const annotation = group.selectAll(\"g.annotation\")\n\n annotation.each(function(d) {\n const a = select(this)\n\n a.attr(\"class\", \"annotation\")\n\n newWithClass(a, [d], \"g\", \"annotation-connector\")\n newWithClass(a, [d], \"g\", \"annotation-subject\")\n newWithClass(a, [d], \"g\", \"annotation-note\")\n newWithClass(\n a.select(\"g.annotation-note\"),\n [d],\n \"g\",\n \"annotation-note-content\"\n )\n d.type =\n d.type.toString() === \"[object Object]\"\n ? d.type\n : new d.type({\n a,\n annotation: d,\n textWrap,\n notePadding,\n editMode,\n dispatcher: annotationDispatcher,\n accessors\n })\n d.type.draw()\n d.type.drawText && d.type.drawText()\n })\n }\n\n annotation.json = function() {\n /* eslint-disable no-console */\n console.log(\n \"Annotations JSON was copied to your clipboard. Please note the annotation type is not JSON compatible. It appears in the objects array in the console, but not in the copied JSON.\",\n collection.json\n )\n /* eslint-enable no-console */\n window.copy(\n JSON.stringify(\n collection.json.map(a => {\n delete a.type\n return a\n })\n )\n )\n return annotation\n }\n\n annotation.update = function() {\n if (annotations && collection) {\n annotations = collection.annotations.map(a => {\n a.type.draw()\n return a\n })\n }\n return annotation\n }\n\n annotation.updateText = function() {\n if (collection) {\n collection.updateText(textWrap)\n annotations = collection.annotations\n }\n return annotation\n }\n\n annotation.updatedAccessors = function() {\n collection.setPositionWithAccessors()\n annotations = collection.annotations\n return annotation\n }\n\n annotation.disable = function(_) {\n if (!arguments.length) return disable\n disable = _\n if (collection) {\n collection.updateDisable(disable)\n annotations = collection.annotations\n }\n return annotation\n }\n\n annotation.textWrap = function(_) {\n if (!arguments.length) return textWrap\n textWrap = _\n if (collection) {\n collection.updateTextWrap(textWrap)\n annotations = collection.annotations\n }\n return annotation\n }\n\n annotation.notePadding = function(_) {\n if (!arguments.length) return notePadding\n notePadding = _\n if (collection) {\n collection.updateNotePadding(notePadding)\n annotations = collection.annotations\n }\n return annotation\n }\n //todo think of how to handle when undefined is sent\n annotation.type = function(_, settings) {\n if (!arguments.length) return type\n type = _\n if (collection) {\n collection.annotations.map(a => {\n a.type.note &&\n a.type.note.selectAll(\"*:not(.annotation-note-content)\").remove()\n a.type.noteContent && a.type.noteContent.selectAll(\"*\").remove()\n a.type.subject && a.type.subject.selectAll(\"*\").remove()\n a.type.connector && a.type.connector.selectAll(\"*\").remove()\n a.type.typeSettings = {}\n a.type = type\n\n a.subject = settings && settings.subject || a.subject\n a.connector = settings && settings.connector || a.connector\n a.note = settings && settings.note || a.note\n })\n\n annotations = collection.annotations\n }\n return annotation\n }\n\n annotation.annotations = function(_) {\n if (!arguments.length)\n return collection && collection.annotations || annotations\n annotations = _\n\n if (collection && collection.annotations) {\n const rerun = annotations.some(\n d => !d.type || d.type.toString() !== \"[object Object]\"\n )\n\n if (rerun) {\n collection = null\n annotation(sel)\n } else {\n collection.annotations = annotations\n }\n }\n return annotation\n }\n\n annotation.context = function(_) {\n if (!arguments.length) return context\n context = _\n return annotation\n }\n\n annotation.accessors = function(_) {\n if (!arguments.length) return accessors\n accessors = _\n return annotation\n }\n\n annotation.accessorsInverse = function(_) {\n if (!arguments.length) return accessorsInverse\n accessorsInverse = _\n return annotation\n }\n\n annotation.ids = function(_) {\n if (!arguments.length) return ids\n ids = _\n return annotation\n }\n\n annotation.editMode = function(_) {\n if (!arguments.length) return editMode\n editMode = _\n\n if (sel) {\n sel.selectAll(\"g.annotation\").classed(\"editable\", editMode)\n }\n\n if (collection) {\n collection.editMode(editMode)\n annotations = collection.annotations\n }\n return annotation\n }\n\n annotation.collection = function(_) {\n if (!arguments.length) return collection\n collection = _\n return annotation\n }\n\n annotation.on = function() {\n const value = annotationDispatcher.on.apply(annotationDispatcher, arguments)\n return value === annotationDispatcher ? annotation : value\n }\n\n return annotation\n}\n","import annotation from './src/Adapter-d3'\nimport { Type, d3Label, d3Callout, d3CalloutCurve, d3CalloutElbow, d3CalloutCircle, \n d3CalloutRect, d3XYThreshold, d3Badge, customType } from './src/Types-d3'\n\nexport {\n annotation,\n Type as annotationTypeBase ,\n d3Label as annotationLabel ,\n d3Callout as annotationCallout ,\n d3CalloutCurve as annotationCalloutCurve ,\n d3CalloutElbow as annotationCalloutElbow ,\n d3CalloutCircle as annotationCalloutCircle ,\n d3CalloutRect as annotationCalloutRect ,\n d3XYThreshold as annotationXYThreshold ,\n d3Badge as annotationBadge ,\n customType as annotationCustomType \n}\n\nexport default {\n annotation,\n annotationTypeBase : Type,\n annotationLabel : d3Label,\n annotationCallout : d3Callout,\n annotationCalloutCurve : d3CalloutCurve,\n annotationCalloutElbow : d3CalloutElbow,\n annotationCalloutCircle : d3CalloutCircle,\n annotationCalloutRect : d3CalloutRect,\n annotationXYThreshold : d3XYThreshold,\n annotationBadge : d3Badge,\n annotationCustomType : customType\n}"],"names":["Annotation","x","y","nx","ny","dy","dx","color","data","type","subject","connector","note","disable","id","className","_dx","undefined","_dy","_x","_y","_color","_className","_type","setPosition","selectAll","nodes","length","redrawSubject","clearComponents","setOffset","redrawConnector","redrawNote","setClassName","updatePosition","updateOffset","json","Object","keys","AnnotationCollection","annotations","accessors","accessorsInverse","newSettings","forEach","d","setPositionWithAccessors","editMode","a","updateEditMode","remove","textWrap","updateTextWrap","drawText","notePadding","map","k","getNoteBBoxOffset","positionX","positionY","xhtml","name","prefix","i","indexOf","slice","namespaces","hasOwnProperty","space","local","creatorInherit","document","ownerDocument","uri","namespaceURI","documentElement","createElement","createElementNS","creatorFixed","fullname","namespace","none","selector","querySelector","select","groups","_groups","m","subgroups","Array","j","group","n","subgroup","node","subnode","call","__data__","Selection","_parents","empty","querySelectorAll","selectorAll","parents","push","matches","match","matcher","update","_enter","sparse","EnterNode","parent","datum","_next","_parent","prototype","child","insertBefore","next","keyPrefix","bindIndex","enter","exit","groupLength","dataLength","bindKey","key","nodeByKeyValue","keyValues","keyValue","value","size","each","bind","constant","enterGroup","updateGroup","exitGroup","i0","i1","previous","_exit","onenter","onupdate","onexit","append","merge","order","selection","groups0","groups1","m0","m1","Math","min","merges","group0","group1","compareDocumentPosition","parentNode","compare","ascending","compareNode","b","sortgroups","sortgroup","sort","NaN","callback","arguments","apply","attrRemove","removeAttribute","attrRemoveNS","removeAttributeNS","attrConstant","setAttribute","attrConstantNS","setAttributeNS","attrFunction","v","attrFunctionNS","getAttributeNS","getAttribute","defaultView","styleRemove","style","removeProperty","styleConstant","priority","setProperty","styleFunction","styleValue","getPropertyValue","getComputedStyle","propertyRemove","propertyConstant","propertyFunction","classArray","string","trim","split","classList","ClassList","_node","_names","join","splice","classedAdd","names","list","add","classedRemove","classedTrue","classedFalse","classedFunction","contains","textRemove","textContent","textConstant","textFunction","htmlRemove","innerHTML","htmlConstant","htmlFunction","raise","nextSibling","appendChild","lower","previousSibling","firstChild","create","creator","constantNull","before","removeChild","selection_cloneShallow","cloneNode","selection_cloneDeep","deep","property","filterEvents","event","element","mouseenter","mouseleave","filterContextListener","listener","index","contextListener","related","relatedTarget","event1","event0","parseTypenames","typenames","t","onRemove","typename","on","__on","o","removeEventListener","capture","onAdd","wrap","addEventListener","customEvent","that","args","sourceEvent","dispatchEvent","params","window","CustomEvent","createEvent","initEvent","bubbles","cancelable","detail","dispatchConstant","dispatchFunction","root","selection_select","selection_selectAll","selection_filter","selection_data","selection_enter","selection_exit","selection_join","selection_merge","selection_order","selection_sort","selection_call","selection_nodes","selection_node","selection_size","selection_empty","selection_each","selection_attr","selection_style","selection_property","selection_classed","selection_text","selection_html","selection_raise","selection_lower","selection_append","selection_insert","selection_remove","selection_clone","selection_datum","selection_on","selection_dispatch","current","source","svg","ownerSVGElement","createSVGPoint","point","clientX","clientY","matrixTransform","getScreenCTM","inverse","rect","getBoundingClientRect","left","clientLeft","top","clientTop","changedTouches","touches","identifier","touch","noop","dispatch","_","Error","Dispatch","types","T","get","set","copy","c","concat","nopropagation","stopImmediatePropagation","preventDefault","view","noevent","__noselect","MozUserSelect","yesdrag","noclick","DragEvent","target","active","defaultFilter","button","defaultContainer","defaultSubject","defaultTouchable","filter","container","touchable","gestures","listeners","mousedownx","mousedowny","mousemoving","touchending","clickDistance2","drag","mousedowned","touchstarted","touchmoved","touchended","gesture","beforestart","mouse","mousemoved","mouseupped","clearTimeout","setTimeout","p","s","sublisteners","p0","clickDistance","sqrt","pointHandle","cx","cy","move","circleHandles","r1","r2","padding","h","addHandles","handles","r","attr","start","end","leftRightDynamic","align","topBottomDynamic","orientationTopBottom","orientationLeftRight","bbox","width","height","orientation","offset","pi","PI","tau","epsilon","tauEpsilon","Path","_x0","_y0","_x1","_y1","path","x1","y1","x2","y2","x0","y0","x21","y21","x01","y01","l01_2","abs","x20","y20","l21_2","l20_2","l21","l01","l","tan","acos","t01","t21","a0","a1","ccw","cos","sin","cw","da","w","halfPi","arcInnerRadius","innerRadius","arcOuterRadius","outerRadius","arcStartAngle","startAngle","arcEndAngle","endAngle","arcPadAngle","padAngle","asin","intersect","x3","y3","x10","y10","x32","y32","cornerTangents","rc","lo","ox","oy","x11","y11","x00","y00","d2","D","max","cx0","cy0","cx1","cy1","dx0","dy0","dx1","dy1","cornerRadius","padRadius","context","arc","buffer","r0","moveTo","a01","a11","a00","a10","da0","da1","ap","rp","rc0","rc1","t0","t1","p1","oc","ax","ay","bx","by","kc","lc","atan2","lineTo","closePath","centroid","Linear","_context","_line","_point","pointX","pointY","defined","curve","curveLinear","output","line","defined0","lineStart","lineEnd","bezierCurveTo","_k","_x2","_y2","Cardinal","tension","_l01_a","_l01_2a","_l12_a","_l12_2a","_l23_a","_l23_2a","CatmullRom","alpha","_alpha","x23","y23","pow","custom","catmullRom","sign","slope3","h0","h1","s0","s1","slope2","MonotoneX","_t0","MonotoneY","ReflectContext","lineBuilder","canvasContext","classID","lineGen","builder","pathMethods","attrs","arcBuilder","arcShape","radius","components","lineSetup","subjectType","annotation","position","subjectData","angle","radiusPadding","connectorData","diffY","diffX","xe","ye","opposite","points","createPoints","curveCatmullRom","cHandles","updatePoint","mapHandles","anchors","diff","scale","angleOffset","atan","dot","transform","updateRadius","updateWidth","updateHeight","rHandles","typeSettings","notCornerOffset","placement","circlebg","fill","circle","pointer","notCornerPointerXY","dragBadge","bHandles","text","Type","dispatcher","noteContent","handler","addHandlers","component","offsetCornerX","offsetCornerY","init","mapX","mapY","builders","isArray","el","addAttrs","removeAttrs","currentAttrs","attributes","bboxWithoutHandles","parseFloat","offsetX","offsetY","subjectParams","subjectCircle","subjectRect","subjectThreshold","subjectBadge","stroke","dragSubject","connectorParams","connectorCurve","connectorElbow","connectorLine","endType","e","distance","connectorArrow","endScale","connectorDot","noteData","noteParams","lineType","noteVertical","noteHorizontal","dragNote","dragging","dragstarted","dragended","noteAlignment","drawFunction","drawOnSVG","drawOnScreen","drawSubject","drawConnector","getNoteBBox","drawNoteContent","drawNote","stopPropagation","classed","customType","initialType","settings","babelHelpers.get","babelHelpers.extends","d3NoteText","titleBBox","label","wrapLength","wrapSplitter","bgPadding","bgPaddingFinal","bottom","right","title","getBBox","d3Label","d3Callout","d3CalloutElbow","d3CalloutCurve","d3Badge","d3CalloutCircle","d3CalloutRect","ThresholdMap","d3XYThreshold","newWithClass","lineHeight","words","reverse","word","tspan","pop","getComputedTextLength","reduce","yOffset","collection","ids","annotationDispatcher","sel","translatedAnnotations","annotationG","toString","draw","log","JSON","stringify","updateText","updatedAccessors","updateDisable","updateNotePadding","rerun","some"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAqBA;4BAiBhB;sBAfDC,CAeC;QAfDA,CAeC,0BAfG,CAeH;sBAdDC,CAcC;QAdDA,CAcC,0BAdG,CAcH;QAbDC,EAaC,QAbDA,EAaC;QAZDC,EAYC,QAZDA,EAYC;uBAXDC,EAWC;QAXDA,EAWC,2BAXI,CAWJ;uBAVDC,EAUC;QAVDA,EAUC,2BAVI,CAUJ;0BATDC,KASC;QATDA,KASC,8BATO,MASP;QARDC,IAQC,QARDA,IAQC;QAPDC,IAOC,QAPDA,IAOC;QANDC,OAMC,QANDA,OAMC;QALDC,SAKC,QALDA,SAKC;QAJDC,IAIC,QAJDA,IAIC;QAHDC,OAGC,QAHDA,OAGC;QAFDC,EAEC,QAFDA,EAEC;QADDC,SACC,QADDA,SACC;;;SACIC,GAAL,GAAWb,OAAOc,SAAP,GAAmBd,KAAKF,CAAxB,GAA4BK,EAAvC;SACKY,GAAL,GAAWd,OAAOa,SAAP,GAAmBb,KAAKF,CAAxB,GAA4BG,EAAvC;SACKc,EAAL,GAAUlB,CAAV;SACKmB,EAAL,GAAUlB,CAAV;SACKmB,MAAL,GAAcd,KAAd;SACKO,EAAL,GAAUA,EAAV;SACKQ,UAAL,GAAkBP,aAAa,EAA/B;;SAEKQ,KAAL,GAAad,QAAQ,EAArB;SACKD,IAAL,GAAYA,IAAZ;;SAEKI,IAAL,GAAYA,QAAQ,EAApB;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