New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@hpcc-js/html

Package Overview
Dependencies
Maintainers
1
Versions
197
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hpcc-js/html - npm Package Compare versions

Comparing version 2.25.0 to 2.26.0

307

CHANGELOG.md

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

# [2.26.0](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/html@2.8.7...@hpcc-js/html@2.26.0) (2021-07-16)
# 2.72.0 (2021-07-07)
# 2.71.0 (2021-07-02)
# 2.70.0 (2021-06-23)
# 2.69.0 (2021-06-23)
# 2.68.0 (2021-06-16)
# 2.67.0 (2021-06-15)
# 2.66.0 (2021-05-26)
# 2.65.0 (2021-05-19)
# 2.64.0 (2021-05-13)
# 2.63.0 (2021-05-08)
# 2.62.0 (2021-04-29)
# 2.61.0 (2021-04-06)
# 2.60.0 (2021-03-16)
# 2.59.0 (2021-02-24)
# 2.58.0 (2021-02-24)
# 2.57.0 (2021-02-22)
# 2.56.0 (2021-02-19)
# 2.55.0 (2021-02-12)
# 2.54.0 (2021-02-05)
# 2.53.0 (2021-02-02)
## 3.0.1 (2021-02-01)
# 2.51.0 (2020-12-15)
# 2.50.0 (2020-12-01)
# 2.49.0 (2020-11-10)
# 2.48.0 (2020-11-03)
# 2.47.0 (2020-10-28)
# 2.46.0 (2020-10-23)
# 2.45.0 (2020-10-16)
# 2.44.0 (2020-10-09)
# 2.43.0 (2020-10-08)
# 2.42.0 (2020-09-24)
# 2.41.0 (2020-09-18)
# 2.40.0 (2020-09-15)
# 2.39.0 (2020-09-09)
### Features
* Added weight markers to DirectoryTree.ts ([73c9b20](https://github.com/hpcc-systems/Visualization/commit/73c9b20473614b20f5b194418c81e9d1ddf98a08))
# 2.38.0 (2020-09-03)
# 2.37.0 (2020-08-26)
# 2.36.0 (2020-08-25)
# 2.35.0 (2020-08-24)
### Features
* Add MiniGantt back compat to React timeline ([dac0ce8](https://github.com/hpcc-systems/Visualization/commit/dac0ce8d90736171a113b3918a5b075331039d6d))
# 2.34.0 (2020-08-22)
# 2.33.0 (2020-08-08)
### Features
* Adds react gantt widgets ([cf869fe](https://github.com/hpcc-systems/Visualization/commit/cf869fea1997f54ad4057bd4e939bd39eea071eb))
# 2.32.0 (2020-08-05)
# 2.31.0 (2020-07-29)
# 2.30.0 (2020-07-29)
# 2.29.0 (2020-07-28)
# 2.28.0 (2020-07-22)
### Features
* **Graph2:** Add vertex tooltip support ([461f096](https://github.com/hpcc-systems/Visualization/commit/461f096dff5b33c1b8d430f27b67dd7240f2a544)), closes [#3646](https://github.com/hpcc-systems/Visualization/issues/3646)
# 2.26.0 (2020-06-26)
# 2.25.0 (2020-06-24)
# 2.24.0 (2020-06-23)
# 2.23.0 (2020-06-23)
# 2.22.0 (2020-06-17)
# 2.21.0 (2020-06-17)
# 2.20.0 (2020-06-17)
# 2.19.0 (2020-06-15)
# 2.18.0 (2020-06-02)
# 2.17.0 (2020-05-31)
# 2.16.0 (2020-05-21)
## 2.15.21 (2020-05-20)
## 2.15.20 (2020-05-20)
## 2.15.19 (2020-05-19)
## 2.15.18 (2020-05-15)
## 2.15.17 (2020-05-15)
## 2.15.16 (2020-05-14)
## 2.15.15 (2020-05-12)
## 2.15.14 (2020-05-07)
## 2.15.13 (2020-04-24)
## 2.15.12 (2020-04-22)
## 2.15.11 (2020-04-21)
## 2.15.10 (2020-04-21)
## 2.15.9 (2020-04-17)
## 2.15.7 (2020-04-11)
# [2.25.0](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/html@2.8.7...@hpcc-js/html@2.25.0) (2021-07-02)

@@ -8,0 +315,0 @@

4

dist/index.es6.js

@@ -5,4 +5,4 @@ import { select, HTMLWidget, format } from '@hpcc-js/common';

var PKG_NAME = "@hpcc-js/html";
var PKG_VERSION = "2.25.0";
var BUILD_VERSION = "2.71.0";
var PKG_VERSION = "2.26.0";
var BUILD_VERSION = "2.73.0";

@@ -9,0 +9,0 @@ /*! *****************************************************************************

@@ -8,4 +8,4 @@ (function (global, factory) {

var PKG_NAME = "@hpcc-js/html";
var PKG_VERSION = "2.25.0";
var BUILD_VERSION = "2.71.0";
var PKG_VERSION = "2.26.0";
var BUILD_VERSION = "2.73.0";

@@ -12,0 +12,0 @@ /*! *****************************************************************************

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

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/util")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util"],e):e((t=t||self)["@hpcc-js/html"]={},t["@hpcc-js/common"],t["@hpcc-js/util"])}(this,function(t,e,o){"use strict";var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var r=function(t){function n(){var e=t.call(this)||this;return e._tooltipHTMLCallback=function(t){return"<b>_tooltipHTMLCallback is undefined</b>"},e._logger=o.scopedLogger("html/HTMLTooltip"),e._closing=!1,e.visible(!1),e}return i(n,t),n.prototype.tooltipHTML=function(t){return this._tooltipHTMLCallback=t,this},n.prototype.tooltipContent=function(t){return arguments.length?(this._contentNode=t,this):this._contentNode},n.prototype.triggerElement=function(t){return this._triggerElement=t,this},n.prototype.enter=function(o,n){t.prototype.enter.call(this,o,n);var i=e.select("body");this._tooltipElement=i.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=i.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")},n.prototype.update=function(e,o){var n=this;if(t.prototype.update.call(this,e,o),this._contentNode!==this._prevContentNode){var i=this._tooltipElement.node();(function(t,e,o){if(o||2===arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||e)})([],i.querySelectorAll("*")).map(function(t){return t.__data__}).filter(function(t){return t}).forEach(function(t){"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()}),i.innerHTML="",i.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(function(){return n._tooltipHTMLCallback(n.data())}),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");var r=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(r.width),this.tooltipHeight_default(r.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()},n.prototype.onShowContent=function(t){},n.prototype.updateTooltipPosition=function(){var t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o},n.prototype.calcTooltipDirection=function(t){var e=Object.keys(t),o=this.direction();e.sort(function(t,e){return t===o?-1:1});for(var n={top:0,left:0,width:window.innerWidth,height:window.innerHeight},i=0;i<e.length;i++){var r={top:t[e[i]].y,left:t[e[i]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(r,n))return e[i]}return this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '"+o+"'"),this._logger.debug(n),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o},n.prototype.rectFits=function(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top},n.prototype.setArrowPosition=function(t,e){var o,n,i="border-top-color";switch(this._arrowElement.style("border",this.arrowHeight()+"px solid "+this.tooltipColor()).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),n=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),i="border-top-color",this._arrowElement.style("border-top-width",this.arrowHeight()+"px").style("border-bottom-width","0px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"s":o=t.y-this.arrowHeight(),n=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,i="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",this.arrowHeight()+"px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,n=t.x-this.arrowHeight(),i="border-right-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width","0px").style("border-right-width",this.arrowHeight()+"px");break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),n=t.x+this.tooltipWidth()+2*this.padding(),i="border-left-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width",this.arrowHeight()+"px").style("border-right-width","0px")}return void 0!==o&&void 0!==n?this._arrowElement.style("top",o+"px").style("left",n+"px").style(i,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t},n.prototype.getReferenceNode=function(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode},n.prototype.calcReferenceBBox=function(){var t=this.getReferenceNode().getBoundingClientRect(),e=t.top,o=t.left,n=t.width,i=t.height,r=this.tooltipWidth(),l=this.tooltipHeight(),s=r/2,p=l/2,h=this.arrowHeight(),a=this.padding(),u=2*a;return this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],n=1,i=1),{n:{x:o+n/2-s-a,y:e-l-h-u},e:{x:o+n+h,y:e+i/2-p-a},s:{x:o+n/2-s-a,y:e+i+h},w:{x:o-r-h-u,y:e+i/2-p-a},nw:{x:o-r-u,y:e-l-u},ne:{x:o+n,y:e-l-u},se:{x:o+n,y:e+i},sw:{x:o-r-u,y:e+i}}},n.prototype.mouseout=function(){var t=this;this._closing=!0,this._tooltipElement.on("mouseover",function(){t._closing=!1}),this._tooltipElement.on("mouseout",function(){t.mouseout()}),setTimeout(function(){t._closing&&t.visible(!1)},this.closeDelay())},n.prototype.visible=function(e){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",e?"visible":"hidden"),this._tooltipElement.style("visibility",e?"visible":"hidden")),t.prototype.visible.call(this,e),this):t.prototype.visible.call(this)},n.prototype.exit=function(e,o){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),t.prototype.exit.call(this,e,o)},n}(e.HTMLWidget);r.prototype._class+=" html_HTMLTooltip",r.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),r.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),r.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),r.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),r.prototype.publish("padding",8,"number","Padding (pixels)"),r.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),r.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),r.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),r.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),r.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");var l=function(t){function o(){return t.call(this)||this}return i(o,t),o.prototype.transformData=function(){return this.data()},o.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._table=o.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")},o.prototype.update=function(o,n){t.prototype.update.call(this,o,n),this._table.style("width",this.autoWidth()?"auto":"100%");var i=this._theadRow.selectAll("th").data(this.columns());i.enter().append("th").attr("class",function(t,e){return"th-"+e}).merge(i).text(function(t){return t.toString()}),i.exit().remove();var r=this._tbody.selectAll("tr").data(this.transformData());r.enter().append("tr").merge(r).each(function(t){var o=e.select(this).selectAll("td").data(t);o.enter().append("td").attr("class",function(t,e){return"col-"+e}).merge(o).text(function(t){return t.toString()}),o.exit().remove()}),r.exit().remove()},o}(e.HTMLWidget);l.prototype._class+=" html_SimpleTable",l.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");var s=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.applyStyleObject=function(t,e){Object.keys(e).forEach(function(o){t.style(o,e[o])})},e.prototype.update=function(e,o){var n=this;t.prototype.update.call(this,e,o),o.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach(function(t,e){n.applyStyleObject(o.select(".th-"+e),t)}),this.tbodyColumnStyles().forEach(function(t,e){n.applyStyleObject(o.selectAll(".col-"+e),t)});var i=Object.keys(this.evenRowStyles()).length>0,r=Object.keys(this.lastRowStyles()).length>0,l=o.selectAll("tbody > tr");if(i){var s=l.select(function(t,e){return e%2?this:null});this.applyStyleObject(s,this.evenRowStyles())}if(r){var p=l.select(function(t,e,o){return e===o.length-1?this:null});this.applyStyleObject(p,this.lastRowStyles())}},e}(l);s.prototype._class+=" html_StyledTable",s.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),s.prototype.publish("fontColor","#333","string","Base font color used within the table"),s.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),s.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');var p=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.transformData=function(){var t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)},e.prototype.breakdownData=function(t){var e=this.data().length,o=this.data().reduce(function(t,e){return t+e[1]},0),n=[],i=0;this.data().sort(function(t,e){return t[1]>e[1]?-1:1});var r=e-t>0;if(this.data().filter(function(e,o){return!r||o<t-1}).forEach(function(t){var e=Math.round(t[1]/o*100);i+=e,n.push([t[0],e+"%"])}),r){var l=this.otherLabel()+" ("+(e-t+1)+")",s="~"+(100-i)+"%";n.push([l,s])}return n},e.prototype.calculateRowCount=function(){var t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),this._tooltip=(new r).target(e),this._tooltip.tooltipHTML(function(t){var e=n.useCalculatedRowCount()?n.calculateRowCount():n.rowCount(),o=n.fontSize(),i=Math.max.apply(Math,t.map(function(t){return n.textSize(t[0],"Verdana",n.fontSize()).width})),r=2*(i+30)+2*n._tooltip.padding(),l=o*Math.ceil((t.length-e)/2)+2*n._tooltip.padding();n._tooltip.tooltipWidth(r),n._tooltip.tooltipHeight(l);var s=n.breakdownData(n.data().length).slice(e-1);return'<div style="\n width: 100%;\n height: 100%;\n font-size: '+n.fontSize()+'px\n ">'+s.map(function(t){return'<div style="\n float:left;\n width:'+Math.floor(49.5)+'%;\n ">'+t[0]+": "+t[1]+"</div>"}).join("")+"</div>"})},e.prototype.update=function(e,o){if(this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),t.prototype.update.call(this,e,o),(this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){var n=o.select("tbody > tr:last-child"),i=this;n.on("mouseout.tooltip",function(t){i._tooltip._triggerElement=n,i._tooltip.visible(!1).render()}).on("mouseenter.tooltip",function(t){i._tooltip._triggerElement=n,i._tooltip.direction("n").data(i.data()).visible(!0).render()})}},e}(s);p.prototype._class+=" html_BreakdownTable",p.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),p.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:function(t){return t.useCalculatedRowCount()}}),p.prototype.publish("fontSize",14,"number","Font size (pixels)"),p.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),p.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),p.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),p.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),p.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),p.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),p.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),p.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),p.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),p.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),p.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),p.prototype.publish("thFontSize",26,"number","Font size for th elements"),p.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),p.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");var h,a,u,c,d,f={},_=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function g(t,e){for(var o in e)t[o]=e[o];return t}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,o){var n,i=arguments,r={};for(n in e)"key"!==n&&"ref"!==n&&(r[n]=e[n]);if(arguments.length>3)for(o=[o],n=3;n<arguments.length;n++)o.push(i[n]);if(null!=o&&(r.children=o),"function"==typeof t&&null!=t.defaultProps)for(n in t.defaultProps)void 0===r[n]&&(r[n]=t.defaultProps[n]);return w(t,r,e&&e.key,e&&e.ref)}function w(t,e,o,n){var i={type:t,props:e,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return h.vnode&&h.vnode(i),i}function v(t){return t.children}function x(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__.__k.indexOf(t)+1):null;for(var o;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e)return o.__e;return"function"==typeof t.type?C(t):null}function k(t){var e,o;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e){t.__e=t.__c.base=o.__e;break}return k(t)}}function S(t){(!t.__d&&(t.__d=!0)&&1===a.push(t)||c!==h.debounceRendering)&&((c=h.debounceRendering)||u)(E)}function E(){var t,e,o,n,i,r,l;for(a.sort(function(t,e){return e.__v.__b-t.__v.__b});t=a.pop();)t.__d&&(o=void 0,n=void 0,r=(i=(e=t).__v).__e,(l=e.__P)&&(o=[],n=R(l,i,g({},i),e.__n,void 0!==l.ownerSVGElement,null,o,null==r?C(i):r),P(o,i),n!=r&&k(i)))}function T(t,e,o,n,i,r,l,s,p){var h,a,u,c,d,y,g,b=o&&o.__k||_,w=b.length;if(s==f&&(s=null!=r?r[0]:w?C(o,0):null),h=0,e.__k=W(e.__k,function(o){if(null!=o){if(o.__=e,o.__b=e.__b+1,null===(u=b[h])||u&&o.key==u.key&&o.type===u.type)b[h]=void 0;else for(a=0;a<w;a++){if((u=b[a])&&o.key==u.key&&o.type===u.type){b[a]=void 0;break}u=null}if(c=R(t,o,u=u||f,n,i,r,l,s,p),(a=o.ref)&&u.ref!=a&&(g||(g=[]),u.ref&&g.push(u.ref,null,o),g.push(a,o.__c||c,o)),null!=c){if(null==y&&(y=c),null!=o.__d)c=o.__d,o.__d=null;else if(r==u||c!=s||null==c.parentNode){t:if(null==s||s.parentNode!==t)t.appendChild(c);else{for(d=s,a=0;(d=d.nextSibling)&&a<w;a+=2)if(d==c)break t;t.insertBefore(c,s)}"option"==e.type&&(t.value="")}s=c.nextSibling,"function"==typeof e.type&&(e.__d=c)}}return h++,o}),e.__e=y,null!=r&&"function"!=typeof e.type)for(h=r.length;h--;)null!=r[h]&&m(r[h]);for(h=w;h--;)null!=b[h]&&N(b[h],b[h]);if(g)for(h=0;h<g.length;h++)L(g[h],g[++h],g[++h])}function W(t,e,o){if(null==o&&(o=[]),null==t||"boolean"==typeof t)e&&o.push(e(null));else if(Array.isArray(t))for(var n=0;n<t.length;n++)W(t[n],e,o);else o.push(e?e("string"==typeof t||"number"==typeof t?w(null,t,null,null):null!=t.__e||null!=t.__c?w(t.type,t.props,t.key,null):t):t);return o}function A(t,e,o){"-"===e[0]?t.setProperty(e,o):t[e]="number"==typeof o&&!1===y.test(e)?o+"px":null==o?"":o}function H(t,e,o,n,i){var r,l,s,p,h;if(i?"className"===e&&(e="class"):"class"===e&&(e="className"),"key"===e||"children"===e);else if("style"===e)if(r=t.style,"string"==typeof o)r.cssText=o;else{if("string"==typeof n&&(r.cssText="",n=null),n)for(l in n)o&&l in o||A(r,l,"");if(o)for(s in o)n&&o[s]===n[s]||A(r,s,o[s])}else"o"===e[0]&&"n"===e[1]?(p=e!==(e=e.replace(/Capture$/,"")),h=e.toLowerCase(),e=(h in t?h:e).slice(2),o?(n||t.addEventListener(e,B,p),(t.l||(t.l={}))[e]=o):t.removeEventListener(e,B,p)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&!i&&e in t?t[e]=null==o?"":o:"function"!=typeof o&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==o||!1===o?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),o):null==o||!1===o?t.removeAttribute(e):t.setAttribute(e,o))}function B(t){this.l[t.type](h.event?h.event(t):t)}function R(t,e,o,n,i,r,l,s,p){var a,u,c,d,f,_,y,m,b,w,C=e.type;if(void 0!==e.constructor)return null;(a=h.__b)&&a(e);try{t:if("function"==typeof C){if(m=e.props,b=(a=C.contextType)&&n[a.__c],w=a?b?b.props.value:a.__:n,o.__c?y=(u=e.__c=o.__c).__=u.__E:("prototype"in C&&C.prototype.render?e.__c=u=new C(m,w):(e.__c=u=new x(m,w),u.constructor=C,u.render=M),b&&b.sub(u),u.props=m,u.state||(u.state={}),u.context=w,u.__n=n,c=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=g({},u.__s)),g(u.__s,C.getDerivedStateFromProps(m,u.__s))),d=u.props,f=u.state,c)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&m!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(m,w),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(m,u.__s,w)){for(u.props=m,u.state=u.__s,u.__d=!1,u.__v=e,e.__e=o.__e,e.__k=o.__k,u.__h.length&&l.push(u),a=0;a<e.__k.length;a++)e.__k[a]&&(e.__k[a].__=e);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(m,u.__s,w),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(d,f,_)})}u.context=w,u.props=m,u.state=u.__s,(a=h.__r)&&a(e),u.__d=!1,u.__v=e,u.__P=t,a=u.render(u.props,u.state,u.context),e.__k=W(null!=a&&a.type==v&&null==a.key?a.props.children:a),null!=u.getChildContext&&(n=g(g({},n),u.getChildContext())),c||null==u.getSnapshotBeforeUpdate||(_=u.getSnapshotBeforeUpdate(d,f)),T(t,e,o,n,i,r,l,s,p),u.base=e.__e,u.__h.length&&l.push(u),y&&(u.__E=u.__=null),u.__e=null}else e.__e=F(o.__e,e,o,n,i,r,l,p);(a=h.diffed)&&a(e)}catch(t){h.__e(t,e,o)}return e.__e}function P(t,e){h.__c&&h.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){h.__e(t,e.__v)}})}function F(t,e,o,n,i,r,l,s){var p,h,a,u,c,d=o.props,y=e.props;if(i="svg"===e.type||i,null==t&&null!=r)for(p=0;p<r.length;p++)if(null!=(h=r[p])&&(null===e.type?3===h.nodeType:h.localName===e.type)){t=h,r[p]=null;break}if(null==t){if(null===e.type)return document.createTextNode(y);t=i?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type),r=null}if(null===e.type)null!=r&&(r[r.indexOf(t)]=null),d!==y&&(t.data=y);else if(e!==o){if(null!=r&&(r=_.slice.call(t.childNodes)),a=(d=o.props||f).dangerouslySetInnerHTML,u=y.dangerouslySetInnerHTML,!s){if(d===f)for(d={},c=0;c<t.attributes.length;c++)d[t.attributes[c].name]=t.attributes[c].value;(u||a)&&(u&&a&&u.__html==a.__html||(t.innerHTML=u&&u.__html||""))}(function(t,e,o,n,i){var r;for(r in o)r in e||H(t,r,null,o[r],n);for(r in e)i&&"function"!=typeof e[r]||"value"===r||"checked"===r||o[r]===e[r]||H(t,r,e[r],o[r],n)})(t,y,d,i,s),e.__k=e.props.children,u||T(t,e,o,n,"foreignObject"!==e.type&&i,r,l,f,s),s||("value"in y&&void 0!==y.value&&y.value!==t.value&&(t.value=null==y.value?"":y.value),"checked"in y&&void 0!==y.checked&&y.checked!==t.checked&&(t.checked=y.checked))}return t}function L(t,e,o){try{"function"==typeof t?t(e):t.current=e}catch(t){h.__e(t,o)}}function N(t,e,o){var n,i,r;if(h.unmount&&h.unmount(t),(n=t.ref)&&L(n,null,e),o||"function"==typeof t.type||(o=null!=(i=t.__e)),t.__e=t.__d=null,null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){h.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(r=0;r<n.length;r++)n[r]&&N(n[r],e,o);null!=i&&m(i)}function M(t,e,o){return this.constructor(t,o)}h={__e:function(t,e){for(var o;e=e.__;)if((o=e.__c)&&!o.__)try{if(o.constructor&&null!=o.constructor.getDerivedStateFromError)o.setState(o.constructor.getDerivedStateFromError(t));else{if(null==o.componentDidCatch)continue;o.componentDidCatch(t)}return S(o.__E=o)}catch(e){t=e}throw t}},x.prototype.setState=function(t,e){var o;o=this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof t&&(t=t(o,this.props)),t&&g(o,t),null!=t&&this.__v&&(this.__e=!1,e&&this.__h.push(e),S(this))},x.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},x.prototype.render=v,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=f;var D,j,z=[],O=h.__r,I=h.diffed,U=h.__c,V=h.unmount;function q(){z.some(function(t){t.__P&&(t.__H.u.forEach(G),t.__H.u.forEach($),t.__H.u=[])}),z=[]}function G(t){t.m&&t.m()}function $(t){var e=t.i();"function"==typeof e&&(t.m=e)}h.__r=function(t){O&&O(t),(D=t.__c).__H&&(D.__H.u.forEach(G),D.__H.u.forEach($),D.__H.u=[])},h.diffed=function(t){I&&I(t);var e=t.__c;if(e){var o=e.__H;o&&o.u.length&&(1!==z.push(e)&&j===h.requestAnimationFrame||((j=h.requestAnimationFrame)||function(t){var e,o=function(){clearTimeout(n),cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(o,100);"undefined"!=typeof window&&(e=requestAnimationFrame(o))})(q))}},h.__c=function(t,e){e.some(function(t){t.__h.forEach(G),t.__h=t.__h.filter(function(t){return!t.i||$(t)})}),U&&U(t,e)},h.unmount=function(t){V&&V(t);var e=t.__c;if(e){var o=e.__H;o&&o.t.forEach(function(t){return t.m&&t.m()})}};var J=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.jsxRender=function(t,e){this.rootNode=function(t,e,o){var n,i,r;h.__&&h.__(t,e),i=(n=o===d)?null:o&&o.__k||e.__k,t=b(v,null,[t]),r=[],R(e,(n?e:o||e).__k=t,i||f,f,void 0!==e.ownerSVGElement,o&&!n?[o]:i?null:_.slice.call(e.childNodes),r,o||f,n),P(r,t)}(t,e,this.rootNode)},e.Component=x,e.createElement=b,e}(e.HTMLWidget);J.prototype._class+=" html_JSXWidget";var K=function(){function t(t,e){this._attrs=t,this._children=e}return t.prototype.type=function(){return"div"},t.prototype.attrs=function(){return this._attrs},t.prototype.attr=function(t){return this._attrs[t]},t.prototype.children=function(){return this._children},t.prototype.update=function(t){for(var e in this._attrs)t.attr(e,this._attrs[e])},t.prototype.render=function(t){var o=t.selectAll(t.node().tagName+" > *").data([this]);return o.exit().each(function(t){return console.log("render: Exit - "+t.type())}).remove(),o.enter().append(this.type()).each(function(t){return console.log("render: Enter - "+t.type())}).attr("reactd3",0).merge(o).each(function(t){var o=e.select(this);t.update(o),t.renderChildren(o)})},t.prototype.renderChildren=function(t){var o=t.selectAll(t.node().tagName+" > *").data(this._children);return o.exit().each(function(t){return console.log("renderChildren: Exit - "+t.type())}).remove(),o.enter().append(function(t){return document.createElement(t.type())}).each(function(t){return console.log("renderChildren: Enter - "+t.type())}).attr("reactd3",function(t,e){return e}).merge(o).each(function(t){var o=e.select(this);t.update(o),t.renderChildren(o)})},t}(),X=function(t){function e(e,o,n){var i=t.call(this,o,n)||this;return i._type=e,i}return i(e,t),e.prototype.type=function(){return this._type},e}(K),Q=function(t){function e(e){var o=t.call(this,{},[])||this;return o._text=e,o}return i(e,t),e.prototype.type=function(){return"span"},e.prototype.update=function(e){t.prototype.update.call(this,e),e.text(this._text)},e}(K);var Y=function(){function t(){}return t.createElement=function(t,e){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];return function(t){return t.prototype&&t.prototype instanceof K}(t)?new t(e):function(t){return"function"==typeof t}(t)?t(e):new X(t,e,o.map(function(t){return"string"==typeof t?new Q(t):t}))},t.render=function(t,e){t.render(e)},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(J.Component),tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(J.Component),et=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.prototype.transformData=function(){var t=this,o=[["Total",0,0]],n=this.data();return n.forEach(function(t){o[0][1]+=t[1],o[0][2]+=t[2]}),n.concat(o).map(function(o){return[o[0],t.secondColumnFormat_exists()?e.format(t.secondColumnFormat())(o[1]):o[1],t.thirdColumnFormat_exists()?e.format(t.thirdColumnFormat())(o[2]):o[2]]})},o.prototype.update=function(e,o){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),t.prototype.update.call(this,e,o)},o}(s);et.prototype._class+=" html_StatsTable",et.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),et.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),et.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),et.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),et.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),et.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),et.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),et.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),et.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),et.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;text-align:left;display:block;text-overflow:ellipsis;overflow:hidden}#left,#right{white-space:nowrap}#right{background-color:orange;float:right;text-align:right}.html_TitleBar>.main{width:100%;display:block}.html_TitleBar .title{padding:4px;text-align:left;display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:20px;font-weight:700}.html_TitleBar .icon-bar{padding:4px;float:right;text-align:right;white-space:nowrap;line-height:28px}.html_TitleBar .icon-bar-item,.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{text-align:center;padding-top:4px;padding-bottom:4px;transition:all .3s ease;color:#a9a9a9}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{text-align:center;padding-top:2px;padding-left:8px;padding-bottom:0;color:none}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}");var ot=function(t){function e(e){var o=t.call(this)||this;return o._owner=e,o._tag="a",o}return i(e,t),e}(e.HTMLWidget),nt=function(t){function e(e,o){var n=t.call(this,e)||this;return n._icon=o,n}return i(e,t),e.prototype.icon=function(){return this._icon},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),o.attr("href","#").on("click",function(t,e,o){return n._owner.titleBarClick(n,t,e,o)}).append("i").attr("class","fa "+this._icon+" fa-lg fa-fw")},e}(ot),it=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){var n=this;o.on("click.sel",function(t,e,o){n.selected(!n.selected()),n.render()}),t.prototype.enter.call(this,e,o)},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._element.classed("selected",this.selected())},e}(nt);it.prototype.publish("selected",!1,"boolean");var rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),o.attr("class","spacer").attr("href","#").append("i")},e}(ot),lt=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._divMain=o.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._divTitle.text(this.title());var n=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());n.enter().append("div").attr("class","icon-bar-item").each(function(t){t.target(this)}).merge(n).each(function(t){t.render()}),n.exit().each(function(t){t.target(null)}).remove(),n.order()},e}(J);lt.prototype._class+=" html_TitleBar",lt.prototype.publish("title","","string"),lt.prototype.publish("buttons",[],"widgetArray"),t.BUILD_VERSION="2.71.0",t.BreakdownTable=p,t.Button=nt,t.HTMLTooltip=r,t.Item=ot,t.JSXWidget=J,t.PKG_NAME="@hpcc-js/html",t.PKG_VERSION="2.25.0",t.ReactD3=Y,t.SimpleTable=l,t.Spacer=rt,t.StatsTable=et,t.StyledTable=s,t.TitleBar=lt,t.ToggleButton=it,t.VNode=K,t.VizComponent=Z,t.VizInstance=tt,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/util")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util"],e):e((t=t||self)["@hpcc-js/html"]={},t["@hpcc-js/common"],t["@hpcc-js/util"])}(this,function(t,e,o){"use strict";var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var r=function(t){function n(){var e=t.call(this)||this;return e._tooltipHTMLCallback=function(t){return"<b>_tooltipHTMLCallback is undefined</b>"},e._logger=o.scopedLogger("html/HTMLTooltip"),e._closing=!1,e.visible(!1),e}return i(n,t),n.prototype.tooltipHTML=function(t){return this._tooltipHTMLCallback=t,this},n.prototype.tooltipContent=function(t){return arguments.length?(this._contentNode=t,this):this._contentNode},n.prototype.triggerElement=function(t){return this._triggerElement=t,this},n.prototype.enter=function(o,n){t.prototype.enter.call(this,o,n);var i=e.select("body");this._tooltipElement=i.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=i.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")},n.prototype.update=function(e,o){var n=this;if(t.prototype.update.call(this,e,o),this._contentNode!==this._prevContentNode){var i=this._tooltipElement.node();(function(t,e,o){if(o||2===arguments.length)for(var n,i=0,r=e.length;i<r;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||e)})([],i.querySelectorAll("*")).map(function(t){return t.__data__}).filter(function(t){return t}).forEach(function(t){"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()}),i.innerHTML="",i.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(function(){return n._tooltipHTMLCallback(n.data())}),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");var r=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(r.width),this.tooltipHeight_default(r.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()},n.prototype.onShowContent=function(t){},n.prototype.updateTooltipPosition=function(){var t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o},n.prototype.calcTooltipDirection=function(t){var e=Object.keys(t),o=this.direction();e.sort(function(t,e){return t===o?-1:1});for(var n={top:0,left:0,width:window.innerWidth,height:window.innerHeight},i=0;i<e.length;i++){var r={top:t[e[i]].y,left:t[e[i]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(r,n))return e[i]}return this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '"+o+"'"),this._logger.debug(n),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o},n.prototype.rectFits=function(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top},n.prototype.setArrowPosition=function(t,e){var o,n,i="border-top-color";switch(this._arrowElement.style("border",this.arrowHeight()+"px solid "+this.tooltipColor()).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),n=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),i="border-top-color",this._arrowElement.style("border-top-width",this.arrowHeight()+"px").style("border-bottom-width","0px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"s":o=t.y-this.arrowHeight(),n=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,i="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",this.arrowHeight()+"px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,n=t.x-this.arrowHeight(),i="border-right-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width","0px").style("border-right-width",this.arrowHeight()+"px");break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),n=t.x+this.tooltipWidth()+2*this.padding(),i="border-left-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width",this.arrowHeight()+"px").style("border-right-width","0px")}return void 0!==o&&void 0!==n?this._arrowElement.style("top",o+"px").style("left",n+"px").style(i,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t},n.prototype.getReferenceNode=function(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode},n.prototype.calcReferenceBBox=function(){var t=this.getReferenceNode().getBoundingClientRect(),e=t.top,o=t.left,n=t.width,i=t.height,r=this.tooltipWidth(),l=this.tooltipHeight(),s=r/2,p=l/2,h=this.arrowHeight(),a=this.padding(),u=2*a;return this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],n=1,i=1),{n:{x:o+n/2-s-a,y:e-l-h-u},e:{x:o+n+h,y:e+i/2-p-a},s:{x:o+n/2-s-a,y:e+i+h},w:{x:o-r-h-u,y:e+i/2-p-a},nw:{x:o-r-u,y:e-l-u},ne:{x:o+n,y:e-l-u},se:{x:o+n,y:e+i},sw:{x:o-r-u,y:e+i}}},n.prototype.mouseout=function(){var t=this;this._closing=!0,this._tooltipElement.on("mouseover",function(){t._closing=!1}),this._tooltipElement.on("mouseout",function(){t.mouseout()}),setTimeout(function(){t._closing&&t.visible(!1)},this.closeDelay())},n.prototype.visible=function(e){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",e?"visible":"hidden"),this._tooltipElement.style("visibility",e?"visible":"hidden")),t.prototype.visible.call(this,e),this):t.prototype.visible.call(this)},n.prototype.exit=function(e,o){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),t.prototype.exit.call(this,e,o)},n}(e.HTMLWidget);r.prototype._class+=" html_HTMLTooltip",r.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),r.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),r.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),r.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),r.prototype.publish("padding",8,"number","Padding (pixels)"),r.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),r.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),r.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),r.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),r.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),r.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");var l=function(t){function o(){return t.call(this)||this}return i(o,t),o.prototype.transformData=function(){return this.data()},o.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._table=o.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")},o.prototype.update=function(o,n){t.prototype.update.call(this,o,n),this._table.style("width",this.autoWidth()?"auto":"100%");var i=this._theadRow.selectAll("th").data(this.columns());i.enter().append("th").attr("class",function(t,e){return"th-"+e}).merge(i).text(function(t){return t.toString()}),i.exit().remove();var r=this._tbody.selectAll("tr").data(this.transformData());r.enter().append("tr").merge(r).each(function(t){var o=e.select(this).selectAll("td").data(t);o.enter().append("td").attr("class",function(t,e){return"col-"+e}).merge(o).text(function(t){return t.toString()}),o.exit().remove()}),r.exit().remove()},o}(e.HTMLWidget);l.prototype._class+=" html_SimpleTable",l.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");var s=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.applyStyleObject=function(t,e){Object.keys(e).forEach(function(o){t.style(o,e[o])})},e.prototype.update=function(e,o){var n=this;t.prototype.update.call(this,e,o),o.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach(function(t,e){n.applyStyleObject(o.select(".th-"+e),t)}),this.tbodyColumnStyles().forEach(function(t,e){n.applyStyleObject(o.selectAll(".col-"+e),t)});var i=Object.keys(this.evenRowStyles()).length>0,r=Object.keys(this.lastRowStyles()).length>0,l=o.selectAll("tbody > tr");if(i){var s=l.select(function(t,e){return e%2?this:null});this.applyStyleObject(s,this.evenRowStyles())}if(r){var p=l.select(function(t,e,o){return e===o.length-1?this:null});this.applyStyleObject(p,this.lastRowStyles())}},e}(l);s.prototype._class+=" html_StyledTable",s.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),s.prototype.publish("fontColor","#333","string","Base font color used within the table"),s.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),s.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),s.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');var p=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.transformData=function(){var t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)},e.prototype.breakdownData=function(t){var e=this.data().length,o=this.data().reduce(function(t,e){return t+e[1]},0),n=[],i=0;this.data().sort(function(t,e){return t[1]>e[1]?-1:1});var r=e-t>0;if(this.data().filter(function(e,o){return!r||o<t-1}).forEach(function(t){var e=Math.round(t[1]/o*100);i+=e,n.push([t[0],e+"%"])}),r){var l=this.otherLabel()+" ("+(e-t+1)+")",s="~"+(100-i)+"%";n.push([l,s])}return n},e.prototype.calculateRowCount=function(){var t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),this._tooltip=(new r).target(e),this._tooltip.tooltipHTML(function(t){var e=n.useCalculatedRowCount()?n.calculateRowCount():n.rowCount(),o=n.fontSize(),i=Math.max.apply(Math,t.map(function(t){return n.textSize(t[0],"Verdana",n.fontSize()).width})),r=2*(i+30)+2*n._tooltip.padding(),l=o*Math.ceil((t.length-e)/2)+2*n._tooltip.padding();n._tooltip.tooltipWidth(r),n._tooltip.tooltipHeight(l);var s=n.breakdownData(n.data().length).slice(e-1);return'<div style="\n width: 100%;\n height: 100%;\n font-size: '+n.fontSize()+'px\n ">'+s.map(function(t){return'<div style="\n float:left;\n width:'+Math.floor(49.5)+'%;\n ">'+t[0]+": "+t[1]+"</div>"}).join("")+"</div>"})},e.prototype.update=function(e,o){if(this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),t.prototype.update.call(this,e,o),(this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){var n=o.select("tbody > tr:last-child"),i=this;n.on("mouseout.tooltip",function(t){i._tooltip._triggerElement=n,i._tooltip.visible(!1).render()}).on("mouseenter.tooltip",function(t){i._tooltip._triggerElement=n,i._tooltip.direction("n").data(i.data()).visible(!0).render()})}},e}(s);p.prototype._class+=" html_BreakdownTable",p.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),p.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:function(t){return t.useCalculatedRowCount()}}),p.prototype.publish("fontSize",14,"number","Font size (pixels)"),p.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),p.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),p.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),p.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),p.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),p.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),p.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),p.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),p.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),p.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),p.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),p.prototype.publish("thFontSize",26,"number","Font size for th elements"),p.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),p.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");var h,a,u,c,d,f={},_=[],y=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function g(t,e){for(var o in e)t[o]=e[o];return t}function m(t){var e=t.parentNode;e&&e.removeChild(t)}function b(t,e,o){var n,i=arguments,r={};for(n in e)"key"!==n&&"ref"!==n&&(r[n]=e[n]);if(arguments.length>3)for(o=[o],n=3;n<arguments.length;n++)o.push(i[n]);if(null!=o&&(r.children=o),"function"==typeof t&&null!=t.defaultProps)for(n in t.defaultProps)void 0===r[n]&&(r[n]=t.defaultProps[n]);return w(t,r,e&&e.key,e&&e.ref)}function w(t,e,o,n){var i={type:t,props:e,key:o,ref:n,__k:null,__:null,__b:0,__e:null,__d:null,__c:null,constructor:void 0};return h.vnode&&h.vnode(i),i}function v(t){return t.children}function x(t,e){this.props=t,this.context=e}function C(t,e){if(null==e)return t.__?C(t.__,t.__.__k.indexOf(t)+1):null;for(var o;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e)return o.__e;return"function"==typeof t.type?C(t):null}function k(t){var e,o;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(o=t.__k[e])&&null!=o.__e){t.__e=t.__c.base=o.__e;break}return k(t)}}function S(t){(!t.__d&&(t.__d=!0)&&1===a.push(t)||c!==h.debounceRendering)&&((c=h.debounceRendering)||u)(E)}function E(){var t,e,o,n,i,r,l;for(a.sort(function(t,e){return e.__v.__b-t.__v.__b});t=a.pop();)t.__d&&(o=void 0,n=void 0,r=(i=(e=t).__v).__e,(l=e.__P)&&(o=[],n=R(l,i,g({},i),e.__n,void 0!==l.ownerSVGElement,null,o,null==r?C(i):r),P(o,i),n!=r&&k(i)))}function T(t,e,o,n,i,r,l,s,p){var h,a,u,c,d,y,g,b=o&&o.__k||_,w=b.length;if(s==f&&(s=null!=r?r[0]:w?C(o,0):null),h=0,e.__k=W(e.__k,function(o){if(null!=o){if(o.__=e,o.__b=e.__b+1,null===(u=b[h])||u&&o.key==u.key&&o.type===u.type)b[h]=void 0;else for(a=0;a<w;a++){if((u=b[a])&&o.key==u.key&&o.type===u.type){b[a]=void 0;break}u=null}if(c=R(t,o,u=u||f,n,i,r,l,s,p),(a=o.ref)&&u.ref!=a&&(g||(g=[]),u.ref&&g.push(u.ref,null,o),g.push(a,o.__c||c,o)),null!=c){if(null==y&&(y=c),null!=o.__d)c=o.__d,o.__d=null;else if(r==u||c!=s||null==c.parentNode){t:if(null==s||s.parentNode!==t)t.appendChild(c);else{for(d=s,a=0;(d=d.nextSibling)&&a<w;a+=2)if(d==c)break t;t.insertBefore(c,s)}"option"==e.type&&(t.value="")}s=c.nextSibling,"function"==typeof e.type&&(e.__d=c)}}return h++,o}),e.__e=y,null!=r&&"function"!=typeof e.type)for(h=r.length;h--;)null!=r[h]&&m(r[h]);for(h=w;h--;)null!=b[h]&&N(b[h],b[h]);if(g)for(h=0;h<g.length;h++)L(g[h],g[++h],g[++h])}function W(t,e,o){if(null==o&&(o=[]),null==t||"boolean"==typeof t)e&&o.push(e(null));else if(Array.isArray(t))for(var n=0;n<t.length;n++)W(t[n],e,o);else o.push(e?e("string"==typeof t||"number"==typeof t?w(null,t,null,null):null!=t.__e||null!=t.__c?w(t.type,t.props,t.key,null):t):t);return o}function A(t,e,o){"-"===e[0]?t.setProperty(e,o):t[e]="number"==typeof o&&!1===y.test(e)?o+"px":null==o?"":o}function H(t,e,o,n,i){var r,l,s,p,h;if(i?"className"===e&&(e="class"):"class"===e&&(e="className"),"key"===e||"children"===e);else if("style"===e)if(r=t.style,"string"==typeof o)r.cssText=o;else{if("string"==typeof n&&(r.cssText="",n=null),n)for(l in n)o&&l in o||A(r,l,"");if(o)for(s in o)n&&o[s]===n[s]||A(r,s,o[s])}else"o"===e[0]&&"n"===e[1]?(p=e!==(e=e.replace(/Capture$/,"")),h=e.toLowerCase(),e=(h in t?h:e).slice(2),o?(n||t.addEventListener(e,B,p),(t.l||(t.l={}))[e]=o):t.removeEventListener(e,B,p)):"list"!==e&&"tagName"!==e&&"form"!==e&&"type"!==e&&!i&&e in t?t[e]=null==o?"":o:"function"!=typeof o&&"dangerouslySetInnerHTML"!==e&&(e!==(e=e.replace(/^xlink:?/,""))?null==o||!1===o?t.removeAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase()):t.setAttributeNS("http://www.w3.org/1999/xlink",e.toLowerCase(),o):null==o||!1===o?t.removeAttribute(e):t.setAttribute(e,o))}function B(t){this.l[t.type](h.event?h.event(t):t)}function R(t,e,o,n,i,r,l,s,p){var a,u,c,d,f,_,y,m,b,w,C=e.type;if(void 0!==e.constructor)return null;(a=h.__b)&&a(e);try{t:if("function"==typeof C){if(m=e.props,b=(a=C.contextType)&&n[a.__c],w=a?b?b.props.value:a.__:n,o.__c?y=(u=e.__c=o.__c).__=u.__E:("prototype"in C&&C.prototype.render?e.__c=u=new C(m,w):(e.__c=u=new x(m,w),u.constructor=C,u.render=M),b&&b.sub(u),u.props=m,u.state||(u.state={}),u.context=w,u.__n=n,c=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=g({},u.__s)),g(u.__s,C.getDerivedStateFromProps(m,u.__s))),d=u.props,f=u.state,c)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&m!==d&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(m,w),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(m,u.__s,w)){for(u.props=m,u.state=u.__s,u.__d=!1,u.__v=e,e.__e=o.__e,e.__k=o.__k,u.__h.length&&l.push(u),a=0;a<e.__k.length;a++)e.__k[a]&&(e.__k[a].__=e);break t}null!=u.componentWillUpdate&&u.componentWillUpdate(m,u.__s,w),null!=u.componentDidUpdate&&u.__h.push(function(){u.componentDidUpdate(d,f,_)})}u.context=w,u.props=m,u.state=u.__s,(a=h.__r)&&a(e),u.__d=!1,u.__v=e,u.__P=t,a=u.render(u.props,u.state,u.context),e.__k=W(null!=a&&a.type==v&&null==a.key?a.props.children:a),null!=u.getChildContext&&(n=g(g({},n),u.getChildContext())),c||null==u.getSnapshotBeforeUpdate||(_=u.getSnapshotBeforeUpdate(d,f)),T(t,e,o,n,i,r,l,s,p),u.base=e.__e,u.__h.length&&l.push(u),y&&(u.__E=u.__=null),u.__e=null}else e.__e=F(o.__e,e,o,n,i,r,l,p);(a=h.diffed)&&a(e)}catch(t){h.__e(t,e,o)}return e.__e}function P(t,e){h.__c&&h.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(t){h.__e(t,e.__v)}})}function F(t,e,o,n,i,r,l,s){var p,h,a,u,c,d=o.props,y=e.props;if(i="svg"===e.type||i,null==t&&null!=r)for(p=0;p<r.length;p++)if(null!=(h=r[p])&&(null===e.type?3===h.nodeType:h.localName===e.type)){t=h,r[p]=null;break}if(null==t){if(null===e.type)return document.createTextNode(y);t=i?document.createElementNS("http://www.w3.org/2000/svg",e.type):document.createElement(e.type),r=null}if(null===e.type)null!=r&&(r[r.indexOf(t)]=null),d!==y&&(t.data=y);else if(e!==o){if(null!=r&&(r=_.slice.call(t.childNodes)),a=(d=o.props||f).dangerouslySetInnerHTML,u=y.dangerouslySetInnerHTML,!s){if(d===f)for(d={},c=0;c<t.attributes.length;c++)d[t.attributes[c].name]=t.attributes[c].value;(u||a)&&(u&&a&&u.__html==a.__html||(t.innerHTML=u&&u.__html||""))}(function(t,e,o,n,i){var r;for(r in o)r in e||H(t,r,null,o[r],n);for(r in e)i&&"function"!=typeof e[r]||"value"===r||"checked"===r||o[r]===e[r]||H(t,r,e[r],o[r],n)})(t,y,d,i,s),e.__k=e.props.children,u||T(t,e,o,n,"foreignObject"!==e.type&&i,r,l,f,s),s||("value"in y&&void 0!==y.value&&y.value!==t.value&&(t.value=null==y.value?"":y.value),"checked"in y&&void 0!==y.checked&&y.checked!==t.checked&&(t.checked=y.checked))}return t}function L(t,e,o){try{"function"==typeof t?t(e):t.current=e}catch(t){h.__e(t,o)}}function N(t,e,o){var n,i,r;if(h.unmount&&h.unmount(t),(n=t.ref)&&L(n,null,e),o||"function"==typeof t.type||(o=null!=(i=t.__e)),t.__e=t.__d=null,null!=(n=t.__c)){if(n.componentWillUnmount)try{n.componentWillUnmount()}catch(t){h.__e(t,e)}n.base=n.__P=null}if(n=t.__k)for(r=0;r<n.length;r++)n[r]&&N(n[r],e,o);null!=i&&m(i)}function M(t,e,o){return this.constructor(t,o)}h={__e:function(t,e){for(var o;e=e.__;)if((o=e.__c)&&!o.__)try{if(o.constructor&&null!=o.constructor.getDerivedStateFromError)o.setState(o.constructor.getDerivedStateFromError(t));else{if(null==o.componentDidCatch)continue;o.componentDidCatch(t)}return S(o.__E=o)}catch(e){t=e}throw t}},x.prototype.setState=function(t,e){var o;o=this.__s!==this.state?this.__s:this.__s=g({},this.state),"function"==typeof t&&(t=t(o,this.props)),t&&g(o,t),null!=t&&this.__v&&(this.__e=!1,e&&this.__h.push(e),S(this))},x.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),S(this))},x.prototype.render=v,a=[],u="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=f;var D,j,z=[],O=h.__r,I=h.diffed,U=h.__c,V=h.unmount;function q(){z.some(function(t){t.__P&&(t.__H.u.forEach(G),t.__H.u.forEach($),t.__H.u=[])}),z=[]}function G(t){t.m&&t.m()}function $(t){var e=t.i();"function"==typeof e&&(t.m=e)}h.__r=function(t){O&&O(t),(D=t.__c).__H&&(D.__H.u.forEach(G),D.__H.u.forEach($),D.__H.u=[])},h.diffed=function(t){I&&I(t);var e=t.__c;if(e){var o=e.__H;o&&o.u.length&&(1!==z.push(e)&&j===h.requestAnimationFrame||((j=h.requestAnimationFrame)||function(t){var e,o=function(){clearTimeout(n),cancelAnimationFrame(e),setTimeout(t)},n=setTimeout(o,100);"undefined"!=typeof window&&(e=requestAnimationFrame(o))})(q))}},h.__c=function(t,e){e.some(function(t){t.__h.forEach(G),t.__h=t.__h.filter(function(t){return!t.i||$(t)})}),U&&U(t,e)},h.unmount=function(t){V&&V(t);var e=t.__c;if(e){var o=e.__H;o&&o.t.forEach(function(t){return t.m&&t.m()})}};var J=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.jsxRender=function(t,e){this.rootNode=function(t,e,o){var n,i,r;h.__&&h.__(t,e),i=(n=o===d)?null:o&&o.__k||e.__k,t=b(v,null,[t]),r=[],R(e,(n?e:o||e).__k=t,i||f,f,void 0!==e.ownerSVGElement,o&&!n?[o]:i?null:_.slice.call(e.childNodes),r,o||f,n),P(r,t)}(t,e,this.rootNode)},e.Component=x,e.createElement=b,e}(e.HTMLWidget);J.prototype._class+=" html_JSXWidget";var K=function(){function t(t,e){this._attrs=t,this._children=e}return t.prototype.type=function(){return"div"},t.prototype.attrs=function(){return this._attrs},t.prototype.attr=function(t){return this._attrs[t]},t.prototype.children=function(){return this._children},t.prototype.update=function(t){for(var e in this._attrs)t.attr(e,this._attrs[e])},t.prototype.render=function(t){var o=t.selectAll(t.node().tagName+" > *").data([this]);return o.exit().each(function(t){return console.log("render: Exit - "+t.type())}).remove(),o.enter().append(this.type()).each(function(t){return console.log("render: Enter - "+t.type())}).attr("reactd3",0).merge(o).each(function(t){var o=e.select(this);t.update(o),t.renderChildren(o)})},t.prototype.renderChildren=function(t){var o=t.selectAll(t.node().tagName+" > *").data(this._children);return o.exit().each(function(t){return console.log("renderChildren: Exit - "+t.type())}).remove(),o.enter().append(function(t){return document.createElement(t.type())}).each(function(t){return console.log("renderChildren: Enter - "+t.type())}).attr("reactd3",function(t,e){return e}).merge(o).each(function(t){var o=e.select(this);t.update(o),t.renderChildren(o)})},t}(),X=function(t){function e(e,o,n){var i=t.call(this,o,n)||this;return i._type=e,i}return i(e,t),e.prototype.type=function(){return this._type},e}(K),Q=function(t){function e(e){var o=t.call(this,{},[])||this;return o._text=e,o}return i(e,t),e.prototype.type=function(){return"span"},e.prototype.update=function(e){t.prototype.update.call(this,e),e.text(this._text)},e}(K);var Y=function(){function t(){}return t.createElement=function(t,e){for(var o=[],n=2;n<arguments.length;n++)o[n-2]=arguments[n];return function(t){return t.prototype&&t.prototype instanceof K}(t)?new t(e):function(t){return"function"==typeof t}(t)?t(e):new X(t,e,o.map(function(t){return"string"==typeof t?new Q(t):t}))},t.render=function(t,e){t.render(e)},t}(),Z=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(J.Component),tt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.refreshProps=function(){for(var t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])},e.prototype.componentDidMount=function(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()},e.prototype.componentWillUnmount=function(){this.widget.target(null).render()},e.prototype.render=function(){return b("div",{style:this.props.style})},e.prototype.componentDidUpdate=function(){this.refreshProps(),this.widget.render()},e}(J.Component),et=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.prototype.transformData=function(){var t=this,o=[["Total",0,0]],n=this.data();return n.forEach(function(t){o[0][1]+=t[1],o[0][2]+=t[2]}),n.concat(o).map(function(o){return[o[0],t.secondColumnFormat_exists()?e.format(t.secondColumnFormat())(o[1]):o[1],t.thirdColumnFormat_exists()?e.format(t.thirdColumnFormat())(o[2]):o[2]]})},o.prototype.update=function(e,o){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),t.prototype.update.call(this,e,o)},o}(s);et.prototype._class+=" html_StatsTable",et.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),et.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),et.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),et.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),et.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),et.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),et.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),et.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),et.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),et.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});!function(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===o&&n.firstChild?n.insertBefore(i,n.firstChild):n.appendChild(i),i.styleSheet?i.styleSheet.cssText=t:i.appendChild(document.createTextNode(t))}}("#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;text-align:left;display:block;text-overflow:ellipsis;overflow:hidden}#left,#right{white-space:nowrap}#right{background-color:orange;float:right;text-align:right}.html_TitleBar>.main{width:100%;display:block}.html_TitleBar .title{padding:4px;text-align:left;display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:20px;font-weight:700}.html_TitleBar .icon-bar{padding:4px;float:right;text-align:right;white-space:nowrap;line-height:28px}.html_TitleBar .icon-bar-item,.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{text-align:center;padding-top:4px;padding-bottom:4px;transition:all .3s ease;color:#a9a9a9}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{text-align:center;padding-top:2px;padding-left:8px;padding-bottom:0;color:none}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}");var ot=function(t){function e(e){var o=t.call(this)||this;return o._owner=e,o._tag="a",o}return i(e,t),e}(e.HTMLWidget),nt=function(t){function e(e,o){var n=t.call(this,e)||this;return n._icon=o,n}return i(e,t),e.prototype.icon=function(){return this._icon},e.prototype.enter=function(e,o){var n=this;t.prototype.enter.call(this,e,o),o.attr("href","#").on("click",function(t,e,o){return n._owner.titleBarClick(n,t,e,o)}).append("i").attr("class","fa "+this._icon+" fa-lg fa-fw")},e}(ot),it=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){var n=this;o.on("click.sel",function(t,e,o){n.selected(!n.selected()),n.render()}),t.prototype.enter.call(this,e,o)},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._element.classed("selected",this.selected())},e}(nt);it.prototype.publish("selected",!1,"boolean");var rt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),o.attr("class","spacer").attr("href","#").append("i")},e}(ot),lt=function(t){function e(){return t.call(this)||this}return i(e,t),e.prototype.enter=function(e,o){t.prototype.enter.call(this,e,o),this._divMain=o.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")},e.prototype.update=function(e,o){t.prototype.update.call(this,e,o),this._divTitle.text(this.title());var n=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());n.enter().append("div").attr("class","icon-bar-item").each(function(t){t.target(this)}).merge(n).each(function(t){t.render()}),n.exit().each(function(t){t.target(null)}).remove(),n.order()},e}(J);lt.prototype._class+=" html_TitleBar",lt.prototype.publish("title","","string"),lt.prototype.publish("buttons",[],"widgetArray"),t.BUILD_VERSION="2.73.0",t.BreakdownTable=p,t.Button=nt,t.HTMLTooltip=r,t.Item=ot,t.JSXWidget=J,t.PKG_NAME="@hpcc-js/html",t.PKG_VERSION="2.26.0",t.ReactD3=Y,t.SimpleTable=l,t.Spacer=rt,t.StatsTable=et,t.StyledTable=s,t.TitleBar=lt,t.ToggleButton=it,t.VNode=K,t.VizComponent=Z,t.VizInstance=tt,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=index.min.js.map
{
"name": "@hpcc-js/html",
"version": "2.25.0",
"version": "2.26.0",
"description": "hpcc-js - Viz HTML",

@@ -40,5 +40,5 @@ "main": "dist/index.js",

"dependencies": {
"@hpcc-js/common": "^2.50.0",
"@hpcc-js/common": "^2.51.0",
"@hpcc-js/preact-shim": "^2.13.14",
"@hpcc-js/util": "^2.31.0"
"@hpcc-js/util": "^2.32.0"
},

@@ -77,3 +77,3 @@ "devDependencies": {

"homepage": "https://github.com/hpcc-systems/Visualization",
"gitHead": "6d93282b5ccfb387fff5a54ebb430af5243cdb7c"
"gitHead": "4b07fa803cecb50ac582284b02023cc7dfba8f0d"
}
export const PKG_NAME = "@hpcc-js/html";
export const PKG_VERSION = "2.25.0";
export const BUILD_VERSION = "2.71.0";
export const PKG_VERSION = "2.26.0";
export const BUILD_VERSION = "2.73.0";

@@ -0,0 +0,0 @@ import { HTMLTooltip } from "./HTMLTooltip";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ export * from "./__package__";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ import { select as d3Select } from "d3-selection";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ import { format as d3Format } from "d3-format";

@@ -0,0 +0,0 @@ import { SimpleTable } from "./SimpleTable";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

export declare const PKG_NAME = "@hpcc-js/html";
export declare const PKG_VERSION = "2.25.0";
export declare const BUILD_VERSION = "2.71.0";
export declare const PKG_VERSION = "2.26.0";
export declare const BUILD_VERSION = "2.73.0";
//# sourceMappingURL=__package__.d.ts.map
export declare const PKG_NAME = "@hpcc-js/html";
export declare const PKG_VERSION = "2.25.0";
export declare const BUILD_VERSION = "2.71.0";
export declare const PKG_VERSION = "2.26.0";
export declare const BUILD_VERSION = "2.73.0";
//# sourceMappingURL=__package__.d.ts.map

@@ -0,0 +0,0 @@ import { StyledTable } from "./StyledTable";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ export * from "./__package__";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ export declare type ReactFn = (attrs: {

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ import { StyledTable } from "./StyledTable";

@@ -0,0 +0,0 @@ import { SimpleTable } from "./SimpleTable";

@@ -0,0 +0,0 @@ import { HTMLWidget } from "@hpcc-js/common";

@@ -0,0 +0,0 @@ import { JSXWidget } from "./JSXWidget";

@@ -0,0 +0,0 @@ import { JSXWidget } from "./JSXWidget";

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

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

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