Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hpcc-js/api

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hpcc-js/api - npm Package Compare versions

Comparing version 0.5.3 to 0.5.4

types/Tooltip.d.ts

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

<a name="0.5.4"></a>
## [0.5.4](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/api@0.5.3...@hpcc-js/api@0.5.4) (2018-08-15)
### Bug Fixes
* **tooltip:** Workaround FF issue with getScreenCTM ([6978cfb](https://github.com/hpcc-systems/Visualization/commit/6978cfb)), closes [#2743](https://github.com/hpcc-systems/Visualization/issues/2743)
<a name="0.5.3"></a>

@@ -8,0 +19,0 @@ ## [0.5.3](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/api@0.5.2...@hpcc-js/api@0.5.3) (2018-08-14)

427

dist/index.es6.js

@@ -1119,65 +1119,53 @@ import { Palette, Widget, select, selection } from '@hpcc-js/common';

/**
* d3.tip
* Copyright (c) 2013-2017 Justin Palmer
*
* Tooltips for d3.js SVG visualizations
*/
function tip() {
var direction = d3TipDirection,
offset = d3TipOffset,
html = d3TipHTML,
rootElement = functor(document.body),
node = initNode(),
svg = null,
point = null,
target = null;
function tip(vis) {
svg = getSVGNode(vis);
if (!svg) return
point = svg.createSVGPoint();
rootElement().appendChild(node);
}
// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip
function tip() {
var direction = d3TipDirection;
var offset = d3TipOffset;
var html = d3TipHTML;
var rootElement = functor(document.body);
var node = initNode();
var svg = null;
var point = null;
var target = null;
var tip = function (vis) {
svg = getSVGNode(vis);
if (!svg)
return;
point = svg.createSVGPoint();
rootElement().appendChild(node);
};
// Public - show the tooltip on the screen
//
// Returns a tip
tip.show = function() {
var args = Array.prototype.slice.call(arguments);
if (args[args.length - 1] instanceof SVGElement) target = args.pop();
var content = html.apply(this, args),
poffset = offset.apply(this, args),
dir = direction.apply(this, args),
nodel = getNodeEl(),
i = directions.length,
coords,
scrollTop = document.documentElement.scrollTop ||
rootElement().scrollTop,
scrollLeft = document.documentElement.scrollLeft ||
rootElement().scrollLeft;
nodel.html(content)
.style('opacity', 1).style('pointer-events', 'all');
while (i--) nodel.classed(directions[i], false);
coords = directionCallbacks.get(dir).apply(this);
nodel.classed(dir, true)
.style('top', (coords.top + poffset[0]) + scrollTop + 'px')
.style('left', (coords.left + poffset[1]) + scrollLeft + 'px');
return tip
tip.show = function (d, idx, arr) {
target = arr[idx];
var args = Array.prototype.slice.call(arguments);
var content = html.apply(this, args);
var poffset = offset.apply(this, args);
var dir = direction.apply(this, args);
var nodel = getNodeEl();
var i = directions.length;
var coords;
var scrollTop = document.documentElement.scrollTop ||
rootElement().scrollTop;
var scrollLeft = document.documentElement.scrollLeft ||
rootElement().scrollLeft;
nodel.html(content)
.style("opacity", 1).style("pointer-events", "all");
while (i--)
nodel.classed(directions[i], false);
coords = directionCallbacks.get(dir).apply(this);
nodel.classed(dir, true)
.style("top", (coords.top + poffset[0]) + scrollTop + "px")
.style("left", (coords.left + poffset[1]) + scrollLeft + "px");
return tip;
};
// Public - hide the tooltip
//
// Returns a tip
tip.hide = function() {
var nodel = getNodeEl();
nodel.style('opacity', 0).style('pointer-events', 'none');
return tip
tip.hide = function () {
var nodel = getNodeEl();
nodel.style("opacity", 0).style("pointer-events", "none");
return tip;
};
// Public: Proxy attr calls to the d3 tip container.

@@ -1191,12 +1179,10 @@ // Sets or gets attribute value.

// eslint-disable-next-line no-unused-vars
tip.attr = function(n, v) {
if (arguments.length < 2 && typeof n === 'string') {
return getNodeEl().attr(n)
}
var args = Array.prototype.slice.call(arguments);
selection.prototype.attr.apply(getNodeEl(), args);
return tip
tip.attr = function (n, v) {
if (arguments.length < 2 && typeof n === "string") {
return getNodeEl().attr(n);
}
var args = Array.prototype.slice.call(arguments);
selection.prototype.attr.apply(getNodeEl(), args);
return tip;
};
// Public: Proxy style calls to the d3 tip container.

@@ -1210,12 +1196,10 @@ // Sets or gets a style value.

// eslint-disable-next-line no-unused-vars
tip.style = function(n, v) {
if (arguments.length < 2 && typeof n === 'string') {
return getNodeEl().style(n)
}
var args = Array.prototype.slice.call(arguments);
selection.prototype.style.apply(getNodeEl(), args);
return tip
tip.style = function (n, v) {
if (arguments.length < 2 && typeof n === "string") {
return getNodeEl().style(n);
}
var args = Array.prototype.slice.call(arguments);
selection.prototype.style.apply(getNodeEl(), args);
return tip;
};
// Public: Set or get the direction of the tooltip

@@ -1227,9 +1211,8 @@ //

// Returns tip or direction
tip.direction = function(v) {
if (!arguments.length) return direction
direction = v == null ? v : functor(v);
return tip
tip.direction = function (v) {
if (!arguments.length)
return direction;
direction = v == null ? v : functor(v);
return tip;
};
// Public: Sets or gets the offset of the tip

@@ -1240,9 +1223,8 @@ //

// Returns offset or
tip.offset = function(v) {
if (!arguments.length) return offset
offset = v == null ? v : functor(v);
return tip
tip.offset = function (v) {
if (!arguments.length)
return offset;
offset = v == null ? v : functor(v);
return tip;
};
// Public: sets or gets the html value of the tooltip

@@ -1253,9 +1235,8 @@ //

// Returns html value or tip
tip.html = function(v) {
if (!arguments.length) return html
html = v == null ? v : functor(v);
return tip
tip.html = function (v) {
if (!arguments.length)
return html;
html = v == null ? v : functor(v);
return tip;
};
// Public: sets or gets the root element anchor of the tooltip

@@ -1266,128 +1247,114 @@ //

// Returns root node of tip
tip.rootElement = function(v) {
if (!arguments.length) return rootElement
rootElement = v == null ? v : functor(v);
return tip
tip.rootElement = function (v) {
if (!arguments.length)
return rootElement;
rootElement = v == null ? v : functor(v);
return tip;
};
// Public: destroys the tooltip and removes it from the DOM
//
// Returns a tip
tip.destroy = function() {
if (node) {
getNodeEl().remove();
node = null;
}
return tip
tip.destroy = function () {
if (node) {
getNodeEl().remove();
node = null;
}
return tip;
};
function d3TipDirection() { return 'n' }
function d3TipOffset() { return [0, 0] }
function d3TipHTML() { return ' ' }
function d3TipDirection() { return "n"; }
function d3TipOffset() { return [0, 0]; }
function d3TipHTML() { return " "; }
var directionCallbacks = map({
n: directionNorth,
s: directionSouth,
e: directionEast,
w: directionWest,
nw: directionNorthWest,
ne: directionNorthEast,
sw: directionSouthWest,
se: directionSouthEast
}),
directions = directionCallbacks.keys();
n: directionNorth,
s: directionSouth,
e: directionEast,
w: directionWest,
nw: directionNorthWest,
ne: directionNorthEast,
sw: directionSouthWest,
se: directionSouthEast
});
var directions = directionCallbacks.keys();
function directionNorth() {
var bbox = getScreenBBox();
return {
top: bbox.n.y - node.offsetHeight,
left: bbox.n.x - node.offsetWidth / 2
}
var bbox = getScreenBBox(window);
return {
top: bbox.n.y - node.offsetHeight,
left: bbox.n.x - node.offsetWidth / 2
};
}
function directionSouth() {
var bbox = getScreenBBox();
return {
top: bbox.s.y,
left: bbox.s.x - node.offsetWidth / 2
}
var bbox = getScreenBBox(window);
return {
top: bbox.s.y,
left: bbox.s.x - node.offsetWidth / 2
};
}
function directionEast() {
var bbox = getScreenBBox();
return {
top: bbox.e.y - node.offsetHeight / 2,
left: bbox.e.x
}
var bbox = getScreenBBox(window);
return {
top: bbox.e.y - node.offsetHeight / 2,
left: bbox.e.x
};
}
function directionWest() {
var bbox = getScreenBBox();
return {
top: bbox.w.y - node.offsetHeight / 2,
left: bbox.w.x - node.offsetWidth
}
var bbox = getScreenBBox(window);
return {
top: bbox.w.y - node.offsetHeight / 2,
left: bbox.w.x - node.offsetWidth
};
}
function directionNorthWest() {
var bbox = getScreenBBox();
return {
top: bbox.nw.y - node.offsetHeight,
left: bbox.nw.x - node.offsetWidth
}
var bbox = getScreenBBox(window);
return {
top: bbox.nw.y - node.offsetHeight,
left: bbox.nw.x - node.offsetWidth
};
}
function directionNorthEast() {
var bbox = getScreenBBox();
return {
top: bbox.ne.y - node.offsetHeight,
left: bbox.ne.x
}
var bbox = getScreenBBox(window);
return {
top: bbox.ne.y - node.offsetHeight,
left: bbox.ne.x
};
}
function directionSouthWest() {
var bbox = getScreenBBox();
return {
top: bbox.sw.y,
left: bbox.sw.x - node.offsetWidth
}
var bbox = getScreenBBox(window);
return {
top: bbox.sw.y,
left: bbox.sw.x - node.offsetWidth
};
}
function directionSouthEast() {
var bbox = getScreenBBox();
return {
top: bbox.se.y,
left: bbox.se.x
}
var bbox = getScreenBBox(window);
return {
top: bbox.se.y,
left: bbox.se.x
};
}
function initNode() {
var div = select(document.createElement('div'));
div
.style('position', 'absolute')
.style('top', 0)
.style('opacity', 0)
.style('pointer-events', 'none')
.style('box-sizing', 'border-box');
return div.node()
var div = select(document.createElement("div"));
div
.style("position", "absolute")
.style("top", 0)
.style("opacity", 0)
.style("pointer-events", "none")
.style("box-sizing", "border-box");
return div.node();
}
function getSVGNode(element) {
var svgNode = element.node();
if (!svgNode) return null
if (svgNode.tagName.toLowerCase() === 'svg') return svgNode
return svgNode.ownerSVGElement
var svgNode = element.node();
if (!svgNode)
return null;
if (svgNode.tagName.toLowerCase() === "svg")
return svgNode;
return svgNode.ownerSVGElement;
}
function getNodeEl() {
if (node == null) {
node = initNode();
// re-add node to DOM
rootElement().appendChild(node);
}
return select(node)
if (node == null) {
node = initNode();
// re-add node to DOM
rootElement.appendChild(node);
}
return select(node);
}
// Private - gets the screen coordinates of a shape

@@ -1406,49 +1373,43 @@ //

// Returns an Object {n, s, e, w, nw, sw, ne, se}
function getScreenBBox() {
var targetel = target || event.target;
while (targetel.getScreenCTM == null && targetel.parentNode == null) {
targetel = targetel.parentNode;
}
var bbox = {},
matrix = targetel.getScreenCTM(),
tbbox = targetel.getBBox(),
width = tbbox.width,
height = tbbox.height,
x = tbbox.x,
y = tbbox.y;
point.x = x;
point.y = y;
bbox.nw = point.matrixTransform(matrix);
point.x += width;
bbox.ne = point.matrixTransform(matrix);
point.y += height;
bbox.se = point.matrixTransform(matrix);
point.x -= width;
bbox.sw = point.matrixTransform(matrix);
point.y -= height / 2;
bbox.w = point.matrixTransform(matrix);
point.x += width;
bbox.e = point.matrixTransform(matrix);
point.x -= width / 2;
point.y -= height / 2;
bbox.n = point.matrixTransform(matrix);
point.y += height;
bbox.s = point.matrixTransform(matrix);
return bbox
function getScreenBBox(targetShape) {
var targetel = target || targetShape;
while (targetel.getCTM == null && targetel.parentNode != null) {
targetel = targetel.parentNode;
}
var bbox = {};
var matrix = targetel.getCTM();
var tbbox = targetel.getBBox();
var width = tbbox.width;
var height = tbbox.height;
var x = tbbox.x;
var y = tbbox.y;
point.x = x;
point.y = y;
bbox.nw = point.matrixTransform(matrix);
point.x += width;
bbox.ne = point.matrixTransform(matrix);
point.y += height;
bbox.se = point.matrixTransform(matrix);
point.x -= width;
bbox.sw = point.matrixTransform(matrix);
point.y -= height / 2;
bbox.w = point.matrixTransform(matrix);
point.x += width;
bbox.e = point.matrixTransform(matrix);
point.x -= width / 2;
point.y -= height / 2;
bbox.n = point.matrixTransform(matrix);
point.y += height;
bbox.s = point.matrixTransform(matrix);
return bbox;
}
// Private - replace D3JS 3.X d3.functor() function
function functor(v) {
return typeof v === 'function' ? v : function() {
return v
}
return typeof v === "function" ? v : function () {
return v;
};
}
return tip;
}
return tip
}
function styleInject(css, ref) {

@@ -1527,2 +1488,6 @@ if ( ref === void 0 ) ref = {};

ITooltip.prototype.tooltipEnter = function (element) {
var overlayElement = this.parentOverlay();
if (!overlayElement.empty()) {
this.tooltip.rootElement(overlayElement.node().parentNode);
}
element.call(this.tooltip);

@@ -1529,0 +1494,0 @@ };

@@ -1123,65 +1123,53 @@ (function (global, factory) {

/**
* d3.tip
* Copyright (c) 2013-2017 Justin Palmer
*
* Tooltips for d3.js SVG visualizations
*/
function tip() {
var direction = d3TipDirection,
offset = d3TipOffset,
html = d3TipHTML,
rootElement = functor(document.body),
node = initNode(),
svg = null,
point = null,
target = null;
function tip(vis) {
svg = getSVGNode(vis);
if (!svg) return
point = svg.createSVGPoint();
rootElement().appendChild(node);
}
// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip
function tip() {
var direction = d3TipDirection;
var offset = d3TipOffset;
var html = d3TipHTML;
var rootElement = functor(document.body);
var node = initNode();
var svg = null;
var point = null;
var target = null;
var tip = function (vis) {
svg = getSVGNode(vis);
if (!svg)
return;
point = svg.createSVGPoint();
rootElement().appendChild(node);
};
// Public - show the tooltip on the screen
//
// Returns a tip
tip.show = function() {
var args = Array.prototype.slice.call(arguments);
if (args[args.length - 1] instanceof SVGElement) target = args.pop();
var content = html.apply(this, args),
poffset = offset.apply(this, args),
dir = direction.apply(this, args),
nodel = getNodeEl(),
i = directions.length,
coords,
scrollTop = document.documentElement.scrollTop ||
rootElement().scrollTop,
scrollLeft = document.documentElement.scrollLeft ||
rootElement().scrollLeft;
nodel.html(content)
.style('opacity', 1).style('pointer-events', 'all');
while (i--) nodel.classed(directions[i], false);
coords = directionCallbacks.get(dir).apply(this);
nodel.classed(dir, true)
.style('top', (coords.top + poffset[0]) + scrollTop + 'px')
.style('left', (coords.left + poffset[1]) + scrollLeft + 'px');
return tip
tip.show = function (d, idx, arr) {
target = arr[idx];
var args = Array.prototype.slice.call(arguments);
var content = html.apply(this, args);
var poffset = offset.apply(this, args);
var dir = direction.apply(this, args);
var nodel = getNodeEl();
var i = directions.length;
var coords;
var scrollTop = document.documentElement.scrollTop ||
rootElement().scrollTop;
var scrollLeft = document.documentElement.scrollLeft ||
rootElement().scrollLeft;
nodel.html(content)
.style("opacity", 1).style("pointer-events", "all");
while (i--)
nodel.classed(directions[i], false);
coords = directionCallbacks.get(dir).apply(this);
nodel.classed(dir, true)
.style("top", (coords.top + poffset[0]) + scrollTop + "px")
.style("left", (coords.left + poffset[1]) + scrollLeft + "px");
return tip;
};
// Public - hide the tooltip
//
// Returns a tip
tip.hide = function() {
var nodel = getNodeEl();
nodel.style('opacity', 0).style('pointer-events', 'none');
return tip
tip.hide = function () {
var nodel = getNodeEl();
nodel.style("opacity", 0).style("pointer-events", "none");
return tip;
};
// Public: Proxy attr calls to the d3 tip container.

@@ -1195,12 +1183,10 @@ // Sets or gets attribute value.

// eslint-disable-next-line no-unused-vars
tip.attr = function(n, v) {
if (arguments.length < 2 && typeof n === 'string') {
return getNodeEl().attr(n)
}
var args = Array.prototype.slice.call(arguments);
common.selection.prototype.attr.apply(getNodeEl(), args);
return tip
tip.attr = function (n, v) {
if (arguments.length < 2 && typeof n === "string") {
return getNodeEl().attr(n);
}
var args = Array.prototype.slice.call(arguments);
common.selection.prototype.attr.apply(getNodeEl(), args);
return tip;
};
// Public: Proxy style calls to the d3 tip container.

@@ -1214,12 +1200,10 @@ // Sets or gets a style value.

// eslint-disable-next-line no-unused-vars
tip.style = function(n, v) {
if (arguments.length < 2 && typeof n === 'string') {
return getNodeEl().style(n)
}
var args = Array.prototype.slice.call(arguments);
common.selection.prototype.style.apply(getNodeEl(), args);
return tip
tip.style = function (n, v) {
if (arguments.length < 2 && typeof n === "string") {
return getNodeEl().style(n);
}
var args = Array.prototype.slice.call(arguments);
common.selection.prototype.style.apply(getNodeEl(), args);
return tip;
};
// Public: Set or get the direction of the tooltip

@@ -1231,9 +1215,8 @@ //

// Returns tip or direction
tip.direction = function(v) {
if (!arguments.length) return direction
direction = v == null ? v : functor(v);
return tip
tip.direction = function (v) {
if (!arguments.length)
return direction;
direction = v == null ? v : functor(v);
return tip;
};
// Public: Sets or gets the offset of the tip

@@ -1244,9 +1227,8 @@ //

// Returns offset or
tip.offset = function(v) {
if (!arguments.length) return offset
offset = v == null ? v : functor(v);
return tip
tip.offset = function (v) {
if (!arguments.length)
return offset;
offset = v == null ? v : functor(v);
return tip;
};
// Public: sets or gets the html value of the tooltip

@@ -1257,9 +1239,8 @@ //

// Returns html value or tip
tip.html = function(v) {
if (!arguments.length) return html
html = v == null ? v : functor(v);
return tip
tip.html = function (v) {
if (!arguments.length)
return html;
html = v == null ? v : functor(v);
return tip;
};
// Public: sets or gets the root element anchor of the tooltip

@@ -1270,128 +1251,114 @@ //

// Returns root node of tip
tip.rootElement = function(v) {
if (!arguments.length) return rootElement
rootElement = v == null ? v : functor(v);
return tip
tip.rootElement = function (v) {
if (!arguments.length)
return rootElement;
rootElement = v == null ? v : functor(v);
return tip;
};
// Public: destroys the tooltip and removes it from the DOM
//
// Returns a tip
tip.destroy = function() {
if (node) {
getNodeEl().remove();
node = null;
}
return tip
tip.destroy = function () {
if (node) {
getNodeEl().remove();
node = null;
}
return tip;
};
function d3TipDirection() { return 'n' }
function d3TipOffset() { return [0, 0] }
function d3TipHTML() { return ' ' }
function d3TipDirection() { return "n"; }
function d3TipOffset() { return [0, 0]; }
function d3TipHTML() { return " "; }
var directionCallbacks = map({
n: directionNorth,
s: directionSouth,
e: directionEast,
w: directionWest,
nw: directionNorthWest,
ne: directionNorthEast,
sw: directionSouthWest,
se: directionSouthEast
}),
directions = directionCallbacks.keys();
n: directionNorth,
s: directionSouth,
e: directionEast,
w: directionWest,
nw: directionNorthWest,
ne: directionNorthEast,
sw: directionSouthWest,
se: directionSouthEast
});
var directions = directionCallbacks.keys();
function directionNorth() {
var bbox = getScreenBBox();
return {
top: bbox.n.y - node.offsetHeight,
left: bbox.n.x - node.offsetWidth / 2
}
var bbox = getScreenBBox(window);
return {
top: bbox.n.y - node.offsetHeight,
left: bbox.n.x - node.offsetWidth / 2
};
}
function directionSouth() {
var bbox = getScreenBBox();
return {
top: bbox.s.y,
left: bbox.s.x - node.offsetWidth / 2
}
var bbox = getScreenBBox(window);
return {
top: bbox.s.y,
left: bbox.s.x - node.offsetWidth / 2
};
}
function directionEast() {
var bbox = getScreenBBox();
return {
top: bbox.e.y - node.offsetHeight / 2,
left: bbox.e.x
}
var bbox = getScreenBBox(window);
return {
top: bbox.e.y - node.offsetHeight / 2,
left: bbox.e.x
};
}
function directionWest() {
var bbox = getScreenBBox();
return {
top: bbox.w.y - node.offsetHeight / 2,
left: bbox.w.x - node.offsetWidth
}
var bbox = getScreenBBox(window);
return {
top: bbox.w.y - node.offsetHeight / 2,
left: bbox.w.x - node.offsetWidth
};
}
function directionNorthWest() {
var bbox = getScreenBBox();
return {
top: bbox.nw.y - node.offsetHeight,
left: bbox.nw.x - node.offsetWidth
}
var bbox = getScreenBBox(window);
return {
top: bbox.nw.y - node.offsetHeight,
left: bbox.nw.x - node.offsetWidth
};
}
function directionNorthEast() {
var bbox = getScreenBBox();
return {
top: bbox.ne.y - node.offsetHeight,
left: bbox.ne.x
}
var bbox = getScreenBBox(window);
return {
top: bbox.ne.y - node.offsetHeight,
left: bbox.ne.x
};
}
function directionSouthWest() {
var bbox = getScreenBBox();
return {
top: bbox.sw.y,
left: bbox.sw.x - node.offsetWidth
}
var bbox = getScreenBBox(window);
return {
top: bbox.sw.y,
left: bbox.sw.x - node.offsetWidth
};
}
function directionSouthEast() {
var bbox = getScreenBBox();
return {
top: bbox.se.y,
left: bbox.se.x
}
var bbox = getScreenBBox(window);
return {
top: bbox.se.y,
left: bbox.se.x
};
}
function initNode() {
var div = common.select(document.createElement('div'));
div
.style('position', 'absolute')
.style('top', 0)
.style('opacity', 0)
.style('pointer-events', 'none')
.style('box-sizing', 'border-box');
return div.node()
var div = common.select(document.createElement("div"));
div
.style("position", "absolute")
.style("top", 0)
.style("opacity", 0)
.style("pointer-events", "none")
.style("box-sizing", "border-box");
return div.node();
}
function getSVGNode(element) {
var svgNode = element.node();
if (!svgNode) return null
if (svgNode.tagName.toLowerCase() === 'svg') return svgNode
return svgNode.ownerSVGElement
var svgNode = element.node();
if (!svgNode)
return null;
if (svgNode.tagName.toLowerCase() === "svg")
return svgNode;
return svgNode.ownerSVGElement;
}
function getNodeEl() {
if (node == null) {
node = initNode();
// re-add node to DOM
rootElement().appendChild(node);
}
return common.select(node)
if (node == null) {
node = initNode();
// re-add node to DOM
rootElement.appendChild(node);
}
return common.select(node);
}
// Private - gets the screen coordinates of a shape

@@ -1410,49 +1377,43 @@ //

// Returns an Object {n, s, e, w, nw, sw, ne, se}
function getScreenBBox() {
var targetel = target || event.target;
while (targetel.getScreenCTM == null && targetel.parentNode == null) {
targetel = targetel.parentNode;
}
var bbox = {},
matrix = targetel.getScreenCTM(),
tbbox = targetel.getBBox(),
width = tbbox.width,
height = tbbox.height,
x = tbbox.x,
y = tbbox.y;
point.x = x;
point.y = y;
bbox.nw = point.matrixTransform(matrix);
point.x += width;
bbox.ne = point.matrixTransform(matrix);
point.y += height;
bbox.se = point.matrixTransform(matrix);
point.x -= width;
bbox.sw = point.matrixTransform(matrix);
point.y -= height / 2;
bbox.w = point.matrixTransform(matrix);
point.x += width;
bbox.e = point.matrixTransform(matrix);
point.x -= width / 2;
point.y -= height / 2;
bbox.n = point.matrixTransform(matrix);
point.y += height;
bbox.s = point.matrixTransform(matrix);
return bbox
function getScreenBBox(targetShape) {
var targetel = target || targetShape;
while (targetel.getCTM == null && targetel.parentNode != null) {
targetel = targetel.parentNode;
}
var bbox = {};
var matrix = targetel.getCTM();
var tbbox = targetel.getBBox();
var width = tbbox.width;
var height = tbbox.height;
var x = tbbox.x;
var y = tbbox.y;
point.x = x;
point.y = y;
bbox.nw = point.matrixTransform(matrix);
point.x += width;
bbox.ne = point.matrixTransform(matrix);
point.y += height;
bbox.se = point.matrixTransform(matrix);
point.x -= width;
bbox.sw = point.matrixTransform(matrix);
point.y -= height / 2;
bbox.w = point.matrixTransform(matrix);
point.x += width;
bbox.e = point.matrixTransform(matrix);
point.x -= width / 2;
point.y -= height / 2;
bbox.n = point.matrixTransform(matrix);
point.y += height;
bbox.s = point.matrixTransform(matrix);
return bbox;
}
// Private - replace D3JS 3.X d3.functor() function
function functor(v) {
return typeof v === 'function' ? v : function() {
return v
}
return typeof v === "function" ? v : function () {
return v;
};
}
return tip;
}
return tip
}
function styleInject(css, ref) {

@@ -1531,2 +1492,6 @@ if ( ref === void 0 ) ref = {};

ITooltip.prototype.tooltipEnter = function (element) {
var overlayElement = this.parentOverlay();
if (!overlayElement.empty()) {
this.tooltip.rootElement(overlayElement.node().parentNode);
}
element.call(this.tooltip);

@@ -1533,0 +1498,0 @@ };

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e(t["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,e){"use strict";function n(){}function r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function o(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function i(){}n.prototype._palette=e.Palette.rainbow("default"),n.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},n.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)};var l="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3})$/,c=/^#([0-9a-f]{6})$/,p=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),h=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),f=new RegExp("^rgba\\("+[l,l,l,a]+"\\)$"),y=new RegExp("^rgba\\("+[s,s,s,a]+"\\)$"),d=new RegExp("^hsl\\("+[a,s,s]+"\\)$"),g=new RegExp("^hsla\\("+[a,s,s,a]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(t){var e;return t=(t+"").trim().toLowerCase(),(e=u.exec(t))?new k((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=c.exec(t))?v(parseInt(e[1],16)):(e=p.exec(t))?new k(e[1],e[2],e[3],1):(e=h.exec(t))?new k(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?w(e[1],e[2],e[3],e[4]):(e=y.exec(t))?w(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=d.exec(t))?C(e[1],e[2]/100,e[3]/100,1):(e=g.exec(t))?C(e[1],e[2]/100,e[3]/100,e[4]):m.hasOwnProperty(t)?v(m[t]):"transparent"===t?new k(NaN,NaN,NaN,0):null}function v(t){return new k(t>>16&255,t>>8&255,255&t,1)}function w(t,e,n,r){return r<=0&&(t=e=n=NaN),new k(t,e,n,r)}function x(t){return t instanceof i||(t=b(t)),t?new k((t=t.rgb()).r,t.g,t.b,t.opacity):new k}function k(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function M(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function C(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new E(t,e,n,r)}function N(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=b(t)),!t)return new E;if(t instanceof E)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),l=Math.max(e,n,r),a=NaN,s=l-o,u=(l+o)/2;return s?(a=e===l?(n-r)/s+6*(n<r):n===l?(r-e)/s+2:(e-n)/s+4,s/=u<.5?l+o:2-l-o,a*=60):s=u>0&&u<1?0:a,new E(a,s,u,t.opacity)}(t):new E(t,e,n,null==r?1:r)}function E(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function S(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}r(i,b,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),r(k,function(t,e,n,r){return 1===arguments.length?x(t):new k(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new k(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new k(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+M(this.r)+M(this.g)+M(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),r(E,N,o(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new E(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new E(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new k(S(t>=240?t-240:t+120,o,r),S(t,o,r),S(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var _=Math.PI/180,$=180/Math.PI,O=.96422,T=1,F=.82521,V=4/29,P=6/29,j=3*P*P,I=P*P*P;function A(t){if(t instanceof z)return new z(t.l,t.a,t.b,t.opacity);if(t instanceof H){if(isNaN(t.h))return new z(t.l,0,0,t.opacity);var e=t.h*_;return new z(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof k||(t=x(t));var n,r,o=J(t.r),i=J(t.g),l=J(t.b),a=q((.2225045*o+.7168786*i+.0606169*l)/T);return o===i&&i===l?n=r=a:(n=q((.4360747*o+.3850649*i+.1430804*l)/O),r=q((.0139322*o+.0971045*i+.7141733*l)/F)),new z(116*a-16,500*(n-a),200*(a-r),t.opacity)}function z(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function q(t){return t>I?Math.pow(t,1/3):t/j+V}function L(t){return t>P?t*t*t:j*(t-V)}function D(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function J(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function H(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}r(z,function(t,e,n,r){return 1===arguments.length?A(t):new z(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return new z(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new z(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new k(D(3.1338561*(e=O*L(e))-1.6168667*(t=T*L(t))-.4906146*(n=F*L(n))),D(-.9787684*e+1.9161415*t+.033454*n),D(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),r(H,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof H)return new H(t.h,t.c,t.l,t.opacity);if(t instanceof z||(t=A(t)),0===t.a&&0===t.b)return new H(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*$;return new H(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new H(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return new H(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new H(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return A(this).rgb()}}));var W=-.14861,B=1.78277,R=-.29227,U=-.90649,G=1.97294,X=G*U,Y=G*B,Z=B*R-U*W;function K(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Q(){}function tt(){}function et(){}r(K,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof K)return new K(t.h,t.s,t.l,t.opacity);t instanceof k||(t=x(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Z*r+X*e-Y*n)/(Z+X-Y),i=r-o,l=(G*(n-o)-R*i)/U,a=Math.sqrt(l*l+i*i)/(G*o*(1-o)),s=a?Math.atan2(l,i)*$-120:NaN;return new K(s<0?s+360:s,a,o,t.opacity)}(t):new K(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new K(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new K(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new k(255*(e+n*(W*r+B*o)),255*(e+n*(R*r+U*o)),255*(e+n*(G*r)),this.opacity)}})),Q.prototype._palette=e.Palette.ordinal("default"),Q.prototype.fillColor=function(t,e,n){return this._palette(t[0])},Q.prototype.strokeColor=function(t,e,n){return N(this.fillColor(t,e,n)).darker().toString()},Q.prototype.textColor=function(t,n,r){return e.Palette.textColor(this.fillColor(t,n,r))},Q.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},Q.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},tt.prototype._palette=e.Palette.rainbow("default"),tt.prototype.fillColor=function(t,e,n){return this._palette(t.length)},tt.prototype.strokeColor=function(t,e,n){return N(this.fillColor(t,e,n)).darker().toString()},tt.prototype.textColor=function(t,n,r){return e.Palette.textColor(this.fillColor(t,n,r))},tt.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},tt.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},et.prototype.vertex_click=function(t,e,n,r){r&&r.vertex&&console.log("Vertex click: "+r.vertex.id())},et.prototype.vertex_dblclick=function(t,e,n,r){r&&r.vertex&&console.log("Vertex double click: "+r.vertex.id())},et.prototype.edge_click=function(t,e,n,r){r&&r.edge&&console.log("Edge click: "+r.edge.id())},et.prototype.edge_dblclick=function(t,e,n,r){r&&r.edge&&console.log("Edge double click: "+r.edge.id())};var nt=function(t,e){return(nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function rt(t,e){function n(){this.constructor=t}nt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=function(t){function e(){return t.call(this)||this}return rt(e,t),e.prototype.isValid=function(){if(this.validate()&&!new RegExp(this.validate()).test(this.value()))return!1;return!0},e.prototype.hasValue=function(){if("function"==typeof this.type){switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1}return""!==this.value()},e.prototype.blur=function(t){},e.prototype.click=function(t){},e.prototype.dblclick=function(t){},e.prototype.change=function(t,e){},e.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},e.prototype.disable=function(t){this._inputElement.forEach(function(e,n){e.attr("disabled",t?"disabled":null)})},e.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},e}(e.Widget);function it(){}function lt(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}ot.prototype.publish("name","","string","HTML name for the input"),ot.prototype.publish("label","","string","Descriptive label"),ot.prototype.publish("value","","string","Input Current Value"),ot.prototype.publish("validate",null,"string","Input Validation"),it.prototype._palette=e.Palette.ordinal("default"),it.prototype.fillColor=function(t,e,n){return this._palette(e)},it.prototype.strokeColor=function(t,e,n){return N(this.fillColor(t,e,n)).darker().toString()},it.prototype.textColor=function(t,n,r){return e.Palette.textColor(this.fillColor(t,n,r))},it.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},it.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)};var at,st=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ut(t){return new ct(t)}function ct(t){if(!(e=st.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function pt(t,e){var n=lt(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}ut.prototype=ct.prototype,ct.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ht={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return pt(100*t,e)},r:pt,s:function(t,e){var n=lt(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(at=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=r.length;return i===l?r:i>l?r+new Array(i-l+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+lt(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function ft(t){return t}var yt,dt,gt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mt(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var o=t.length,i=[],l=0,a=e[0],s=0;o>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),i.push(t.substring(o-=a,o+a)),!((s+=a+1)>r));)a=e[l=(l+1)%e.length];return i.reverse().join(n)}):ft,o=t.currency,i=t.decimal,l=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):ft,a=t.percent||"%";function s(t){var e=(t=ut(t)).fill,n=t.align,s=t.sign,u=t.symbol,c=t.zero,p=t.width,h=t.comma,f=t.precision,y=t.trim,d=t.type;"n"===d?(h=!0,d="g"):ht[d]||(null==f&&(f=12),y=!0,d="g"),(c||"0"===e&&"="===n)&&(c=!0,e="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(d)?"0"+d.toLowerCase():"",m="$"===u?o[1]:/[%p]/.test(d)?a:"",b=ht[d],v=/[defgprs%]/.test(d);function w(t){var o,a,u,w=g,x=m;if("c"===d)x=b(t)+x,t="";else{var k=(t=+t)<0;if(t=b(Math.abs(t),f),y&&(t=function(t){t:for(var e,n=t.length,r=1,o=-1;r<n;++r)switch(t[r]){case".":o=e=r;break;case"0":0===o&&(o=r),e=r;break;default:if(o>0){if(!+t[r])break t;o=0}}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),k&&0==+t&&(k=!1),w=(k?"("===s?s:"-":"-"===s||"("===s?"":s)+w,x=("s"===d?gt[8+at/3]:"")+x+(k&&"("===s?")":""),v)for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){x=(46===u?i+t.slice(o+1):t.slice(o))+x,t=t.slice(0,o);break}}h&&!c&&(t=r(t,1/0));var M=w.length+t.length+x.length,C=M<p?new Array(p-M+1).join(e):"";switch(h&&c&&(t=r(C+t,C.length?p-x.length:1/0),C=""),n){case"<":t=w+t+x+C;break;case"=":t=w+C+t+x;break;case"^":t=C.slice(0,M=C.length>>1)+w+t+x+C.slice(M);break;default:t=C+w+t+x}return l(t)}return f=null==f?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return t+""},w}return{format:s,formatPrefix:function(t,e){var n,r=s(((t=ut(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=lt(Math.abs(n)))?n[1]:NaN)/3)))),i=Math.pow(10,-o),l=gt[8+o/3];return function(t){return r(i*t)+l}}}}yt=mt({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),dt=yt.format,yt.formatPrefix;function bt(){}function vt(t,e){var n=new bt;if(t instanceof bt)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var l in t)n.set(l,t[l]);return n}function wt(){}bt.prototype=vt.prototype={constructor:bt,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var xt=vt.prototype;wt.prototype=function(t,e){var n=new wt;if(t instanceof wt)t.each(function(t){n.add(t)});else if(t){var r=-1,o=t.length;if(null==e)for(;++r<o;)n.add(t[r]);else for(;++r<o;)n.add(e(t[r],r,t))}return n}.prototype={constructor:wt,has:xt.has,add:function(t){return this["$"+(t+="")]=t,this},remove:xt.remove,clear:xt.clear,values:xt.keys,size:xt.size,empty:xt.empty,each:xt.each};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}('.d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n box-sizing: border-box;\r\n display: inline;\r\n font-size: 10px;\r\n width: 100%;\r\n line-height: 1;\r\n color: rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n content: "\\25BC";\r\n margin: -1px 0 0 0;\r\n top: 100%;\r\n left: 0;\r\n text-align: center;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n content: "\\25C0";\r\n margin: -4px 0 0 0;\r\n top: 50%;\r\n left: -8px;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s:after {\r\n content: "\\25B2";\r\n margin: 0 0 1px 0;\r\n top: -8px;\r\n left: 0;\r\n text-align: center;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n content: "\\25B6";\r\n margin: -4px 0 0 -1px;\r\n top: 50%;\r\n left: 100%;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n content: "" !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n');var kt=function(t){function n(){var n=t.call(this)||this;if(n.tooltip=function(){var t=function(){return"n"},n=function(){return[0,0]},r=function(){return" "},o=d(document.body),i=h(),l=null,a=null,s=null;function u(t){var e;e=t.node(),(l=e?"svg"===e.tagName.toLowerCase()?e:e.ownerSVGElement:null)&&(a=l.createSVGPoint(),o().appendChild(i))}u.show=function(){var e=Array.prototype.slice.call(arguments);e[e.length-1]instanceof SVGElement&&(s=e.pop());var i,l=r.apply(this,e),a=n.apply(this,e),h=t.apply(this,e),y=f(),d=p.length,g=document.documentElement.scrollTop||o().scrollTop,m=document.documentElement.scrollLeft||o().scrollLeft;for(y.html(l).style("opacity",1).style("pointer-events","all");d--;)y.classed(p[d],!1);return i=c.get(h).apply(this),y.classed(h,!0).style("top",i.top+a[0]+g+"px").style("left",i.left+a[1]+m+"px"),u},u.hide=function(){return f().style("opacity",0).style("pointer-events","none"),u},u.attr=function(t,n){if(arguments.length<2&&"string"==typeof t)return f().attr(t);var r=Array.prototype.slice.call(arguments);return e.selection.prototype.attr.apply(f(),r),u},u.style=function(t,n){if(arguments.length<2&&"string"==typeof t)return f().style(t);var r=Array.prototype.slice.call(arguments);return e.selection.prototype.style.apply(f(),r),u},u.direction=function(e){return arguments.length?(t=null==e?e:d(e),u):t},u.offset=function(t){return arguments.length?(n=null==t?t:d(t),u):n},u.html=function(t){return arguments.length?(r=null==t?t:d(t),u):r},u.rootElement=function(t){return arguments.length?(o=null==t?t:d(t),u):o},u.destroy=function(){return i&&(f().remove(),i=null),u};var c=vt({n:function(){var t=y();return{top:t.n.y-i.offsetHeight,left:t.n.x-i.offsetWidth/2}},s:function(){var t=y();return{top:t.s.y,left:t.s.x-i.offsetWidth/2}},e:function(){var t=y();return{top:t.e.y-i.offsetHeight/2,left:t.e.x}},w:function(){var t=y();return{top:t.w.y-i.offsetHeight/2,left:t.w.x-i.offsetWidth}},nw:function(){var t=y();return{top:t.nw.y-i.offsetHeight,left:t.nw.x-i.offsetWidth}},ne:function(){var t=y();return{top:t.ne.y-i.offsetHeight,left:t.ne.x}},sw:function(){var t=y();return{top:t.sw.y,left:t.sw.x-i.offsetWidth}},se:function(){var t=y();return{top:t.se.y,left:t.se.x}}}),p=c.keys();function h(){var t=e.select(document.createElement("div"));return t.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function f(){return null==i&&(i=h(),o().appendChild(i)),e.select(i)}function y(){for(var t=s||event.target;null==t.getScreenCTM&&null==t.parentNode;)t=t.parentNode;var e={},n=t.getScreenCTM(),r=t.getBBox(),o=r.width,i=r.height,l=r.x,u=r.y;return a.x=l,a.y=u,e.nw=a.matrixTransform(n),a.x+=o,e.ne=a.matrixTransform(n),a.y+=i,e.se=a.matrixTransform(n),a.x-=o,e.sw=a.matrixTransform(n),a.y-=i/2,e.w=a.matrixTransform(n),a.x+=o,e.e=a.matrixTransform(n),a.x-=o/2,a.y-=i/2,e.n=a.matrixTransform(n),a.y+=i,e.s=a.matrixTransform(n),e}function d(t){return"function"==typeof t?t:function(){return t}}return u}().attr("class","d3-tip"),n._valueFormatter=dt(n.tooltipValueFormat()),n.layerEnter){var r=n.layerEnter;n.layerEnter=function(t,e,n){this.tooltipEnter(e),r.apply(this,arguments)};var o=n.layerUpdate;n.layerUpdate=function(t){o.apply(this,arguments),this.tooltipUpdate()};var i=n.layerExit;n.layerExit=function(t){i.apply(this,arguments),this.tooltipExit()}}else{var l=n.enter;n.enter=function(t,e){this.tooltipEnter(e),l.apply(this,arguments)};var a=n.update;n.update=function(t,e){a.apply(this,arguments),this.tooltipUpdate()};var s=n.exit;n.exit=function(t,e){s.apply(this,arguments),this.tooltipExit()}}return n}return rt(n,t),n.prototype.tooltipEnter=function(t){t.call(this.tooltip)},n.prototype.tooltipUpdate=function(){var t=this;this.tooltip.offset(function(){switch(t.tooltip.direction()()){case"e":return[0,t.tooltipOffset()];default:return[-t.tooltipOffset(),0]}});var e=this.tooltip.attr("class");e&&(e=e.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":""),this.tooltip.attr("class",e))},n.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},n.prototype._tooltipHTML=function(t){return t},n.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},n.prototype.tooltipFormat=function(t){switch((t=t||{}).label=void 0===t.label?"":t.label,t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":t.value=this._valueFormatter(t.value)||"",this.tooltipStyle()){case"none":break;default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},n}(e.Widget);kt.prototype.publish("tooltipStyle","default","set","Style",["default","none"],{}),kt.prototype.publish("tooltipValueFormat",",.2f","string","Value Format",null,{}),kt.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Series Color",null,{}),kt.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Label Color",null,{}),kt.prototype.publish("tooltipValueColor","white","html-color","Value Color",null,{}),kt.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),kt.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});var Mt=kt.prototype.tooltipValueFormat;kt.prototype.tooltipValueFormat=function(t){var e=Mt.apply(this,arguments);return arguments.length&&(this._valueFormatter=dt(t)),e};var Ct=function(){function t(){}return t.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},t.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},t}();Ct.prototype._palette=e.Palette.ordinal("default"),t.I1DChart=n,t.I2DChart=Q,t.I2DAggrChart=tt,t.IGraph=et,t.instanceOfIHighlight=function(t){return"function"==typeof t.highlightColumn},t.IInput=ot,t.INDChart=it,t.ITooltip=kt,t.ITree=Ct,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],e):e(t["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,e){"use strict";function n(){}function r(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function o(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function i(){}n.prototype._palette=e.Palette.rainbow("default"),n.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},n.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)};var l="\\s*([+-]?\\d+)\\s*",a="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u=/^#([0-9a-f]{3})$/,c=/^#([0-9a-f]{6})$/,p=new RegExp("^rgb\\("+[l,l,l]+"\\)$"),h=new RegExp("^rgb\\("+[s,s,s]+"\\)$"),f=new RegExp("^rgba\\("+[l,l,l,a]+"\\)$"),d=new RegExp("^rgba\\("+[s,s,s,a]+"\\)$"),y=new RegExp("^hsl\\("+[a,s,s]+"\\)$"),g=new RegExp("^hsla\\("+[a,s,s,a]+"\\)$"),m={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function b(t){var e;return t=(t+"").trim().toLowerCase(),(e=u.exec(t))?new k((e=parseInt(e[1],16))>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):(e=c.exec(t))?v(parseInt(e[1],16)):(e=p.exec(t))?new k(e[1],e[2],e[3],1):(e=h.exec(t))?new k(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=f.exec(t))?w(e[1],e[2],e[3],e[4]):(e=d.exec(t))?w(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=y.exec(t))?C(e[1],e[2]/100,e[3]/100,1):(e=g.exec(t))?C(e[1],e[2]/100,e[3]/100,e[4]):m.hasOwnProperty(t)?v(m[t]):"transparent"===t?new k(NaN,NaN,NaN,0):null}function v(t){return new k(t>>16&255,t>>8&255,255&t,1)}function w(t,e,n,r){return r<=0&&(t=e=n=NaN),new k(t,e,n,r)}function x(t){return t instanceof i||(t=b(t)),t?new k((t=t.rgb()).r,t.g,t.b,t.opacity):new k}function k(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function M(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function C(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new E(t,e,n,r)}function N(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof E)return new E(t.h,t.s,t.l,t.opacity);if(t instanceof i||(t=b(t)),!t)return new E;if(t instanceof E)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,o=Math.min(e,n,r),l=Math.max(e,n,r),a=NaN,s=l-o,u=(l+o)/2;return s?(a=e===l?(n-r)/s+6*(n<r):n===l?(r-e)/s+2:(e-n)/s+4,s/=u<.5?l+o:2-l-o,a*=60):s=u>0&&u<1?0:a,new E(a,s,u,t.opacity)}(t):new E(t,e,n,null==r?1:r)}function E(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function S(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}r(i,b,{displayable:function(){return this.rgb().displayable()},hex:function(){return this.rgb().hex()},toString:function(){return this.rgb()+""}}),r(k,function(t,e,n,r){return 1===arguments.length?x(t):new k(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new k(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new k(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return 0<=this.r&&this.r<=255&&0<=this.g&&this.g<=255&&0<=this.b&&this.b<=255&&0<=this.opacity&&this.opacity<=1},hex:function(){return"#"+M(this.r)+M(this.g)+M(this.b)},toString:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}})),r(E,N,o(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new E(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new E(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,o=2*n-r;return new k(S(t>=240?t-240:t+120,o,r),S(t,o,r),S(t<120?t+240:t-120,o,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1}}));var _=Math.PI/180,$=180/Math.PI,O=.96422,T=1,F=.82521,P=4/29,V=6/29,j=3*V*V,I=V*V*V;function A(t){if(t instanceof z)return new z(t.l,t.a,t.b,t.opacity);if(t instanceof H){if(isNaN(t.h))return new z(t.l,0,0,t.opacity);var e=t.h*_;return new z(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}t instanceof k||(t=x(t));var n,r,o=J(t.r),i=J(t.g),l=J(t.b),a=q((.2225045*o+.7168786*i+.0606169*l)/T);return o===i&&i===l?n=r=a:(n=q((.4360747*o+.3850649*i+.1430804*l)/O),r=q((.0139322*o+.0971045*i+.7141733*l)/F)),new z(116*a-16,500*(n-a),200*(a-r),t.opacity)}function z(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function q(t){return t>I?Math.pow(t,1/3):t/j+P}function L(t){return t>V?t*t*t:j*(t-P)}function D(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function J(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function H(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}r(z,function(t,e,n,r){return 1===arguments.length?A(t):new z(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return new z(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new z(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new k(D(3.1338561*(e=O*L(e))-1.6168667*(t=T*L(t))-.4906146*(n=F*L(n))),D(-.9787684*e+1.9161415*t+.033454*n),D(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),r(H,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof H)return new H(t.h,t.c,t.l,t.opacity);if(t instanceof z||(t=A(t)),0===t.a&&0===t.b)return new H(NaN,0,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*$;return new H(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}(t):new H(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return new H(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new H(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return A(this).rgb()}}));var W=-.14861,B=1.78277,R=-.29227,U=-.90649,G=1.97294,X=G*U,Y=G*B,Z=B*R-U*W;function K(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function Q(){}function tt(){}function et(){}r(K,function(t,e,n,r){return 1===arguments.length?function(t){if(t instanceof K)return new K(t.h,t.s,t.l,t.opacity);t instanceof k||(t=x(t));var e=t.r/255,n=t.g/255,r=t.b/255,o=(Z*r+X*e-Y*n)/(Z+X-Y),i=r-o,l=(G*(n-o)-R*i)/U,a=Math.sqrt(l*l+i*i)/(G*o*(1-o)),s=a?Math.atan2(l,i)*$-120:NaN;return new K(s<0?s+360:s,a,o,t.opacity)}(t):new K(t,e,n,null==r?1:r)},o(i,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new K(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new K(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*_,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),o=Math.sin(t);return new k(255*(e+n*(W*r+B*o)),255*(e+n*(R*r+U*o)),255*(e+n*(G*r)),this.opacity)}})),Q.prototype._palette=e.Palette.ordinal("default"),Q.prototype.fillColor=function(t,e,n){return this._palette(t[0])},Q.prototype.strokeColor=function(t,e,n){return N(this.fillColor(t,e,n)).darker().toString()},Q.prototype.textColor=function(t,n,r){return e.Palette.textColor(this.fillColor(t,n,r))},Q.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},Q.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},tt.prototype._palette=e.Palette.rainbow("default"),tt.prototype.fillColor=function(t,e,n){return this._palette(t.length)},tt.prototype.strokeColor=function(t,e,n){return N(this.fillColor(t,e,n)).darker().toString()},tt.prototype.textColor=function(t,n,r){return e.Palette.textColor(this.fillColor(t,n,r))},tt.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},tt.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},et.prototype.vertex_click=function(t,e,n,r){r&&r.vertex&&console.log("Vertex click: "+r.vertex.id())},et.prototype.vertex_dblclick=function(t,e,n,r){r&&r.vertex&&console.log("Vertex double click: "+r.vertex.id())},et.prototype.edge_click=function(t,e,n,r){r&&r.edge&&console.log("Edge click: "+r.edge.id())},et.prototype.edge_dblclick=function(t,e,n,r){r&&r.edge&&console.log("Edge double click: "+r.edge.id())};var nt=function(t,e){return(nt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function rt(t,e){function n(){this.constructor=t}nt(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ot=function(t){function e(){return t.call(this)||this}return rt(e,t),e.prototype.isValid=function(){if(this.validate()&&!new RegExp(this.validate()).test(this.value()))return!1;return!0},e.prototype.hasValue=function(){if("function"==typeof this.type){switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1}return""!==this.value()},e.prototype.blur=function(t){},e.prototype.click=function(t){},e.prototype.dblclick=function(t){},e.prototype.change=function(t,e){},e.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},e.prototype.disable=function(t){this._inputElement.forEach(function(e,n){e.attr("disabled",t?"disabled":null)})},e.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},e}(e.Widget);function it(){}function lt(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]}ot.prototype.publish("name","","string","HTML name for the input"),ot.prototype.publish("label","","string","Descriptive label"),ot.prototype.publish("value","","string","Input Current Value"),ot.prototype.publish("validate",null,"string","Input Validation"),it.prototype._palette=e.Palette.ordinal("default"),it.prototype.fillColor=function(t,e,n){return this._palette(e)},it.prototype.strokeColor=function(t,e,n){return N(this.fillColor(t,e,n)).darker().toString()},it.prototype.textColor=function(t,n,r){return e.Palette.textColor(this.fillColor(t,n,r))},it.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},it.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)};var at,st=/^(?:(.)?([<>=^]))?([+\-\( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ut(t){return new ct(t)}function ct(t){if(!(e=st.exec(t)))throw new Error("invalid format: "+t);var e;this.fill=e[1]||" ",this.align=e[2]||">",this.sign=e[3]||"-",this.symbol=e[4]||"",this.zero=!!e[5],this.width=e[6]&&+e[6],this.comma=!!e[7],this.precision=e[8]&&+e[8].slice(1),this.trim=!!e[9],this.type=e[10]||""}function pt(t,e){var n=lt(t,e);if(!n)return t+"";var r=n[0],o=n[1];return o<0?"0."+new Array(-o).join("0")+r:r.length>o+1?r.slice(0,o+1)+"."+r.slice(o+1):r+new Array(o-r.length+2).join("0")}ut.prototype=ct.prototype,ct.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(null==this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(null==this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var ht={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return pt(100*t,e)},r:pt,s:function(t,e){var n=lt(t,e);if(!n)return t+"";var r=n[0],o=n[1],i=o-(at=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=r.length;return i===l?r:i>l?r+new Array(i-l+1).join("0"):i>0?r.slice(0,i)+"."+r.slice(i):"0."+new Array(1-i).join("0")+lt(t,Math.max(0,e+i-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function ft(t){return t}var dt,yt,gt=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function mt(t){var e,n,r=t.grouping&&t.thousands?(e=t.grouping,n=t.thousands,function(t,r){for(var o=t.length,i=[],l=0,a=e[0],s=0;o>0&&a>0&&(s+a+1>r&&(a=Math.max(1,r-s)),i.push(t.substring(o-=a,o+a)),!((s+=a+1)>r));)a=e[l=(l+1)%e.length];return i.reverse().join(n)}):ft,o=t.currency,i=t.decimal,l=t.numerals?function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(t.numerals):ft,a=t.percent||"%";function s(t){var e=(t=ut(t)).fill,n=t.align,s=t.sign,u=t.symbol,c=t.zero,p=t.width,h=t.comma,f=t.precision,d=t.trim,y=t.type;"n"===y?(h=!0,y="g"):ht[y]||(null==f&&(f=12),d=!0,y="g"),(c||"0"===e&&"="===n)&&(c=!0,e="0",n="=");var g="$"===u?o[0]:"#"===u&&/[boxX]/.test(y)?"0"+y.toLowerCase():"",m="$"===u?o[1]:/[%p]/.test(y)?a:"",b=ht[y],v=/[defgprs%]/.test(y);function w(t){var o,a,u,w=g,x=m;if("c"===y)x=b(t)+x,t="";else{var k=(t=+t)<0;if(t=b(Math.abs(t),f),d&&(t=function(t){t:for(var e,n=t.length,r=1,o=-1;r<n;++r)switch(t[r]){case".":o=e=r;break;case"0":0===o&&(o=r),e=r;break;default:if(o>0){if(!+t[r])break t;o=0}}return o>0?t.slice(0,o)+t.slice(e+1):t}(t)),k&&0==+t&&(k=!1),w=(k?"("===s?s:"-":"-"===s||"("===s?"":s)+w,x=("s"===y?gt[8+at/3]:"")+x+(k&&"("===s?")":""),v)for(o=-1,a=t.length;++o<a;)if(48>(u=t.charCodeAt(o))||u>57){x=(46===u?i+t.slice(o+1):t.slice(o))+x,t=t.slice(0,o);break}}h&&!c&&(t=r(t,1/0));var M=w.length+t.length+x.length,C=M<p?new Array(p-M+1).join(e):"";switch(h&&c&&(t=r(C+t,C.length?p-x.length:1/0),C=""),n){case"<":t=w+t+x+C;break;case"=":t=w+C+t+x;break;case"^":t=C.slice(0,M=C.length>>1)+w+t+x+C.slice(M);break;default:t=C+w+t+x}return l(t)}return f=null==f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),w.toString=function(){return t+""},w}return{format:s,formatPrefix:function(t,e){var n,r=s(((t=ut(t)).type="f",t)),o=3*Math.max(-8,Math.min(8,Math.floor((n=e,((n=lt(Math.abs(n)))?n[1]:NaN)/3)))),i=Math.pow(10,-o),l=gt[8+o/3];return function(t){return r(i*t)+l}}}}dt=mt({decimal:".",thousands:",",grouping:[3],currency:["$",""]}),yt=dt.format,dt.formatPrefix;function bt(){}function vt(t,e){var n=new bt;if(t instanceof bt)t.each(function(t,e){n.set(e,t)});else if(Array.isArray(t)){var r,o=-1,i=t.length;if(null==e)for(;++o<i;)n.set(o,t[o]);else for(;++o<i;)n.set(e(r=t[o],o,t),r)}else if(t)for(var l in t)n.set(l,t[l]);return n}function wt(){}bt.prototype=vt.prototype={constructor:bt,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var xt=vt.prototype;wt.prototype=function(t,e){var n=new wt;if(t instanceof wt)t.each(function(t){n.add(t)});else if(t){var r=-1,o=t.length;if(null==e)for(;++r<o;)n.add(t[r]);else for(;++r<o;)n.add(e(t[r],r,t))}return n}.prototype={constructor:wt,has:xt.has,add:function(t){return this["$"+(t+="")]=t,this},remove:xt.remove,clear:xt.clear,values:xt.keys,size:xt.size,empty:xt.empty,each:xt.each};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=t:o.appendChild(document.createTextNode(t))}}('.d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n box-sizing: border-box;\r\n display: inline;\r\n font-size: 10px;\r\n width: 100%;\r\n line-height: 1;\r\n color: rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n content: "\\25BC";\r\n margin: -1px 0 0 0;\r\n top: 100%;\r\n left: 0;\r\n text-align: center;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n content: "\\25C0";\r\n margin: -4px 0 0 0;\r\n top: 50%;\r\n left: -8px;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s:after {\r\n content: "\\25B2";\r\n margin: 0 0 1px 0;\r\n top: -8px;\r\n left: 0;\r\n text-align: center;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n content: "\\25B6";\r\n margin: -4px 0 0 -1px;\r\n top: 50%;\r\n left: 100%;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n content: "" !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n');var kt=function(t){function n(){var n=t.call(this)||this;if(n.tooltip=function(){var t=function(){return"n"},n=function(){return[0,0]},r=function(){return" "},o=y(document.body),i=h(),l=null,a=null,s=null,u=function(t){var e;e=t.node(),(l=e?"svg"===e.tagName.toLowerCase()?e:e.ownerSVGElement:null)&&(a=l.createSVGPoint(),o().appendChild(i))};u.show=function(e,i,l){s=l[i];var a,h=Array.prototype.slice.call(arguments),d=r.apply(this,h),y=n.apply(this,h),g=t.apply(this,h),m=f(),b=p.length,v=document.documentElement.scrollTop||o().scrollTop,w=document.documentElement.scrollLeft||o().scrollLeft;for(m.html(d).style("opacity",1).style("pointer-events","all");b--;)m.classed(p[b],!1);return a=c.get(g).apply(this),m.classed(g,!0).style("top",a.top+y[0]+v+"px").style("left",a.left+y[1]+w+"px"),u},u.hide=function(){return f().style("opacity",0).style("pointer-events","none"),u},u.attr=function(t,n){if(arguments.length<2&&"string"==typeof t)return f().attr(t);var r=Array.prototype.slice.call(arguments);return e.selection.prototype.attr.apply(f(),r),u},u.style=function(t,n){if(arguments.length<2&&"string"==typeof t)return f().style(t);var r=Array.prototype.slice.call(arguments);return e.selection.prototype.style.apply(f(),r),u},u.direction=function(e){return arguments.length?(t=null==e?e:y(e),u):t},u.offset=function(t){return arguments.length?(n=null==t?t:y(t),u):n},u.html=function(t){return arguments.length?(r=null==t?t:y(t),u):r},u.rootElement=function(t){return arguments.length?(o=null==t?t:y(t),u):o},u.destroy=function(){return i&&(f().remove(),i=null),u};var c=vt({n:function(){var t=d(window);return{top:t.n.y-i.offsetHeight,left:t.n.x-i.offsetWidth/2}},s:function(){var t=d(window);return{top:t.s.y,left:t.s.x-i.offsetWidth/2}},e:function(){var t=d(window);return{top:t.e.y-i.offsetHeight/2,left:t.e.x}},w:function(){var t=d(window);return{top:t.w.y-i.offsetHeight/2,left:t.w.x-i.offsetWidth}},nw:function(){var t=d(window);return{top:t.nw.y-i.offsetHeight,left:t.nw.x-i.offsetWidth}},ne:function(){var t=d(window);return{top:t.ne.y-i.offsetHeight,left:t.ne.x}},sw:function(){var t=d(window);return{top:t.sw.y,left:t.sw.x-i.offsetWidth}},se:function(){var t=d(window);return{top:t.se.y,left:t.se.x}}}),p=c.keys();function h(){var t=e.select(document.createElement("div"));return t.style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function f(){return null==i&&(i=h(),o.appendChild(i)),e.select(i)}function d(t){for(var e=s||t;null==e.getCTM&&null!=e.parentNode;)e=e.parentNode;var n={},r=e.getCTM(),o=e.getBBox(),i=o.width,l=o.height,u=o.x,c=o.y;return a.x=u,a.y=c,n.nw=a.matrixTransform(r),a.x+=i,n.ne=a.matrixTransform(r),a.y+=l,n.se=a.matrixTransform(r),a.x-=i,n.sw=a.matrixTransform(r),a.y-=l/2,n.w=a.matrixTransform(r),a.x+=i,n.e=a.matrixTransform(r),a.x-=i/2,a.y-=l/2,n.n=a.matrixTransform(r),a.y+=l,n.s=a.matrixTransform(r),n}function y(t){return"function"==typeof t?t:function(){return t}}return u}().attr("class","d3-tip"),n._valueFormatter=yt(n.tooltipValueFormat()),n.layerEnter){var r=n.layerEnter;n.layerEnter=function(t,e,n){this.tooltipEnter(e),r.apply(this,arguments)};var o=n.layerUpdate;n.layerUpdate=function(t){o.apply(this,arguments),this.tooltipUpdate()};var i=n.layerExit;n.layerExit=function(t){i.apply(this,arguments),this.tooltipExit()}}else{var l=n.enter;n.enter=function(t,e){this.tooltipEnter(e),l.apply(this,arguments)};var a=n.update;n.update=function(t,e){a.apply(this,arguments),this.tooltipUpdate()};var s=n.exit;n.exit=function(t,e){s.apply(this,arguments),this.tooltipExit()}}return n}return rt(n,t),n.prototype.tooltipEnter=function(t){var e=this.parentOverlay();e.empty()||this.tooltip.rootElement(e.node().parentNode),t.call(this.tooltip)},n.prototype.tooltipUpdate=function(){var t=this;this.tooltip.offset(function(){switch(t.tooltip.direction()()){case"e":return[0,t.tooltipOffset()];default:return[-t.tooltipOffset(),0]}});var e=this.tooltip.attr("class");e&&(e=e.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":""),this.tooltip.attr("class",e))},n.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},n.prototype._tooltipHTML=function(t){return t},n.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},n.prototype.tooltipFormat=function(t){switch((t=t||{}).label=void 0===t.label?"":t.label,t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":t.value=this._valueFormatter(t.value)||"",this.tooltipStyle()){case"none":break;default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},n}(e.Widget);kt.prototype.publish("tooltipStyle","default","set","Style",["default","none"],{}),kt.prototype.publish("tooltipValueFormat",",.2f","string","Value Format",null,{}),kt.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Series Color",null,{}),kt.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Label Color",null,{}),kt.prototype.publish("tooltipValueColor","white","html-color","Value Color",null,{}),kt.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),kt.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});var Mt=kt.prototype.tooltipValueFormat;kt.prototype.tooltipValueFormat=function(t){var e=Mt.apply(this,arguments);return arguments.length&&(this._valueFormatter=yt(t)),e};var Ct=function(){function t(){}return t.prototype.click=function(t,e,n){console.log("Click: "+JSON.stringify(t)+", "+e+", "+n)},t.prototype.dblclick=function(t,e,n){console.log("Double click: "+JSON.stringify(t)+", "+e+", "+n)},t}();Ct.prototype._palette=e.Palette.ordinal("default"),t.I1DChart=n,t.I2DChart=Q,t.I2DAggrChart=tt,t.IGraph=et,t.instanceOfIHighlight=function(t){return"function"==typeof t.highlightColumn},t.IInput=ot,t.INDChart=it,t.ITooltip=kt,t.ITree=Ct,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "@hpcc-js/api",
"version": "0.5.3",
"version": "0.5.4",
"description": "hpcc-js - Viz api",

@@ -31,3 +31,2 @@ "main": "dist/index.js",

"d3-format": "1.3.0",
"d3-tip": "GordonSmith/d3-tip#vJSNEXT",
"tslib": "1.9.3"

@@ -34,0 +33,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc