text: (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}var _bar=require("./bar"),_bar2=_interopRequireDefault(_bar),_bezier=require("./bezier"),_bezier2=_interopRequireDefault(_bezier),_connector=require("./connector"),_connector2=_interopRequireDefault(_connector),_curvedRectangle=require("./curved-rectangle"),_curvedRectangle2=_interopRequireDefault(_curvedRectangle),_graph=require("./graph"),_graph2=_interopRequireDefault(_graph),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_path=require("./path"),_path2=_interopRequireDefault(_path),_pie=require("./pie"),_pie2=_interopRequireDefault(_pie),_polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon),_radar=require("./radar"),_radar2=_interopRequireDefault(_radar),_rectangle=require("./rectangle"),_rectangle2=_interopRequireDefault(_rectangle),_sankey=require("./sankey"),_sankey2=_interopRequireDefault(_sankey),_sector=require("./sector"),_sector2=_interopRequireDefault(_sector),_semiRegularPolygon=require("./semi-regular-polygon"),_semiRegularPolygon2=_interopRequireDefault(_semiRegularPolygon),_smoothLine=require("./smooth-line"),_smoothLine2=_interopRequireDefault(_smoothLine),_stack=require("./stack"),_stack2=_interopRequireDefault(_stack),_stock=require("./stock"),_stock2=_interopRequireDefault(_stock),_tree=require("./tree"),_tree2=_interopRequireDefault(_tree),_voronoi=require("./voronoi"),_voronoi2=_interopRequireDefault(_voronoi),_waterfall=require("./waterfall"),_waterfall2=_interopRequireDefault(_waterfall);!function(){var e=(1,eval)("this");e.Paths={Bar:_bar2["default"],Bezier:_bezier2["default"],Connector:_connector2["default"],CurvedRectangle:_curvedRectangle2["default"],Graph:_graph2["default"],Linear:_linear2["default"],Path:_path2["default"],Pie:_pie2["default"],Polygon:_polygon2["default"],Radar:_radar2["default"],Rectangle:_rectangle2["default"],Sankey:_sankey2["default"],Sector:_sector2["default"],SemiRegularPolygon:_semiRegularPolygon2["default"],SmoothLine:_smoothLine2["default"],Stack:_stack2["default"],Stock:_stock2["default"],Tree:_tree2["default"],Voronoi:_voronoi2["default"],Waterfall:_waterfall2["default"]}}();
  },{"./bar":2,"./bezier":5,"./connector":7,"./curved-rectangle":8,"./graph":12,"./linear":14,"./path":16,"./pie":17,"./polygon":18,"./radar":19,"./rectangle":20,"./sankey":21,"./sector":22,"./semi-regular-polygon":24,"./smooth-line":25,"./stack":26,"./stock":27,"./tree":29,"./voronoi":30,"./waterfall":31}],2:[function(require,module,exports){
  "use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{"default":r}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,e){var t=[],n=!0,a=!1,i=void 0;try{for(var l,o=r[Symbol.iterator]();!(n=(l=o.next()).done)&&(t.push(l.value),!e||t.length!==e);n=!0);}catch(u){a=!0,i=u}finally{try{!n&&o["return"]&&o["return"]()}finally{if(a)throw i}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_rectangle=require("./rectangle"),_rectangle2=_interopRequireDefault(_rectangle),_ops=require("./ops");exports["default"]=function(r){var e=r.data,t=r.accessor,n=void 0===t?_ops.id:t,a=r.width,i=r.height,l=r.min,o=r.max,u=r.gutter,f=void 0===u?10:u,c=r.offset,y=void 0===c?[0,0]:c,d=r.compute,s=[],v=!1,_=!1;null==l&&(l=0,v=!0),null==o&&(o=0,_=!0);var h=_slicedToArray(y,2),p=h[0],m=h[1],g=!0,x=!1,b=void 0;try{for(var w,A=e.entries()[Symbol.iterator]();!(g=(w=A.next()).done);g=!0){var T=_slicedToArray(w.value,2),q=T[0],S=T[1],D=!0,R=!1,j=void 0;try{for(var M,O=S.entries()[Symbol.iterator]();!(D=(M=O.next()).done);D=!0){var E=_slicedToArray(M.value,2),I=E[0],P=E[1],k=n(P);v&&l>k&&(l=k),_&&k>o&&(o=k),null==s[I]&&(s[I]=[]),s[I][q]=k}}catch(z){R=!0,j=z}finally{try{!D&&O["return"]&&O["return"]()}finally{if(R)throw j}}}}catch(z){x=!0,b=z}finally{try{!g&&A["return"]&&A["return"]()}finally{if(x)throw b}}var B=s.length,C=(a-f*(B-1))/B,F=[],G=(0,_linear2["default"])([l,o],[i+m,m]),H=!0,J=!1,K=void 0;try{for(var L,N=s.entries()[Symbol.iterator]();!(H=(L=N.next()).done);H=!0){var Q=_slicedToArray(L.value,2),q=Q[0],U=Q[1],V=C/U.length,W=(C+f)*q+p,X=!0,Y=!1,Z=void 0;try{for(var $,rr=U.entries()[Symbol.iterator]();!(X=($=rr.next()).done);X=!0){var er=_slicedToArray($.value,2),I=er[0],P=er[1],tr=W+V*I,nr=tr+V,ar=G(0),ir=G(P),lr=(0,_rectangle2["default"])({left:tr,right:nr,bottom:ar,top:ir});F.push((0,_ops.enhance)(d,{item:e[I][q],line:lr,group:q,index:I}))}}catch(z){Y=!0,Z=z}finally{try{!X&&rr["return"]&&rr["return"]()}finally{if(Y)throw Z}}}}catch(z){J=!0,K=z}finally{try{!H&&N["return"]&&N["return"]()}finally{if(J)throw K}}return{curves:F,scale:G}},module.exports=exports["default"];
  },{"./linear":14,"./ops":15,"./rectangle":20}],3:[function(require,module,exports){
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,e){var t=[],o=!0,n=!1,i=void 0;try{for(var a,s=r[Symbol.iterator]();!(o=(a=s.next()).done)&&(t.push(a.value),!e||t.length!==e);o=!0);}catch(u){n=!0,i=u}finally{try{!o&&s["return"]&&s["return"]()}finally{if(n)throw i}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_ops=require("./ops"),average=function(r,e){var t=r.mass+e.mass,o=(0,_ops.times)(1/t,(0,_ops.plus)((0,_ops.times)(r.mass,r.point),(0,_ops.times)(e.mass,e.point)));return[o,t]},locate=function(r,e){var t=_slicedToArray(r,2),o=t[0],n=t[1],i=!0,a=!1,s=void 0;try{for(var u,d=e[Symbol.iterator]();!(i=(u=d.next()).done);i=!0){var l=u.value,f=l.box,c=f.top,p=f.bottom,m=f.left,y=f.right;if(o>=m&&y>=o&&n>=p&&c>=n)return l}}catch(v){a=!0,s=v}finally{try{!i&&d["return"]&&d["return"]()}finally{if(a)throw s}}},makeQuadrant=function(r,e){var t=r.top,o=r.bottom,n=r.left,i=r.right,a=_slicedToArray(e,2),s=a[0],u=a[1],d=(n+i)/2,l=(t+o)/2;return{box:{top:u?l:t,bottom:u?o:l,left:s?d:n,right:s?i:d}}},subdivide=function(r){var e=r.box;return[makeQuadrant(e,[0,0]),makeQuadrant(e,[1,0]),makeQuadrant(e,[0,1]),makeQuadrant(e,[1,1])]},addBody=function r(e,t){if(e.body){var o=e.body;delete e.body,e.children=subdivide(e),r(e,o),r(e,t)}else if(e.children){var n=locate(t.point,e.children),i=e.point?average(e,t):[t.point,t.mass],a=_slicedToArray(i,2),s=a[0],u=a[1];e.point=s,e.mass=u,r(n,t)}else e.body=t},makeTree=function(r,e){for(var t=!0;t;){var o=r,n=e;if(t=!1,0===o.length)return n;var i=o.shift();addBody(n,i),r=o,e=n,t=!0,i=void 0}},makeBodies=function(r){return(0,_ops.mapObject)(r,function(r,e){return{id:r,point:e,mass:1}})},makeRoot=function(r,e){return{box:{top:e,bottom:0,left:0,right:r}}},walkLeaves=function e(r,t){if(r.body)t(r);else if(r.children){var o=!0,n=!1,i=void 0;try{for(var a,s=r.children[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var u=a.value;e(u,t)}}catch(d){n=!0,i=d}finally{try{!o&&s["return"]&&s["return"]()}finally{if(n)throw i}}}},bodyForceOn=function(r,e,t){var o=(0,_ops.minus)(r.point,e.point),n=(0,_ops.length)(o);return(0,_ops.times)(t*r.mass*e.mass/(n*n*n),o)},boxWidth=function(r){var e=r.top,t=r.bottom,o=r.left,n=r.right;return(0,_ops.length)([e-t,n-o])},forceOn=function t(r,e,o,n){if(e===r)return[0,0];if(e.body)return bodyForceOn(r.body,e.body,o);if(e.point){var i=boxWidth(e.box),a=(0,_ops.length)((0,_ops.minus)(r.body.point,e.point));return n>i/a?bodyForceOn(r.body,e,o):(0,_ops.sumVectors)(e.children.map(function(e){return t(r,e,o,n)}))}return[0,0]},repulsiveForces=function(r,e,t){var o={};return walkLeaves(r,function(n){o[n.body.id]=forceOn(n,r,e,t)}),o};exports.tree=makeTree,exports.bodies=makeBodies,exports.root=makeRoot,exports.forces=repulsiveForces,exports["default"]={tree:makeTree,bodies:makeBodies,root:makeRoot,forces:repulsiveForces};
  },{"./ops":15}],4:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function Beachline(e,t,r,i,n){_binarytree2["default"].call(this,e,t,r,i),this.cEvent=n}Object.defineProperty(exports,"__esModule",{value:!0});var _binarytree=require("./binarytree"),_binarytree2=_interopRequireDefault(_binarytree),_segment=require("./segment"),_segment2=_interopRequireDefault(_segment),_geom=require("./geom"),_geom2=_interopRequireDefault(_geom);Beachline.prototype=Object.create(_binarytree2["default"].prototype),Beachline.prototype.isLeaf=function(){return void 0===this.l},Beachline.prototype.getArcNodeOnSite=function(e){for(var t=this,r=void 0;!t.isLeaf();)r=t.item.pl[1]<t.item.pr[1]?0:1,t=e[0]<_geom2["default"].parabolsCrossX(t.item.pl,t.item.pr,e[1])[r]?t.l:t.r;return t},Beachline.prototype.addArc=function(e,t){var r=t[0],i=t[1],n=t[2],a=i.item,o=[e[0],e[1]-_geom2["default"].distPointToParabol(e,a)],l=new _segment2["default"](a,e,o),d=new _segment2["default"](e,a,o);i.item=l,i.addLChild(new Beachline(a)),i.addRChild(new Beachline(d)),i.r.addLChild(new Beachline(e)),i.r.addRChild(new Beachline(a)),void 0!=r&&void 0!=r.cEvent&&(r.cEvent.arcsNodes[2]=i.l),void 0!=n&&void 0!=n.cEvent&&(n.cEvent.arcsNodes[0]=i.r.r)},Beachline.prototype.rmArc=function(e,t,r){var i=t[0],n=t[1],a=t[2];if(n.isRChild())var o=r[0].l,l=r[0],d=r[1];else var o=r[1].r,l=r[1],d=r[0];d.item=new _segment2["default"](i.item,a.item,e),l.isRChild()?l.parent.r=o:l.parent.l=o,o.parent=l.parent},exports["default"]=Beachline,module.exports=exports["default"];
  },{"./binarytree":6,"./geom":11,"./segment":23}],5:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var r=0,o=Array(e.length);r<e.length;r++)o[r]=e[r];return o}return Array.from(e)}Object.defineProperty(exports,"__esModule",{value:!0});var _path=require("./path"),_path2=_interopRequireDefault(_path),_polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon),_ops=require("./ops"),reflect=function(e,r){return(0,_ops.minus)((0,_ops.times)(2,e),r)};exports["default"]=function(e){var r,o=e.points,t=e.tension;t=t||.3;var u=[],n=o.length;if(2>=n)return(0,_polygon2["default"])({points:o});for(var p=1;n-1>=p;p++)u.push((0,_ops.times)(t,(0,_ops.minus)(o[p],o[p-1])));for(var a=[(0,_ops.plus)(o[0],reflect(u[0],u[1]))],p=1;n-2>=p;p++)a.push((0,_ops.minus)(o[p],(0,_ops.average)([u[p],u[p-1]])));a.push((0,_ops.minus)(o[n-1],reflect(u[n-2],u[n-3])));var s=a[0],i=a[1],_=o[0],l=o[1],f=(r=(0,_path2["default"])()).moveto.apply(r,_toConsumableArray(_)).curveto(s[0],s[1],i[0],i[1],l[0],l[1]);return{path:(0,_ops.range)(2,n).reduce(function(e,r){var t=a[r],u=o[r];return e.smoothcurveto(t[0],t[1],u[0],u[1])},f),centroid:(0,_ops.average)(o)}},module.exports=exports["default"];
  },{"./ops":15,"./path":16,"./polygon":18}],6:[function(require,module,exports){
  "use strict";function BinaryTree(t,r,e,i){this.item=t,this.parent=r,this.l=e,this.r=i}Object.defineProperty(exports,"__esModule",{value:!0}),BinaryTree.prototype.isRoot=function(){return void 0===this.parent},BinaryTree.prototype.isLeaf=function(){return void 0===this.l&&void 0===this.r},BinaryTree.prototype.isLChild=function(){return!this.isRoot()&&this.parent.l===this},BinaryTree.prototype.isRChild=function(){return!this.isRoot()&&this.parent.r===this},BinaryTree.prototype.addLChild=function(t){this.l=t,t.parent=this},BinaryTree.prototype.addRChild=function(t){this.r=t,t.parent=this},BinaryTree.prototype.getLLeafAndLParent=function(t){for(var r=t||this;r.isLChild();)r=r.parent;if(r.isRoot())return[void 0,void 0];var e=r.parent;for(r=r.parent.l;!r.isLeaf();)r=r.r;return[r,e]},BinaryTree.prototype.getRLeafAndRParent=function(t){for(var r=t||this;r.isRChild();)r=r.parent;if(r.isRoot())return[void 0,void 0];var e=r.parent;for(r=r.parent.r;!r.isLeaf();)r=r.l;return[r,e]},exports["default"]=BinaryTree,module.exports=exports["default"];
  },{}],7:[function(require,module,exports){
  "use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{"default":r}}function _toConsumableArray(r){if(Array.isArray(r)){for(var e=0,t=Array(r.length);e<r.length;e++)t[e]=r[e];return t}return Array.from(r)}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,e){var t=[],a=!0,n=!1,o=void 0;try{for(var u,i=r[Symbol.iterator]();!(a=(u=i.next()).done)&&(t.push(u.value),!e||t.length!==e);a=!0);}catch(l){n=!0,o=l}finally{try{!a&&i["return"]&&i["return"]()}finally{if(n)throw o}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_path=require("./path"),_path2=_interopRequireDefault(_path),_ops=require("./ops");exports["default"]=function(r){var e,t,a,n=r.start,o=r.end,u=r.tension;null==u&&(u=.05);var i=_slicedToArray(n,2),l=i[0],p=i[1],s=_slicedToArray(o,2),y=s[0],f=s[1],c=(y-l)*u,_=[l+c,p];return{path:(e=(t=(a=(0,_path2["default"])()).moveto.apply(a,_toConsumableArray(n))).lineto.apply(t,_).curveto(l+5*c,p,y-5*c,f,y-c,f)).lineto.apply(e,_toConsumableArray(o)),centroid:(0,_ops.average)([n,o])}},module.exports=exports["default"];
  },{"./ops":15,"./path":16}],8:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _path=require("./path"),_path2=_interopRequireDefault(_path),_connector=require("./connector"),_connector2=_interopRequireDefault(_connector),_ops=require("./ops");exports["default"]=function(e){var t=e.topleft,o=e.topright,r=e.bottomleft,n=e.bottomright,a=(0,_connector2["default"])({start:t,end:o}).path,u=(0,_connector2["default"])({start:n,end:r}).path,p=a.connect(u).closepath(),c=(0,_ops.average)([t,o,r,n]);return{path:p,centroid:c}},module.exports=exports["default"];
  },{"./connector":7,"./ops":15,"./path":16}],9:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function Event(e,o,t){2==e.length?this.coord=e:(this.arcsNodes=[e[0],e[2],e[4]],this.edgesNodes=[e[1],e[3]],this.vertexCoord=t,this.coord=o),Event.prototype.goToEventIndex=function(e,o){o=o||1e-10;for(var t=0;t<e.length&&this.coord[1]>e[t].coord[1]+o;)t++;return t},Event.prototype.add=function(e){e.splice(this.goToEventIndex(e),0,this)},Event.prototype.rm=function(e){for(var o=this.goToEventIndex(e);o<e.length;){if(o==e.length-1||this.coord[1]!=e[o+1].coord[1]||this.arcsNodes==e[o].arcsNodes&&this.coord[0]===e[o].coord[0]&&this.coord[1]===e[o].coord[1])return e.splice(o,1);o++}console.log("Event does not exist in list")},Event.prototype.toString=function(){return this.edgesNodes?"Circle event. Vertex: "+this.vertexCoord+"; coord:"+this.coord:"Site event. Coord:"+this.coord}}Object.defineProperty(exports,"__esModule",{value:!0});var _geom=require("./geom"),_geom2=_interopRequireDefault(_geom);exports["default"]=Event,module.exports=exports["default"];
  },{"./geom":11}],10:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function Fortune(e){this.sites=e,this.events=[],this.beach=new _beachline2["default"],this.edges=[],this.patches=Object.create(null),this.iterations=0,e.forEach(function(e){this.patches[e]=[],new _event2["default"](e).add(this.events)},this)}Object.defineProperty(exports,"__esModule",{value:!0});var _beachline=require("./beachline"),_beachline2=_interopRequireDefault(_beachline),_geom=require("./geom"),_geom2=_interopRequireDefault(_geom),_event=require("./event"),_event2=_interopRequireDefault(_event);Fortune.prototype.addCircleEvent=function(e,t,i){void 0===e&&(e=1e-10);var r=e.getLLeafAndLParent(),s=r[0],n=r[1],o=e.getRLeafAndRParent(),a=o[0],c=o[1];if(void 0!==s&&void 0!==a&&(s.item[0]!==a.item[0]||s.item[1]!==a.item[1])&&_geom2["default"].doHalflinesCross(n.item,c.item)){var h=_geom2["default"].circumCenter(s.item,e.item,a.item);if(h[1]!=1/0){var d=[h[0],h[1]+_geom2["default"].distPointToPoint(e.item,h)];d[1]<t-i||(e.cEvent=new _event2["default"]([s,n,e,c,a],d,h),e.cEvent.add(this.events))}}},Fortune.prototype.rmCircleEvent=function(e){void 0!==e.cEvent&&(e.cEvent.rm(this.events),e.cEvent=void 0)},Fortune.prototype.manageSiteEvent=function(){var e=this.events.splice(0,1)[0],t=this.beach.getArcNodeOnSite(e.coord),i=t.getLLeafAndLParent()[0],r=t.getRLeafAndRParent()[0];this.rmCircleEvent(t),this.beach.addArc(e.coord,[i,t,r]),this.addCircleEvent(t.l,e.coord[1]),this.addCircleEvent(t.r.r,e.coord[1])},Fortune.prototype.manageCircleEvent=function(){var e=this.events.splice(0,1)[0],t=e.edgesNodes[0].item,i=e.edgesNodes[1].item;t.pe=e.vertexCoord,i.pe=e.vertexCoord,this.edges.push(t),this.edges.push(i),this.beach.rmArc(e.vertexCoord,e.arcsNodes,e.edgesNodes),this.rmCircleEvent(e.arcsNodes[0]),this.rmCircleEvent(e.arcsNodes[2]),this.addCircleEvent(e.arcsNodes[0],e.coord[1]),this.addCircleEvent(e.arcsNodes[2],e.coord[1])},Fortune.prototype.getPoints=function(){return this.sites},Fortune.prototype.getEdges=function(){for(this.beach.item=this.events.splice(0,1)[0].coord,this.iterations+=1;this.events.length>0;)this.events[0].arcsNodes?this.manageCircleEvent():this.manageSiteEvent(),this.iterations+=1;return this.edges},Fortune.prototype.getPatches=function(e,t,i,r,s){function n(e,t){for(var i=0;i<t.length;i++)if(t[i][0]===e[0]&&t[i][1]===e[1])return!0;return!1}function o(e,t,i){for(var r=0;r<i.length;r++)if(Math.atan2(t[1]-e[1],t[0]-e[0])<Math.atan2(i[r][1]-e[1],i[r][0]-e[0]))return void i.splice(r,0,t);i.push(t)}function a(e){n(e.ps,this.patches[e.pl])||o(e.pl,e.ps,this.patches[e.pl]),n(e.ps,this.patches[e.pr])||o(e.pr,e.ps,this.patches[e.pr]),n(e.pe,this.patches[e.pl])||o(e.pl,e.pe,this.patches[e.pl]),n(e.pe,this.patches[e.pr])||o(e.pr,e.pe,this.patches[e.pr])}return this.getEdges().forEach(a,this),this.patches},exports["default"]=Fortune,module.exports=exports["default"];
  },{"./beachline":4,"./event":9,"./geom":11}],11:[function(require,module,exports){
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,t){var e=[],n=!0,o=!1,i=void 0;try{for(var s,a=r[Symbol.iterator]();!(n=(s=a.next()).done)&&(e.push(s.value),!t||e.length!==t);n=!0);}catch(u){o=!0,i=u}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw i}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),sq=function(r){return r*r},distPointToPoint=function(r,t){var e=_slicedToArray(r,2),n=e[0],o=e[1],i=_slicedToArray(t,2),s=i[0],a=i[1];return Math.sqrt(sq(n-s)+sq(o-a))},distPointToParabol=function(r,t){var e=distPointToPoint(r,t);return 0==e?1/0:sq(e)/(2*Math.abs(r[1]-t[1]))},circumCenter=function(r,t,e){var n=(r[0]-e[0])*(t[1]-e[1])-(t[0]-e[0])*(r[1]-e[1]);if(0==n)return[1/0,1/0];var o=(((r[0]-e[0])*(r[0]+e[0])+(r[1]-e[1])*(r[1]+e[1]))/2*(t[1]-e[1])-((t[0]-e[0])*(t[0]+e[0])+(t[1]-e[1])*(t[1]+e[1]))/2*(r[1]-e[1]))/n,i=(((t[0]-e[0])*(t[0]+e[0])+(t[1]-e[1])*(t[1]+e[1]))/2*(r[0]-e[0])-((r[0]-e[0])*(r[0]+e[0])+(r[1]-e[1])*(r[1]+e[1]))/2*(t[0]-e[0]))/n;return[o,i]},parabolsCrossX=function(r,t,e){if(r[1]===t[1])return[(r[0]+t[0])/2,(r[0]+t[0])/2];var n=(r[1]*t[0]-r[0]*t[1]+r[0]*e-t[0]*e+Math.sqrt((r[0]*r[0]+r[1]*r[1]-2*r[0]*t[0]+t[0]*t[0]-2*r[1]*t[1]+t[1]*t[1])*(r[1]*t[1]-r[1]*e-t[1]*e+e*e)))/(r[1]-t[1]),o=(r[1]*t[0]-r[0]*t[1]+r[0]*e-t[0]*e-Math.sqrt((r[0]*r[0]+r[1]*r[1]-2*r[0]*t[0]+t[0]*t[0]-2*r[1]*t[1]+t[1]*t[1])*(r[1]*t[1]-r[1]*e-t[1]*e+e*e)))/(r[1]-t[1]);return o>n?[n,o]:[o,n]},doHalflinesCross=function(r,t){var e=arguments.length<=2||void 0===arguments[2]?1e-10:arguments[2],n=t.ps[0]-r.ps[0],o=t.ps[1]-r.ps[1];if(r.m==1/0)return r.hp*(t.m*n-o)<=e&&t.vec[0]*n<=e;if(t.m==1/0)return t.hp*(r.m*n-o)>=-e&&r.vec[0]*n>=-e;var i=t.vec[0]*r.vec[1]-t.vec[1]*r.vec[0];if(0===i)return!1;var s=(o*t.vec[0]-n*t.vec[1])/i,a=(o*r.vec[0]-n*r.vec[1])/i;return s>=-e&&a>=e||s>=e&&a>=-e};exports["default"]={distPointToPoint:distPointToPoint,distPointToParabol:distPointToParabol,circumCenter:circumCenter,parabolsCrossX:parabolsCrossX,doHalflinesCross:doHalflinesCross},module.exports=exports["default"];
  },{}],12:[function(require,module,exports){
  "use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{"default":r}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,t){var e=[],n=!0,o=!1,a=void 0;try{for(var i,u=r[Symbol.iterator]();!(n=(i=u.next()).done)&&(e.push(i.value),!t||e.length!==t);n=!0);}catch(l){o=!0,a=l}finally{try{!n&&u["return"]&&u["return"]()}finally{if(o)throw a}}return e}return function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return r(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon),_ops=require("./ops"),_barnesHut=require("./barnes-hut"),_barnesHut2=_interopRequireDefault(_barnesHut),randomPosition=function(r,t){return[Math.random()*r,Math.random()*t]},cap=function(r,t){return Math.min(Math.max(t,0),r)},inside=function(r,t){return function(e){var n=_slicedToArray(e,2),o=n[0],a=n[1];return[cap(r,o),cap(t,a)]}},attractiveForces=function(r,t,e){var n={},o=!0,a=!1,i=void 0;try{for(var u,l=Object.keys(r)[Symbol.iterator]();!(o=(u=l.next()).done);o=!0){var s=u.value,c=r[s],f=c.start,d=c.end,y=c.weight,v=t[f],p=t[d],_=(0,_ops.times)(e*y,(0,_ops.minus)(v,p));n[f]||(n[f]=[0,0]),n[d]||(n[d]=[0,0]),n[f]=(0,_ops.minus)(n[f],_),n[d]=(0,_ops.plus)(n[d],_)}}catch(h){a=!0,i=h}finally{try{!o&&l["return"]&&l["return"]()}finally{if(a)throw i}}return n};exports["default"]=function(r){var t=r.data,e=r.nodeaccessor,n=r.linkaccessor,o=r.width,a=r.height,i=r.attraction,u=r.repulsion,l=r.threshold,s=function(r){return r};e||(e=s),n||(n=s),i=i||1,u=u||1,l=l||.5;var c=inside(o,a),f=t.nodes,d=t.links,y=t.constraints;y||(y={});var v={},p={},_=!0,h=!1,b=void 0;try{for(var m,w=f[Symbol.iterator]();!(_=(m=w.next()).done);_=!0){var x=m.value,g=e(x);v[g]=y[g]||randomPosition(o,a),p[g]=x}}catch(k){h=!0,b=k}finally{try{!_&&w["return"]&&w["return"]()}finally{if(h)throw b}}var H={},j=!0,q=!1,M=void 0;try{for(var O,S=d[Symbol.iterator]();!(j=(O=S.next()).done);j=!0){var A=O.value,D=n(A),P=D.start,R=D.end,T=D.weight;H[P+"|"+R]={weight:T,start:P,end:R,link:A}}}catch(k){q=!0,M=k}finally{try{!j&&S["return"]&&S["return"]()}finally{if(q)throw M}}var F=function(){var r=_barnesHut2["default"].bodies(v),t=_barnesHut2["default"].root(o,a),e=_barnesHut2["default"].tree(r,t),n=attractiveForces(H,v,i/1e3),s=_barnesHut2["default"].forces(e,1e3*u,l),f=!0,d=!1,p=void 0;try{for(var _,h=Object.keys(v)[Symbol.iterator]();!(f=(_=h.next()).done);f=!0){var b=_.value,m=v[b];if(y[b])v[b]=y[b];else{var w=n[b]||[0,0],x=s[b]||[0,0],g=(0,_ops.plus)(w,x);v[b]=c((0,_ops.plus)(m,g))}}}catch(k){d=!0,p=k}finally{try{!f&&h["return"]&&h["return"]()}finally{if(d)throw p}}return B()},E=function(r,t){y[r]=t},I=function(r){delete y[r]},z={tick:F,constrain:E,unconstrain:I},B=function(){var r=-1;return z.curves=(0,_ops.mapObject)(H,function(t,e){var n=e.start,o=e.end,a=e.link;r+=1;var i=v[n],u=v[o];return{link:(0,_polygon2["default"])({points:[i,u],closed:!1}),item:a,index:r}}),z.nodes=(0,_ops.mapObject)(p,function(r,t){return{point:v[r],item:t}}),z};return B()},module.exports=exports["default"];
  },{"./barnes-hut":3,"./ops":15,"./polygon":18}],13:[function(require,module,exports){
  "use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{"default":r}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,n){var e=[],t=!0,i=!1,a=void 0;try{for(var o,u=r[Symbol.iterator]();!(t=(o=u.next()).done)&&(e.push(o.value),!n||e.length!==n);t=!0);}catch(l){i=!0,a=l}finally{try{!t&&u["return"]&&u["return"]()}finally{if(i)throw a}}return e}return function(n,e){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return r(n,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_ops=require("./ops"),epsilon=1e-5,box=function(r,n,e){var t=r.map(n),i=e?t.sort(function(r,n){var e=_slicedToArray(r,2),t=e[0],i=(e[1],_slicedToArray(n,2)),a=i[0];i[1];return t-a}):t,a=i.length,o=i[0][0],u=i[a-1][0],l=(0,_ops.minBy)(i,function(r){return r[1]}),s=(0,_ops.maxBy)(i,function(r){return r[1]});return o==u&&(u+=epsilon),l==s&&(s+=epsilon),{points:i,xmin:o,xmax:u,ymin:l,ymax:s}};exports["default"]=function(r){var n=r.data,e=r.xaccessor,t=r.yaccessor,i=r.width,a=r.height,o=r.closed,u=r.min,l=r.max,s=r.sort,c=void 0===s?!0:s;e||(e=function(r){var n=_slicedToArray(r,2),e=n[0];n[1];return e}),t||(t=function(r){var n=_slicedToArray(r,2),e=(n[0],n[1]);return e});var f=function(r){return[e(r),t(r)]},y=n.map(function(r){return box(r,f,c)}),d=(0,_ops.minBy)(y,function(r){return r.xmin}),m=(0,_ops.maxBy)(y,function(r){return r.xmax}),p=null==u?(0,_ops.minBy)(y,function(r){return r.ymin}):u,_=null==l?(0,_ops.maxBy)(y,function(r){return r.ymax}):l;o&&(p=Math.min(p,0),_=Math.max(_,0));var x=o?0:p,v=(0,_linear2["default"])([d,m],[0,i]),h=(0,_linear2["default"])([p,_],[a,0]),b=function(r){var n=_slicedToArray(r,2),e=n[0],t=n[1];return[v(e),h(t)]};return{arranged:y,scale:b,xscale:v,yscale:h,base:x}},module.exports=exports["default"];
  },{"./linear":14,"./ops":15}],14:[function(require,module,exports){
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,e){var t=[],n=!0,o=!1,i=void 0;try{for(var u,a=r[Symbol.iterator]();!(n=(u=a.next()).done)&&(t.push(u.value),!e||t.length!==e);n=!0);}catch(l){o=!0,i=l}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw i}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),linear=function r(e,t){var n=_slicedToArray(e,2),o=n[0],i=n[1],u=_slicedToArray(t,2),a=u[0],l=u[1],c=function(r){return a+(l-a)*(r-o)/(i-o)};return c.inverse=function(){return r([a,l],[o,i])},c};exports["default"]=linear,module.exports=exports["default"];
  },{}],15:[function(require,module,exports){
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,e){var n=[],t=!0,u=!1,i=void 0;try{for(var a,o=r[Symbol.iterator]();!(t=(a=o.next()).done)&&(n.push(a.value),!e||n.length!==e);t=!0);}catch(s){u=!0,i=s}finally{try{!t&&o["return"]&&o["return"]()}finally{if(u)throw i}}return n}return function(e,n){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),sum=function(r){return r.reduce(function(r,e){return r+e},0)},min=function(r){return r.reduce(function(r,e){return Math.min(r,e)})},max=function(r){return r.reduce(function(r,e){return Math.max(r,e)})},sumBy=function(r,e){return r.reduce(function(r,n){return r+e(n)},0)},minBy=function(r,e){return r.reduce(function(r,n){return Math.min(r,e(n))},1/0)},maxBy=function(r,e){return r.reduce(function(r,n){return Math.max(r,e(n))},-(1/0))},plus=function(r,e){var n=_slicedToArray(r,2),t=n[0],u=n[1],i=_slicedToArray(e,2),a=i[0],o=i[1];return[t+a,u+o]},minus=function(r,e){var n=_slicedToArray(r,2),t=n[0],u=n[1],i=_slicedToArray(e,2),a=i[0],o=i[1];return[t-a,u-o]},times=function(r,e){var n=_slicedToArray(e,2),t=n[0],u=n[1];return[r*t,r*u]},length=function(r){var e=_slicedToArray(r,2),n=e[0],t=e[1];return Math.sqrt(n*n+t*t)},sumVectors=function(r){return r.reduce(plus,[0,0])},average=function(r){return times(1/r.length,r.reduce(plus))},onCircle=function(r,e){return times(r,[Math.sin(e),-Math.cos(e)])},enhance=function(r,e){var n=r||{};for(var t in n){var u=n[t];e[t]=u(e.index,e.item,e.group)}return e},range=function(r,e,n){for(var t=[],u=r;e>u;u++)t.push(u);return n&&t.push(e),t},mapObject=function(r,e){var n=[],t=!0,u=!1,i=void 0;try{for(var a,o=Object.keys(r)[Symbol.iterator]();!(t=(a=o.next()).done);t=!0){var s=a.value,c=r[s];n.push(e(s,c))}}catch(m){u=!0,i=m}finally{try{!t&&o["return"]&&o["return"]()}finally{if(u)throw i}}return n},pairs=function(r){return mapObject(r,function(r,e){return[r,e]})},id=function(r){return r};exports.sum=sum,exports.min=min,exports.max=max,exports.sumBy=sumBy,exports.minBy=minBy,exports.maxBy=maxBy,exports.plus=plus,exports.minus=minus,exports.times=times,exports.id=id,exports.length=length,exports.sumVectors=sumVectors,exports.average=average,exports.onCircle=onCircle,exports.enhance=enhance,exports.range=range,exports.mapObject=mapObject,exports.pairs=pairs,exports["default"]={sum:sum,min:min,max:max,sumBy:sumBy,minBy:minBy,maxBy:maxBy,plus:plus,minus:minus,times:times,id:id,length:length,sumVectors:sumVectors,average:average,onCircle:onCircle,enhance:enhance,range:range,mapObject:mapObject,pairs:pairs};
  },{}],16:[function(require,module,exports){
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,n){var t=[],e=!0,o=!1,a=void 0;try{for(var u,c=r[Symbol.iterator]();!(e=(u=c.next()).done)&&(t.push(u.value),!n||t.length!==n);e=!0);}catch(i){o=!0,a=i}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw a}}return t}return function(n,t){if(Array.isArray(n))return n;if(Symbol.iterator in Object(n))return r(n,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),Path=function r(n){var t=n||[],e=function(r,n){var t=r.slice(0,r.length);return t.push(n),t},o=function(r,n){var t=_slicedToArray(r,2),e=t[0],o=t[1],a=_slicedToArray(n,2),u=a[0],c=a[1];return e===u&&o===c},a=function(r,n){for(var t=r.length;"0"===r.charAt(t-1);)t-=1;return"."===r.charAt(t-1)&&(t-=1),r.substr(0,t)},u=function(r,n){var t=r.toFixed(n);return a(t)},c=function(r){var n=r.command,t=r.params,e=t.map(function(r){return u(r,6)});return n+" "+e.join(" ")},i=function(r,n){var t=r.command,e=r.params,o=_slicedToArray(n,2),a=o[0],u=o[1];switch(t){case"M":return[e[0],e[1]];case"L":return[e[0],e[1]];case"H":return[e[0],u];case"V":return[a,e[0]];case"Z":return null;case"C":return[e[4],e[5]];case"S":return[e[2],e[3]];case"Q":return[e[2],e[3]];case"T":return[e[0],e[1]];case"A":return[e[5],e[6]]}},s=function(r,n){return function(t){var e="object"==typeof t?r.map(function(r){return t[r]}):arguments;return n.apply(null,e)}},m=function(n){return r(e(t,n))};return{moveto:s(["x","y"],function(r,n){return m({command:"M",params:[r,n]})}),lineto:s(["x","y"],function(r,n){return m({command:"L",params:[r,n]})}),hlineto:s(["x"],function(r){return m({command:"H",params:[r]})}),vlineto:s(["y"],function(r){return m({command:"V",params:[r]})}),closepath:function(){return m({command:"Z",params:[]})},curveto:s(["x1","y1","x2","y2","x","y"],function(r,n,t,e,o,a){return m({command:"C",params:[r,n,t,e,o,a]})}),smoothcurveto:s(["x2","y2","x","y"],function(r,n,t,e){return m({command:"S",params:[r,n,t,e]})}),qcurveto:s(["x1","y1","x","y"],function(r,n,t,e){return m({command:"Q",params:[r,n,t,e]})}),smoothqcurveto:s(["x","y"],function(r,n){return m({command:"T",params:[r,n]})}),arc:s(["rx","ry","xrot","largeArcFlag","sweepFlag","x","y"],function(r,n,t,e,o,a,u){return m({command:"A",params:[r,n,t,e,o,a,u]})}),print:function(){return t.map(c).join(" ")},toString:function(){return(void 0).print()},points:function(){var r=[],n=[0,0],e=!0,o=!1,a=void 0;try{for(var u,c=t[Symbol.iterator]();!(e=(u=c.next()).done);e=!0){var s=u.value,m=i(s,n);n=m,m&&r.push(m)}}catch(f){o=!0,a=f}finally{try{!e&&c["return"]&&c["return"]()}finally{if(o)throw a}}return r},instructions:function(){return t.slice(0,t.length)},connect:function(n){var t=this.points(),e=t[t.length-1],a=n.points()[0],u=n.instructions().slice(1);return o(e,a)||u.unshift({command:"L",params:a}),r(this.instructions().concat(u))}}};exports["default"]=function(){return Path()},module.exports=exports["default"];
  },{}],17:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],n=!0,o=!1,a=void 0;try{for(var i,u=e[Symbol.iterator]();!(n=(i=u.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(l){o=!0,a=l}finally{try{!n&&u["return"]&&u["return"]()}finally{if(o)throw a}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_sector=require("./sector"),_sector2=_interopRequireDefault(_sector),_ops=require("./ops");exports["default"]=function(e){var r=e.data,t=e.accessor,n=e.center,o=e.r,a=e.R,i=e.compute,u=r.map(t),l=(0,_ops.sum)(u),s=(0,_linear2["default"])([0,l],[0,2*Math.PI]),c=[],f=0,d=!0,_=!1,p=void 0;try{for(var y,v=r.entries()[Symbol.iterator]();!(d=(y=v.next()).done);d=!0){var h=_slicedToArray(y.value,2),m=h[0],x=h[1],b=u[m];c.push((0,_ops.enhance)(i,{item:x,index:m,sector:(0,_sector2["default"])({center:n,r:o,R:a,start:s(f),end:s(f+b)})})),f+=b}}catch(q){_=!0,p=q}finally{try{!d&&v["return"]&&v["return"]()}finally{if(_)throw p}}return{curves:c}},module.exports=exports["default"];
  },{"./linear":14,"./ops":15,"./sector":22}],18:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var r=0,t=Array(e.length);r<e.length;r++)t[r]=e[r];return t}return Array.from(e)}Object.defineProperty(exports,"__esModule",{value:!0});var _path=require("./path"),_path2=_interopRequireDefault(_path),_ops=require("./ops");exports["default"]=function(e){var r,t=e.points,o=e.closed,a=t.length,u=t[0],n=t.slice(1,a+1),l=n.reduce(function(e,r){return e.lineto.apply(e,_toConsumableArray(r))},(r=(0,_path2["default"])()).moveto.apply(r,_toConsumableArray(u)));return{path:o?l.closepath():l,centroid:(0,_ops.average)(t)}},module.exports=exports["default"];
  },{"./ops":15,"./path":16}],19:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _semiRegularPolygon=require("./semi-regular-polygon"),_semiRegularPolygon2=_interopRequireDefault(_semiRegularPolygon),_ops=require("./ops"),collectKeys=function(e){var r=[],t=(e.map(Object.keys),!0),n=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var i=a.value,l=!0,c=!1,s=void 0;try{for(var f,y=Object.keys(i)[Symbol.iterator]();!(l=(f=y.next()).done);l=!0){var p=f.value;-1==r.indexOf(p)&&r.push(p)}}catch(v){c=!0,s=v}finally{try{!l&&y["return"]&&y["return"]()}finally{if(c)throw s}}}}catch(v){n=!0,o=v}finally{try{!t&&u["return"]&&u["return"]()}finally{if(n)throw o}}return r},keyAccessor=function(e){var r={},t=!0,n=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(t=(a=u.next()).done);t=!0){var i=a.value;!function(e){r[e]=function(r){return r[e]}}(i)}}catch(l){n=!0,o=l}finally{try{!t&&u["return"]&&u["return"]()}finally{if(n)throw o}}return r},globalMax=function(e,r){var t=Object.keys(r),n=e.map(function(e){return(0,_ops.maxBy)(t,function(t){return r[t](e)})});return(0,_ops.max)(n)};exports["default"]=function(e){var r=e.data,t=e.accessor,n=e.center,o=e.r,a=e.max,u=e.rings,i=void 0===u?3:u,l=e.compute,c=void 0===l?{}:l;t||(t=keyAccessor(collectKeys(r)));var s=Object.keys(t),f=s.length,y=(2*Math.PI/f,-1);null==a&&(a=globalMax(r,t));var p=(0,_ops.range)(1,i,!0).map(function(e){var r=o*e/i;return(0,_semiRegularPolygon2["default"])({center:n,radii:(0,_ops.range)(0,f).map(function(e){return r})})}),v=r.map(function(e){return y+=1,(0,_ops.enhance)(c,{polygon:(0,_semiRegularPolygon2["default"])({center:n,radii:s.map(function(r){return o*t[r](e)/a})}),item:e,index:y})});return{curves:v,rings:p}},module.exports=exports["default"];
  },{"./ops":15,"./semi-regular-polygon":24}],20:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon);exports["default"]=function(e){var o=e.left,t=e.right,r=e.top,u=e.bottom;return(0,_polygon2["default"])({points:[[t,r],[t,u],[o,u],[o,r]],closed:!0})},module.exports=exports["default"];
  },{"./polygon":18}],21:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],n=!0,u=!1,o=void 0;try{for(var a,c=e[Symbol.iterator]();!(n=(a=c.next()).done)&&(t.push(a.value),!r||t.length!==r);n=!0);}catch(i){u=!0,o=i}finally{try{!n&&c["return"]&&c["return"]()}finally{if(u)throw o}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_rectangle=require("./rectangle"),_rectangle2=_interopRequireDefault(_rectangle),_curvedRectangle=require("./curved-rectangle"),_curvedRectangle2=_interopRequireDefault(_curvedRectangle),_ops=require("./ops");exports["default"]=function(e){var r=e.data,t=e.nodeaccessor,n=e.linkaccessor,u=e.width,o=e.height,a=e.gutter,c=e.rectWidth,i=e.compute,l=function(e){return e};t||(t=l),n||(n=l),a=a||10,c=c||10;var s=r.links.map(n),f=r.nodes.map(function(e){return e.map(t)}),d=(u-c)/(r.nodes.length-1),p={};f.reduce(function(e,r){return e.concat(r)}).forEach(function(e){p[e]={value:0,currentlyUsedIn:0,currentlyUsedOut:0}});var v=!0,y=!1,h=void 0;try{for(var g,_=function(){var e=_slicedToArray(g.value,2),r=e[0],t=e[1],n=(0,_ops.sumBy)(s.filter(function(e){return e.end===r}),function(e){return e.weight}),u=(0,_ops.sumBy)(s.filter(function(e){return e.start===r}),function(e){return e.weight});t.value=Math.max(n,u)},m=(0,_ops.pairs)(p)[Symbol.iterator]();!(v=(g=m.next()).done);v=!0)_()}catch(b){y=!0,h=b}finally{try{!v&&m["return"]&&m["return"]()}finally{if(y)throw h}}var x=f.map(function(e){return(0,_ops.sumBy)(e,function(e){return p[e].value})}),w=f.map(function(e){return o-(e.length-1)*a}),R=(0,_ops.min)(x.map(function(e,r){return w[r]/e})),q=!0,U=!1,A=void 0;try{for(var O,B=(0,_ops.pairs)(p)[Symbol.iterator]();!(q=(O=B.next()).done);q=!0){var E=_slicedToArray(O.value,2),I=(E[0],E[1]);I.scaledValue=R*I.value}}catch(b){U=!0,A=b}finally{try{!q&&B["return"]&&B["return"]()}finally{if(U)throw A}}var S=[],T=-1;f.forEach(function(e,t){var n=(0,_ops.sumBy)(e,function(e){return p[e].scaledValue})+(e.length-1)*a,u=(o-n)/2,l=u-a;e.forEach(function(e,n){var u=l+a,o=u+p[e].scaledValue;l=o;var s={top:u,bottom:o,left:c/2+t*d-c/2,right:c/2+t*d+c/2};p[e].rectangleCoords=s,T+=1,S.push((0,_ops.enhance)(i,{curve:(0,_rectangle2["default"])(s),item:r.nodes[t][n],index:T,group:t}))})});var k=s.map(function(e,t){var n=p[e.start],u=p[e.end],o=n.rectangleCoords,a=u.rectangleCoords,c=e.weight*R,l=o.top+n.currentlyUsedOut,s=a.top+u.currentlyUsedIn,f={topleft:[o.right,l],topright:[a.left,s],bottomleft:[o.right,l+c],bottomright:[a.left,s+c]};return n.currentlyUsedOut+=c,u.currentlyUsedIn+=c,(0,_ops.enhance)(i,{curve:(0,_curvedRectangle2["default"])(f),item:r.links[t],index:t})});return{curvedRectangles:k,rectangles:S}},module.exports=exports["default"];
  },{"./curved-rectangle":8,"./ops":15,"./rectangle":20}],22:[function(require,module,exports){
  "use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{"default":r}}function _toConsumableArray(r){if(Array.isArray(r)){for(var e=0,o=Array(r.length);e<r.length;e++)o[e]=r[e];return o}return Array.from(r)}Object.defineProperty(exports,"__esModule",{value:!0});var _path=require("./path"),_path2=_interopRequireDefault(_path),_ops=require("./ops");exports["default"]=function(r){var e,o,t,a,p=r.center,l=r.r,s=r.R,u=r.start,n=r.end,_=(0,_ops.plus)(p,(0,_ops.onCircle)(s,u)),i=(0,_ops.plus)(p,(0,_ops.onCircle)(s,n)),c=(0,_ops.plus)(p,(0,_ops.onCircle)(l,n)),y=(0,_ops.plus)(p,(0,_ops.onCircle)(l,u)),f=n-u>Math.PI?1:0,d=(e=(o=(t=(a=(0,_path2["default"])()).moveto.apply(a,_toConsumableArray(_))).arc.apply(t,[s,s,0,f,1].concat(_toConsumableArray(i)))).lineto.apply(o,_toConsumableArray(c))).arc.apply(e,[l,l,0,f,0].concat(_toConsumableArray(y))).closepath(),h=(u+n)/2,C=(l+s)/2,A=(0,_ops.plus)(p,(0,_ops.onCircle)(C,h));return{path:d,centroid:A}},module.exports=exports["default"];
  },{"./ops":15,"./path":16}],23:[function(require,module,exports){
  "use strict";function Segment(t,s,h,i){this.pl=t,this.pr=s,this.ps=h,this.pe=i,this.m=this.pl[1]===this.pr[1]?1/0:-(this.pl[0]-this.pr[0])/(this.pl[1]-this.pr[1]),this.hp=this.pl[0]<this.pr[0]||this.pl[0]===this.pr[0]&&this.pl[1]>this.pr[1]?1:-1,this.vec=this.hp*this.m>0||0===this.m&&this.hp>0?[1,this.m]:[-1,-this.m]}Object.defineProperty(exports,"__esModule",{value:!0}),exports["default"]=Segment,module.exports=exports["default"];
  },{}],24:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon),_ops=require("./ops");exports["default"]=function(e){var o=e.center,r=e.radii,t=2*Math.PI/r.length,u=r.map(function(e,r){return(0,_ops.plus)(o,(0,_ops.onCircle)(e,r*t))});return(0,_polygon2["default"])({points:u,closed:!0})},module.exports=exports["default"];
  },{"./ops":15,"./polygon":18}],25:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function _toConsumableArray(e){if(Array.isArray(e)){for(var r=0,a=Array(e.length);r<e.length;r++)a[r]=e[r];return a}return Array.from(e)}Object.defineProperty(exports,"__esModule",{value:!0});var _bezier=require("./bezier"),_bezier2=_interopRequireDefault(_bezier),_lineChartComp=require("./line-chart-comp"),_lineChartComp2=_interopRequireDefault(_lineChartComp),_ops=require("./ops");exports["default"]=function(e){var r=(0,_lineChartComp2["default"])(e),a=r.arranged,t=r.scale,o=r.xscale,n=r.yscale,i=r.base,l=-1,u=a.map(function(r){var a,o,n=r.points,u=r.xmin,p=r.xmax,s=n.map(t);l+=1;var _=(0,_bezier2["default"])({points:s}),c={path:(a=(o=_.path).lineto.apply(o,_toConsumableArray(t([p,i])))).lineto.apply(a,_toConsumableArray(t([u,i]))).closepath(),centroid:(0,_ops.average)([_.centroid,t([u,i]),t([p,i])])};return(0,_ops.enhance)(e.compute,{item:e.data[l],line:_,area:c,index:l})});return{curves:u,xscale:o,yscale:n}},module.exports=exports["default"];
  },{"./bezier":5,"./line-chart-comp":13,"./ops":15}],26:[function(require,module,exports){
  "use strict";function _interopRequireDefault(r){return r&&r.__esModule?r:{"default":r}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function r(r,e){var t=[],n=!0,a=!1,i=void 0;try{for(var l,o=r[Symbol.iterator]();!(n=(l=o.next()).done)&&(t.push(l.value),!e||t.length!==e);n=!0);}catch(u){a=!0,i=u}finally{try{!n&&o["return"]&&o["return"]()}finally{if(a)throw i}}return t}return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return r(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_rectangle=require("./rectangle"),_rectangle2=_interopRequireDefault(_rectangle),_ops=require("./ops");exports["default"]=function(r){var e=r.data,t=r.accessor,n=void 0===t?_ops.id:t,a=r.width,i=r.height,l=r.min,o=r.max,u=r.gutter,f=void 0===u?10:u,c=r.compute,y=[],d=!1,s=!1;null==l&&(l=0,d=!0),null==o&&(o=0,s=!0);var v=!0,_=!1,h=void 0;try{for(var p,m=e.entries()[Symbol.iterator]();!(v=(p=m.next()).done);v=!0){var g=_slicedToArray(p.value,2),x=g[0],b=g[1],w=!0,A=!1,q=void 0;try{for(var S,T=b.entries()[Symbol.iterator]();!(w=(S=T.next()).done);w=!0){var D=_slicedToArray(S.value,2),R=D[0],j=D[1];null==y[R]&&(y[R]=[]);var M=0===x?0:y[R][x-1],O=n(j)+M;d&&l>O&&(l=O),s&&O>o&&(o=O),y[R][x]=O}}catch(E){A=!0,q=E}finally{try{!w&&T["return"]&&T["return"]()}finally{if(A)throw q}}}}catch(E){_=!0,h=E}finally{try{!v&&m["return"]&&m["return"]()}finally{if(_)throw h}}var I=e[0].length,P=(0,_linear2["default"])([l,o],[i,0]),k=(a-(I-1)*f)/I,z=[],B=!0,C=!1,F=void 0;try{for(var G,H=e.entries()[Symbol.iterator]();!(B=(G=H.next()).done);B=!0){var J=_slicedToArray(G.value,2),x=J[0],b=J[1],K=!0,L=!1,N=void 0;try{for(var Q,U=b.entries()[Symbol.iterator]();!(K=(Q=U.next()).done);K=!0){var V=_slicedToArray(Q.value,2),R=V[0],j=V[1],W={line:(0,_rectangle2["default"])({top:P(y[R][x]),bottom:P(0===x?0:y[R][x-1]),left:R*(k+f),right:R*(k+f)+k}),index:R,group:x,item:j};z.push((0,_ops.enhance)(c,W))}}catch(E){L=!0,N=E}finally{try{!K&&U["return"]&&U["return"]()}finally{if(L)throw N}}}}catch(E){C=!0,F=E}finally{try{!B&&H["return"]&&H["return"]()}finally{if(C)throw F}}return{curves:z,scale:P}},module.exports=exports["default"];
  },{"./linear":14,"./ops":15,"./rectangle":20}],27:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon),_lineChartComp=require("./line-chart-comp"),_lineChartComp2=_interopRequireDefault(_lineChartComp),_ops=require("./ops");exports["default"]=function(e){var o=(0,_lineChartComp2["default"])(e),r=o.arranged,t=o.scale,a=o.xscale,n=o.yscale,l=o.base,p=-1,u=r.map(function(o){var r=o.points,a=o.xmin,n=o.xmax,u=r.map(t);r.push([n,l]),r.push([a,l]);var i=r.map(t);return p+=1,(0,_ops.enhance)(e.compute,{item:e.data[p],line:(0,_polygon2["default"])({points:u,closed:!1}),area:(0,_polygon2["default"])({points:i,closed:!0}),index:p})});return{curves:u,xscale:a,yscale:n}},module.exports=exports["default"];
  },{"./line-chart-comp":13,"./ops":15,"./polygon":18}],28:[function(require,module,exports){
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var maxBy=function(e,t){return void 0===e&&(e=[]),e.reduce(function(e,r){return Math.max(e,t(r))},0)},treeHeight=function e(t){return 1+maxBy(t.children,e)},buildTree=function t(e,r){var n=arguments.length<=2||void 0===arguments[2]?0:arguments[2],i={item:e,level:n},u=r(e);return u&&u.length&&(i.children=u.map(function(e){return t(e,r,n+1)})),i},setHeight=function r(e){var t=arguments.length<=1||void 0===arguments[1]?0:arguments[1],n=arguments.length<=2||void 0===arguments[2]?[]:arguments[2];null!=n[t]?(e.height=n[t]+1,n[t]+=1):(n[t]=0,e.height=0);var i=!0,u=!1,a=void 0;try{for(var l,o=(e.children||[])[Symbol.iterator]();!(i=(l=o.next()).done);i=!0){var c=l.value;r(c,t+1,n)}}catch(h){u=!0,a=h}finally{try{!i&&o["return"]&&o["return"]()}finally{if(u)throw a}}return n},collect=function n(e,t){var r=[],i=!0,u=!1,a=void 0;try{for(var l,o=(e.children||[])[Symbol.iterator]();!(i=(l=o.next()).done);i=!0){var c=l.value;r.push(t(e,c)),r=r.concat(n(c,t))}}catch(h){u=!0,a=h}finally{try{!i&&o["return"]&&o["return"]()}finally{if(u)throw a}}return r};exports.treeHeight=treeHeight,exports.buildTree=buildTree,exports.setHeight=setHeight,exports.collect=collect;
  },{}],29:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _connector=require("./connector"),_connector2=_interopRequireDefault(_connector),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_ops=require("./ops"),_treeUtils=require("./tree-utils");exports["default"]=function(e){var t=e.data,r=e.width,n=e.height,i=e.children,o=e.tension;i||(i=function(e){return e.children});var u=(0,_treeUtils.buildTree)(t,i),l=(0,_treeUtils.treeHeight)(u),c=(0,_treeUtils.setHeight)(u),a=(0,_linear2["default"])([0,l-1],[0,r]),s=(0,_ops.range)(0,l).map(function(e){var t=Math.sqrt(e/(l-1))*n,r=(n-t)/2,i=r+t,o=e>0?c[e]+c[e-1]:c[e];return 0===o?function(e){return n/2}:(0,_linear2["default"])([0,o],[r,i])}),_=function(e){var t=e.level,r=s[t];return[a(t),r(e.height_)]},d=-1,f=(0,_treeUtils.collect)(u,function(e,t){return d+=1,t.height_=t.height+e.height,{connector:(0,_connector2["default"])({start:_(e),end:_(t),tension:o}),index:d,item:{start:e.item,end:t.item}}}),h=(0,_treeUtils.collect)(u,function(e,t){return{point:_(t),item:t.item}}),p={point:_(u),item:u.item};return{curves:f,nodes:[p].concat(h)}},module.exports=exports["default"];
  },{"./connector":7,"./linear":14,"./ops":15,"./tree-utils":28}],30:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}function Voronoi(e){var r=e.data,t=e.accessor,n=e.width,o=e.height,u=e.xrange,i=e.yrange,a=e.compute;"function"!=typeof t&&(t=function(e){return e}),u=u||[-1,1],i=i||[-1,1];var l=r.map(t),f=function(e){return e*e},c=(u[0]+u[1])/2,s=(i[0]+i[1])/2,p=Math.sqrt(f(u[0]-u[1])+f(i[0]-i[1])),_=(0,_linear2["default"])(u,[0,n]),d=(0,_linear2["default"])(i,[o,0]),y=10,h=[[y*(u[0]-p),y*s],[y*(u[1]+p),y*s],[y*c,y*(i[0]-p)],[y*c,y*(i[1]+p)]],v=h.concat(l),g=new _fortune2["default"](v),m=g.getPatches(),q=[],x=[];return l.forEach(function(e,t){var n=m[e].map(function(e){var r=_slicedToArray(e,2),t=r[0],n=r[1];return[_(t),d(n)]});q.push({point:[_(e[0]),d(e[1])],item:r[t]}),x.push((0,_ops.enhance)(a,{line:(0,_polygon2["default"])({points:n,closed:!0}),index:t,item:r[t]}))}),{curves:x,nodes:q,xscale:_,yscale:d}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],n=!0,o=!1,u=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(t.push(i.value),!r||t.length!==r);n=!0);}catch(l){o=!0,u=l}finally{try{!n&&a["return"]&&a["return"]()}finally{if(o)throw u}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();exports["default"]=Voronoi;var _polygon=require("./polygon"),_polygon2=_interopRequireDefault(_polygon),_fortune=require("./fortune"),_fortune2=_interopRequireDefault(_fortune),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_ops=require("./ops");module.exports=exports["default"];
  },{"./fortune":10,"./linear":14,"./ops":15,"./polygon":18}],31:[function(require,module,exports){
  "use strict";function _interopRequireDefault(e){return e&&e.__esModule?e:{"default":e}}Object.defineProperty(exports,"__esModule",{value:!0});var _slicedToArray=function(){function e(e,r){var t=[],a=!0,n=!1,i=void 0;try{for(var l,o=e[Symbol.iterator]();!(a=(l=o.next()).done)&&(t.push(l.value),!r||t.length!==r);a=!0);}catch(u){n=!0,i=u}finally{try{!a&&o["return"]&&o["return"]()}finally{if(n)throw i}}return t}return function(r,t){if(Array.isArray(r))return r;if(Symbol.iterator in Object(r))return e(r,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_linear=require("./linear"),_linear2=_interopRequireDefault(_linear),_rectangle=require("./rectangle"),_rectangle2=_interopRequireDefault(_rectangle),_ops=require("./ops");exports["default"]=function(e){var r=e.data,t=e.accessor,a=e.width,n=e.height,i=e.gutter,l=void 0===i?10:i,o=e.compute,u=e.min,c=void 0===u?0:u,f=e.max,d=void 0===f?0:f;t||(t=function(e){return e});var s=0,v=[],h=!0,y=!1,_=void 0;try{for(var p,m=r[Symbol.iterator]();!(h=(p=m.next()).done);h=!0){var g=p.value,x=t(g),b=x.value,w=x.absolute,q=w?[0,b||s]:[s,s+b],M=_slicedToArray(q,2),A=M[0],S=M[1],T=Math.min(A,S),D=Math.max(A,S);c=Math.min(c,T),d=Math.max(d,D),s=S,v.push({item:g,low:A,high:S,value:null!=b?b:S})}}catch(R){y=!0,_=R}finally{try{!h&&m["return"]&&m["return"]()}finally{if(y)throw _}}var j=v.length,O=(a-l*(j-1))/j,E=[],I=(0,_linear2["default"])([c,d],[n,0]),P=!0,k=!1,z=void 0;try{for(var B,C=v.entries()[Symbol.iterator]();!(P=(B=C.next()).done);P=!0){var F=_slicedToArray(B.value,2),G=F[0],g=F[1],H=G*(O+l),J=H+O,K=I(g.low),L=I(g.high),N=(0,_rectangle2["default"])({left:H,right:J,bottom:K,top:L});E.push((0,_ops.enhance)(o,{item:g.item,line:N,value:g.value,index:G}))}}catch(R){k=!0,z=R}finally{try{!P&&C["return"]&&C["return"]()}finally{if(k)throw z}}return{curves:E,scale:I}},module.exports=exports["default"];
  },{"./linear":14,"./ops":15,"./rectangle":20}]},{},[1])
  
  
  //# sourceMappingURL=dist/global/paths.js.map