force-graph 1.47.2 → 1.47.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- // Version 1.47.2 force-graph - https://github.com/vasturiano/force-graph
1
+ // Version 1.47.4 force-graph - https://github.com/vasturiano/force-graph
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
5
5
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.ForceGraph = factory());
6
6
  })(this, (function () { 'use strict';
7
7
 
8
- function styleInject(css, ref) {
9
- if ( ref === void 0 ) ref = {};
8
+ function styleInject$1(css, ref) {
9
+ if ( ref === undefined ) ref = {};
10
10
  var insertAt = ref.insertAt;
11
11
 
12
12
  if (typeof document === 'undefined') { return; }
@@ -32,19 +32,19 @@
32
32
  }
33
33
  }
34
34
 
35
- var css_248z = ".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .graph-tooltip {\n position: absolute;\n top: 0;\n font-family: sans-serif;\n font-size: 16px;\n padding: 4px;\n border-radius: 3px;\n color: #eee;\n background: rgba(0,0,0,0.65);\n visibility: hidden; /* by default */\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n";
36
- styleInject(css_248z);
35
+ var css_248z$1 = ".force-graph-container canvas {\n display: block;\n user-select: none;\n outline: none;\n -webkit-tap-highlight-color: transparent;\n}\n\n.force-graph-container .clickable {\n cursor: pointer;\n}\n\n.force-graph-container .grabbable {\n cursor: move;\n cursor: grab;\n cursor: -moz-grab;\n cursor: -webkit-grab;\n}\n\n.force-graph-container .grabbable:active {\n cursor: grabbing;\n cursor: -moz-grabbing;\n cursor: -webkit-grabbing;\n}\n";
36
+ styleInject$1(css_248z$1);
37
37
 
38
- function _arrayLikeToArray$3(r, a) {
38
+ function _arrayLikeToArray$4(r, a) {
39
39
  (null == a || a > r.length) && (a = r.length);
40
40
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
41
41
  return n;
42
42
  }
43
- function _arrayWithHoles$2(r) {
43
+ function _arrayWithHoles$3(r) {
44
44
  if (Array.isArray(r)) return r;
45
45
  }
46
46
  function _arrayWithoutHoles$2(r) {
47
- if (Array.isArray(r)) return _arrayLikeToArray$3(r);
47
+ if (Array.isArray(r)) return _arrayLikeToArray$4(r);
48
48
  }
49
49
  function _construct(t, e, r) {
50
50
  if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
@@ -56,9 +56,9 @@
56
56
  function _defineProperty(e, r, t) {
57
57
  return (r = _toPropertyKey$2(r)) in e ? Object.defineProperty(e, r, {
58
58
  value: t,
59
- enumerable: !0,
60
- configurable: !0,
61
- writable: !0
59
+ enumerable: true,
60
+ configurable: true,
61
+ writable: true
62
62
  }) : e[r] = t, e;
63
63
  }
64
64
  function _isNativeReflectConstruct() {
@@ -72,7 +72,7 @@
72
72
  function _iterableToArray$2(r) {
73
73
  if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
74
74
  }
75
- function _iterableToArrayLimit$2(r, l) {
75
+ function _iterableToArrayLimit$3(r, l) {
76
76
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
77
77
  if (null != t) {
78
78
  var e,
@@ -80,12 +80,12 @@
80
80
  i,
81
81
  u,
82
82
  a = [],
83
- f = !0,
84
- o = !1;
83
+ f = true,
84
+ o = false;
85
85
  try {
86
86
  if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
87
87
  } catch (r) {
88
- o = !0, n = r;
88
+ o = true, n = r;
89
89
  } finally {
90
90
  try {
91
91
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -96,7 +96,7 @@
96
96
  return a;
97
97
  }
98
98
  }
99
- function _nonIterableRest$2() {
99
+ function _nonIterableRest$3() {
100
100
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
101
101
  }
102
102
  function _nonIterableSpread$2() {
@@ -115,7 +115,7 @@
115
115
  function _objectSpread2(e) {
116
116
  for (var r = 1; r < arguments.length; r++) {
117
117
  var t = null != arguments[r] ? arguments[r] : {};
118
- r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
118
+ r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
119
119
  _defineProperty(e, r, t[r]);
120
120
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
121
121
  Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
@@ -123,16 +123,16 @@
123
123
  }
124
124
  return e;
125
125
  }
126
- function _slicedToArray$2(r, e) {
127
- return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$3(r, e) || _nonIterableRest$2();
126
+ function _slicedToArray$3(r, e) {
127
+ return _arrayWithHoles$3(r) || _iterableToArrayLimit$3(r, e) || _unsupportedIterableToArray$4(r, e) || _nonIterableRest$3();
128
128
  }
129
129
  function _toConsumableArray$2(r) {
130
- return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$3(r) || _nonIterableSpread$2();
130
+ return _arrayWithoutHoles$2(r) || _iterableToArray$2(r) || _unsupportedIterableToArray$4(r) || _nonIterableSpread$2();
131
131
  }
132
132
  function _toPrimitive$2(t, r) {
133
133
  if ("object" != typeof t || !t) return t;
134
134
  var e = t[Symbol.toPrimitive];
135
- if (void 0 !== e) {
135
+ if (undefined !== e) {
136
136
  var i = e.call(t, r || "default");
137
137
  if ("object" != typeof i) return i;
138
138
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -143,20 +143,20 @@
143
143
  var i = _toPrimitive$2(t, "string");
144
144
  return "symbol" == typeof i ? i : i + "";
145
145
  }
146
- function _typeof$1(o) {
146
+ function _typeof$2(o) {
147
147
  "@babel/helpers - typeof";
148
148
 
149
- return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
149
+ return _typeof$2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
150
150
  return typeof o;
151
151
  } : function (o) {
152
152
  return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
153
- }, _typeof$1(o);
153
+ }, _typeof$2(o);
154
154
  }
155
- function _unsupportedIterableToArray$3(r, a) {
155
+ function _unsupportedIterableToArray$4(r, a) {
156
156
  if (r) {
157
- if ("string" == typeof r) return _arrayLikeToArray$3(r, a);
157
+ if ("string" == typeof r) return _arrayLikeToArray$4(r, a);
158
158
  var t = {}.toString.call(r).slice(8, -1);
159
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : void 0;
159
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$4(r, a) : undefined;
160
160
  }
161
161
  }
162
162
 
@@ -4482,7 +4482,7 @@
4482
4482
  },
4483
4483
  }),
4484
4484
  generatePow: function (power) {
4485
- if (power === void 0) { power = 4; }
4485
+ if (power === undefined) { power = 4; }
4486
4486
  power = power < Number.EPSILON ? Number.EPSILON : power;
4487
4487
  power = power > 10000 ? 10000 : power;
4488
4488
  return {
@@ -4537,7 +4537,7 @@
4537
4537
  var tween = tweens_1[_b];
4538
4538
  // Remove from any other group first, a tween can only be in one group at a time.
4539
4539
  // @ts-expect-error library internal access
4540
- (_a = tween._group) === null || _a === void 0 ? void 0 : _a.remove(tween);
4540
+ (_a = tween._group) === null || _a === undefined ? undefined : _a.remove(tween);
4541
4541
  // @ts-expect-error library internal access
4542
4542
  tween._group = this;
4543
4543
  this._tweens[tween.getId()] = tween;
@@ -4562,8 +4562,8 @@
4562
4562
  return this.getAll().every(function (tween) { return !tween.isPlaying(); });
4563
4563
  };
4564
4564
  Group.prototype.update = function (time, preserve) {
4565
- if (time === void 0) { time = now(); }
4566
- if (preserve === void 0) { preserve = true; }
4565
+ if (time === undefined) { time = now(); }
4566
+ if (preserve === undefined) { preserve = true; }
4567
4567
  var tweenIds = Object.keys(this._tweens);
4568
4568
  if (tweenIds.length === 0)
4569
4569
  return;
@@ -4739,7 +4739,7 @@
4739
4739
  return this._duration;
4740
4740
  };
4741
4741
  Tween.prototype.to = function (target, duration) {
4742
- if (duration === void 0) { duration = 1000; }
4742
+ if (duration === undefined) { duration = 1000; }
4743
4743
  if (this._isPlaying)
4744
4744
  throw new Error('Can not call Tween.to() while Tween is already started or paused. Stop the Tween first.');
4745
4745
  this._valuesEnd = target;
@@ -4748,18 +4748,18 @@
4748
4748
  return this;
4749
4749
  };
4750
4750
  Tween.prototype.duration = function (duration) {
4751
- if (duration === void 0) { duration = 1000; }
4751
+ if (duration === undefined) { duration = 1000; }
4752
4752
  this._duration = duration < 0 ? 0 : duration;
4753
4753
  return this;
4754
4754
  };
4755
4755
  Tween.prototype.dynamic = function (dynamic) {
4756
- if (dynamic === void 0) { dynamic = false; }
4756
+ if (dynamic === undefined) { dynamic = false; }
4757
4757
  this._isDynamic = dynamic;
4758
4758
  return this;
4759
4759
  };
4760
4760
  Tween.prototype.start = function (time, overrideStartingValues) {
4761
- if (time === void 0) { time = now(); }
4762
- if (overrideStartingValues === void 0) { overrideStartingValues = false; }
4761
+ if (time === undefined) { time = now(); }
4762
+ if (overrideStartingValues === undefined) { overrideStartingValues = false; }
4763
4763
  if (this._isPlaying) {
4764
4764
  return this;
4765
4765
  }
@@ -4892,7 +4892,7 @@
4892
4892
  return this;
4893
4893
  };
4894
4894
  Tween.prototype.pause = function (time) {
4895
- if (time === void 0) { time = now(); }
4895
+ if (time === undefined) { time = now(); }
4896
4896
  if (this._isPaused || !this._isPlaying) {
4897
4897
  return this;
4898
4898
  }
@@ -4901,7 +4901,7 @@
4901
4901
  return this;
4902
4902
  };
4903
4903
  Tween.prototype.resume = function (time) {
4904
- if (time === void 0) { time = now(); }
4904
+ if (time === undefined) { time = now(); }
4905
4905
  if (!this._isPaused || !this._isPlaying) {
4906
4906
  return this;
4907
4907
  }
@@ -4929,16 +4929,16 @@
4929
4929
  */
4930
4930
  Tween.prototype.remove = function () {
4931
4931
  var _a;
4932
- (_a = this._group) === null || _a === void 0 ? void 0 : _a.remove(this);
4932
+ (_a = this._group) === null || _a === undefined ? undefined : _a.remove(this);
4933
4933
  return this;
4934
4934
  };
4935
4935
  Tween.prototype.delay = function (amount) {
4936
- if (amount === void 0) { amount = 0; }
4936
+ if (amount === undefined) { amount = 0; }
4937
4937
  this._delayTime = amount;
4938
4938
  return this;
4939
4939
  };
4940
4940
  Tween.prototype.repeat = function (times) {
4941
- if (times === void 0) { times = 0; }
4941
+ if (times === undefined) { times = 0; }
4942
4942
  this._initialRepeat = times;
4943
4943
  this._repeat = times;
4944
4944
  return this;
@@ -4948,17 +4948,17 @@
4948
4948
  return this;
4949
4949
  };
4950
4950
  Tween.prototype.yoyo = function (yoyo) {
4951
- if (yoyo === void 0) { yoyo = false; }
4951
+ if (yoyo === undefined) { yoyo = false; }
4952
4952
  this._yoyo = yoyo;
4953
4953
  return this;
4954
4954
  };
4955
4955
  Tween.prototype.easing = function (easingFunction) {
4956
- if (easingFunction === void 0) { easingFunction = Easing.Linear.None; }
4956
+ if (easingFunction === undefined) { easingFunction = Easing.Linear.None; }
4957
4957
  this._easingFunction = easingFunction;
4958
4958
  return this;
4959
4959
  };
4960
4960
  Tween.prototype.interpolation = function (interpolationFunction) {
4961
- if (interpolationFunction === void 0) { interpolationFunction = Interpolation.Linear; }
4961
+ if (interpolationFunction === undefined) { interpolationFunction = Interpolation.Linear; }
4962
4962
  this._interpolationFunction = interpolationFunction;
4963
4963
  return this;
4964
4964
  };
@@ -5007,8 +5007,8 @@
5007
5007
  Tween.prototype.update = function (time, autoStart) {
5008
5008
  var _this = this;
5009
5009
  var _a;
5010
- if (time === void 0) { time = now(); }
5011
- if (autoStart === void 0) { autoStart = Tween.autoStartOnUpdate; }
5010
+ if (time === undefined) { time = now(); }
5011
+ if (autoStart === undefined) { autoStart = Tween.autoStartOnUpdate; }
5012
5012
  if (this._isPaused)
5013
5013
  return true;
5014
5014
  var property;
@@ -5035,7 +5035,7 @@
5035
5035
  this._onEveryStartCallbackFired = true;
5036
5036
  }
5037
5037
  var elapsedTime = time - this._startTime;
5038
- var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== void 0 ? _a : this._delayTime);
5038
+ var durationAndDelay = this._duration + ((_a = this._repeatDelayTime) !== null && _a !== undefined ? _a : this._delayTime);
5039
5039
  var totalTime = this._duration + this._repeat * durationAndDelay;
5040
5040
  var calculateElapsedPortion = function () {
5041
5041
  if (_this._duration === 0)
@@ -5410,12 +5410,12 @@
5410
5410
  */
5411
5411
  TWEEN.update.bind(TWEEN);
5412
5412
 
5413
- function _arrayLikeToArray$2(r, a) {
5413
+ function _arrayLikeToArray$3(r, a) {
5414
5414
  (null == a || a > r.length) && (a = r.length);
5415
5415
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
5416
5416
  return n;
5417
5417
  }
5418
- function _arrayWithHoles$1(r) {
5418
+ function _arrayWithHoles$2(r) {
5419
5419
  if (Array.isArray(r)) return r;
5420
5420
  }
5421
5421
  function _classCallCheck$1(a, n) {
@@ -5423,10 +5423,10 @@
5423
5423
  }
5424
5424
  function _createClass$1(e, r, t) {
5425
5425
  return Object.defineProperty(e, "prototype", {
5426
- writable: !1
5426
+ writable: false
5427
5427
  }), e;
5428
5428
  }
5429
- function _iterableToArrayLimit$1(r, l) {
5429
+ function _iterableToArrayLimit$2(r, l) {
5430
5430
  var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
5431
5431
  if (null != t) {
5432
5432
  var e,
@@ -5434,12 +5434,12 @@
5434
5434
  i,
5435
5435
  u,
5436
5436
  a = [],
5437
- f = !0,
5438
- o = !1;
5437
+ f = true,
5438
+ o = false;
5439
5439
  try {
5440
5440
  if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
5441
5441
  } catch (r) {
5442
- o = !0, n = r;
5442
+ o = true, n = r;
5443
5443
  } finally {
5444
5444
  try {
5445
5445
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -5450,48 +5450,48 @@
5450
5450
  return a;
5451
5451
  }
5452
5452
  }
5453
- function _nonIterableRest$1() {
5453
+ function _nonIterableRest$2() {
5454
5454
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
5455
5455
  }
5456
- function _slicedToArray$1(r, e) {
5457
- return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$2(r, e) || _nonIterableRest$1();
5456
+ function _slicedToArray$2(r, e) {
5457
+ return _arrayWithHoles$2(r) || _iterableToArrayLimit$2(r, e) || _unsupportedIterableToArray$3(r, e) || _nonIterableRest$2();
5458
5458
  }
5459
- function _unsupportedIterableToArray$2(r, a) {
5459
+ function _unsupportedIterableToArray$3(r, a) {
5460
5460
  if (r) {
5461
- if ("string" == typeof r) return _arrayLikeToArray$2(r, a);
5461
+ if ("string" == typeof r) return _arrayLikeToArray$3(r, a);
5462
5462
  var t = {}.toString.call(r).slice(8, -1);
5463
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : void 0;
5463
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$3(r, a) : undefined;
5464
5464
  }
5465
5465
  }
5466
5466
 
5467
5467
  var Prop = /*#__PURE__*/_createClass$1(function Prop(name, _ref) {
5468
5468
  var _ref$default = _ref["default"],
5469
- defaultVal = _ref$default === void 0 ? null : _ref$default,
5469
+ defaultVal = _ref$default === undefined ? null : _ref$default,
5470
5470
  _ref$triggerUpdate = _ref.triggerUpdate,
5471
- triggerUpdate = _ref$triggerUpdate === void 0 ? true : _ref$triggerUpdate,
5471
+ triggerUpdate = _ref$triggerUpdate === undefined ? true : _ref$triggerUpdate,
5472
5472
  _ref$onChange = _ref.onChange,
5473
- onChange = _ref$onChange === void 0 ? function (newVal, state) {} : _ref$onChange;
5473
+ onChange = _ref$onChange === undefined ? function (newVal, state) {} : _ref$onChange;
5474
5474
  _classCallCheck$1(this, Prop);
5475
5475
  this.name = name;
5476
5476
  this.defaultVal = defaultVal;
5477
5477
  this.triggerUpdate = triggerUpdate;
5478
5478
  this.onChange = onChange;
5479
5479
  });
5480
- function index$3 (_ref2) {
5480
+ function index$4 (_ref2) {
5481
5481
  var _ref2$stateInit = _ref2.stateInit,
5482
- stateInit = _ref2$stateInit === void 0 ? function () {
5482
+ stateInit = _ref2$stateInit === undefined ? function () {
5483
5483
  return {};
5484
5484
  } : _ref2$stateInit,
5485
5485
  _ref2$props = _ref2.props,
5486
- rawProps = _ref2$props === void 0 ? {} : _ref2$props,
5486
+ rawProps = _ref2$props === undefined ? {} : _ref2$props,
5487
5487
  _ref2$methods = _ref2.methods,
5488
- methods = _ref2$methods === void 0 ? {} : _ref2$methods,
5488
+ methods = _ref2$methods === undefined ? {} : _ref2$methods,
5489
5489
  _ref2$aliases = _ref2.aliases,
5490
- aliases = _ref2$aliases === void 0 ? {} : _ref2$aliases,
5490
+ aliases = _ref2$aliases === undefined ? {} : _ref2$aliases,
5491
5491
  _ref2$init = _ref2.init,
5492
- initFn = _ref2$init === void 0 ? function () {} : _ref2$init,
5492
+ initFn = _ref2$init === undefined ? function () {} : _ref2$init,
5493
5493
  _ref2$update = _ref2.update,
5494
- updateFn = _ref2$update === void 0 ? function () {} : _ref2$update;
5494
+ updateFn = _ref2$update === undefined ? function () {} : _ref2$update;
5495
5495
  // Parse props into Prop instances
5496
5496
  var props = Object.keys(rawProps).map(function (propName) {
5497
5497
  return new Prop(propName, rawProps[propName]);
@@ -5500,10 +5500,10 @@
5500
5500
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
5501
5501
  args[_key] = arguments[_key];
5502
5502
  }
5503
- var classMode = !!(this instanceof KapsuleComp ? this.constructor : void 0);
5503
+ var classMode = !!(this instanceof KapsuleComp ? this.constructor : undefined);
5504
5504
  var nodeElement = classMode ? args.shift() : undefined;
5505
5505
  var _args$ = args[0],
5506
- options = _args$ === void 0 ? {} : _args$;
5506
+ options = _args$ === undefined ? {} : _args$;
5507
5507
 
5508
5508
  // Holds component state
5509
5509
  var state = Object.assign({}, stateInit instanceof Function ? stateInit(options) : stateInit,
@@ -5539,11 +5539,11 @@
5539
5539
  function getSetProp(_ref3) {
5540
5540
  var prop = _ref3.name,
5541
5541
  _ref3$triggerUpdate = _ref3.triggerUpdate,
5542
- redigest = _ref3$triggerUpdate === void 0 ? false : _ref3$triggerUpdate,
5542
+ redigest = _ref3$triggerUpdate === undefined ? false : _ref3$triggerUpdate,
5543
5543
  _ref3$onChange = _ref3.onChange,
5544
- onChange = _ref3$onChange === void 0 ? function (newVal, state) {} : _ref3$onChange,
5544
+ onChange = _ref3$onChange === undefined ? function (newVal, state) {} : _ref3$onChange,
5545
5545
  _ref3$defaultVal = _ref3.defaultVal,
5546
- defaultVal = _ref3$defaultVal === void 0 ? null : _ref3$defaultVal;
5546
+ defaultVal = _ref3$defaultVal === undefined ? null : _ref3$defaultVal;
5547
5547
  return function (_) {
5548
5548
  var curVal = state[prop];
5549
5549
  if (!arguments.length) {
@@ -5577,7 +5577,7 @@
5577
5577
 
5578
5578
  // Link aliases
5579
5579
  Object.entries(aliases).forEach(function (_ref4) {
5580
- var _ref5 = _slicedToArray$1(_ref4, 2),
5580
+ var _ref5 = _slicedToArray$2(_ref4, 2),
5581
5581
  alias = _ref5[0],
5582
5582
  target = _ref5[1];
5583
5583
  return comp[alias] = comp[target];
@@ -5601,7 +5601,7 @@
5601
5601
  };
5602
5602
  }
5603
5603
 
5604
- var index$2 = (function (p) {
5604
+ var index$3 = (function (p) {
5605
5605
  return typeof p === 'function' ? p // fn
5606
5606
  : typeof p === 'string' ? function (obj) {
5607
5607
  return obj[p];
@@ -5612,14 +5612,14 @@
5612
5612
  }); // constant
5613
5613
 
5614
5614
  // This file is autogenerated. It's used to publish ESM to npm.
5615
- function _typeof(obj) {
5615
+ function _typeof$1(obj) {
5616
5616
  "@babel/helpers - typeof";
5617
5617
 
5618
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5618
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
5619
5619
  return typeof obj;
5620
5620
  } : function (obj) {
5621
5621
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
5622
- }, _typeof(obj);
5622
+ }, _typeof$1(obj);
5623
5623
  }
5624
5624
 
5625
5625
  // https://github.com/bgrins/TinyColor
@@ -5883,7 +5883,7 @@
5883
5883
  // If input is an object, force 1 into "1.0" to handle ratios properly
5884
5884
  // String input requires "1.0" as input, so 1 will be treated as 1
5885
5885
  tinycolor.fromRatio = function (color, opts) {
5886
- if (_typeof(color) == "object") {
5886
+ if (_typeof$1(color) == "object") {
5887
5887
  var newColor = {};
5888
5888
  for (var i in color) {
5889
5889
  if (color.hasOwnProperty(i)) {
@@ -5929,7 +5929,7 @@
5929
5929
  if (typeof color == "string") {
5930
5930
  color = stringInputToObject(color);
5931
5931
  }
5932
- if (_typeof(color) == "object") {
5932
+ if (_typeof$1(color) == "object") {
5933
5933
  if (isValidCSSUnit(color.r) && isValidCSSUnit(color.g) && isValidCSSUnit(color.b)) {
5934
5934
  rgb = rgbToRgb(color.r, color.g, color.b);
5935
5935
  ok = true;
@@ -6790,13 +6790,13 @@
6790
6790
  };
6791
6791
  }
6792
6792
 
6793
- function _arrayLikeToArray$1(r, a) {
6793
+ function _arrayLikeToArray$2(r, a) {
6794
6794
  (null == a || a > r.length) && (a = r.length);
6795
6795
  for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6796
6796
  return n;
6797
6797
  }
6798
6798
  function _arrayWithoutHoles$1(r) {
6799
- if (Array.isArray(r)) return _arrayLikeToArray$1(r);
6799
+ if (Array.isArray(r)) return _arrayLikeToArray$2(r);
6800
6800
  }
6801
6801
  function _assertClassBrand(e, t, n) {
6802
6802
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
@@ -6820,12 +6820,12 @@
6820
6820
  function _defineProperties(e, r) {
6821
6821
  for (var t = 0; t < r.length; t++) {
6822
6822
  var o = r[t];
6823
- o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey$1(o.key), o);
6823
+ o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey$1(o.key), o);
6824
6824
  }
6825
6825
  }
6826
6826
  function _createClass(e, r, t) {
6827
6827
  return _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
6828
- writable: !1
6828
+ writable: false
6829
6829
  }), e;
6830
6830
  }
6831
6831
  function _iterableToArray$1(r) {
@@ -6835,12 +6835,12 @@
6835
6835
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6836
6836
  }
6837
6837
  function _toConsumableArray$1(r) {
6838
- return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$1(r) || _nonIterableSpread$1();
6838
+ return _arrayWithoutHoles$1(r) || _iterableToArray$1(r) || _unsupportedIterableToArray$2(r) || _nonIterableSpread$1();
6839
6839
  }
6840
6840
  function _toPrimitive$1(t, r) {
6841
6841
  if ("object" != typeof t || !t) return t;
6842
6842
  var e = t[Symbol.toPrimitive];
6843
- if (void 0 !== e) {
6843
+ if (undefined !== e) {
6844
6844
  var i = e.call(t, r);
6845
6845
  if ("object" != typeof i) return i;
6846
6846
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -6851,11 +6851,11 @@
6851
6851
  var i = _toPrimitive$1(t, "string");
6852
6852
  return "symbol" == typeof i ? i : i + "";
6853
6853
  }
6854
- function _unsupportedIterableToArray$1(r, a) {
6854
+ function _unsupportedIterableToArray$2(r, a) {
6855
6855
  if (r) {
6856
- if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
6856
+ if ("string" == typeof r) return _arrayLikeToArray$2(r, a);
6857
6857
  var t = {}.toString.call(r).slice(8, -1);
6858
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : void 0;
6858
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$2(r, a) : undefined;
6859
6859
  }
6860
6860
  }
6861
6861
 
@@ -6884,9 +6884,9 @@
6884
6884
  var csBits = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 6;
6885
6885
  _classCallCheck(this, _default);
6886
6886
  // Internal state
6887
- _classPrivateFieldInitSpec(this, _registry, void 0);
6887
+ _classPrivateFieldInitSpec(this, _registry, undefined);
6888
6888
  // indexed objects for rgb lookup;
6889
- _classPrivateFieldInitSpec(this, _csBits, void 0);
6889
+ _classPrivateFieldInitSpec(this, _csBits, undefined);
6890
6890
  _classPrivateFieldSet2(_csBits, this, csBits);
6891
6891
  this.reset();
6892
6892
  }
@@ -6913,7 +6913,7 @@
6913
6913
  value: function lookup(color) {
6914
6914
  if (!color) return null; // invalid color
6915
6915
 
6916
- var n = typeof color === 'string' ? colorStr2Int(color) : rgb2Int.apply(void 0, _toConsumableArray$1(color));
6916
+ var n = typeof color === 'string' ? colorStr2Int(color) : rgb2Int.apply(undefined, _toConsumableArray$1(color));
6917
6917
  if (!n) return null; // 0 index is reserved for background
6918
6918
 
6919
6919
  var idx = n & Math.pow(2, 24 - _classPrivateFieldGet2(_csBits, this)) - 1; // registry index
@@ -6926,6 +6926,138 @@
6926
6926
  }]);
6927
6927
  }();
6928
6928
 
6929
+ function _arrayLikeToArray$1(r, a) {
6930
+ (null == a || a > r.length) && (a = r.length);
6931
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
6932
+ return n;
6933
+ }
6934
+ function _arrayWithHoles$1(r) {
6935
+ if (Array.isArray(r)) return r;
6936
+ }
6937
+ function _iterableToArrayLimit$1(r, l) {
6938
+ var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
6939
+ if (null != t) {
6940
+ var e,
6941
+ n,
6942
+ i,
6943
+ u,
6944
+ a = [],
6945
+ f = true,
6946
+ o = false;
6947
+ try {
6948
+ if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
6949
+ } catch (r) {
6950
+ o = true, n = r;
6951
+ } finally {
6952
+ try {
6953
+ if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
6954
+ } finally {
6955
+ if (o) throw n;
6956
+ }
6957
+ }
6958
+ return a;
6959
+ }
6960
+ }
6961
+ function _nonIterableRest$1() {
6962
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
6963
+ }
6964
+ function _slicedToArray$1(r, e) {
6965
+ return _arrayWithHoles$1(r) || _iterableToArrayLimit$1(r, e) || _unsupportedIterableToArray$1(r, e) || _nonIterableRest$1();
6966
+ }
6967
+ function _typeof(o) {
6968
+ "@babel/helpers - typeof";
6969
+
6970
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
6971
+ return typeof o;
6972
+ } : function (o) {
6973
+ return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
6974
+ }, _typeof(o);
6975
+ }
6976
+ function _unsupportedIterableToArray$1(r, a) {
6977
+ if (r) {
6978
+ if ("string" == typeof r) return _arrayLikeToArray$1(r, a);
6979
+ var t = {}.toString.call(r).slice(8, -1);
6980
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray$1(r, a) : undefined;
6981
+ }
6982
+ }
6983
+
6984
+ function styleInject(css, ref) {
6985
+ if (ref === undefined) ref = {};
6986
+ var insertAt = ref.insertAt;
6987
+ if (typeof document === 'undefined') {
6988
+ return;
6989
+ }
6990
+ var head = document.head || document.getElementsByTagName('head')[0];
6991
+ var style = document.createElement('style');
6992
+ style.type = 'text/css';
6993
+ if (insertAt === 'top') {
6994
+ if (head.firstChild) {
6995
+ head.insertBefore(style, head.firstChild);
6996
+ } else {
6997
+ head.appendChild(style);
6998
+ }
6999
+ } else {
7000
+ head.appendChild(style);
7001
+ }
7002
+ if (style.styleSheet) {
7003
+ style.styleSheet.cssText = css;
7004
+ } else {
7005
+ style.appendChild(document.createTextNode(css));
7006
+ }
7007
+ }
7008
+
7009
+ var css_248z = ".float-tooltip-kap {\n position: absolute;\n width: max-content; /* prevent shrinking near right edge */\n padding: 3px 5px;\n border-radius: 3px;\n font: 12px sans-serif;\n color: #eee;\n background: rgba(0,0,0,0.6);\n pointer-events: none;\n}\n";
7010
+ styleInject(css_248z);
7011
+
7012
+ var index$2 = index$4({
7013
+ props: {
7014
+ content: {
7015
+ "default": false
7016
+ }
7017
+ },
7018
+ init: function init(domNode, state) {
7019
+ var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
7020
+ _ref$style = _ref.style,
7021
+ style = _ref$style === undefined ? {} : _ref$style;
7022
+ var isD3Selection = !!domNode && _typeof(domNode) === 'object' && !!domNode.node && typeof domNode.node === 'function';
7023
+ var el = d3Select(isD3Selection ? domNode.node() : domNode);
7024
+ state.tooltipEl = el.append('div').attr('class', 'float-tooltip-kap');
7025
+ Object.entries(style).forEach(function (_ref2) {
7026
+ var _ref3 = _slicedToArray$1(_ref2, 2),
7027
+ k = _ref3[0],
7028
+ v = _ref3[1];
7029
+ return state.tooltipEl.style(k, v);
7030
+ });
7031
+ state.tooltipEl // start off-screen
7032
+ .style('left', '-10000px').style('display', 'none');
7033
+ state.mouseInside = false;
7034
+ el.on('mousemove.tooltip', function (ev) {
7035
+ state.mouseInside = true;
7036
+ var mousePos = pointer(ev);
7037
+ var domNode = el.node();
7038
+ var canvasWidth = domNode.offsetWidth;
7039
+ var canvasHeight = domNode.offsetHeight;
7040
+ state.tooltipEl.style('left', mousePos[0] + 'px').style('top', mousePos[1] + 'px')
7041
+ // adjust horizontal position to not exceed canvas boundaries
7042
+ .style('transform', "translate(-".concat(mousePos[0] / canvasWidth * 100, "%, ").concat(
7043
+ // flip to above if near bottom
7044
+ canvasHeight > 130 && canvasHeight - mousePos[1] < 100 ? 'calc(-100% - 6px)' : '21px', ")"));
7045
+ });
7046
+ el.on('mouseover.tooltip', function () {
7047
+ state.mouseInside = true;
7048
+ state.content && state.tooltipEl.style('display', 'inline');
7049
+ });
7050
+ el.on('mouseout.tooltip', function () {
7051
+ state.mouseInside = false;
7052
+ state.tooltipEl.style('display', 'none');
7053
+ });
7054
+ },
7055
+ update: function update(state) {
7056
+ state.tooltipEl.style('display', !!state.content && state.mouseInside ? 'inline' : 'none');
7057
+ state.tooltipEl.html(state.content || '');
7058
+ }
7059
+ });
7060
+
6929
7061
  function d3ForceCenter(x, y, z) {
6930
7062
  var nodes, strength = 1;
6931
7063
 
@@ -7988,6 +8120,33 @@
7988
8120
  return data;
7989
8121
  }
7990
8122
 
8123
+ const distance = (x1, y1, z1, x2, y2, z2) => Math.sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2);
8124
+
8125
+ function findAllWithinRadius(x, y, z, radius) {
8126
+ const result = [];
8127
+
8128
+ const xMin = x - radius;
8129
+ const yMin = y - radius;
8130
+ const zMin = z - radius;
8131
+ const xMax = x + radius;
8132
+ const yMax = y + radius;
8133
+ const zMax = z + radius;
8134
+
8135
+ this.visit((node, x1, y1, z1, x2, y2, z2) => {
8136
+ if (!node.length) {
8137
+ do {
8138
+ const d = node.data;
8139
+ if (distance(x, y, z, this._x(d), this._y(d), this._z(d)) <= radius) {
8140
+ result.push(d);
8141
+ }
8142
+ } while (node = node.next);
8143
+ }
8144
+ return x1 > xMax || y1 > yMax || z1 > zMax || x2 < xMin || y2 < yMin || z2 < zMin;
8145
+ });
8146
+
8147
+ return result;
8148
+ }
8149
+
7991
8150
  function tree_remove(d) {
7992
8151
  if (isNaN(x = +this._x.call(null, d)) || isNaN(y = +this._y.call(null, d)) || isNaN(z = +this._z.call(null, d))) return this; // ignore invalid points
7993
8152
 
@@ -8191,6 +8350,7 @@
8191
8350
  treeProto.data = tree_data;
8192
8351
  treeProto.extent = tree_extent;
8193
8352
  treeProto.find = tree_find;
8353
+ treeProto.findAllWithinRadius = findAllWithinRadius;
8194
8354
  treeProto.remove = tree_remove;
8195
8355
  treeProto.removeAll = removeAll;
8196
8356
  treeProto.root = tree_root;
@@ -8762,29 +8922,29 @@
8762
8922
  const utils = {
8763
8923
  // Legendre-Gauss abscissae with n=24 (x_i values, defined at i=n as the roots of the nth order Legendre polynomial Pn(x))
8764
8924
  Tvalues: [
8765
- -0.0640568928626056260850430826247450385909,
8925
+ -0.06405689286260563,
8766
8926
  0.0640568928626056260850430826247450385909,
8767
- -0.1911188674736163091586398207570696318404,
8927
+ -0.1911188674736163,
8768
8928
  0.1911188674736163091586398207570696318404,
8769
- -0.3150426796961633743867932913198102407864,
8929
+ -0.3150426796961634,
8770
8930
  0.3150426796961633743867932913198102407864,
8771
- -0.4337935076260451384870842319133497124524,
8931
+ -0.4337935076260451,
8772
8932
  0.4337935076260451384870842319133497124524,
8773
- -0.5454214713888395356583756172183723700107,
8933
+ -0.5454214713888396,
8774
8934
  0.5454214713888395356583756172183723700107,
8775
- -0.6480936519369755692524957869107476266696,
8935
+ -0.6480936519369755,
8776
8936
  0.6480936519369755692524957869107476266696,
8777
- -0.7401241915785543642438281030999784255232,
8937
+ -0.7401241915785544,
8778
8938
  0.7401241915785543642438281030999784255232,
8779
- -0.8200019859739029219539498726697452080761,
8939
+ -0.820001985973903,
8780
8940
  0.8200019859739029219539498726697452080761,
8781
- -0.8864155270044010342131543419821967550873,
8941
+ -0.8864155270044011,
8782
8942
  0.8864155270044010342131543419821967550873,
8783
- -0.9382745520027327585236490017087214496548,
8943
+ -0.9382745520027328,
8784
8944
  0.9382745520027327585236490017087214496548,
8785
- -0.9747285559713094981983919930081690617411,
8945
+ -0.9747285559713095,
8786
8946
  0.9747285559713094981983919930081690617411,
8787
- -0.9951872199970213601799974097007368118745,
8947
+ -0.9951872199970213,
8788
8948
  0.9951872199970213601799974097007368118745,
8789
8949
  ],
8790
8950
 
@@ -10737,12 +10897,12 @@
10737
10897
  i,
10738
10898
  u,
10739
10899
  a = [],
10740
- f = !0,
10741
- o = !1;
10900
+ f = true,
10901
+ o = false;
10742
10902
  try {
10743
10903
  if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
10744
10904
  } catch (r) {
10745
- o = !0, n = r;
10905
+ o = true, n = r;
10746
10906
  } finally {
10747
10907
  try {
10748
10908
  if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
@@ -10788,7 +10948,7 @@
10788
10948
  function _toPrimitive(t, r) {
10789
10949
  if ("object" != typeof t || !t) return t;
10790
10950
  var e = t[Symbol.toPrimitive];
10791
- if (void 0 !== e) {
10951
+ if (undefined !== e) {
10792
10952
  var i = e.call(t, r );
10793
10953
  if ("object" != typeof i) return i;
10794
10954
  throw new TypeError("@@toPrimitive must return a primitive value.");
@@ -10803,7 +10963,7 @@
10803
10963
  if (r) {
10804
10964
  if ("string" == typeof r) return _arrayLikeToArray(r, a);
10805
10965
  var t = {}.toString.call(r).slice(8, -1);
10806
- return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
10966
+ return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : undefined;
10807
10967
  }
10808
10968
  }
10809
10969
 
@@ -10977,11 +11137,11 @@
10977
11137
  links = _ref.links;
10978
11138
  var _ref2 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
10979
11139
  _ref2$nodeFilter = _ref2.nodeFilter,
10980
- nodeFilter = _ref2$nodeFilter === void 0 ? function () {
11140
+ nodeFilter = _ref2$nodeFilter === undefined ? function () {
10981
11141
  return true;
10982
11142
  } : _ref2$nodeFilter,
10983
11143
  _ref2$onLoopError = _ref2.onLoopError,
10984
- onLoopError = _ref2$onLoopError === void 0 ? function (loopIds) {
11144
+ onLoopError = _ref2$onLoopError === undefined ? function (loopIds) {
10985
11145
  throw "Invalid DAG structure! Found cycle in node path: ".concat(loopIds.join(' -> '), ".");
10986
11146
  } : _ref2$onLoopError;
10987
11147
  // linked graph
@@ -11005,17 +11165,17 @@
11005
11165
  var targetNode = graph[targetId];
11006
11166
  sourceNode.out.push(targetNode);
11007
11167
  function getNodeId(node) {
11008
- return _typeof$1(node) === 'object' ? idAccessor(node) : node;
11168
+ return _typeof$2(node) === 'object' ? idAccessor(node) : node;
11009
11169
  }
11010
11170
  });
11011
11171
  var foundLoops = [];
11012
11172
  traverse(Object.values(graph));
11013
11173
  var nodeDepths = Object.assign.apply(Object, [{}].concat(_toConsumableArray$2(Object.entries(graph).filter(function (_ref4) {
11014
- var _ref5 = _slicedToArray$2(_ref4, 2),
11174
+ var _ref5 = _slicedToArray$3(_ref4, 2),
11015
11175
  node = _ref5[1];
11016
11176
  return !node.skip;
11017
11177
  }).map(function (_ref6) {
11018
- var _ref7 = _slicedToArray$2(_ref6, 2),
11178
+ var _ref7 = _slicedToArray$3(_ref6, 2),
11019
11179
  id = _ref7[0],
11020
11180
  node = _ref7[1];
11021
11181
  return _defineProperty({}, id, node.depth);
@@ -11063,7 +11223,7 @@
11063
11223
  var updDataPhotons = function updDataPhotons(_, state) {
11064
11224
  if (!state.isShadow) {
11065
11225
  // Add photon particles
11066
- var linkParticlesAccessor = index$2(state.linkDirectionalParticles);
11226
+ var linkParticlesAccessor = index$3(state.linkDirectionalParticles);
11067
11227
  state.graphData.links.forEach(function (link) {
11068
11228
  var numPhotons = Math.round(Math.abs(linkParticlesAccessor(link)));
11069
11229
  if (numPhotons) {
@@ -11076,7 +11236,7 @@
11076
11236
  });
11077
11237
  }
11078
11238
  };
11079
- var CanvasForceGraph = index$3({
11239
+ var CanvasForceGraph = index$4({
11080
11240
  props: {
11081
11241
  graphData: {
11082
11242
  "default": {
@@ -11329,10 +11489,10 @@
11329
11489
  }
11330
11490
  }
11331
11491
  function paintNodes() {
11332
- var getVisibility = index$2(state.nodeVisibility);
11333
- var getVal = index$2(state.nodeVal);
11334
- var getColor = index$2(state.nodeColor);
11335
- var getNodeCanvasObjectMode = index$2(state.nodeCanvasObjectMode);
11492
+ var getVisibility = index$3(state.nodeVisibility);
11493
+ var getVal = index$3(state.nodeVal);
11494
+ var getColor = index$3(state.nodeColor);
11495
+ var getNodeCanvasObjectMode = index$3(state.nodeCanvasObjectMode);
11336
11496
  var ctx = state.ctx;
11337
11497
 
11338
11498
  // Draw wider nodes by 1px on shadow canvas for more precise hovering (due to boundary anti-aliasing)
@@ -11364,12 +11524,12 @@
11364
11524
  ctx.restore();
11365
11525
  }
11366
11526
  function paintLinks() {
11367
- var getVisibility = index$2(state.linkVisibility);
11368
- var getColor = index$2(state.linkColor);
11369
- var getWidth = index$2(state.linkWidth);
11370
- var getLineDash = index$2(state.linkLineDash);
11371
- var getCurvature = index$2(state.linkCurvature);
11372
- var getLinkCanvasObjectMode = index$2(state.linkCanvasObjectMode);
11527
+ var getVisibility = index$3(state.linkVisibility);
11528
+ var getColor = index$3(state.linkColor);
11529
+ var getWidth = index$3(state.linkWidth);
11530
+ var getLineDash = index$3(state.linkLineDash);
11531
+ var getCurvature = index$3(state.linkCurvature);
11532
+ var getLinkCanvasObjectMode = index$3(state.linkCanvasObjectMode);
11373
11533
  var ctx = state.ctx;
11374
11534
 
11375
11535
  // Draw wider lines by 2px on shadow canvas for more precise hovering (due to boundary anti-aliasing)
@@ -11405,17 +11565,17 @@
11405
11565
  var linksPerColor = index(defaultPaintLinks, [getColor, getWidth, getLineDash]);
11406
11566
  ctx.save();
11407
11567
  Object.entries(linksPerColor).forEach(function (_ref) {
11408
- var _ref2 = _slicedToArray$2(_ref, 2),
11568
+ var _ref2 = _slicedToArray$3(_ref, 2),
11409
11569
  color = _ref2[0],
11410
11570
  linksPerWidth = _ref2[1];
11411
11571
  var lineColor = !color || color === 'undefined' ? 'rgba(0,0,0,0.15)' : color;
11412
11572
  Object.entries(linksPerWidth).forEach(function (_ref3) {
11413
- var _ref4 = _slicedToArray$2(_ref3, 2),
11573
+ var _ref4 = _slicedToArray$3(_ref3, 2),
11414
11574
  width = _ref4[0],
11415
11575
  linesPerLineDash = _ref4[1];
11416
11576
  var lineWidth = (width || 1) / state.globalScale + padAmount;
11417
11577
  Object.entries(linesPerLineDash).forEach(function (_ref5) {
11418
- var _ref6 = _slicedToArray$2(_ref5, 2);
11578
+ var _ref6 = _slicedToArray$3(_ref5, 2);
11419
11579
  _ref6[0];
11420
11580
  var links = _ref6[1];
11421
11581
  var lineDashSegments = getLineDash(links[0]);
@@ -11486,11 +11646,11 @@
11486
11646
  function paintArrows() {
11487
11647
  var ARROW_WH_RATIO = 1.6;
11488
11648
  var ARROW_VLEN_RATIO = 0.2;
11489
- var getLength = index$2(state.linkDirectionalArrowLength);
11490
- var getRelPos = index$2(state.linkDirectionalArrowRelPos);
11491
- var getVisibility = index$2(state.linkVisibility);
11492
- var getColor = index$2(state.linkDirectionalArrowColor || state.linkColor);
11493
- var getNodeVal = index$2(state.nodeVal);
11649
+ var getLength = index$3(state.linkDirectionalArrowLength);
11650
+ var getRelPos = index$3(state.linkDirectionalArrowRelPos);
11651
+ var getVisibility = index$3(state.linkVisibility);
11652
+ var getColor = index$3(state.linkDirectionalArrowColor || state.linkColor);
11653
+ var getNodeVal = index$3(state.nodeVal);
11494
11654
  var ctx = state.ctx;
11495
11655
  ctx.save();
11496
11656
  state.graphData.links.filter(getVisibility).forEach(function (link) {
@@ -11535,11 +11695,11 @@
11535
11695
  ctx.restore();
11536
11696
  }
11537
11697
  function paintPhotons() {
11538
- var getNumPhotons = index$2(state.linkDirectionalParticles);
11539
- var getSpeed = index$2(state.linkDirectionalParticleSpeed);
11540
- var getDiameter = index$2(state.linkDirectionalParticleWidth);
11541
- var getVisibility = index$2(state.linkVisibility);
11542
- var getColor = index$2(state.linkDirectionalParticleColor || state.linkColor);
11698
+ var getNumPhotons = index$3(state.linkDirectionalParticles);
11699
+ var getSpeed = index$3(state.linkDirectionalParticleSpeed);
11700
+ var getDiameter = index$3(state.linkDirectionalParticleWidth);
11701
+ var getVisibility = index$3(state.linkVisibility);
11702
+ var getColor = index$3(state.linkDirectionalParticleColor || state.linkColor);
11543
11703
  var ctx = state.ctx;
11544
11704
  ctx.save();
11545
11705
  state.graphData.links.filter(getVisibility).forEach(function (link) {
@@ -11621,11 +11781,11 @@
11621
11781
  state.onUpdate();
11622
11782
  if (state.nodeAutoColorBy !== null) {
11623
11783
  // Auto add color to uncolored nodes
11624
- autoColorObjects(state.graphData.nodes, index$2(state.nodeAutoColorBy), state.nodeColor);
11784
+ autoColorObjects(state.graphData.nodes, index$3(state.nodeAutoColorBy), state.nodeColor);
11625
11785
  }
11626
11786
  if (state.linkAutoColorBy !== null) {
11627
11787
  // Auto add color to uncolored links
11628
- autoColorObjects(state.graphData.links, index$2(state.linkAutoColorBy), state.linkColor);
11788
+ autoColorObjects(state.graphData.links, index$3(state.linkAutoColorBy), state.linkColor);
11629
11789
  }
11630
11790
 
11631
11791
  // parse links
@@ -11790,7 +11950,7 @@
11790
11950
 
11791
11951
  //
11792
11952
 
11793
- var forceGraph = index$3({
11953
+ var forceGraph = index$4({
11794
11954
  props: _objectSpread2({
11795
11955
  width: {
11796
11956
  "default": window.innerWidth,
@@ -12081,7 +12241,7 @@
12081
12241
  var nodeFilter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {
12082
12242
  return true;
12083
12243
  };
12084
- var getVal = index$2(state.nodeVal);
12244
+ var getVal = index$3(state.nodeVal);
12085
12245
  var getR = function getR(node) {
12086
12246
  return Math.sqrt(Math.max(0, getVal(node) || 1)) * state.nodeRelSize;
12087
12247
  };
@@ -12257,7 +12417,7 @@
12257
12417
  state.zoom.filter(function (ev) {
12258
12418
  return (
12259
12419
  // disable zoom interaction
12260
- !ev.button && state.enableZoomPanInteraction && (ev.type !== 'wheel' || index$2(state.enableZoomInteraction)(ev)) && (ev.type === 'wheel' || index$2(state.enablePanInteraction)(ev))
12420
+ !ev.button && state.enableZoomPanInteraction && (ev.type !== 'wheel' || index$3(state.enableZoomInteraction)(ev)) && (ev.type === 'wheel' || index$3(state.enablePanInteraction)(ev))
12261
12421
  );
12262
12422
  }).on('zoom', function (ev) {
12263
12423
  var t = ev.transform;
@@ -12283,9 +12443,7 @@
12283
12443
  });
12284
12444
 
12285
12445
  // Setup tooltip
12286
- var toolTipElem = document.createElement('div');
12287
- toolTipElem.classList.add('graph-tooltip');
12288
- container.appendChild(toolTipElem);
12446
+ state.tooltip = new index$2(container);
12289
12447
 
12290
12448
  // Capture pointer coords on move or touchstart
12291
12449
  ['pointermove', 'pointerdown'].forEach(function (evType) {
@@ -12308,15 +12466,6 @@
12308
12466
  pointerPos.x = ev.pageX - offset.left;
12309
12467
  pointerPos.y = ev.pageY - offset.top;
12310
12468
 
12311
- // Move tooltip
12312
- toolTipElem.style.top = "".concat(pointerPos.y, "px");
12313
- toolTipElem.style.left = "".concat(pointerPos.x, "px");
12314
-
12315
- // adjust horizontal position to not exceed canvas boundaries
12316
- toolTipElem.style.transform = "translate(-".concat(pointerPos.x / state.width * 100, "%, ").concat(
12317
- // flip to above if near bottom
12318
- state.height - pointerPos.y < 100 ? 'calc(-100% - 8px)' : '21px', ")");
12319
-
12320
12469
  //
12321
12470
 
12322
12471
  function getOffset(el) {
@@ -12347,7 +12496,7 @@
12347
12496
  // mouse left-click or touch
12348
12497
  if (state.hoverObj) {
12349
12498
  var fn = state["on".concat(state.hoverObj.type, "Click")];
12350
- fn && fn.apply(void 0, [state.hoverObj.d].concat(cbEvents));
12499
+ fn && fn.apply(undefined, [state.hoverObj.d].concat(cbEvents));
12351
12500
  } else {
12352
12501
  state.onBackgroundClick && state.onBackgroundClick.apply(state, cbEvents);
12353
12502
  }
@@ -12356,7 +12505,7 @@
12356
12505
  // mouse right-click
12357
12506
  if (state.hoverObj) {
12358
12507
  var _fn = state["on".concat(state.hoverObj.type, "RightClick")];
12359
- _fn && _fn.apply(void 0, [state.hoverObj.d].concat(cbEvents));
12508
+ _fn && _fn.apply(undefined, [state.hoverObj.d].concat(cbEvents));
12360
12509
  } else {
12361
12510
  state.onBackgroundRightClick && state.onBackgroundRightClick.apply(state, cbEvents);
12362
12511
  }
@@ -12381,7 +12530,7 @@
12381
12530
 
12382
12531
  // Adjust link hover area
12383
12532
  state.shadowGraph.linkWidth(function (l) {
12384
- return index$2(state.linkWidth)(l) + state.linkHoverPrecision;
12533
+ return index$3(state.linkWidth)(l) + state.linkHoverPrecision;
12385
12534
  });
12386
12535
 
12387
12536
  // redraw
@@ -12414,9 +12563,7 @@
12414
12563
  var _fn2 = state["on".concat(objType, "Hover")];
12415
12564
  _fn2 && _fn2(obj.d, prevObjType === objType ? prevObj.d : null);
12416
12565
  }
12417
- var tooltipContent = obj ? index$2(state["".concat(obj.type.toLowerCase(), "Label")])(obj.d) || '' : '';
12418
- toolTipElem.style.visibility = tooltipContent ? 'visible' : 'hidden';
12419
- toolTipElem.innerHTML = tooltipContent;
12566
+ state.tooltip.content(obj ? index$3(state["".concat(obj.type.toLowerCase(), "Label")])(obj.d) || null : null);
12420
12567
 
12421
12568
  // set pointer if hovered object is clickable
12422
12569
  state.canvas.classList[obj && state["on".concat(objType, "Click")] || !obj && state.onBackgroundClick ? 'add' : 'remove']('clickable');