billboard.js 3.12.3 → 3.13.0-next.1

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.
Files changed (62) hide show
  1. package/dist/billboard.css +1 -1
  2. package/dist/billboard.js +199 -83
  3. package/dist/billboard.min.css +1 -1
  4. package/dist/billboard.min.js +10 -10
  5. package/dist/billboard.pkgd.js +661 -982
  6. package/dist/billboard.pkgd.min.js +15 -15
  7. package/dist/plugin/billboardjs-plugin-bubblecompare.js +5 -15
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  9. package/dist/plugin/billboardjs-plugin-sparkline.js +4 -13
  10. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  11. package/dist/plugin/billboardjs-plugin-stanford.js +6 -21
  12. package/dist/plugin/billboardjs-plugin-stanford.min.js +8 -8
  13. package/dist/plugin/billboardjs-plugin-tableview.js +4 -13
  14. package/dist/plugin/billboardjs-plugin-tableview.min.js +6 -6
  15. package/dist/plugin/billboardjs-plugin-textoverlap.js +4 -13
  16. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +3 -3
  17. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +60 -113
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  19. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +218 -434
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +2 -2
  21. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +299 -586
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +2 -2
  23. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +218 -434
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +3 -3
  25. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +291 -573
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +2 -2
  27. package/dist/theme/dark.css +1 -1
  28. package/dist/theme/dark.min.css +1 -1
  29. package/dist/theme/datalab.css +1 -1
  30. package/dist/theme/datalab.min.css +1 -1
  31. package/dist/theme/graph.css +1 -1
  32. package/dist/theme/graph.min.css +1 -1
  33. package/dist/theme/insight.css +1 -1
  34. package/dist/theme/insight.min.css +1 -1
  35. package/dist/theme/modern.css +1 -1
  36. package/dist/theme/modern.min.css +1 -1
  37. package/dist-esm/billboard.js +236 -67
  38. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +2 -2
  39. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +2 -2
  40. package/dist-esm/plugin/billboardjs-plugin-stanford.js +2 -2
  41. package/dist-esm/plugin/billboardjs-plugin-tableview.js +2 -2
  42. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +2 -2
  43. package/package.json +18 -18
  44. package/src/ChartInternal/ChartInternal.ts +1 -1
  45. package/src/ChartInternal/data/data.ts +11 -0
  46. package/src/ChartInternal/internals/class.ts +3 -1
  47. package/src/ChartInternal/internals/scale.ts +13 -5
  48. package/src/ChartInternal/shape/line.ts +170 -41
  49. package/src/ChartInternal/shape/shape.ts +8 -5
  50. package/src/config/Options/axis/y2.ts +13 -0
  51. package/src/config/Options/data/axis.ts +6 -2
  52. package/src/config/Options/data/data.ts +7 -4
  53. package/src/config/Options/shape/bar.ts +22 -6
  54. package/src/config/const.ts +10 -4
  55. package/src/config/resolver/shape.ts +4 -0
  56. package/src/index.esm.ts +1 -0
  57. package/types/axis.d.ts +8 -0
  58. package/types/bb.d.ts +1 -0
  59. package/types/index.d.ts +1 -0
  60. package/types/options.d.ts +3 -3
  61. package/types/options.shape.d.ts +10 -1
  62. package/types/types.d.ts +1 -0
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.12.3
8
+ * @version 3.13.0-next.1
9
9
  *
10
10
  * All-in-one packaged file for ease use of 'billboard.js' with dependant d3.js modules & polyfills.
11
11
  * - @types/d3-selection ^3.0.0
@@ -19240,6 +19240,7 @@ __webpack_require__.d(resolver_shape_namespaceObject, {
19240
19240
  areaSpline: function() { return areaSpline; },
19241
19241
  areaSplineRange: function() { return areaSplineRange; },
19242
19242
  areaStep: function() { return areaStep; },
19243
+ areaStepRange: function() { return areaStepRange; },
19243
19244
  bar: function() { return resolver_shape_bar; },
19244
19245
  bubble: function() { return resolver_shape_bubble; },
19245
19246
  candlestick: function() { return resolver_shape_candlestick; },
@@ -19269,13 +19270,11 @@ function none() {
19269
19270
 
19270
19271
 
19271
19272
  /* harmony default export */ function selection_select(select) {
19272
- if (typeof select !== "function")
19273
- select = selector(select);
19273
+ if (typeof select !== "function") select = selector(select);
19274
19274
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
19275
19275
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
19276
19276
  if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
19277
- if ("__data__" in node)
19278
- subnode.__data__ = node.__data__;
19277
+ if ("__data__" in node) subnode.__data__ = node.__data__;
19279
19278
  subgroup[i] = subnode;
19280
19279
  }
19281
19280
  }
@@ -19308,10 +19307,8 @@ function arrayAll(select) {
19308
19307
  };
19309
19308
  }
19310
19309
  /* harmony default export */ function selectAll(select) {
19311
- if (typeof select === "function")
19312
- select = arrayAll(select);
19313
- else
19314
- select = selectorAll(select);
19310
+ if (typeof select === "function") select = arrayAll(select);
19311
+ else select = selectorAll(select);
19315
19312
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
19316
19313
  for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
19317
19314
  if (node = group[i]) {
@@ -19369,8 +19366,7 @@ function childrenFilter(match) {
19369
19366
 
19370
19367
 
19371
19368
  /* harmony default export */ function selection_filter(match) {
19372
- if (typeof match !== "function")
19373
- match = matcher(match);
19369
+ if (typeof match !== "function") match = matcher(match);
19374
19370
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
19375
19371
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
19376
19372
  if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
@@ -19474,20 +19470,16 @@ function datum(node) {
19474
19470
  return node.__data__;
19475
19471
  }
19476
19472
  /* harmony default export */ function data(value, key) {
19477
- if (!arguments.length)
19478
- return Array.from(this, datum);
19473
+ if (!arguments.length) return Array.from(this, datum);
19479
19474
  var bind = key ? bindKey : bindIndex, parents = this._parents, groups = this._groups;
19480
- if (typeof value !== "function")
19481
- value = constant(value);
19475
+ if (typeof value !== "function") value = constant(value);
19482
19476
  for (var m = groups.length, update = new Array(m), enter = new Array(m), exit = new Array(m), j = 0; j < m; ++j) {
19483
19477
  var parent = parents[j], group = groups[j], groupLength = group.length, data = arraylike(value.call(parent, parent && parent.__data__, j, parents)), dataLength = data.length, enterGroup = enter[j] = new Array(dataLength), updateGroup = update[j] = new Array(dataLength), exitGroup = exit[j] = new Array(groupLength);
19484
19478
  bind(parent, group, enterGroup, updateGroup, exitGroup, data, key);
19485
19479
  for (var i0 = 0, i1 = 0, previous, next; i0 < dataLength; ++i0) {
19486
19480
  if (previous = enterGroup[i0]) {
19487
- if (i0 >= i1)
19488
- i1 = i0 + 1;
19489
- while (!(next = updateGroup[i1]) && ++i1 < dataLength)
19490
- ;
19481
+ if (i0 >= i1) i1 = i0 + 1;
19482
+ while (!(next = updateGroup[i1]) && ++i1 < dataLength) ;
19491
19483
  previous._next = next || null;
19492
19484
  }
19493
19485
  }
@@ -19513,20 +19505,16 @@ function arraylike(data) {
19513
19505
  var enter = this.enter(), update = this, exit = this.exit();
19514
19506
  if (typeof onenter === "function") {
19515
19507
  enter = onenter(enter);
19516
- if (enter)
19517
- enter = enter.selection();
19508
+ if (enter) enter = enter.selection();
19518
19509
  } else {
19519
19510
  enter = enter.append(onenter + "");
19520
19511
  }
19521
19512
  if (onupdate != null) {
19522
19513
  update = onupdate(update);
19523
- if (update)
19524
- update = update.selection();
19514
+ if (update) update = update.selection();
19525
19515
  }
19526
- if (onexit == null)
19527
- exit.remove();
19528
- else
19529
- onexit(exit);
19516
+ if (onexit == null) exit.remove();
19517
+ else onexit(exit);
19530
19518
  return enter && update ? enter.merge(update).order() : update;
19531
19519
  }
19532
19520
 
@@ -19552,8 +19540,7 @@ function arraylike(data) {
19552
19540
  for (var groups = this._groups, j = -1, m = groups.length; ++j < m; ) {
19553
19541
  for (var group = groups[j], i = group.length - 1, next = group[i], node; --i >= 0; ) {
19554
19542
  if (node = group[i]) {
19555
- if (next && node.compareDocumentPosition(next) ^ 4)
19556
- next.parentNode.insertBefore(node, next);
19543
+ if (next && node.compareDocumentPosition(next) ^ 4) next.parentNode.insertBefore(node, next);
19557
19544
  next = node;
19558
19545
  }
19559
19546
  }
@@ -19564,8 +19551,7 @@ function arraylike(data) {
19564
19551
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/sort.js
19565
19552
 
19566
19553
  /* harmony default export */ function sort(compare) {
19567
- if (!compare)
19568
- compare = ascending;
19554
+ if (!compare) compare = ascending;
19569
19555
  function compareNode(a, b) {
19570
19556
  return a && b ? compare(a.__data__, b.__data__) : !a - !b;
19571
19557
  }
@@ -19601,8 +19587,7 @@ function ascending(a, b) {
19601
19587
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
19602
19588
  for (var group = groups[j], i = 0, n = group.length; i < n; ++i) {
19603
19589
  var node = group[i];
19604
- if (node)
19605
- return node;
19590
+ if (node) return node;
19606
19591
  }
19607
19592
  }
19608
19593
  return null;
@@ -19611,8 +19596,7 @@ function ascending(a, b) {
19611
19596
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/size.js
19612
19597
  /* harmony default export */ function size() {
19613
19598
  let size = 0;
19614
- for (const node of this)
19615
- ++size;
19599
+ for (const node of this) ++size;
19616
19600
  return size;
19617
19601
  }
19618
19602
 
@@ -19625,8 +19609,7 @@ function ascending(a, b) {
19625
19609
  /* harmony default export */ function each(callback) {
19626
19610
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
19627
19611
  for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
19628
- if (node = group[i])
19629
- callback.call(node, node.__data__, i, group);
19612
+ if (node = group[i]) callback.call(node, node.__data__, i, group);
19630
19613
  }
19631
19614
  }
19632
19615
  return this;
@@ -19646,8 +19629,7 @@ var xhtml = "http://www.w3.org/1999/xhtml";
19646
19629
 
19647
19630
  /* harmony default export */ function namespace(name) {
19648
19631
  var prefix = name += "", i = prefix.indexOf(":");
19649
- if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns")
19650
- name = name.slice(i + 1);
19632
+ if (i >= 0 && (prefix = name.slice(0, i)) !== "xmlns") name = name.slice(i + 1);
19651
19633
  return namespaces.hasOwnProperty(prefix) ? { space: namespaces[prefix], local: name } : name;
19652
19634
  }
19653
19635
 
@@ -19676,19 +19658,15 @@ function attrConstantNS(fullname, value) {
19676
19658
  function attrFunction(name, value) {
19677
19659
  return function() {
19678
19660
  var v = value.apply(this, arguments);
19679
- if (v == null)
19680
- this.removeAttribute(name);
19681
- else
19682
- this.setAttribute(name, v);
19661
+ if (v == null) this.removeAttribute(name);
19662
+ else this.setAttribute(name, v);
19683
19663
  };
19684
19664
  }
19685
19665
  function attrFunctionNS(fullname, value) {
19686
19666
  return function() {
19687
19667
  var v = value.apply(this, arguments);
19688
- if (v == null)
19689
- this.removeAttributeNS(fullname.space, fullname.local);
19690
- else
19691
- this.setAttributeNS(fullname.space, fullname.local, v);
19668
+ if (v == null) this.removeAttributeNS(fullname.space, fullname.local);
19669
+ else this.setAttributeNS(fullname.space, fullname.local, v);
19692
19670
  };
19693
19671
  }
19694
19672
  /* harmony default export */ function attr(name, value) {
@@ -19720,10 +19698,8 @@ function styleConstant(name, value, priority) {
19720
19698
  function styleFunction(name, value, priority) {
19721
19699
  return function() {
19722
19700
  var v = value.apply(this, arguments);
19723
- if (v == null)
19724
- this.style.removeProperty(name);
19725
- else
19726
- this.style.setProperty(name, v, priority);
19701
+ if (v == null) this.style.removeProperty(name);
19702
+ else this.style.setProperty(name, v, priority);
19727
19703
  };
19728
19704
  }
19729
19705
  /* harmony default export */ function style(name, value, priority) {
@@ -19747,10 +19723,8 @@ function propertyConstant(name, value) {
19747
19723
  function propertyFunction(name, value) {
19748
19724
  return function() {
19749
19725
  var v = value.apply(this, arguments);
19750
- if (v == null)
19751
- delete this[name];
19752
- else
19753
- this[name] = v;
19726
+ if (v == null) delete this[name];
19727
+ else this[name] = v;
19754
19728
  };
19755
19729
  }
19756
19730
  /* harmony default export */ function property(name, value) {
@@ -19789,13 +19763,11 @@ ClassList.prototype = {
19789
19763
  };
19790
19764
  function classedAdd(node, names) {
19791
19765
  var list = classList(node), i = -1, n = names.length;
19792
- while (++i < n)
19793
- list.add(names[i]);
19766
+ while (++i < n) list.add(names[i]);
19794
19767
  }
19795
19768
  function classedRemove(node, names) {
19796
19769
  var list = classList(node), i = -1, n = names.length;
19797
- while (++i < n)
19798
- list.remove(names[i]);
19770
+ while (++i < n) list.remove(names[i]);
19799
19771
  }
19800
19772
  function classedTrue(names) {
19801
19773
  return function() {
@@ -19816,9 +19788,7 @@ function classedFunction(names, value) {
19816
19788
  var names = classArray(name + "");
19817
19789
  if (arguments.length < 2) {
19818
19790
  var list = classList(this.node()), i = -1, n = names.length;
19819
- while (++i < n)
19820
- if (!list.contains(names[i]))
19821
- return false;
19791
+ while (++i < n) if (!list.contains(names[i])) return false;
19822
19792
  return true;
19823
19793
  }
19824
19794
  return this.each((typeof value === "function" ? classedFunction : value ? classedTrue : classedFalse)(names, value));
@@ -19864,8 +19834,7 @@ function htmlFunction(value) {
19864
19834
 
19865
19835
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/raise.js
19866
19836
  function raise() {
19867
- if (this.nextSibling)
19868
- this.parentNode.appendChild(this);
19837
+ if (this.nextSibling) this.parentNode.appendChild(this);
19869
19838
  }
19870
19839
  /* harmony default export */ function selection_raise() {
19871
19840
  return this.each(raise);
@@ -19873,8 +19842,7 @@ function raise() {
19873
19842
 
19874
19843
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/lower.js
19875
19844
  function lower() {
19876
- if (this.previousSibling)
19877
- this.parentNode.insertBefore(this, this.parentNode.firstChild);
19845
+ if (this.previousSibling) this.parentNode.insertBefore(this, this.parentNode.firstChild);
19878
19846
  }
19879
19847
  /* harmony default export */ function selection_lower() {
19880
19848
  return this.each(lower);
@@ -19924,8 +19892,7 @@ function constantNull() {
19924
19892
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/selection/remove.js
19925
19893
  function remove() {
19926
19894
  var parent = this.parentNode;
19927
- if (parent)
19928
- parent.removeChild(this);
19895
+ if (parent) parent.removeChild(this);
19929
19896
  }
19930
19897
  /* harmony default export */ function selection_remove() {
19931
19898
  return this.each(remove);
@@ -19958,16 +19925,14 @@ function contextListener(listener) {
19958
19925
  function parseTypenames(typenames) {
19959
19926
  return typenames.trim().split(/^|\s+/).map(function(t) {
19960
19927
  var name = "", i = t.indexOf(".");
19961
- if (i >= 0)
19962
- name = t.slice(i + 1), t = t.slice(0, i);
19928
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
19963
19929
  return { type: t, name };
19964
19930
  });
19965
19931
  }
19966
19932
  function onRemove(typename) {
19967
19933
  return function() {
19968
19934
  var on = this.__on;
19969
- if (!on)
19970
- return;
19935
+ if (!on) return;
19971
19936
  for (var j = 0, i = -1, m = on.length, o; j < m; ++j) {
19972
19937
  if (o = on[j], (!typename.type || o.type === typename.type) && o.name === typename.name) {
19973
19938
  this.removeEventListener(o.type, o.listener, o.options);
@@ -19975,49 +19940,42 @@ function onRemove(typename) {
19975
19940
  on[++i] = o;
19976
19941
  }
19977
19942
  }
19978
- if (++i)
19979
- on.length = i;
19980
- else
19981
- delete this.__on;
19943
+ if (++i) on.length = i;
19944
+ else delete this.__on;
19982
19945
  };
19983
19946
  }
19984
19947
  function onAdd(typename, value, options) {
19985
19948
  return function() {
19986
19949
  var on = this.__on, o, listener = contextListener(value);
19987
- if (on)
19988
- for (var j = 0, m = on.length; j < m; ++j) {
19989
- if ((o = on[j]).type === typename.type && o.name === typename.name) {
19990
- this.removeEventListener(o.type, o.listener, o.options);
19991
- this.addEventListener(o.type, o.listener = listener, o.options = options);
19992
- o.value = value;
19993
- return;
19994
- }
19950
+ if (on) for (var j = 0, m = on.length; j < m; ++j) {
19951
+ if ((o = on[j]).type === typename.type && o.name === typename.name) {
19952
+ this.removeEventListener(o.type, o.listener, o.options);
19953
+ this.addEventListener(o.type, o.listener = listener, o.options = options);
19954
+ o.value = value;
19955
+ return;
19995
19956
  }
19957
+ }
19996
19958
  this.addEventListener(typename.type, listener, options);
19997
19959
  o = { type: typename.type, name: typename.name, value, listener, options };
19998
- if (!on)
19999
- this.__on = [o];
20000
- else
20001
- on.push(o);
19960
+ if (!on) this.__on = [o];
19961
+ else on.push(o);
20002
19962
  };
20003
19963
  }
20004
19964
  /* harmony default export */ function on(typename, value, options) {
20005
19965
  var typenames = parseTypenames(typename + ""), i, n = typenames.length, t;
20006
19966
  if (arguments.length < 2) {
20007
19967
  var on = this.node().__on;
20008
- if (on)
20009
- for (var j = 0, m = on.length, o; j < m; ++j) {
20010
- for (i = 0, o = on[j]; i < n; ++i) {
20011
- if ((t = typenames[i]).type === o.type && t.name === o.name) {
20012
- return o.value;
20013
- }
19968
+ if (on) for (var j = 0, m = on.length, o; j < m; ++j) {
19969
+ for (i = 0, o = on[j]; i < n; ++i) {
19970
+ if ((t = typenames[i]).type === o.type && t.name === o.name) {
19971
+ return o.value;
20014
19972
  }
20015
19973
  }
19974
+ }
20016
19975
  return;
20017
19976
  }
20018
19977
  on = value ? onAdd : onRemove;
20019
- for (i = 0; i < n; ++i)
20020
- this.each(on(typenames[i], value, options));
19978
+ for (i = 0; i < n; ++i) this.each(on(typenames[i], value, options));
20021
19979
  return this;
20022
19980
  }
20023
19981
 
@@ -20029,10 +19987,8 @@ function dispatchEvent(node, type, params) {
20029
19987
  event = new event(type, params);
20030
19988
  } else {
20031
19989
  event = window.document.createEvent("Event");
20032
- if (params)
20033
- event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
20034
- else
20035
- event.initEvent(type, false, false);
19990
+ if (params) event.initEvent(type, params.bubbles, params.cancelable), event.detail = params.detail;
19991
+ else event.initEvent(type, false, false);
20036
19992
  }
20037
19993
  node.dispatchEvent(event);
20038
19994
  }
@@ -20054,8 +20010,7 @@ function dispatchFunction(type, params) {
20054
20010
  /* harmony default export */ function* iterator() {
20055
20011
  for (var groups = this._groups, j = 0, m = groups.length; j < m; ++j) {
20056
20012
  for (var group = groups[j], i = 0, n = group.length, node; i < n; ++i) {
20057
- if (node = group[i])
20058
- yield node;
20013
+ if (node = group[i]) yield node;
20059
20014
  }
20060
20015
  }
20061
20016
  }
@@ -20175,8 +20130,7 @@ function timeInterval(floori, offseti, count, field) {
20175
20130
  const range = [];
20176
20131
  start = interval.ceil(start);
20177
20132
  step = step == null ? 1 : Math.floor(step);
20178
- if (!(start < stop) || !(step > 0))
20179
- return range;
20133
+ if (!(start < stop) || !(step > 0)) return range;
20180
20134
  let previous;
20181
20135
  do
20182
20136
  range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
@@ -20185,21 +20139,17 @@ function timeInterval(floori, offseti, count, field) {
20185
20139
  };
20186
20140
  interval.filter = (test) => {
20187
20141
  return timeInterval((date) => {
20188
- if (date >= date)
20189
- while (floori(date), !test(date))
20190
- date.setTime(date - 1);
20142
+ if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
20191
20143
  }, (date, step) => {
20192
20144
  if (date >= date) {
20193
- if (step < 0)
20194
- while (++step <= 0) {
20195
- while (offseti(date, -1), !test(date)) {
20196
- }
20145
+ if (step < 0) while (++step <= 0) {
20146
+ while (offseti(date, -1), !test(date)) {
20197
20147
  }
20198
- else
20199
- while (--step >= 0) {
20200
- while (offseti(date, 1), !test(date)) {
20201
- }
20148
+ }
20149
+ else while (--step >= 0) {
20150
+ while (offseti(date, 1), !test(date)) {
20202
20151
  }
20152
+ }
20203
20153
  }
20204
20154
  });
20205
20155
  };
@@ -20487,17 +20437,13 @@ function formatLocale(locale) {
20487
20437
  function newFormat(specifier, formats2) {
20488
20438
  return function(date) {
20489
20439
  var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format;
20490
- if (!(date instanceof Date))
20491
- date = /* @__PURE__ */ new Date(+date);
20440
+ if (!(date instanceof Date)) date = /* @__PURE__ */ new Date(+date);
20492
20441
  while (++i < n) {
20493
20442
  if (specifier.charCodeAt(i) === 37) {
20494
20443
  string.push(specifier.slice(j, i));
20495
- if ((pad2 = pads[c = specifier.charAt(++i)]) != null)
20496
- c = specifier.charAt(++i);
20497
- else
20498
- pad2 = c === "e" ? " " : "0";
20499
- if (format = formats2[c])
20500
- c = format(date, pad2);
20444
+ if ((pad2 = pads[c = specifier.charAt(++i)]) != null) c = specifier.charAt(++i);
20445
+ else pad2 = c === "e" ? " " : "0";
20446
+ if (format = formats2[c]) c = format(date, pad2);
20501
20447
  string.push(c);
20502
20448
  j = i + 1;
20503
20449
  }
@@ -20509,23 +20455,15 @@ function formatLocale(locale) {
20509
20455
  function newParse(specifier, Z) {
20510
20456
  return function(string) {
20511
20457
  var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day;
20512
- if (i != string.length)
20513
- return null;
20514
- if ("Q" in d)
20515
- return new Date(d.Q);
20516
- if ("s" in d)
20517
- return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
20518
- if (Z && !("Z" in d))
20519
- d.Z = 0;
20520
- if ("p" in d)
20521
- d.H = d.H % 12 + d.p * 12;
20522
- if (d.m === void 0)
20523
- d.m = "q" in d ? d.q : 0;
20458
+ if (i != string.length) return null;
20459
+ if ("Q" in d) return new Date(d.Q);
20460
+ if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
20461
+ if (Z && !("Z" in d)) d.Z = 0;
20462
+ if ("p" in d) d.H = d.H % 12 + d.p * 12;
20463
+ if (d.m === void 0) d.m = "q" in d ? d.q : 0;
20524
20464
  if ("V" in d) {
20525
- if (d.V < 1 || d.V > 53)
20526
- return null;
20527
- if (!("w" in d))
20528
- d.w = 1;
20465
+ if (d.V < 1 || d.V > 53) return null;
20466
+ if (!("w" in d)) d.w = 1;
20529
20467
  if ("Z" in d) {
20530
20468
  week = utcDate(newDate(d.y, 0, 1)), day = week.getUTCDay();
20531
20469
  week = day > 4 || day === 0 ? utcMonday.ceil(week) : utcMonday(week);
@@ -20542,8 +20480,7 @@ function formatLocale(locale) {
20542
20480
  d.d = week.getDate() + (d.w + 6) % 7;
20543
20481
  }
20544
20482
  } else if ("W" in d || "U" in d) {
20545
- if (!("w" in d))
20546
- d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
20483
+ if (!("w" in d)) d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0;
20547
20484
  day = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay();
20548
20485
  d.m = 0;
20549
20486
  d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day + 5) % 7 : d.w + d.U * 7 - (day + 6) % 7;
@@ -20559,14 +20496,12 @@ function formatLocale(locale) {
20559
20496
  function parseSpecifier(d, specifier, string, j) {
20560
20497
  var i = 0, n = specifier.length, m = string.length, c, parse;
20561
20498
  while (i < n) {
20562
- if (j >= m)
20563
- return -1;
20499
+ if (j >= m) return -1;
20564
20500
  c = specifier.charCodeAt(i++);
20565
20501
  if (c === 37) {
20566
20502
  c = specifier.charAt(i++);
20567
20503
  parse = parses[c in pads ? specifier.charAt(i++) : c];
20568
- if (!parse || (j = parse(d, string, j)) < 0)
20569
- return -1;
20504
+ if (!parse || (j = parse(d, string, j)) < 0) return -1;
20570
20505
  } else if (c != string.charCodeAt(j++)) {
20571
20506
  return -1;
20572
20507
  }
@@ -22149,6 +22084,7 @@ const $ZOOM = {
22149
22084
  * - area-spline
22150
22085
  * - area-spline-range
22151
22086
  * - area-step
22087
+ * - area-step-range
22152
22088
  * - bar
22153
22089
  * - bubble
22154
22090
  * - candlestick
@@ -22180,6 +22116,7 @@ const $ZOOM = {
22180
22116
  * areaSpline,
22181
22117
  * areaSplineRange,
22182
22118
  * areaStep,
22119
+ * areaStepRange,
22183
22120
  * bar,
22184
22121
  * bubble,
22185
22122
  * candlestick,
@@ -22228,6 +22165,7 @@ const $ZOOM = {
22228
22165
  * areaSpline,
22229
22166
  * areaSplineRange,
22230
22167
  * areaStep,
22168
+ * areaStepRange,
22231
22169
  * bar,
22232
22170
  * bubble,
22233
22171
  * candlestick,
@@ -22619,7 +22557,7 @@ const $ZOOM = {
22619
22557
  data_onhidden: void 0,
22620
22558
  /**
22621
22559
  * Set a callback for minimum data
22622
- * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
22560
+ * - **NOTE:** For 'area-line-range', 'area-step-range' and 'area-spline-range', `mid` data will be taken for the comparison
22623
22561
  * @name data․onmin
22624
22562
  * @memberof Options
22625
22563
  * @type {Function}
@@ -22634,7 +22572,7 @@ const $ZOOM = {
22634
22572
  data_onmin: void 0,
22635
22573
  /**
22636
22574
  * Set a callback for maximum data
22637
- * - **NOTE:** For 'area-line-range' and 'area-spline-range', `mid` data will be taken for the comparison
22575
+ * - **NOTE:** For 'area-line-range', 'area-step-range' and 'area-spline-range', `mid` data will be taken for the comparison
22638
22576
  * @name data․onmax
22639
22577
  * @memberof Options
22640
22578
  * @type {Function}
@@ -22737,7 +22675,7 @@ const $ZOOM = {
22737
22675
  * type: "bar"
22738
22676
  * }
22739
22677
  *
22740
- * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
22678
+ * // for 'range' types('area-line-range' or 'area-step-range' or 'area-spline-range'), data should contain:
22741
22679
  * // - an array of [high, mid, low] data following the order
22742
22680
  * // - or an object with 'high', 'mid' and 'low' key value
22743
22681
  * data: {
@@ -22822,7 +22760,7 @@ const $ZOOM = {
22822
22760
  * type: "bar"
22823
22761
  * }
22824
22762
  *
22825
- * // for 'range' types('area-line-range' or 'area-spline-range'), data should contain:
22763
+ * // for 'range' types('area-line-range' or 'area-step-range' or 'area-spline-range'), data should contain:
22826
22764
  * // - an array of [high, mid, low] data following the order
22827
22765
  * // - or an object with 'high', 'mid' and 'low' key value
22828
22766
  * data: {
@@ -22971,8 +22909,7 @@ var noop = { value: () => {
22971
22909
  } };
22972
22910
  function dispatch_dispatch() {
22973
22911
  for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
22974
- if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t))
22975
- throw new Error("illegal type: " + t);
22912
+ if (!(t = arguments[i] + "") || t in _ || /[\s.]/.test(t)) throw new Error("illegal type: " + t);
22976
22913
  _[t] = [];
22977
22914
  }
22978
22915
  return new Dispatch(_);
@@ -22983,10 +22920,8 @@ function Dispatch(_) {
22983
22920
  function dispatch_parseTypenames(typenames, types) {
22984
22921
  return typenames.trim().split(/^|\s+/).map(function(t) {
22985
22922
  var name = "", i = t.indexOf(".");
22986
- if (i >= 0)
22987
- name = t.slice(i + 1), t = t.slice(0, i);
22988
- if (t && !types.hasOwnProperty(t))
22989
- throw new Error("unknown type: " + t);
22923
+ if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
22924
+ if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
22990
22925
  return { type: t, name };
22991
22926
  });
22992
22927
  }
@@ -22995,42 +22930,29 @@ Dispatch.prototype = dispatch_dispatch.prototype = {
22995
22930
  on: function(typename, callback) {
22996
22931
  var _ = this._, T = dispatch_parseTypenames(typename + "", _), t, i = -1, n = T.length;
22997
22932
  if (arguments.length < 2) {
22998
- while (++i < n)
22999
- if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name)))
23000
- return t;
22933
+ while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
23001
22934
  return;
23002
22935
  }
23003
- if (callback != null && typeof callback !== "function")
23004
- throw new Error("invalid callback: " + callback);
22936
+ if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
23005
22937
  while (++i < n) {
23006
- if (t = (typename = T[i]).type)
23007
- _[t] = set(_[t], typename.name, callback);
23008
- else if (callback == null)
23009
- for (t in _)
23010
- _[t] = set(_[t], typename.name, null);
22938
+ if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
22939
+ else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
23011
22940
  }
23012
22941
  return this;
23013
22942
  },
23014
22943
  copy: function() {
23015
22944
  var copy = {}, _ = this._;
23016
- for (var t in _)
23017
- copy[t] = _[t].slice();
22945
+ for (var t in _) copy[t] = _[t].slice();
23018
22946
  return new Dispatch(copy);
23019
22947
  },
23020
22948
  call: function(type, that) {
23021
- if ((n = arguments.length - 2) > 0)
23022
- for (var args = new Array(n), i = 0, n, t; i < n; ++i)
23023
- args[i] = arguments[i + 2];
23024
- if (!this._.hasOwnProperty(type))
23025
- throw new Error("unknown type: " + type);
23026
- for (t = this._[type], i = 0, n = t.length; i < n; ++i)
23027
- t[i].value.apply(that, args);
22949
+ if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
22950
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
22951
+ for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
23028
22952
  },
23029
22953
  apply: function(type, that, args) {
23030
- if (!this._.hasOwnProperty(type))
23031
- throw new Error("unknown type: " + type);
23032
- for (var t = this._[type], i = 0, n = t.length; i < n; ++i)
23033
- t[i].value.apply(that, args);
22954
+ if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
22955
+ for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
23034
22956
  }
23035
22957
  };
23036
22958
  function get(type, name) {
@@ -23047,8 +22969,7 @@ function set(type, name, callback) {
23047
22969
  break;
23048
22970
  }
23049
22971
  }
23050
- if (callback != null)
23051
- type.push({ name, value: callback });
22972
+ if (callback != null) type.push({ name, value: callback });
23052
22973
  return type;
23053
22974
  }
23054
22975
  /* harmony default export */ var src_dispatch = (dispatch_dispatch);
@@ -23099,8 +23020,7 @@ function yesdrag(view, noclick) {
23099
23020
  }
23100
23021
  function extend(parent, definition) {
23101
23022
  var prototype = Object.create(parent.prototype);
23102
- for (var key in definition)
23103
- prototype[key] = definition[key];
23023
+ for (var key in definition) prototype[key] = definition[key];
23104
23024
  return prototype;
23105
23025
  }
23106
23026
 
@@ -23297,15 +23217,12 @@ function rgbn(n) {
23297
23217
  return new Rgb(n >> 16 & 255, n >> 8 & 255, n & 255, 1);
23298
23218
  }
23299
23219
  function rgba(r, g, b, a) {
23300
- if (a <= 0)
23301
- r = g = b = NaN;
23220
+ if (a <= 0) r = g = b = NaN;
23302
23221
  return new Rgb(r, g, b, a);
23303
23222
  }
23304
23223
  function rgbConvert(o) {
23305
- if (!(o instanceof Color))
23306
- o = color_color(o);
23307
- if (!o)
23308
- return new Rgb();
23224
+ if (!(o instanceof Color)) o = color_color(o);
23225
+ if (!o) return new Rgb();
23309
23226
  o = o.rgb();
23310
23227
  return new Rgb(o.r, o.g, o.b, o.opacity);
23311
23228
  }
@@ -23364,32 +23281,22 @@ function hex(value) {
23364
23281
  return (value < 16 ? "0" : "") + value.toString(16);
23365
23282
  }
23366
23283
  function hsla(h, s, l, a) {
23367
- if (a <= 0)
23368
- h = s = l = NaN;
23369
- else if (l <= 0 || l >= 1)
23370
- h = s = NaN;
23371
- else if (s <= 0)
23372
- h = NaN;
23284
+ if (a <= 0) h = s = l = NaN;
23285
+ else if (l <= 0 || l >= 1) h = s = NaN;
23286
+ else if (s <= 0) h = NaN;
23373
23287
  return new Hsl(h, s, l, a);
23374
23288
  }
23375
23289
  function hslConvert(o) {
23376
- if (o instanceof Hsl)
23377
- return new Hsl(o.h, o.s, o.l, o.opacity);
23378
- if (!(o instanceof Color))
23379
- o = color_color(o);
23380
- if (!o)
23381
- return new Hsl();
23382
- if (o instanceof Hsl)
23383
- return o;
23290
+ if (o instanceof Hsl) return new Hsl(o.h, o.s, o.l, o.opacity);
23291
+ if (!(o instanceof Color)) o = color_color(o);
23292
+ if (!o) return new Hsl();
23293
+ if (o instanceof Hsl) return o;
23384
23294
  o = o.rgb();
23385
23295
  var r = o.r / 255, g = o.g / 255, b = o.b / 255, min = Math.min(r, g, b), max = Math.max(r, g, b), h = NaN, s = max - min, l = (max + min) / 2;
23386
23296
  if (s) {
23387
- if (r === max)
23388
- h = (g - b) / s + (g < b) * 6;
23389
- else if (g === max)
23390
- h = (b - r) / s + 2;
23391
- else
23392
- h = (r - g) / s + 4;
23297
+ if (r === max) h = (g - b) / s + (g < b) * 6;
23298
+ else if (g === max) h = (b - r) / s + 2;
23299
+ else h = (r - g) / s + 4;
23393
23300
  s /= l < 0.5 ? max + min : 2 - max - min;
23394
23301
  h *= 60;
23395
23302
  } else {
@@ -23544,12 +23451,10 @@ var rgbBasisClosed = rgbSpline(basisClosed);
23544
23451
 
23545
23452
  ;// CONCATENATED MODULE: ./node_modules/d3-interpolate/src/numberArray.js
23546
23453
  /* harmony default export */ function numberArray(a, b) {
23547
- if (!b)
23548
- b = [];
23454
+ if (!b) b = [];
23549
23455
  var n = a ? Math.min(b.length, a.length) : 0, c = b.slice(), i;
23550
23456
  return function(t) {
23551
- for (i = 0; i < n; ++i)
23552
- c[i] = a[i] * (1 - t) + b[i] * t;
23457
+ for (i = 0; i < n; ++i) c[i] = a[i] * (1 - t) + b[i] * t;
23553
23458
  return c;
23554
23459
  };
23555
23460
  }
@@ -23565,13 +23470,10 @@ function isNumberArray(x) {
23565
23470
  }
23566
23471
  function genericArray(a, b) {
23567
23472
  var nb = b ? b.length : 0, na = a ? Math.min(nb, a.length) : 0, x = new Array(na), c = new Array(nb), i;
23568
- for (i = 0; i < na; ++i)
23569
- x[i] = value(a[i], b[i]);
23570
- for (; i < nb; ++i)
23571
- c[i] = b[i];
23473
+ for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
23474
+ for (; i < nb; ++i) c[i] = b[i];
23572
23475
  return function(t) {
23573
- for (i = 0; i < na; ++i)
23574
- c[i] = x[i](t);
23476
+ for (i = 0; i < na; ++i) c[i] = x[i](t);
23575
23477
  return c;
23576
23478
  };
23577
23479
  }
@@ -23595,10 +23497,8 @@ function genericArray(a, b) {
23595
23497
 
23596
23498
  /* harmony default export */ function object(a, b) {
23597
23499
  var i = {}, c = {}, k;
23598
- if (a === null || typeof a !== "object")
23599
- a = {};
23600
- if (b === null || typeof b !== "object")
23601
- b = {};
23500
+ if (a === null || typeof a !== "object") a = {};
23501
+ if (b === null || typeof b !== "object") b = {};
23602
23502
  for (k in b) {
23603
23503
  if (k in a) {
23604
23504
  i[k] = value(a[k], b[k]);
@@ -23607,8 +23507,7 @@ function genericArray(a, b) {
23607
23507
  }
23608
23508
  }
23609
23509
  return function(t) {
23610
- for (k in i)
23611
- c[k] = i[k](t);
23510
+ for (k in i) c[k] = i[k](t);
23612
23511
  return c;
23613
23512
  };
23614
23513
  }
@@ -23632,16 +23531,12 @@ function one(b) {
23632
23531
  while ((am = reA.exec(a)) && (bm = reB.exec(b))) {
23633
23532
  if ((bs = bm.index) > bi) {
23634
23533
  bs = b.slice(bi, bs);
23635
- if (s[i])
23636
- s[i] += bs;
23637
- else
23638
- s[++i] = bs;
23534
+ if (s[i]) s[i] += bs;
23535
+ else s[++i] = bs;
23639
23536
  }
23640
23537
  if ((am = am[0]) === (bm = bm[0])) {
23641
- if (s[i])
23642
- s[i] += bm;
23643
- else
23644
- s[++i] = bm;
23538
+ if (s[i]) s[i] += bm;
23539
+ else s[++i] = bm;
23645
23540
  } else {
23646
23541
  s[++i] = null;
23647
23542
  q.push({ i, x: number(am, bm) });
@@ -23650,14 +23545,11 @@ function one(b) {
23650
23545
  }
23651
23546
  if (bi < b.length) {
23652
23547
  bs = b.slice(bi);
23653
- if (s[i])
23654
- s[i] += bs;
23655
- else
23656
- s[++i] = bs;
23548
+ if (s[i]) s[i] += bs;
23549
+ else s[++i] = bs;
23657
23550
  }
23658
23551
  return s.length < 2 ? q[0] ? one(q[0].x) : zero(b) : (b = q.length, function(t) {
23659
- for (var i2 = 0, o; i2 < b; ++i2)
23660
- s[(o = q[i2]).i] = o.x(t);
23552
+ for (var i2 = 0, o; i2 < b; ++i2) s[(o = q[i2]).i] = o.x(t);
23661
23553
  return s.join("");
23662
23554
  });
23663
23555
  }
@@ -23680,8 +23572,7 @@ function one(b) {
23680
23572
  ;// CONCATENATED MODULE: ./node_modules/d3-selection/src/sourceEvent.js
23681
23573
  /* harmony default export */ function sourceEvent(event) {
23682
23574
  let sourceEvent;
23683
- while (sourceEvent = event.sourceEvent)
23684
- event = sourceEvent;
23575
+ while (sourceEvent = event.sourceEvent) event = sourceEvent;
23685
23576
  return event;
23686
23577
  }
23687
23578
 
@@ -23689,8 +23580,7 @@ function one(b) {
23689
23580
 
23690
23581
  /* harmony default export */ function src_pointer(event, node) {
23691
23582
  event = sourceEvent(event);
23692
- if (node === void 0)
23693
- node = event.currentTarget;
23583
+ if (node === void 0) node = event.currentTarget;
23694
23584
  if (node) {
23695
23585
  var svg = node.ownerSVGElement || node;
23696
23586
  if (svg.createSVGPoint) {
@@ -23723,14 +23613,11 @@ function Timer() {
23723
23613
  Timer.prototype = timer.prototype = {
23724
23614
  constructor: Timer,
23725
23615
  restart: function(callback, delay, time) {
23726
- if (typeof callback !== "function")
23727
- throw new TypeError("callback is not a function");
23616
+ if (typeof callback !== "function") throw new TypeError("callback is not a function");
23728
23617
  time = (time == null ? now() : +time) + (delay == null ? 0 : +delay);
23729
23618
  if (!this._next && taskTail !== this) {
23730
- if (taskTail)
23731
- taskTail._next = this;
23732
- else
23733
- taskHead = this;
23619
+ if (taskTail) taskTail._next = this;
23620
+ else taskHead = this;
23734
23621
  taskTail = this;
23735
23622
  }
23736
23623
  this._call = callback;
@@ -23755,8 +23642,7 @@ function timerFlush() {
23755
23642
  ++timer_frame;
23756
23643
  var t = taskHead, e;
23757
23644
  while (t) {
23758
- if ((e = clockNow - t._time) >= 0)
23759
- t._call.call(void 0, e);
23645
+ if ((e = clockNow - t._time) >= 0) t._call.call(void 0, e);
23760
23646
  t = t._next;
23761
23647
  }
23762
23648
  --timer_frame;
@@ -23774,15 +23660,13 @@ function wake() {
23774
23660
  }
23775
23661
  function poke() {
23776
23662
  var now2 = clock.now(), delay = now2 - clockLast;
23777
- if (delay > pokeDelay)
23778
- clockSkew -= delay, clockLast = now2;
23663
+ if (delay > pokeDelay) clockSkew -= delay, clockLast = now2;
23779
23664
  }
23780
23665
  function nap() {
23781
23666
  var t0, t1 = taskHead, t2, time = Infinity;
23782
23667
  while (t1) {
23783
23668
  if (t1._call) {
23784
- if (time > t1._time)
23785
- time = t1._time;
23669
+ if (time > t1._time) time = t1._time;
23786
23670
  t0 = t1, t1 = t1._next;
23787
23671
  } else {
23788
23672
  t2 = t1._next, t1._next = null;
@@ -23793,19 +23677,14 @@ function nap() {
23793
23677
  sleep(time);
23794
23678
  }
23795
23679
  function sleep(time) {
23796
- if (timer_frame)
23797
- return;
23798
- if (timeout)
23799
- timeout = clearTimeout(timeout);
23680
+ if (timer_frame) return;
23681
+ if (timeout) timeout = clearTimeout(timeout);
23800
23682
  var delay = time - clockNow;
23801
23683
  if (delay > 24) {
23802
- if (time < Infinity)
23803
- timeout = setTimeout(wake, time - clock.now() - clockSkew);
23804
- if (interval)
23805
- interval = clearInterval(interval);
23684
+ if (time < Infinity) timeout = setTimeout(wake, time - clock.now() - clockSkew);
23685
+ if (interval) interval = clearInterval(interval);
23806
23686
  } else {
23807
- if (!interval)
23808
- clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
23687
+ if (!interval) clockLast = clock.now(), interval = setInterval(poke, pokeDelay);
23809
23688
  timer_frame = 1, setFrame(wake);
23810
23689
  }
23811
23690
  }
@@ -23836,10 +23715,8 @@ var ENDING = 5;
23836
23715
  var ENDED = 6;
23837
23716
  /* harmony default export */ function schedule(node, name, id, index, group, timing) {
23838
23717
  var schedules = node.__transition;
23839
- if (!schedules)
23840
- node.__transition = {};
23841
- else if (id in schedules)
23842
- return;
23718
+ if (!schedules) node.__transition = {};
23719
+ else if (id in schedules) return;
23843
23720
  create(node, id, {
23844
23721
  name,
23845
23722
  index,
@@ -23858,20 +23735,17 @@ var ENDED = 6;
23858
23735
  }
23859
23736
  function init(node, id) {
23860
23737
  var schedule = schedule_get(node, id);
23861
- if (schedule.state > CREATED)
23862
- throw new Error("too late; already scheduled");
23738
+ if (schedule.state > CREATED) throw new Error("too late; already scheduled");
23863
23739
  return schedule;
23864
23740
  }
23865
23741
  function schedule_set(node, id) {
23866
23742
  var schedule = schedule_get(node, id);
23867
- if (schedule.state > STARTED)
23868
- throw new Error("too late; already running");
23743
+ if (schedule.state > STARTED) throw new Error("too late; already running");
23869
23744
  return schedule;
23870
23745
  }
23871
23746
  function schedule_get(node, id) {
23872
23747
  var schedule = node.__transition;
23873
- if (!schedule || !(schedule = schedule[id]))
23874
- throw new Error("transition not found");
23748
+ if (!schedule || !(schedule = schedule[id])) throw new Error("transition not found");
23875
23749
  return schedule;
23876
23750
  }
23877
23751
  function create(node, id, self) {
@@ -23881,19 +23755,15 @@ function create(node, id, self) {
23881
23755
  function schedule(elapsed) {
23882
23756
  self.state = SCHEDULED;
23883
23757
  self.timer.restart(start, self.delay, self.time);
23884
- if (self.delay <= elapsed)
23885
- start(elapsed - self.delay);
23758
+ if (self.delay <= elapsed) start(elapsed - self.delay);
23886
23759
  }
23887
23760
  function start(elapsed) {
23888
23761
  var i, j, n, o;
23889
- if (self.state !== SCHEDULED)
23890
- return stop();
23762
+ if (self.state !== SCHEDULED) return stop();
23891
23763
  for (i in schedules) {
23892
23764
  o = schedules[i];
23893
- if (o.name !== self.name)
23894
- continue;
23895
- if (o.state === STARTED)
23896
- return src_timeout(start);
23765
+ if (o.name !== self.name) continue;
23766
+ if (o.state === STARTED) return src_timeout(start);
23897
23767
  if (o.state === RUNNING) {
23898
23768
  o.state = ENDED;
23899
23769
  o.timer.stop();
@@ -23915,8 +23785,7 @@ function create(node, id, self) {
23915
23785
  });
23916
23786
  self.state = STARTING;
23917
23787
  self.on.call("start", node, node.__data__, self.index, self.group);
23918
- if (self.state !== STARTING)
23919
- return;
23788
+ if (self.state !== STARTING) return;
23920
23789
  self.state = STARTED;
23921
23790
  tween = new Array(n = self.tween.length);
23922
23791
  for (i = 0, j = -1; i < n; ++i) {
@@ -23940,8 +23809,7 @@ function create(node, id, self) {
23940
23809
  self.state = ENDED;
23941
23810
  self.timer.stop();
23942
23811
  delete schedules[id];
23943
- for (var i in schedules)
23944
- return;
23812
+ for (var i in schedules) return;
23945
23813
  delete node.__transition;
23946
23814
  }
23947
23815
  }
@@ -23950,8 +23818,7 @@ function create(node, id, self) {
23950
23818
 
23951
23819
  /* harmony default export */ function interrupt(node, name) {
23952
23820
  var schedules = node.__transition, schedule, active, empty = true, i;
23953
- if (!schedules)
23954
- return;
23821
+ if (!schedules) return;
23955
23822
  name = name == null ? null : name + "";
23956
23823
  for (i in schedules) {
23957
23824
  if ((schedule = schedules[i]).name !== name) {
@@ -23964,8 +23831,7 @@ function create(node, id, self) {
23964
23831
  schedule.on.call(active ? "interrupt" : "cancel", node, node.__data__, schedule.index, schedule.group);
23965
23832
  delete schedules[i];
23966
23833
  }
23967
- if (empty)
23968
- delete node.__transition;
23834
+ if (empty) delete node.__transition;
23969
23835
  }
23970
23836
 
23971
23837
  ;// CONCATENATED MODULE: ./node_modules/d3-transition/src/selection/interrupt.js
@@ -23988,14 +23854,10 @@ var identity = {
23988
23854
  };
23989
23855
  /* harmony default export */ function decompose(a, b, c, d, e, f) {
23990
23856
  var scaleX, scaleY, skewX;
23991
- if (scaleX = Math.sqrt(a * a + b * b))
23992
- a /= scaleX, b /= scaleX;
23993
- if (skewX = a * c + b * d)
23994
- c -= a * skewX, d -= b * skewX;
23995
- if (scaleY = Math.sqrt(c * c + d * d))
23996
- c /= scaleY, d /= scaleY, skewX /= scaleY;
23997
- if (a * d < b * c)
23998
- a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
23857
+ if (scaleX = Math.sqrt(a * a + b * b)) a /= scaleX, b /= scaleX;
23858
+ if (skewX = a * c + b * d) c -= a * skewX, d -= b * skewX;
23859
+ if (scaleY = Math.sqrt(c * c + d * d)) c /= scaleY, d /= scaleY, skewX /= scaleY;
23860
+ if (a * d < b * c) a = -a, b = -b, skewX = -skewX, scaleX = -scaleX;
23999
23861
  return {
24000
23862
  translateX: e,
24001
23863
  translateY: f,
@@ -24014,13 +23876,10 @@ function parseCss(value) {
24014
23876
  return m.isIdentity ? identity : decompose(m.a, m.b, m.c, m.d, m.e, m.f);
24015
23877
  }
24016
23878
  function parseSvg(value) {
24017
- if (value == null)
24018
- return identity;
24019
- if (!svgNode)
24020
- svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
23879
+ if (value == null) return identity;
23880
+ if (!svgNode) svgNode = document.createElementNS("http://www.w3.org/2000/svg", "g");
24021
23881
  svgNode.setAttribute("transform", value);
24022
- if (!(value = svgNode.transform.baseVal.consolidate()))
24023
- return identity;
23882
+ if (!(value = svgNode.transform.baseVal.consolidate())) return identity;
24024
23883
  value = value.matrix;
24025
23884
  return decompose(value.a, value.b, value.c, value.d, value.e, value.f);
24026
23885
  }
@@ -24042,10 +23901,8 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
24042
23901
  }
24043
23902
  function rotate(a, b, s, q) {
24044
23903
  if (a !== b) {
24045
- if (a - b > 180)
24046
- b += 360;
24047
- else if (b - a > 180)
24048
- a += 360;
23904
+ if (a - b > 180) b += 360;
23905
+ else if (b - a > 180) a += 360;
24049
23906
  q.push({ i: s.push(pop(s) + "rotate(", null, degParen) - 2, x: number(a, b) });
24050
23907
  } else if (b) {
24051
23908
  s.push(pop(s) + "rotate(" + b + degParen);
@@ -24076,8 +23933,7 @@ function interpolateTransform(parse, pxComma, pxParen, degParen) {
24076
23933
  a = b = null;
24077
23934
  return function(t) {
24078
23935
  var i = -1, n = q.length, o;
24079
- while (++i < n)
24080
- s[(o = q[i]).i] = o.x(t);
23936
+ while (++i < n) s[(o = q[i]).i] = o.x(t);
24081
23937
  return s.join("");
24082
23938
  };
24083
23939
  };
@@ -24106,8 +23962,7 @@ function tweenRemove(id, name) {
24106
23962
  }
24107
23963
  function tweenFunction(id, name, value) {
24108
23964
  var tween0, tween1;
24109
- if (typeof value !== "function")
24110
- throw new Error();
23965
+ if (typeof value !== "function") throw new Error();
24111
23966
  return function() {
24112
23967
  var schedule = schedule_set(this, id), tween = schedule.tween;
24113
23968
  if (tween !== tween0) {
@@ -24118,8 +23973,7 @@ function tweenFunction(id, name, value) {
24118
23973
  break;
24119
23974
  }
24120
23975
  }
24121
- if (i === n)
24122
- tween1.push(t);
23976
+ if (i === n) tween1.push(t);
24123
23977
  }
24124
23978
  schedule.tween = tween1;
24125
23979
  };
@@ -24190,8 +24044,7 @@ function attr_attrFunction(name, interpolate2, value) {
24190
24044
  var string00, string10, interpolate0;
24191
24045
  return function() {
24192
24046
  var string0, value1 = value(this), string1;
24193
- if (value1 == null)
24194
- return void this.removeAttribute(name);
24047
+ if (value1 == null) return void this.removeAttribute(name);
24195
24048
  string0 = this.getAttribute(name);
24196
24049
  string1 = value1 + "";
24197
24050
  return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
@@ -24201,8 +24054,7 @@ function attr_attrFunctionNS(fullname, interpolate2, value) {
24201
24054
  var string00, string10, interpolate0;
24202
24055
  return function() {
24203
24056
  var string0, value1 = value(this), string1;
24204
- if (value1 == null)
24205
- return void this.removeAttributeNS(fullname.space, fullname.local);
24057
+ if (value1 == null) return void this.removeAttributeNS(fullname.space, fullname.local);
24206
24058
  string0 = this.getAttributeNS(fullname.space, fullname.local);
24207
24059
  string1 = value1 + "";
24208
24060
  return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
@@ -24229,8 +24081,7 @@ function attrTweenNS(fullname, value) {
24229
24081
  var t0, i0;
24230
24082
  function tween() {
24231
24083
  var i = value.apply(this, arguments);
24232
- if (i !== i0)
24233
- t0 = (i0 = i) && attrInterpolateNS(fullname, i);
24084
+ if (i !== i0) t0 = (i0 = i) && attrInterpolateNS(fullname, i);
24234
24085
  return t0;
24235
24086
  }
24236
24087
  tween._value = value;
@@ -24240,8 +24091,7 @@ function attrTween(name, value) {
24240
24091
  var t0, i0;
24241
24092
  function tween() {
24242
24093
  var i = value.apply(this, arguments);
24243
- if (i !== i0)
24244
- t0 = (i0 = i) && attrInterpolate(name, i);
24094
+ if (i !== i0) t0 = (i0 = i) && attrInterpolate(name, i);
24245
24095
  return t0;
24246
24096
  }
24247
24097
  tween._value = value;
@@ -24249,12 +24099,9 @@ function attrTween(name, value) {
24249
24099
  }
24250
24100
  /* harmony default export */ function transition_attrTween(name, value) {
24251
24101
  var key = "attr." + name;
24252
- if (arguments.length < 2)
24253
- return (key = this.tween(key)) && key._value;
24254
- if (value == null)
24255
- return this.tween(key, null);
24256
- if (typeof value !== "function")
24257
- throw new Error();
24102
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
24103
+ if (value == null) return this.tween(key, null);
24104
+ if (typeof value !== "function") throw new Error();
24258
24105
  var fullname = namespace(name);
24259
24106
  return this.tween(key, (fullname.local ? attrTweenNS : attrTween)(fullname, value));
24260
24107
  }
@@ -24296,8 +24143,7 @@ function durationConstant(id, value) {
24296
24143
  ;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/ease.js
24297
24144
 
24298
24145
  function easeConstant(id, value) {
24299
- if (typeof value !== "function")
24300
- throw new Error();
24146
+ if (typeof value !== "function") throw new Error();
24301
24147
  return function() {
24302
24148
  schedule_set(this, id).ease = value;
24303
24149
  };
@@ -24312,14 +24158,12 @@ function easeConstant(id, value) {
24312
24158
  function easeVarying(id, value) {
24313
24159
  return function() {
24314
24160
  var v = value.apply(this, arguments);
24315
- if (typeof v !== "function")
24316
- throw new Error();
24161
+ if (typeof v !== "function") throw new Error();
24317
24162
  schedule_set(this, id).ease = v;
24318
24163
  };
24319
24164
  }
24320
24165
  /* harmony default export */ function transition_easeVarying(value) {
24321
- if (typeof value !== "function")
24322
- throw new Error();
24166
+ if (typeof value !== "function") throw new Error();
24323
24167
  return this.each(easeVarying(this._id, value));
24324
24168
  }
24325
24169
 
@@ -24327,8 +24171,7 @@ function easeVarying(id, value) {
24327
24171
 
24328
24172
 
24329
24173
  /* harmony default export */ function transition_filter(match) {
24330
- if (typeof match !== "function")
24331
- match = matcher(match);
24174
+ if (typeof match !== "function") match = matcher(match);
24332
24175
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
24333
24176
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = [], node, i = 0; i < n; ++i) {
24334
24177
  if ((node = group[i]) && match.call(node, node.__data__, i, group)) {
@@ -24342,8 +24185,7 @@ function easeVarying(id, value) {
24342
24185
  ;// CONCATENATED MODULE: ./node_modules/d3-transition/src/transition/merge.js
24343
24186
 
24344
24187
  /* harmony default export */ function transition_merge(transition) {
24345
- if (transition._id !== this._id)
24346
- throw new Error();
24188
+ if (transition._id !== this._id) throw new Error();
24347
24189
  for (var groups0 = this._groups, groups1 = transition._groups, m0 = groups0.length, m1 = groups1.length, m = Math.min(m0, m1), merges = new Array(m0), j = 0; j < m; ++j) {
24348
24190
  for (var group0 = groups0[j], group1 = groups1[j], n = group0.length, merge = merges[j] = new Array(n), node, i = 0; i < n; ++i) {
24349
24191
  if (node = group0[i] || group1[i]) {
@@ -24362,8 +24204,7 @@ function easeVarying(id, value) {
24362
24204
  function start(name) {
24363
24205
  return (name + "").trim().split(/^|\s+/).every(function(t) {
24364
24206
  var i = t.indexOf(".");
24365
- if (i >= 0)
24366
- t = t.slice(0, i);
24207
+ if (i >= 0) t = t.slice(0, i);
24367
24208
  return !t || t === "start";
24368
24209
  });
24369
24210
  }
@@ -24371,8 +24212,7 @@ function onFunction(id, name, listener) {
24371
24212
  var on0, on1, sit = start(name) ? init : schedule_set;
24372
24213
  return function() {
24373
24214
  var schedule = sit(this, id), on = schedule.on;
24374
- if (on !== on0)
24375
- (on1 = (on0 = on).copy()).on(name, listener);
24215
+ if (on !== on0) (on1 = (on0 = on).copy()).on(name, listener);
24376
24216
  schedule.on = on1;
24377
24217
  };
24378
24218
  }
@@ -24385,11 +24225,8 @@ function onFunction(id, name, listener) {
24385
24225
  function removeFunction(id) {
24386
24226
  return function() {
24387
24227
  var parent = this.parentNode;
24388
- for (var i in this.__transition)
24389
- if (+i !== id)
24390
- return;
24391
- if (parent)
24392
- parent.removeChild(this);
24228
+ for (var i in this.__transition) if (+i !== id) return;
24229
+ if (parent) parent.removeChild(this);
24393
24230
  };
24394
24231
  }
24395
24232
  /* harmony default export */ function transition_remove() {
@@ -24402,13 +24239,11 @@ function removeFunction(id) {
24402
24239
 
24403
24240
  /* harmony default export */ function transition_select(select) {
24404
24241
  var name = this._name, id = this._id;
24405
- if (typeof select !== "function")
24406
- select = selector(select);
24242
+ if (typeof select !== "function") select = selector(select);
24407
24243
  for (var groups = this._groups, m = groups.length, subgroups = new Array(m), j = 0; j < m; ++j) {
24408
24244
  for (var group = groups[j], n = group.length, subgroup = subgroups[j] = new Array(n), node, subnode, i = 0; i < n; ++i) {
24409
24245
  if ((node = group[i]) && (subnode = select.call(node, node.__data__, i, group))) {
24410
- if ("__data__" in node)
24411
- subnode.__data__ = node.__data__;
24246
+ if ("__data__" in node) subnode.__data__ = node.__data__;
24412
24247
  subgroup[i] = subnode;
24413
24248
  schedule(subgroup[i], name, id, i, subgroup, schedule_get(node, id));
24414
24249
  }
@@ -24423,8 +24258,7 @@ function removeFunction(id) {
24423
24258
 
24424
24259
  /* harmony default export */ function transition_selectAll(select) {
24425
24260
  var name = this._name, id = this._id;
24426
- if (typeof select !== "function")
24427
- select = selectorAll(select);
24261
+ if (typeof select !== "function") select = selectorAll(select);
24428
24262
  for (var groups = this._groups, m = groups.length, subgroups = [], parents = [], j = 0; j < m; ++j) {
24429
24263
  for (var group = groups[j], n = group.length, node, i = 0; i < n; ++i) {
24430
24264
  if (node = group[i]) {
@@ -24477,8 +24311,7 @@ function style_styleFunction(name, interpolate2, value) {
24477
24311
  var string00, string10, interpolate0;
24478
24312
  return function() {
24479
24313
  var string0 = styleValue(this, name), value1 = value(this), string1 = value1 + "";
24480
- if (value1 == null)
24481
- string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
24314
+ if (value1 == null) string1 = value1 = (this.style.removeProperty(name), styleValue(this, name));
24482
24315
  return string0 === string1 ? null : string0 === string00 && string1 === string10 ? interpolate0 : (string10 = string1, interpolate0 = interpolate2(string00 = string0, value1));
24483
24316
  };
24484
24317
  }
@@ -24486,8 +24319,7 @@ function styleMaybeRemove(id, name) {
24486
24319
  var on0, on1, listener0, key = "style." + name, event = "end." + key, remove;
24487
24320
  return function() {
24488
24321
  var schedule = schedule_set(this, id), on = schedule.on, listener = schedule.value[key] == null ? remove || (remove = style_styleRemove(name)) : void 0;
24489
- if (on !== on0 || listener0 !== listener)
24490
- (on1 = (on0 = on).copy()).on(event, listener0 = listener);
24322
+ if (on !== on0 || listener0 !== listener) (on1 = (on0 = on).copy()).on(event, listener0 = listener);
24491
24323
  schedule.on = on1;
24492
24324
  };
24493
24325
  }
@@ -24506,8 +24338,7 @@ function styleTween(name, value, priority) {
24506
24338
  var t, i0;
24507
24339
  function tween() {
24508
24340
  var i = value.apply(this, arguments);
24509
- if (i !== i0)
24510
- t = (i0 = i) && styleInterpolate(name, i, priority);
24341
+ if (i !== i0) t = (i0 = i) && styleInterpolate(name, i, priority);
24511
24342
  return t;
24512
24343
  }
24513
24344
  tween._value = value;
@@ -24515,12 +24346,9 @@ function styleTween(name, value, priority) {
24515
24346
  }
24516
24347
  /* harmony default export */ function transition_styleTween(name, value, priority) {
24517
24348
  var key = "style." + (name += "");
24518
- if (arguments.length < 2)
24519
- return (key = this.tween(key)) && key._value;
24520
- if (value == null)
24521
- return this.tween(key, null);
24522
- if (typeof value !== "function")
24523
- throw new Error();
24349
+ if (arguments.length < 2) return (key = this.tween(key)) && key._value;
24350
+ if (value == null) return this.tween(key, null);
24351
+ if (typeof value !== "function") throw new Error();
24524
24352
  return this.tween(key, styleTween(name, value, priority == null ? "" : priority));
24525
24353
  }
24526
24354
 
@@ -24551,8 +24379,7 @@ function textTween(value) {
24551
24379
  var t0, i0;
24552
24380
  function tween() {
24553
24381
  var i = value.apply(this, arguments);
24554
- if (i !== i0)
24555
- t0 = (i0 = i) && textInterpolate(i);
24382
+ if (i !== i0) t0 = (i0 = i) && textInterpolate(i);
24556
24383
  return t0;
24557
24384
  }
24558
24385
  tween._value = value;
@@ -24560,12 +24387,9 @@ function textTween(value) {
24560
24387
  }
24561
24388
  /* harmony default export */ function transition_textTween(value) {
24562
24389
  var key = "text";
24563
- if (arguments.length < 1)
24564
- return (key = this.tween(key)) && key._value;
24565
- if (value == null)
24566
- return this.tween(key, null);
24567
- if (typeof value !== "function")
24568
- throw new Error();
24390
+ if (arguments.length < 1) return (key = this.tween(key)) && key._value;
24391
+ if (value == null) return this.tween(key, null);
24392
+ if (typeof value !== "function") throw new Error();
24569
24393
  return this.tween(key, textTween(value));
24570
24394
  }
24571
24395
 
@@ -24596,8 +24420,7 @@ function textTween(value) {
24596
24420
  var on0, on1, that = this, id = that._id, size = that.size();
24597
24421
  return new Promise(function(resolve, reject) {
24598
24422
  var cancel = { value: reject }, end = { value: function() {
24599
- if (--size === 0)
24600
- resolve();
24423
+ if (--size === 0) resolve();
24601
24424
  } };
24602
24425
  that.each(function() {
24603
24426
  var schedule = schedule_set(this, id), on = schedule.on;
@@ -24609,8 +24432,7 @@ function textTween(value) {
24609
24432
  }
24610
24433
  schedule.on = on1;
24611
24434
  });
24612
- if (size === 0)
24613
- resolve();
24435
+ if (size === 0) resolve();
24614
24436
  });
24615
24437
  }
24616
24438
 
@@ -24892,9 +24714,7 @@ function defaultTouchable() {
24892
24714
  return navigator.maxTouchPoints || "ontouchstart" in this;
24893
24715
  }
24894
24716
  function local(node) {
24895
- while (!node.__brush)
24896
- if (!(node = node.parentNode))
24897
- return;
24717
+ while (!node.__brush) if (!(node = node.parentNode)) return;
24898
24718
  return node.__brush;
24899
24719
  }
24900
24720
  function brush_empty(extent) {
@@ -24991,15 +24811,12 @@ function brush_brush(dim) {
24991
24811
  }
24992
24812
  Emitter.prototype = {
24993
24813
  beforestart: function() {
24994
- if (++this.active === 1)
24995
- this.state.emitter = this, this.starting = true;
24814
+ if (++this.active === 1) this.state.emitter = this, this.starting = true;
24996
24815
  return this;
24997
24816
  },
24998
24817
  start: function(event, mode) {
24999
- if (this.starting)
25000
- this.starting = false, this.emit("start", event, mode);
25001
- else
25002
- this.emit("brush", event);
24818
+ if (this.starting) this.starting = false, this.emit("start", event, mode);
24819
+ else this.emit("brush", event);
25003
24820
  return this;
25004
24821
  },
25005
24822
  brush: function(event, mode) {
@@ -25007,8 +24824,7 @@ function brush_brush(dim) {
25007
24824
  return this;
25008
24825
  },
25009
24826
  end: function(event, mode) {
25010
- if (--this.active === 0)
25011
- delete this.state.emitter, this.emit("end", event, mode);
24827
+ if (--this.active === 0) delete this.state.emitter, this.emit("end", event, mode);
25012
24828
  return this;
25013
24829
  },
25014
24830
  emit: function(type2, event, mode) {
@@ -25028,10 +24844,8 @@ function brush_brush(dim) {
25028
24844
  }
25029
24845
  };
25030
24846
  function started(event) {
25031
- if (touchending && !event.touches)
25032
- return;
25033
- if (!filter.apply(this, arguments))
25034
- return;
24847
+ if (touchending && !event.touches) return;
24848
+ if (!filter.apply(this, arguments)) return;
25035
24849
  var that = this, type2 = event.target.__data__.type, mode = (keys && event.metaKey ? type2 = "overlay" : type2) === "selection" ? MODE_DRAG : keys && event.altKey ? MODE_CENTER : MODE_HANDLE, signX = dim === Y ? null : signsX[type2], signY = dim === X ? null : signsY[type2], state = local(that), extent2 = state.extent, selection = state.selection, W = extent2[0][0], w0, w1, N = extent2[0][1], n0, n1, E = extent2[1][0], e0, e1, S = extent2[1][1], s0, s1, dx = 0, dy = 0, moving, shifting = signX && signY && keys && event.shiftKey, lockX, lockY, points = Array.from(event.touches || [event], (t) => {
25036
24850
  const i = t.identifier;
25037
24851
  t = src_pointer(t, that);
@@ -25042,8 +24856,7 @@ function brush_brush(dim) {
25042
24856
  interrupt(that);
25043
24857
  var emit = emitter(that, arguments, true).beforestart();
25044
24858
  if (type2 === "overlay") {
25045
- if (selection)
25046
- moving = true;
24859
+ if (selection) moving = true;
25047
24860
  const pts = [points[0], points[1] || points[0]];
25048
24861
  state.selection = selection = [[
25049
24862
  w0 = dim === Y ? W : min(pts[0][0], pts[1][0]),
@@ -25052,8 +24865,7 @@ function brush_brush(dim) {
25052
24865
  e0 = dim === Y ? E : max(pts[0][0], pts[1][0]),
25053
24866
  s0 = dim === X ? S : max(pts[0][1], pts[1][1])
25054
24867
  ]];
25055
- if (points.length > 1)
25056
- move(event);
24868
+ if (points.length > 1) move(event);
25057
24869
  } else {
25058
24870
  w0 = selection[0][0];
25059
24871
  n0 = selection[0][1];
@@ -25071,8 +24883,7 @@ function brush_brush(dim) {
25071
24883
  emit.ended = ended;
25072
24884
  } else {
25073
24885
  var view = src_select(event.view).on("mousemove.brush", moved, true).on("mouseup.brush", ended, true);
25074
- if (keys)
25075
- view.on("keydown.brush", keydowned, true).on("keyup.brush", keyupped, true);
24886
+ if (keys) view.on("keydown.brush", keydowned, true).on("keyup.brush", keyupped, true);
25076
24887
  nodrag(event.view);
25077
24888
  }
25078
24889
  redraw.call(that);
@@ -25080,8 +24891,7 @@ function brush_brush(dim) {
25080
24891
  function moved(event2) {
25081
24892
  for (const p of event2.changedTouches || [event2]) {
25082
24893
  for (const d of points)
25083
- if (d.identifier === p.identifier)
25084
- d.cur = src_pointer(p, that);
24894
+ if (d.identifier === p.identifier) d.cur = src_pointer(p, that);
25085
24895
  }
25086
24896
  if (shifting && !lockX && !lockY && points.length === 1) {
25087
24897
  const point = points[0];
@@ -25091,8 +24901,7 @@ function brush_brush(dim) {
25091
24901
  lockX = true;
25092
24902
  }
25093
24903
  for (const point of points)
25094
- if (point.cur)
25095
- point[0] = point.cur[0], point[1] = point.cur[1];
24904
+ if (point.cur) point[0] = point.cur[0], point[1] = point.cur[1];
25096
24905
  moving = true;
25097
24906
  src_noevent(event2);
25098
24907
  move(event2);
@@ -25105,35 +24914,25 @@ function brush_brush(dim) {
25105
24914
  switch (mode) {
25106
24915
  case MODE_SPACE:
25107
24916
  case MODE_DRAG: {
25108
- if (signX)
25109
- dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
25110
- if (signY)
25111
- dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
24917
+ if (signX) dx = max(W - w0, min(E - e0, dx)), w1 = w0 + dx, e1 = e0 + dx;
24918
+ if (signY) dy = max(N - n0, min(S - s0, dy)), n1 = n0 + dy, s1 = s0 + dy;
25112
24919
  break;
25113
24920
  }
25114
24921
  case MODE_HANDLE: {
25115
24922
  if (points[1]) {
25116
- if (signX)
25117
- w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;
25118
- if (signY)
25119
- n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;
24923
+ if (signX) w1 = max(W, min(E, points[0][0])), e1 = max(W, min(E, points[1][0])), signX = 1;
24924
+ if (signY) n1 = max(N, min(S, points[0][1])), s1 = max(N, min(S, points[1][1])), signY = 1;
25120
24925
  } else {
25121
- if (signX < 0)
25122
- dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;
25123
- else if (signX > 0)
25124
- dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
25125
- if (signY < 0)
25126
- dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;
25127
- else if (signY > 0)
25128
- dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
24926
+ if (signX < 0) dx = max(W - w0, min(E - w0, dx)), w1 = w0 + dx, e1 = e0;
24927
+ else if (signX > 0) dx = max(W - e0, min(E - e0, dx)), w1 = w0, e1 = e0 + dx;
24928
+ if (signY < 0) dy = max(N - n0, min(S - n0, dy)), n1 = n0 + dy, s1 = s0;
24929
+ else if (signY > 0) dy = max(N - s0, min(S - s0, dy)), n1 = n0, s1 = s0 + dy;
25129
24930
  }
25130
24931
  break;
25131
24932
  }
25132
24933
  case MODE_CENTER: {
25133
- if (signX)
25134
- w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));
25135
- if (signY)
25136
- n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));
24934
+ if (signX) w1 = max(W, min(E, w0 - dx * signX)), e1 = max(W, min(E, e0 + dx * signX));
24935
+ if (signY) n1 = max(N, min(S, n0 - dy * signY)), s1 = max(N, min(S, s0 + dy * signY));
25137
24936
  break;
25138
24937
  }
25139
24938
  }
@@ -25141,22 +24940,17 @@ function brush_brush(dim) {
25141
24940
  signX *= -1;
25142
24941
  t = w0, w0 = e0, e0 = t;
25143
24942
  t = w1, w1 = e1, e1 = t;
25144
- if (type2 in flipX)
25145
- overlay.attr("cursor", cursors[type2 = flipX[type2]]);
24943
+ if (type2 in flipX) overlay.attr("cursor", cursors[type2 = flipX[type2]]);
25146
24944
  }
25147
24945
  if (s1 < n1) {
25148
24946
  signY *= -1;
25149
24947
  t = n0, n0 = s0, s0 = t;
25150
24948
  t = n1, n1 = s1, s1 = t;
25151
- if (type2 in flipY)
25152
- overlay.attr("cursor", cursors[type2 = flipY[type2]]);
25153
- }
25154
- if (state.selection)
25155
- selection = state.selection;
25156
- if (lockX)
25157
- w1 = selection[0][0], e1 = selection[1][0];
25158
- if (lockY)
25159
- n1 = selection[0][1], s1 = selection[1][1];
24949
+ if (type2 in flipY) overlay.attr("cursor", cursors[type2 = flipY[type2]]);
24950
+ }
24951
+ if (state.selection) selection = state.selection;
24952
+ if (lockX) w1 = selection[0][0], e1 = selection[1][0];
24953
+ if (lockY) n1 = selection[0][1], s1 = selection[1][1];
25160
24954
  if (selection[0][0] !== w1 || selection[0][1] !== n1 || selection[1][0] !== e1 || selection[1][1] !== s1) {
25161
24955
  state.selection = [[w1, n1], [e1, s1]];
25162
24956
  redraw.call(that);
@@ -25166,10 +24960,8 @@ function brush_brush(dim) {
25166
24960
  function ended(event2) {
25167
24961
  noevent_nopropagation(event2);
25168
24962
  if (event2.touches) {
25169
- if (event2.touches.length)
25170
- return;
25171
- if (touchending)
25172
- clearTimeout(touchending);
24963
+ if (event2.touches.length) return;
24964
+ if (touchending) clearTimeout(touchending);
25173
24965
  touchending = setTimeout(function() {
25174
24966
  touchending = null;
25175
24967
  }, 500);
@@ -25179,10 +24971,8 @@ function brush_brush(dim) {
25179
24971
  }
25180
24972
  group.attr("pointer-events", "all");
25181
24973
  overlay.attr("cursor", cursors.overlay);
25182
- if (state.selection)
25183
- selection = state.selection;
25184
- if (brush_empty(selection))
25185
- state.selection = null, redraw.call(that);
24974
+ if (state.selection) selection = state.selection;
24975
+ if (brush_empty(selection)) state.selection = null, redraw.call(that);
25186
24976
  emit.end(event2, mode.name);
25187
24977
  }
25188
24978
  function keydowned(event2) {
@@ -25193,10 +24983,8 @@ function brush_brush(dim) {
25193
24983
  }
25194
24984
  case 18: {
25195
24985
  if (mode === MODE_HANDLE) {
25196
- if (signX)
25197
- e0 = e1 - dx * signX, w0 = w1 + dx * signX;
25198
- if (signY)
25199
- s0 = s1 - dy * signY, n0 = n1 + dy * signY;
24986
+ if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
24987
+ if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
25200
24988
  mode = MODE_CENTER;
25201
24989
  move(event2);
25202
24990
  }
@@ -25204,14 +24992,10 @@ function brush_brush(dim) {
25204
24992
  }
25205
24993
  case 32: {
25206
24994
  if (mode === MODE_HANDLE || mode === MODE_CENTER) {
25207
- if (signX < 0)
25208
- e0 = e1 - dx;
25209
- else if (signX > 0)
25210
- w0 = w1 - dx;
25211
- if (signY < 0)
25212
- s0 = s1 - dy;
25213
- else if (signY > 0)
25214
- n0 = n1 - dy;
24995
+ if (signX < 0) e0 = e1 - dx;
24996
+ else if (signX > 0) w0 = w1 - dx;
24997
+ if (signY < 0) s0 = s1 - dy;
24998
+ else if (signY > 0) n0 = n1 - dy;
25215
24999
  mode = MODE_SPACE;
25216
25000
  overlay.attr("cursor", cursors.selection);
25217
25001
  move(event2);
@@ -25234,14 +25018,10 @@ function brush_brush(dim) {
25234
25018
  }
25235
25019
  case 18: {
25236
25020
  if (mode === MODE_CENTER) {
25237
- if (signX < 0)
25238
- e0 = e1;
25239
- else if (signX > 0)
25240
- w0 = w1;
25241
- if (signY < 0)
25242
- s0 = s1;
25243
- else if (signY > 0)
25244
- n0 = n1;
25021
+ if (signX < 0) e0 = e1;
25022
+ else if (signX > 0) w0 = w1;
25023
+ if (signY < 0) s0 = s1;
25024
+ else if (signY > 0) n0 = n1;
25245
25025
  mode = MODE_HANDLE;
25246
25026
  move(event2);
25247
25027
  }
@@ -25250,20 +25030,14 @@ function brush_brush(dim) {
25250
25030
  case 32: {
25251
25031
  if (mode === MODE_SPACE) {
25252
25032
  if (event2.altKey) {
25253
- if (signX)
25254
- e0 = e1 - dx * signX, w0 = w1 + dx * signX;
25255
- if (signY)
25256
- s0 = s1 - dy * signY, n0 = n1 + dy * signY;
25033
+ if (signX) e0 = e1 - dx * signX, w0 = w1 + dx * signX;
25034
+ if (signY) s0 = s1 - dy * signY, n0 = n1 + dy * signY;
25257
25035
  mode = MODE_CENTER;
25258
25036
  } else {
25259
- if (signX < 0)
25260
- e0 = e1;
25261
- else if (signX > 0)
25262
- w0 = w1;
25263
- if (signY < 0)
25264
- s0 = s1;
25265
- else if (signY > 0)
25266
- n0 = n1;
25037
+ if (signX < 0) e0 = e1;
25038
+ else if (signX > 0) w0 = w1;
25039
+ if (signY < 0) s0 = s1;
25040
+ else if (signY > 0) n0 = n1;
25267
25041
  mode = MODE_HANDLE;
25268
25042
  }
25269
25043
  overlay.attr("cursor", cursors[type2]);
@@ -25755,10 +25529,7 @@ var Options_spreadValues = (a, b) => {
25755
25529
  }
25756
25530
  return a;
25757
25531
  };
25758
- var __publicField = (obj, key, value) => {
25759
- Options_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
25760
- return value;
25761
- };
25532
+ var __publicField = (obj, key, value) => Options_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
25762
25533
 
25763
25534
 
25764
25535
 
@@ -26039,10 +25810,7 @@ class Store {
26039
25810
  ;// CONCATENATED MODULE: ./src/module/Cache.ts
26040
25811
  var Cache_defProp = Object.defineProperty;
26041
25812
  var Cache_defNormalProp = (obj, key, value) => key in obj ? Cache_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
26042
- var Cache_publicField = (obj, key, value) => {
26043
- Cache_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
26044
- return value;
26045
- };
25813
+ var Cache_publicField = (obj, key, value) => Cache_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
26046
25814
 
26047
25815
  const KEY = {
26048
25816
  bubbleBaseLength: "$baseLength",
@@ -26137,6 +25905,7 @@ const TYPE = {
26137
25905
  AREA_SPLINE: "area-spline",
26138
25906
  AREA_SPLINE_RANGE: "area-spline-range",
26139
25907
  AREA_STEP: "area-step",
25908
+ AREA_STEP_RANGE: "area-step-range",
26140
25909
  BAR: "bar",
26141
25910
  BUBBLE: "bubble",
26142
25911
  CANDLESTICK: "candlestick",
@@ -26158,6 +25927,7 @@ const TYPE_METHOD_NEEDED = {
26158
25927
  AREA_SPLINE: "initArea",
26159
25928
  AREA_SPLINE_RANGE: "initArea",
26160
25929
  AREA_STEP: "initArea",
25930
+ AREA_STEP_RANGE: "initArea",
26161
25931
  BAR: "initBar",
26162
25932
  BUBBLE: "initCircle",
26163
25933
  CANDLESTICK: "initCandlestick",
@@ -26179,11 +25949,13 @@ const TYPE_BY_CATEGORY = {
26179
25949
  TYPE.AREA_SPLINE,
26180
25950
  TYPE.AREA_SPLINE_RANGE,
26181
25951
  TYPE.AREA_LINE_RANGE,
26182
- TYPE.AREA_STEP
25952
+ TYPE.AREA_STEP,
25953
+ TYPE.AREA_STEP_RANGE
26183
25954
  ],
26184
25955
  AreaRange: [
26185
25956
  TYPE.AREA_SPLINE_RANGE,
26186
- TYPE.AREA_LINE_RANGE
25957
+ TYPE.AREA_LINE_RANGE,
25958
+ TYPE.AREA_STEP_RANGE
26187
25959
  ],
26188
25960
  Arc: [
26189
25961
  TYPE.PIE,
@@ -26200,11 +25972,13 @@ const TYPE_BY_CATEGORY = {
26200
25972
  TYPE.AREA_SPLINE_RANGE,
26201
25973
  TYPE.AREA_LINE_RANGE,
26202
25974
  TYPE.STEP,
26203
- TYPE.AREA_STEP
25975
+ TYPE.AREA_STEP,
25976
+ TYPE.AREA_STEP_RANGE
26204
25977
  ],
26205
25978
  Step: [
26206
25979
  TYPE.STEP,
26207
- TYPE.AREA_STEP
25980
+ TYPE.AREA_STEP,
25981
+ TYPE.AREA_STEP_RANGE
26208
25982
  ],
26209
25983
  Spline: [
26210
25984
  TYPE.SPLINE,
@@ -26402,8 +26176,7 @@ function formatDate(date) {
26402
26176
  var reFormat = new RegExp('["' + delimiter + "\n\r]"), DELIMITER = delimiter.charCodeAt(0);
26403
26177
  function parse(text, f) {
26404
26178
  var convert, columns, rows = parseRows(text, function(row, i) {
26405
- if (convert)
26406
- return convert(row, i - 1);
26179
+ if (convert) return convert(row, i - 1);
26407
26180
  columns = row, convert = f ? customConverter(row, f) : objectConverter(row);
26408
26181
  });
26409
26182
  rows.columns = columns || [];
@@ -26411,49 +26184,36 @@ function formatDate(date) {
26411
26184
  }
26412
26185
  function parseRows(text, f) {
26413
26186
  var rows = [], N = text.length, I = 0, n = 0, t, eof = N <= 0, eol = false;
26414
- if (text.charCodeAt(N - 1) === NEWLINE)
26415
- --N;
26416
- if (text.charCodeAt(N - 1) === RETURN)
26417
- --N;
26187
+ if (text.charCodeAt(N - 1) === NEWLINE) --N;
26188
+ if (text.charCodeAt(N - 1) === RETURN) --N;
26418
26189
  function token() {
26419
- if (eof)
26420
- return EOF;
26421
- if (eol)
26422
- return eol = false, EOL;
26190
+ if (eof) return EOF;
26191
+ if (eol) return eol = false, EOL;
26423
26192
  var i, j = I, c;
26424
26193
  if (text.charCodeAt(j) === QUOTE) {
26425
- while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE)
26426
- ;
26427
- if ((i = I) >= N)
26428
- eof = true;
26429
- else if ((c = text.charCodeAt(I++)) === NEWLINE)
26430
- eol = true;
26194
+ while (I++ < N && text.charCodeAt(I) !== QUOTE || text.charCodeAt(++I) === QUOTE) ;
26195
+ if ((i = I) >= N) eof = true;
26196
+ else if ((c = text.charCodeAt(I++)) === NEWLINE) eol = true;
26431
26197
  else if (c === RETURN) {
26432
26198
  eol = true;
26433
- if (text.charCodeAt(I) === NEWLINE)
26434
- ++I;
26199
+ if (text.charCodeAt(I) === NEWLINE) ++I;
26435
26200
  }
26436
26201
  return text.slice(j + 1, i - 1).replace(/""/g, '"');
26437
26202
  }
26438
26203
  while (I < N) {
26439
- if ((c = text.charCodeAt(i = I++)) === NEWLINE)
26440
- eol = true;
26204
+ if ((c = text.charCodeAt(i = I++)) === NEWLINE) eol = true;
26441
26205
  else if (c === RETURN) {
26442
26206
  eol = true;
26443
- if (text.charCodeAt(I) === NEWLINE)
26444
- ++I;
26445
- } else if (c !== DELIMITER)
26446
- continue;
26207
+ if (text.charCodeAt(I) === NEWLINE) ++I;
26208
+ } else if (c !== DELIMITER) continue;
26447
26209
  return text.slice(j, i);
26448
26210
  }
26449
26211
  return eof = true, text.slice(j, N);
26450
26212
  }
26451
26213
  while ((t = token()) !== EOF) {
26452
26214
  var row = [];
26453
- while (t !== EOL && t !== EOF)
26454
- row.push(t), t = token();
26455
- if (f && (row = f(row, n++)) == null)
26456
- continue;
26215
+ while (t !== EOL && t !== EOF) row.push(t), t = token();
26216
+ if (f && (row = f(row, n++)) == null) continue;
26457
26217
  rows.push(row);
26458
26218
  }
26459
26219
  return rows;
@@ -26466,13 +26226,11 @@ function formatDate(date) {
26466
26226
  });
26467
26227
  }
26468
26228
  function format(rows, columns) {
26469
- if (columns == null)
26470
- columns = inferColumns(rows);
26229
+ if (columns == null) columns = inferColumns(rows);
26471
26230
  return [columns.map(formatValue).join(delimiter)].concat(preformatBody(rows, columns)).join("\n");
26472
26231
  }
26473
26232
  function formatBody(rows, columns) {
26474
- if (columns == null)
26475
- columns = inferColumns(rows);
26233
+ if (columns == null) columns = inferColumns(rows);
26476
26234
  return preformatBody(rows, columns).join("\n");
26477
26235
  }
26478
26236
  function formatRows(rows) {
@@ -27298,10 +27056,20 @@ function getDataKeyForJson(keysParam, config) {
27298
27056
  const dataLabels = this.config.data_labels;
27299
27057
  return isBoolean(dataLabels) && dataLabels || isObjectType(dataLabels) && notEmpty(dataLabels);
27300
27058
  },
27059
+ /**
27060
+ * Determine if has null value
27061
+ * @param {Array} targets Data array to be evaluated
27062
+ * @returns {boolean}
27063
+ * @private
27064
+ */
27065
+ hasNullDataValue(targets) {
27066
+ return targets.some(({ value }) => value === null);
27067
+ },
27301
27068
  /**
27302
27069
  * Get data index from the event coodinates
27303
27070
  * @param {Event} event Event object
27304
27071
  * @returns {number}
27072
+ * @private
27305
27073
  */
27306
27074
  getDataIndexFromEvent(event) {
27307
27075
  const $$ = this;
@@ -27774,11 +27542,9 @@ function drag_defaultTouchable() {
27774
27542
  selection.on("mousedown.drag", mousedowned).filter(touchable).on("touchstart.drag", touchstarted).on("touchmove.drag", touchmoved, nonpassive).on("touchend.drag touchcancel.drag", touchended).style("touch-action", "none").style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
27775
27543
  }
27776
27544
  function mousedowned(event, d) {
27777
- if (touchending || !filter.call(this, event, d))
27778
- return;
27545
+ if (touchending || !filter.call(this, event, d)) return;
27779
27546
  var gesture = beforestart(this, container.call(this, event, d), event, d, "mouse");
27780
- if (!gesture)
27781
- return;
27547
+ if (!gesture) return;
27782
27548
  src_select(event.view).on("mousemove.drag", mousemoved, nonpassivecapture).on("mouseup.drag", mouseupped, nonpassivecapture);
27783
27549
  nodrag(event.view);
27784
27550
  nopropagation(event);
@@ -27802,8 +27568,7 @@ function drag_defaultTouchable() {
27802
27568
  gestures.mouse("end", event);
27803
27569
  }
27804
27570
  function touchstarted(event, d) {
27805
- if (!filter.call(this, event, d))
27806
- return;
27571
+ if (!filter.call(this, event, d)) return;
27807
27572
  var touches = event.changedTouches, c = container.call(this, event, d), n = touches.length, i, gesture;
27808
27573
  for (i = 0; i < n; ++i) {
27809
27574
  if (gesture = beforestart(this, c, event, d, touches[i].identifier, touches[i])) {
@@ -27823,8 +27588,7 @@ function drag_defaultTouchable() {
27823
27588
  }
27824
27589
  function touchended(event) {
27825
27590
  var touches = event.changedTouches, n = touches.length, i, gesture;
27826
- if (touchending)
27827
- clearTimeout(touchending);
27591
+ if (touchending) clearTimeout(touchending);
27828
27592
  touchending = setTimeout(function() {
27829
27593
  touchending = null;
27830
27594
  }, 500);
@@ -27847,8 +27611,7 @@ function drag_defaultTouchable() {
27847
27611
  dx: 0,
27848
27612
  dy: 0,
27849
27613
  dispatch: dispatch2
27850
- }), d)) == null)
27851
- return;
27614
+ }), d)) == null) return;
27852
27615
  dx = s.x - p[0] || 0;
27853
27616
  dy = s.y - p[1] || 0;
27854
27617
  return function gesture(type, event2, touch2) {
@@ -28213,7 +27976,7 @@ function drag_defaultTouchable() {
28213
27976
  },
28214
27977
  getTargetSelectorSuffix(targetId) {
28215
27978
  const targetStr = targetId || targetId === 0 ? `-${targetId}` : "";
28216
- return targetStr.replace(/([\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\])/g, "-");
27979
+ return targetStr.replace(/[\x00-\x20\x7F-\xA0\s?!@#$%^&*()_=+,.<>'":;\[\]\/|~`{}\\]/g, "-");
28217
27980
  },
28218
27981
  selectorTarget(id, prefix = "", postfix = "") {
28219
27982
  const target = this.getTargetSelectorSuffix(id);
@@ -28236,9 +27999,7 @@ class InternMap extends Map {
28236
27999
  constructor(entries, key = keyof) {
28237
28000
  super();
28238
28001
  Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
28239
- if (entries != null)
28240
- for (const [key2, value] of entries)
28241
- this.set(key2, value);
28002
+ if (entries != null) for (const [key2, value] of entries) this.set(key2, value);
28242
28003
  }
28243
28004
  get(key) {
28244
28005
  return super.get(intern_get(this, key));
@@ -28257,9 +28018,7 @@ class InternSet extends Set {
28257
28018
  constructor(values, key = keyof) {
28258
28019
  super();
28259
28020
  Object.defineProperties(this, { _intern: { value: /* @__PURE__ */ new Map() }, _key: { value: key } });
28260
- if (values != null)
28261
- for (const value of values)
28262
- this.add(value);
28021
+ if (values != null) for (const value of values) this.add(value);
28263
28022
  }
28264
28023
  has(value) {
28265
28024
  return super.has(intern_get(this, value));
@@ -28277,8 +28036,7 @@ function intern_get({ _intern, _key }, value) {
28277
28036
  }
28278
28037
  function intern_set({ _intern, _key }, value) {
28279
28038
  const key = _key(value);
28280
- if (_intern.has(key))
28281
- return _intern.get(key);
28039
+ if (_intern.has(key)) return _intern.get(key);
28282
28040
  _intern.set(key, value);
28283
28041
  return value;
28284
28042
  }
@@ -28313,18 +28071,14 @@ function initInterpolator(domain, interpolator) {
28313
28071
  case 0:
28314
28072
  break;
28315
28073
  case 1: {
28316
- if (typeof domain === "function")
28317
- this.interpolator(domain);
28318
- else
28319
- this.range(domain);
28074
+ if (typeof domain === "function") this.interpolator(domain);
28075
+ else this.range(domain);
28320
28076
  break;
28321
28077
  }
28322
28078
  default: {
28323
28079
  this.domain(domain);
28324
- if (typeof interpolator === "function")
28325
- this.interpolator(interpolator);
28326
- else
28327
- this.range(interpolator);
28080
+ if (typeof interpolator === "function") this.interpolator(interpolator);
28081
+ else this.range(interpolator);
28328
28082
  break;
28329
28083
  }
28330
28084
  }
@@ -28340,19 +28094,16 @@ function ordinal() {
28340
28094
  function scale(d) {
28341
28095
  let i = index.get(d);
28342
28096
  if (i === void 0) {
28343
- if (unknown !== implicit)
28344
- return unknown;
28097
+ if (unknown !== implicit) return unknown;
28345
28098
  index.set(d, i = domain.push(d) - 1);
28346
28099
  }
28347
28100
  return range[i % range.length];
28348
28101
  }
28349
28102
  scale.domain = function(_) {
28350
- if (!arguments.length)
28351
- return domain.slice();
28103
+ if (!arguments.length) return domain.slice();
28352
28104
  domain = [], index = new InternMap();
28353
28105
  for (const value of _) {
28354
- if (index.has(value))
28355
- continue;
28106
+ if (index.has(value)) continue;
28356
28107
  index.set(value, domain.push(value) - 1);
28357
28108
  }
28358
28109
  return scale;
@@ -29814,48 +29565,32 @@ function tickSpec(start, stop, count) {
29814
29565
  inc = Math.pow(10, -power) / factor;
29815
29566
  i1 = Math.round(start * inc);
29816
29567
  i2 = Math.round(stop * inc);
29817
- if (i1 / inc < start)
29818
- ++i1;
29819
- if (i2 / inc > stop)
29820
- --i2;
29568
+ if (i1 / inc < start) ++i1;
29569
+ if (i2 / inc > stop) --i2;
29821
29570
  inc = -inc;
29822
29571
  } else {
29823
29572
  inc = Math.pow(10, power) * factor;
29824
29573
  i1 = Math.round(start / inc);
29825
29574
  i2 = Math.round(stop / inc);
29826
- if (i1 * inc < start)
29827
- ++i1;
29828
- if (i2 * inc > stop)
29829
- --i2;
29575
+ if (i1 * inc < start) ++i1;
29576
+ if (i2 * inc > stop) --i2;
29830
29577
  }
29831
- if (i2 < i1 && 0.5 <= count && count < 2)
29832
- return tickSpec(start, stop, count * 2);
29578
+ if (i2 < i1 && 0.5 <= count && count < 2) return tickSpec(start, stop, count * 2);
29833
29579
  return [i1, i2, inc];
29834
29580
  }
29835
29581
  function ticks(start, stop, count) {
29836
29582
  stop = +stop, start = +start, count = +count;
29837
- if (!(count > 0))
29838
- return [];
29839
- if (start === stop)
29840
- return [start];
29583
+ if (!(count > 0)) return [];
29584
+ if (start === stop) return [start];
29841
29585
  const reverse = stop < start, [i1, i2, inc] = reverse ? tickSpec(stop, start, count) : tickSpec(start, stop, count);
29842
- if (!(i2 >= i1))
29843
- return [];
29586
+ if (!(i2 >= i1)) return [];
29844
29587
  const n = i2 - i1 + 1, ticks2 = new Array(n);
29845
29588
  if (reverse) {
29846
- if (inc < 0)
29847
- for (let i = 0; i < n; ++i)
29848
- ticks2[i] = (i2 - i) / -inc;
29849
- else
29850
- for (let i = 0; i < n; ++i)
29851
- ticks2[i] = (i2 - i) * inc;
29589
+ if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) / -inc;
29590
+ else for (let i = 0; i < n; ++i) ticks2[i] = (i2 - i) * inc;
29852
29591
  } else {
29853
- if (inc < 0)
29854
- for (let i = 0; i < n; ++i)
29855
- ticks2[i] = (i1 + i) / -inc;
29856
- else
29857
- for (let i = 0; i < n; ++i)
29858
- ticks2[i] = (i1 + i) * inc;
29592
+ if (inc < 0) for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) / -inc;
29593
+ else for (let i = 0; i < n; ++i) ticks2[i] = (i1 + i) * inc;
29859
29594
  }
29860
29595
  return ticks2;
29861
29596
  }
@@ -29895,28 +29630,22 @@ function bisector(f) {
29895
29630
  }
29896
29631
  function left(a, x, lo = 0, hi = a.length) {
29897
29632
  if (lo < hi) {
29898
- if (compare1(x, x) !== 0)
29899
- return hi;
29633
+ if (compare1(x, x) !== 0) return hi;
29900
29634
  do {
29901
29635
  const mid = lo + hi >>> 1;
29902
- if (compare2(a[mid], x) < 0)
29903
- lo = mid + 1;
29904
- else
29905
- hi = mid;
29636
+ if (compare2(a[mid], x) < 0) lo = mid + 1;
29637
+ else hi = mid;
29906
29638
  } while (lo < hi);
29907
29639
  }
29908
29640
  return lo;
29909
29641
  }
29910
29642
  function right(a, x, lo = 0, hi = a.length) {
29911
29643
  if (lo < hi) {
29912
- if (compare1(x, x) !== 0)
29913
- return hi;
29644
+ if (compare1(x, x) !== 0) return hi;
29914
29645
  do {
29915
29646
  const mid = lo + hi >>> 1;
29916
- if (compare2(a[mid], x) <= 0)
29917
- lo = mid + 1;
29918
- else
29919
- hi = mid;
29647
+ if (compare2(a[mid], x) <= 0) lo = mid + 1;
29648
+ else hi = mid;
29920
29649
  } while (lo < hi);
29921
29650
  }
29922
29651
  return lo;
@@ -29997,18 +29726,15 @@ function normalize(a, b) {
29997
29726
  }
29998
29727
  function clamper(a, b) {
29999
29728
  var t;
30000
- if (a > b)
30001
- t = a, a = b, b = t;
29729
+ if (a > b) t = a, a = b, b = t;
30002
29730
  return function(x) {
30003
29731
  return Math.max(a, Math.min(b, x));
30004
29732
  };
30005
29733
  }
30006
29734
  function bimap(domain, range, interpolate) {
30007
29735
  var d0 = domain[0], d1 = domain[1], r0 = range[0], r1 = range[1];
30008
- if (d1 < d0)
30009
- d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
30010
- else
30011
- d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
29736
+ if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);
29737
+ else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
30012
29738
  return function(x) {
30013
29739
  return r0(d0(x));
30014
29740
  };
@@ -30035,8 +29761,7 @@ function transformer() {
30035
29761
  var domain = unit, range = unit, interpolate = value, transform, untransform, unknown, clamp = continuous_identity, piecewise, output, input;
30036
29762
  function rescale() {
30037
29763
  var n = Math.min(domain.length, range.length);
30038
- if (clamp !== continuous_identity)
30039
- clamp = clamper(domain[0], domain[n - 1]);
29764
+ if (clamp !== continuous_identity) clamp = clamper(domain[0], domain[n - 1]);
30040
29765
  piecewise = n > 2 ? polymap : bimap;
30041
29766
  output = input = null;
30042
29767
  return scale;
@@ -30077,8 +29802,7 @@ function continuous() {
30077
29802
  ;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatSpecifier.js
30078
29803
  var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
30079
29804
  function formatSpecifier(specifier) {
30080
- if (!(match = re.exec(specifier)))
30081
- throw new Error("invalid format: " + specifier);
29805
+ if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
30082
29806
  var match;
30083
29807
  return new FormatSpecifier({
30084
29808
  fill: match[1],
@@ -30115,8 +29839,7 @@ FormatSpecifier.prototype.toString = function() {
30115
29839
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
30116
29840
  }
30117
29841
  function formatDecimalParts(x, p) {
30118
- if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0)
30119
- return null;
29842
+ if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null;
30120
29843
  var i, coefficient = x.slice(0, i);
30121
29844
  return [
30122
29845
  coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
@@ -30141,11 +29864,9 @@ function formatDecimalParts(x, p) {
30141
29864
  return function(value, width) {
30142
29865
  var i = value.length, t = [], j = 0, g = grouping[0], length = 0;
30143
29866
  while (i > 0 && g > 0) {
30144
- if (length + g + 1 > width)
30145
- g = Math.max(1, width - length);
29867
+ if (length + g + 1 > width) g = Math.max(1, width - length);
30146
29868
  t.push(value.substring(i -= g, i + g));
30147
- if ((length += g + 1) > width)
30148
- break;
29869
+ if ((length += g + 1) > width) break;
30149
29870
  g = grouping[j = (j + 1) % grouping.length];
30150
29871
  }
30151
29872
  return t.reverse().join(thousands);
@@ -30163,25 +29884,21 @@ function formatDecimalParts(x, p) {
30163
29884
 
30164
29885
  ;// CONCATENATED MODULE: ./node_modules/d3-format/src/formatTrim.js
30165
29886
  /* harmony default export */ function formatTrim(s) {
30166
- out:
30167
- for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
30168
- switch (s[i]) {
30169
- case ".":
30170
- i0 = i1 = i;
30171
- break;
30172
- case "0":
30173
- if (i0 === 0)
30174
- i0 = i;
30175
- i1 = i;
30176
- break;
30177
- default:
30178
- if (!+s[i])
30179
- break out;
30180
- if (i0 > 0)
30181
- i0 = 0;
30182
- break;
30183
- }
29887
+ out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
29888
+ switch (s[i]) {
29889
+ case ".":
29890
+ i0 = i1 = i;
29891
+ break;
29892
+ case "0":
29893
+ if (i0 === 0) i0 = i;
29894
+ i1 = i;
29895
+ break;
29896
+ default:
29897
+ if (!+s[i]) break out;
29898
+ if (i0 > 0) i0 = 0;
29899
+ break;
30184
29900
  }
29901
+ }
30185
29902
  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
30186
29903
  }
30187
29904
 
@@ -30190,8 +29907,7 @@ function formatDecimalParts(x, p) {
30190
29907
  var prefixExponent;
30191
29908
  /* harmony default export */ function formatPrefixAuto(x, p) {
30192
29909
  var d = formatDecimalParts(x, p);
30193
- if (!d)
30194
- return x + "";
29910
+ if (!d) return x + "";
30195
29911
  var coefficient = d[0], exponent = d[1], i = exponent - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent / 3))) * 3) + 1, n = coefficient.length;
30196
29912
  return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
30197
29913
  }
@@ -30200,8 +29916,7 @@ var prefixExponent;
30200
29916
 
30201
29917
  /* harmony default export */ function formatRounded(x, p) {
30202
29918
  var d = formatDecimalParts(x, p);
30203
- if (!d)
30204
- return x + "";
29919
+ if (!d) return x + "";
30205
29920
  var coefficient = d[0], exponent = d[1];
30206
29921
  return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
30207
29922
  }
@@ -30246,12 +29961,9 @@ var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "\xB5",
30246
29961
  function newFormat(specifier) {
30247
29962
  specifier = formatSpecifier(specifier);
30248
29963
  var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
30249
- if (type === "n")
30250
- comma = true, type = "g";
30251
- else if (!formatTypes[type])
30252
- precision === void 0 && (precision = 12), trim = true, type = "g";
30253
- if (zero || fill === "0" && align === "=")
30254
- zero = true, fill = "0", align = "=";
29964
+ if (type === "n") comma = true, type = "g";
29965
+ else if (!formatTypes[type]) precision === void 0 && (precision = 12), trim = true, type = "g";
29966
+ if (zero || fill === "0" && align === "=") zero = true, fill = "0", align = "=";
30255
29967
  var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "";
30256
29968
  var formatType = formatTypes[type], maybeSuffix = /[defgprs%]/.test(type);
30257
29969
  precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
@@ -30264,10 +29976,8 @@ var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "\xB5",
30264
29976
  value = +value;
30265
29977
  var valueNegative = value < 0 || 1 / value < 0;
30266
29978
  value = isNaN(value) ? nan : formatType(Math.abs(value), precision);
30267
- if (trim)
30268
- value = formatTrim(value);
30269
- if (valueNegative && +value === 0 && sign !== "+")
30270
- valueNegative = false;
29979
+ if (trim) value = formatTrim(value);
29980
+ if (valueNegative && +value === 0 && sign !== "+") valueNegative = false;
30271
29981
  valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix;
30272
29982
  valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : "");
30273
29983
  if (maybeSuffix) {
@@ -30281,11 +29991,9 @@ var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "\xB5",
30281
29991
  }
30282
29992
  }
30283
29993
  }
30284
- if (comma && !zero)
30285
- value = group(value, Infinity);
29994
+ if (comma && !zero) value = group(value, Infinity);
30286
29995
  var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
30287
- if (comma && zero)
30288
- value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
29996
+ if (comma && zero) value = group(padding + value, padding.length ? width - valueSuffix.length : Infinity), padding = "";
30289
29997
  switch (align) {
30290
29998
  case "<":
30291
29999
  value = valuePrefix + value + valueSuffix + padding;
@@ -30358,8 +30066,7 @@ function tickFormat(start, stop, count, specifier) {
30358
30066
  switch (specifier.type) {
30359
30067
  case "s": {
30360
30068
  var value = Math.max(Math.abs(start), Math.abs(stop));
30361
- if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value)))
30362
- specifier.precision = precision;
30069
+ if (specifier.precision == null && !isNaN(precision = precisionPrefix(step, value))) specifier.precision = precision;
30363
30070
  return formatPrefix(specifier, value);
30364
30071
  }
30365
30072
  case "":
@@ -30367,14 +30074,12 @@ function tickFormat(start, stop, count, specifier) {
30367
30074
  case "g":
30368
30075
  case "p":
30369
30076
  case "r": {
30370
- if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop)))))
30371
- specifier.precision = precision - (specifier.type === "e");
30077
+ if (specifier.precision == null && !isNaN(precision = precisionRound(step, Math.max(Math.abs(start), Math.abs(stop))))) specifier.precision = precision - (specifier.type === "e");
30372
30078
  break;
30373
30079
  }
30374
30080
  case "f":
30375
30081
  case "%": {
30376
- if (specifier.precision == null && !isNaN(precision = precisionFixed(step)))
30377
- specifier.precision = precision - (specifier.type === "%") * 2;
30082
+ if (specifier.precision == null && !isNaN(precision = precisionFixed(step))) specifier.precision = precision - (specifier.type === "%") * 2;
30378
30083
  break;
30379
30084
  }
30380
30085
  }
@@ -30397,8 +30102,7 @@ function linearish(scale) {
30397
30102
  return tickFormat(d[0], d[d.length - 1], count == null ? 10 : count, specifier);
30398
30103
  };
30399
30104
  scale.nice = function(count) {
30400
- if (count == null)
30401
- count = 10;
30105
+ if (count == null) count = 10;
30402
30106
  var d = domain();
30403
30107
  var i0 = 0;
30404
30108
  var i1 = d.length - 1;
@@ -30540,8 +30244,7 @@ function loggish(transform) {
30540
30244
  let u = d[0];
30541
30245
  let v = d[d.length - 1];
30542
30246
  const r = v < u;
30543
- if (r)
30544
- [u, v] = [v, u];
30247
+ if (r) [u, v] = [v, u];
30545
30248
  let i = logs(u);
30546
30249
  let j = logs(v);
30547
30250
  let k;
@@ -30550,52 +30253,40 @@ function loggish(transform) {
30550
30253
  let z = [];
30551
30254
  if (!(base % 1) && j - i < n) {
30552
30255
  i = Math.floor(i), j = Math.ceil(j);
30553
- if (u > 0)
30554
- for (; i <= j; ++i) {
30555
- for (k = 1; k < base; ++k) {
30556
- t = i < 0 ? k / pows(-i) : k * pows(i);
30557
- if (t < u)
30558
- continue;
30559
- if (t > v)
30560
- break;
30561
- z.push(t);
30562
- }
30256
+ if (u > 0) for (; i <= j; ++i) {
30257
+ for (k = 1; k < base; ++k) {
30258
+ t = i < 0 ? k / pows(-i) : k * pows(i);
30259
+ if (t < u) continue;
30260
+ if (t > v) break;
30261
+ z.push(t);
30563
30262
  }
30564
- else
30565
- for (; i <= j; ++i) {
30566
- for (k = base - 1; k >= 1; --k) {
30567
- t = i > 0 ? k / pows(-i) : k * pows(i);
30568
- if (t < u)
30569
- continue;
30570
- if (t > v)
30571
- break;
30572
- z.push(t);
30573
- }
30263
+ }
30264
+ else for (; i <= j; ++i) {
30265
+ for (k = base - 1; k >= 1; --k) {
30266
+ t = i > 0 ? k / pows(-i) : k * pows(i);
30267
+ if (t < u) continue;
30268
+ if (t > v) break;
30269
+ z.push(t);
30574
30270
  }
30575
- if (z.length * 2 < n)
30576
- z = ticks(u, v, n);
30271
+ }
30272
+ if (z.length * 2 < n) z = ticks(u, v, n);
30577
30273
  } else {
30578
30274
  z = ticks(i, j, Math.min(j - i, n)).map(pows);
30579
30275
  }
30580
30276
  return r ? z.reverse() : z;
30581
30277
  };
30582
30278
  scale.tickFormat = (count, specifier) => {
30583
- if (count == null)
30584
- count = 10;
30585
- if (specifier == null)
30586
- specifier = base === 10 ? "s" : ",";
30279
+ if (count == null) count = 10;
30280
+ if (specifier == null) specifier = base === 10 ? "s" : ",";
30587
30281
  if (typeof specifier !== "function") {
30588
- if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null)
30589
- specifier.trim = true;
30282
+ if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
30590
30283
  specifier = defaultLocale_format(specifier);
30591
30284
  }
30592
- if (count === Infinity)
30593
- return specifier;
30285
+ if (count === Infinity) return specifier;
30594
30286
  const k = Math.max(1, base * count / scale.ticks().length);
30595
30287
  return (d) => {
30596
30288
  let i = d / pows(Math.round(logs(d)));
30597
- if (i * base < base - 0.5)
30598
- i *= base;
30289
+ if (i * base < base - 0.5) i *= base;
30599
30290
  return i <= k ? specifier(d) : "";
30600
30291
  };
30601
30292
  };
@@ -30624,10 +30315,8 @@ const millisecond = timeInterval(() => {
30624
30315
  });
30625
30316
  millisecond.every = (k) => {
30626
30317
  k = Math.floor(k);
30627
- if (!isFinite(k) || !(k > 0))
30628
- return null;
30629
- if (!(k > 1))
30630
- return millisecond;
30318
+ if (!isFinite(k) || !(k > 0)) return null;
30319
+ if (!(k > 1)) return millisecond;
30631
30320
  return timeInterval((date) => {
30632
30321
  date.setTime(Math.floor(date / k) * k);
30633
30322
  }, (date, step) => {
@@ -30759,8 +30448,7 @@ function ticker(year, month, week, day, hour, minute) {
30759
30448
  ];
30760
30449
  function ticks(start, stop, count) {
30761
30450
  const reverse = stop < start;
30762
- if (reverse)
30763
- [start, stop] = [stop, start];
30451
+ if (reverse) [start, stop] = [stop, start];
30764
30452
  const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count);
30765
30453
  const ticks2 = interval ? interval.range(start, +stop + 1) : [];
30766
30454
  return reverse ? ticks2.reverse() : ticks2;
@@ -30768,10 +30456,8 @@ function ticker(year, month, week, day, hour, minute) {
30768
30456
  function tickInterval(start, stop, count) {
30769
30457
  const target = Math.abs(stop - start) / count;
30770
30458
  const i = bisector(([, , step2]) => step2).right(tickIntervals, target);
30771
- if (i === tickIntervals.length)
30772
- return year.every(tickStep(start / durationYear, stop / durationYear, count));
30773
- if (i === 0)
30774
- return millisecond.every(Math.max(tickStep(start, stop, count), 1));
30459
+ if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));
30460
+ if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));
30775
30461
  const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
30776
30462
  return t.every(step);
30777
30463
  }
@@ -30814,8 +30500,7 @@ function calendar(ticks, tickInterval, year, month, week, day, hour, minute, sec
30814
30500
  };
30815
30501
  scale.nice = function(interval) {
30816
30502
  var d = domain();
30817
- if (!interval || typeof interval.range !== "function")
30818
- interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
30503
+ if (!interval || typeof interval.range !== "function") interval = tickInterval(d[0], d[d.length - 1], interval == null ? 10 : interval);
30819
30504
  return interval ? domain(nice(d, interval)) : scale;
30820
30505
  };
30821
30506
  scale.copy = function() {
@@ -30839,7 +30524,7 @@ function utcTime() {
30839
30524
  ;// CONCATENATED MODULE: ./src/ChartInternal/internals/scale.ts
30840
30525
 
30841
30526
 
30842
- function getScale(type = "linear", min = 0, max = 1) {
30527
+ function getScale(type = "linear", min, max) {
30843
30528
  const scale = {
30844
30529
  linear: linear_linear,
30845
30530
  log: symlog,
@@ -30849,7 +30534,7 @@ function getScale(type = "linear", min = 0, max = 1) {
30849
30534
  }[type]();
30850
30535
  scale.type = type;
30851
30536
  /_?log/.test(type) && scale.clamp(true);
30852
- return scale.range([min, max]);
30537
+ return scale.range([min != null ? min : 0, max != null ? max : 1]);
30853
30538
  }
30854
30539
  /* harmony default export */ var scale = ({
30855
30540
  /**
@@ -32684,8 +32369,7 @@ Basis.prototype = {
32684
32369
  this._context.lineTo(this._x1, this._y1);
32685
32370
  break;
32686
32371
  }
32687
- if (this._line || this._line !== 0 && this._point === 1)
32688
- this._context.closePath();
32372
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
32689
32373
  this._line = 1 - this._line;
32690
32374
  },
32691
32375
  point: function(x, y) {
@@ -32796,8 +32480,7 @@ BasisOpen.prototype = {
32796
32480
  this._point = 0;
32797
32481
  },
32798
32482
  lineEnd: function() {
32799
- if (this._line || this._line !== 0 && this._point === 3)
32800
- this._context.closePath();
32483
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
32801
32484
  this._line = 1 - this._line;
32802
32485
  },
32803
32486
  point: function(x, y) {
@@ -32905,8 +32588,7 @@ Cardinal.prototype = {
32905
32588
  cardinal_point(this, this._x1, this._y1);
32906
32589
  break;
32907
32590
  }
32908
- if (this._line || this._line !== 0 && this._point === 1)
32909
- this._context.closePath();
32591
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
32910
32592
  this._line = 1 - this._line;
32911
32593
  },
32912
32594
  point: function(x, y) {
@@ -33025,8 +32707,7 @@ CardinalOpen.prototype = {
33025
32707
  this._point = 0;
33026
32708
  },
33027
32709
  lineEnd: function() {
33028
- if (this._line || this._line !== 0 && this._point === 3)
33029
- this._context.closePath();
32710
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
33030
32711
  this._line = 1 - this._line;
33031
32712
  },
33032
32713
  point: function(x, y) {
@@ -33122,8 +32803,7 @@ CatmullRom.prototype = {
33122
32803
  this.point(this._x2, this._y2);
33123
32804
  break;
33124
32805
  }
33125
- if (this._line || this._line !== 0 && this._point === 1)
33126
- this._context.closePath();
32806
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
33127
32807
  this._line = 1 - this._line;
33128
32808
  },
33129
32809
  point: function(x, y) {
@@ -33255,8 +32935,7 @@ CatmullRomOpen.prototype = {
33255
32935
  this._l01_a = this._l12_a = this._l23_a = this._l01_2a = this._l12_2a = this._l23_2a = this._point = 0;
33256
32936
  },
33257
32937
  lineEnd: function() {
33258
- if (this._line || this._line !== 0 && this._point === 3)
33259
- this._context.closePath();
32938
+ if (this._line || this._line !== 0 && this._point === 3) this._context.closePath();
33260
32939
  this._line = 1 - this._line;
33261
32940
  },
33262
32941
  point: function(x, y) {
@@ -33337,15 +33016,13 @@ MonotoneX.prototype = {
33337
33016
  monotone_point(this, this._t0, slope2(this, this._t0));
33338
33017
  break;
33339
33018
  }
33340
- if (this._line || this._line !== 0 && this._point === 1)
33341
- this._context.closePath();
33019
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
33342
33020
  this._line = 1 - this._line;
33343
33021
  },
33344
33022
  point: function(x, y) {
33345
33023
  var t1 = NaN;
33346
33024
  x = +x, y = +y;
33347
- if (x === this._x1 && y === this._y1)
33348
- return;
33025
+ if (x === this._x1 && y === this._y1) return;
33349
33026
  switch (this._point) {
33350
33027
  case 0:
33351
33028
  this._point = 1;
@@ -33425,8 +33102,7 @@ Natural.prototype = {
33425
33102
  }
33426
33103
  }
33427
33104
  }
33428
- if (this._line || this._line !== 0 && n === 1)
33429
- this._context.closePath();
33105
+ if (this._line || this._line !== 0 && n === 1) this._context.closePath();
33430
33106
  this._line = 1 - this._line;
33431
33107
  this._x = this._y = null;
33432
33108
  },
@@ -33438,17 +33114,13 @@ Natural.prototype = {
33438
33114
  function controlPoints(x) {
33439
33115
  var i, n = x.length - 1, m, a = new Array(n), b = new Array(n), r = new Array(n);
33440
33116
  a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];
33441
- for (i = 1; i < n - 1; ++i)
33442
- a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
33117
+ for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];
33443
33118
  a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];
33444
- for (i = 1; i < n; ++i)
33445
- m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
33119
+ for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];
33446
33120
  a[n - 1] = r[n - 1] / b[n - 1];
33447
- for (i = n - 2; i >= 0; --i)
33448
- a[i] = (r[i] - a[i + 1]) / b[i];
33121
+ for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];
33449
33122
  b[n - 1] = (x[n] + a[n - 1]) / 2;
33450
- for (i = 0; i < n - 1; ++i)
33451
- b[i] = 2 * x[i + 1] - a[i + 1];
33123
+ for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];
33452
33124
  return [a, b];
33453
33125
  }
33454
33126
  /* harmony default export */ function natural(context) {
@@ -33467,15 +33139,12 @@ LinearClosed.prototype = {
33467
33139
  this._point = 0;
33468
33140
  },
33469
33141
  lineEnd: function() {
33470
- if (this._point)
33471
- this._context.closePath();
33142
+ if (this._point) this._context.closePath();
33472
33143
  },
33473
33144
  point: function(x, y) {
33474
33145
  x = +x, y = +y;
33475
- if (this._point)
33476
- this._context.lineTo(x, y);
33477
- else
33478
- this._point = 1, this._context.moveTo(x, y);
33146
+ if (this._point) this._context.lineTo(x, y);
33147
+ else this._point = 1, this._context.moveTo(x, y);
33479
33148
  }
33480
33149
  };
33481
33150
  /* harmony default export */ function linearClosed(context) {
@@ -33497,8 +33166,7 @@ Linear.prototype = {
33497
33166
  this._point = 0;
33498
33167
  },
33499
33168
  lineEnd: function() {
33500
- if (this._line || this._line !== 0 && this._point === 1)
33501
- this._context.closePath();
33169
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
33502
33170
  this._line = 1 - this._line;
33503
33171
  },
33504
33172
  point: function(x, y) {
@@ -33537,12 +33205,9 @@ Step.prototype = {
33537
33205
  this._point = 0;
33538
33206
  },
33539
33207
  lineEnd: function() {
33540
- if (0 < this._t && this._t < 1 && this._point === 2)
33541
- this._context.lineTo(this._x, this._y);
33542
- if (this._line || this._line !== 0 && this._point === 1)
33543
- this._context.closePath();
33544
- if (this._line >= 0)
33545
- this._t = 1 - this._t, this._line = 1 - this._line;
33208
+ if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);
33209
+ if (this._line || this._line !== 0 && this._point === 1) this._context.closePath();
33210
+ if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;
33546
33211
  },
33547
33212
  point: function(x, y) {
33548
33213
  x = +x, y = +y;
@@ -33880,7 +33545,7 @@ function getGroupedDataPointsFn(d) {
33880
33545
  getBarW(type, axis, targetsNum) {
33881
33546
  var _a, _b, _c, _d, _e;
33882
33547
  const $$ = this;
33883
- const { config, org, scale } = $$;
33548
+ const { config, org, scale, state } = $$;
33884
33549
  const maxDataCount = $$.getMaxDataCount();
33885
33550
  const isGrouped = type === "bar" && ((_a = config.data_groups) == null ? void 0 : _a.length);
33886
33551
  const configName = `${type}_width`;
@@ -33901,7 +33566,7 @@ function getGroupedDataPointsFn(d) {
33901
33566
  const width = id ? config[configName][id] : config[configName];
33902
33567
  const ratio = id ? width.ratio : config[`${configName}_ratio`];
33903
33568
  const max = id ? width.max : config[`${configName}_max`];
33904
- const w = isNumber(width) ? width : targetsNum ? tickInterval * ratio / targetsNum : 0;
33569
+ const w = isNumber(width) ? width : isFunction(width) ? width.call($$, state.width, targetsNum, maxDataCount) : targetsNum ? tickInterval * ratio / targetsNum : 0;
33905
33570
  return max && w > max ? max : w;
33906
33571
  };
33907
33572
  let result = getWidth();
@@ -33946,7 +33611,7 @@ function getGroupedDataPointsFn(d) {
33946
33611
  if (!$$.isTargetToShow(d.id)) {
33947
33612
  isWithin = false;
33948
33613
  } else if ((_a = $$.hasValidPointType) == null ? void 0 : _a.call($$, that.nodeName)) {
33949
- isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScaleById(d.id)(d.value)) : $$.isWithinCircle(
33614
+ isWithin = $$.isStepType(d) ? $$.isWithinStep(that, $$.getYScaleById(d.id)($$.getBaseValue(d))) : $$.isWithinCircle(
33950
33615
  that,
33951
33616
  $$.isBubbleType(d) ? $$.pointSelectR(d) * 1.5 : 0
33952
33617
  );
@@ -34006,10 +33671,7 @@ function getGroupedDataPointsFn(d) {
34006
33671
  ;// CONCATENATED MODULE: ./src/ChartInternal/ChartInternal.ts
34007
33672
  var ChartInternal_defProp = Object.defineProperty;
34008
33673
  var ChartInternal_defNormalProp = (obj, key, value) => key in obj ? ChartInternal_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
34009
- var ChartInternal_publicField = (obj, key, value) => {
34010
- ChartInternal_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34011
- return value;
34012
- };
33674
+ var ChartInternal_publicField = (obj, key, value) => ChartInternal_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
34013
33675
 
34014
33676
 
34015
33677
 
@@ -34296,7 +33958,7 @@ class ChartInternal {
34296
33958
  if (hasAxis || hasColorPatterns || hasPolar || hasTreemap || labelsBGColor || ((_a = $$.hasLegendDefsPoint) == null ? void 0 : _a.call($$))) {
34297
33959
  $el.defs = $el.svg.append("defs");
34298
33960
  if (hasAxis) {
34299
- ["id", "idXAxis", "idYAxis", "idGrid"].forEach((v) => {
33961
+ ["id", "idXAxis", "idYAxis", "idY2Axis", "idGrid"].forEach((v) => {
34300
33962
  $$.appendClip($el.defs, state.clip[v]);
34301
33963
  });
34302
33964
  }
@@ -35762,10 +35424,7 @@ const tooltip_tooltip = {
35762
35424
  ;// CONCATENATED MODULE: ./src/Chart/Chart.ts
35763
35425
  var Chart_defProp = Object.defineProperty;
35764
35426
  var Chart_defNormalProp = (obj, key, value) => key in obj ? Chart_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
35765
- var Chart_publicField = (obj, key, value) => {
35766
- Chart_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
35767
- return value;
35768
- };
35427
+ var Chart_publicField = (obj, key, value) => Chart_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
35769
35428
 
35770
35429
 
35771
35430
 
@@ -36166,9 +35825,7 @@ Transform.prototype = {
36166
35825
  var transform_identity = new Transform(1, 0, 0);
36167
35826
  transform_transform.prototype = Transform.prototype;
36168
35827
  function transform_transform(node) {
36169
- while (!node.__zoom)
36170
- if (!(node = node.parentNode))
36171
- return transform_identity;
35828
+ while (!node.__zoom) if (!(node = node.parentNode)) return transform_identity;
36172
35829
  return node.__zoom;
36173
35830
  }
36174
35831
 
@@ -36286,8 +35943,7 @@ function defaultConstrain(transform, extent, translateExtent) {
36286
35943
  }).tween("zoom", function() {
36287
35944
  var that = this, args = arguments, g = gesture(that, args).event(event), e = extent.apply(that, args), p = point == null ? centroid(e) : typeof point === "function" ? point.apply(that, args) : point, w = Math.max(e[1][0] - e[0][0], e[1][1] - e[0][1]), a = that.__zoom, b = typeof transform === "function" ? transform.apply(that, args) : transform, i = interpolate(a.invert(p).concat(w / a.k), b.invert(p).concat(w / b.k));
36288
35945
  return function(t) {
36289
- if (t === 1)
36290
- t = b;
35946
+ if (t === 1) t = b;
36291
35947
  else {
36292
35948
  var l = i(t), k = w / l[2];
36293
35949
  t = new Transform(k, p[0] - l[0] * k, p[1] - l[1] * k);
@@ -36309,8 +35965,7 @@ function defaultConstrain(transform, extent, translateExtent) {
36309
35965
  }
36310
35966
  Gesture.prototype = {
36311
35967
  event: function(event) {
36312
- if (event)
36313
- this.sourceEvent = event;
35968
+ if (event) this.sourceEvent = event;
36314
35969
  return this;
36315
35970
  },
36316
35971
  start: function() {
@@ -36321,12 +35976,9 @@ function defaultConstrain(transform, extent, translateExtent) {
36321
35976
  return this;
36322
35977
  },
36323
35978
  zoom: function(key, transform) {
36324
- if (this.mouse && key !== "mouse")
36325
- this.mouse[1] = transform.invert(this.mouse[0]);
36326
- if (this.touch0 && key !== "touch")
36327
- this.touch0[1] = transform.invert(this.touch0[0]);
36328
- if (this.touch1 && key !== "touch")
36329
- this.touch1[1] = transform.invert(this.touch1[0]);
35979
+ if (this.mouse && key !== "mouse") this.mouse[1] = transform.invert(this.mouse[0]);
35980
+ if (this.touch0 && key !== "touch") this.touch0[1] = transform.invert(this.touch0[0]);
35981
+ if (this.touch1 && key !== "touch") this.touch1[1] = transform.invert(this.touch1[0]);
36330
35982
  this.that.__zoom = transform;
36331
35983
  this.emit("zoom");
36332
35984
  return this;
@@ -36355,16 +36007,14 @@ function defaultConstrain(transform, extent, translateExtent) {
36355
36007
  }
36356
36008
  };
36357
36009
  function wheeled(event, ...args) {
36358
- if (!filter.apply(this, arguments))
36359
- return;
36010
+ if (!filter.apply(this, arguments)) return;
36360
36011
  var g = gesture(this, args).event(event), t = this.__zoom, k = Math.max(scaleExtent[0], Math.min(scaleExtent[1], t.k * Math.pow(2, wheelDelta.apply(this, arguments)))), p = src_pointer(event);
36361
36012
  if (g.wheel) {
36362
36013
  if (g.mouse[0][0] !== p[0] || g.mouse[0][1] !== p[1]) {
36363
36014
  g.mouse[1] = t.invert(g.mouse[0] = p);
36364
36015
  }
36365
36016
  clearTimeout(g.wheel);
36366
- } else if (t.k === k)
36367
- return;
36017
+ } else if (t.k === k) return;
36368
36018
  else {
36369
36019
  g.mouse = [p, t.invert(p)];
36370
36020
  interrupt(this);
@@ -36379,8 +36029,7 @@ function defaultConstrain(transform, extent, translateExtent) {
36379
36029
  }
36380
36030
  }
36381
36031
  function mousedowned(event, ...args) {
36382
- if (touchending || !filter.apply(this, arguments))
36383
- return;
36032
+ if (touchending || !filter.apply(this, arguments)) return;
36384
36033
  var currentTarget = event.currentTarget, g = gesture(this, args, true).event(event), v = src_select(event.view).on("mousemove.zoom", mousemoved, true).on("mouseup.zoom", mouseupped, true), p = src_pointer(event, currentTarget), x0 = event.clientX, y0 = event.clientY;
36385
36034
  nodrag(event.view);
36386
36035
  src_noevent_nopropagation(event);
@@ -36403,50 +36052,39 @@ function defaultConstrain(transform, extent, translateExtent) {
36403
36052
  }
36404
36053
  }
36405
36054
  function dblclicked(event, ...args) {
36406
- if (!filter.apply(this, arguments))
36407
- return;
36055
+ if (!filter.apply(this, arguments)) return;
36408
36056
  var t0 = this.__zoom, p0 = src_pointer(event.changedTouches ? event.changedTouches[0] : event, this), p1 = t0.invert(p0), k1 = t0.k * (event.shiftKey ? 0.5 : 2), t1 = constrain(translate(scale(t0, k1), p0, p1), extent.apply(this, args), translateExtent);
36409
36057
  d3_zoom_src_noevent(event);
36410
- if (duration > 0)
36411
- src_select(this).transition().duration(duration).call(schedule, t1, p0, event);
36412
- else
36413
- src_select(this).call(zoom.transform, t1, p0, event);
36058
+ if (duration > 0) src_select(this).transition().duration(duration).call(schedule, t1, p0, event);
36059
+ else src_select(this).call(zoom.transform, t1, p0, event);
36414
36060
  }
36415
36061
  function touchstarted(event, ...args) {
36416
- if (!filter.apply(this, arguments))
36417
- return;
36062
+ if (!filter.apply(this, arguments)) return;
36418
36063
  var touches = event.touches, n = touches.length, g = gesture(this, args, event.changedTouches.length === n).event(event), started, i, t, p;
36419
36064
  src_noevent_nopropagation(event);
36420
36065
  for (i = 0; i < n; ++i) {
36421
36066
  t = touches[i], p = src_pointer(t, this);
36422
36067
  p = [p, this.__zoom.invert(p), t.identifier];
36423
- if (!g.touch0)
36424
- g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
36425
- else if (!g.touch1 && g.touch0[2] !== p[2])
36426
- g.touch1 = p, g.taps = 0;
36068
+ if (!g.touch0) g.touch0 = p, started = true, g.taps = 1 + !!touchstarting;
36069
+ else if (!g.touch1 && g.touch0[2] !== p[2]) g.touch1 = p, g.taps = 0;
36427
36070
  }
36428
- if (touchstarting)
36429
- touchstarting = clearTimeout(touchstarting);
36071
+ if (touchstarting) touchstarting = clearTimeout(touchstarting);
36430
36072
  if (started) {
36431
- if (g.taps < 2)
36432
- touchfirst = p[0], touchstarting = setTimeout(function() {
36433
- touchstarting = null;
36434
- }, touchDelay);
36073
+ if (g.taps < 2) touchfirst = p[0], touchstarting = setTimeout(function() {
36074
+ touchstarting = null;
36075
+ }, touchDelay);
36435
36076
  interrupt(this);
36436
36077
  g.start();
36437
36078
  }
36438
36079
  }
36439
36080
  function touchmoved(event, ...args) {
36440
- if (!this.__zooming)
36441
- return;
36081
+ if (!this.__zooming) return;
36442
36082
  var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t, p, l;
36443
36083
  d3_zoom_src_noevent(event);
36444
36084
  for (i = 0; i < n; ++i) {
36445
36085
  t = touches[i], p = src_pointer(t, this);
36446
- if (g.touch0 && g.touch0[2] === t.identifier)
36447
- g.touch0[0] = p;
36448
- else if (g.touch1 && g.touch1[2] === t.identifier)
36449
- g.touch1[0] = p;
36086
+ if (g.touch0 && g.touch0[2] === t.identifier) g.touch0[0] = p;
36087
+ else if (g.touch1 && g.touch1[2] === t.identifier) g.touch1[0] = p;
36450
36088
  }
36451
36089
  t = g.that.__zoom;
36452
36090
  if (g.touch1) {
@@ -36454,41 +36092,32 @@ function defaultConstrain(transform, extent, translateExtent) {
36454
36092
  t = scale(t, Math.sqrt(dp / dl));
36455
36093
  p = [(p0[0] + p1[0]) / 2, (p0[1] + p1[1]) / 2];
36456
36094
  l = [(l0[0] + l1[0]) / 2, (l0[1] + l1[1]) / 2];
36457
- } else if (g.touch0)
36458
- p = g.touch0[0], l = g.touch0[1];
36459
- else
36460
- return;
36095
+ } else if (g.touch0) p = g.touch0[0], l = g.touch0[1];
36096
+ else return;
36461
36097
  g.zoom("touch", constrain(translate(t, p, l), g.extent, translateExtent));
36462
36098
  }
36463
36099
  function touchended(event, ...args) {
36464
- if (!this.__zooming)
36465
- return;
36100
+ if (!this.__zooming) return;
36466
36101
  var g = gesture(this, args).event(event), touches = event.changedTouches, n = touches.length, i, t;
36467
36102
  src_noevent_nopropagation(event);
36468
- if (touchending)
36469
- clearTimeout(touchending);
36103
+ if (touchending) clearTimeout(touchending);
36470
36104
  touchending = setTimeout(function() {
36471
36105
  touchending = null;
36472
36106
  }, touchDelay);
36473
36107
  for (i = 0; i < n; ++i) {
36474
36108
  t = touches[i];
36475
- if (g.touch0 && g.touch0[2] === t.identifier)
36476
- delete g.touch0;
36477
- else if (g.touch1 && g.touch1[2] === t.identifier)
36478
- delete g.touch1;
36479
- }
36480
- if (g.touch1 && !g.touch0)
36481
- g.touch0 = g.touch1, delete g.touch1;
36482
- if (g.touch0)
36483
- g.touch0[1] = this.__zoom.invert(g.touch0[0]);
36109
+ if (g.touch0 && g.touch0[2] === t.identifier) delete g.touch0;
36110
+ else if (g.touch1 && g.touch1[2] === t.identifier) delete g.touch1;
36111
+ }
36112
+ if (g.touch1 && !g.touch0) g.touch0 = g.touch1, delete g.touch1;
36113
+ if (g.touch0) g.touch0[1] = this.__zoom.invert(g.touch0[0]);
36484
36114
  else {
36485
36115
  g.end();
36486
36116
  if (g.taps === 2) {
36487
36117
  t = src_pointer(t, this);
36488
36118
  if (Math.hypot(touchfirst[0] - t[0], touchfirst[1] - t[1]) < tapDistance) {
36489
36119
  var p = src_select(this).on("dblclick.zoom");
36490
- if (p)
36491
- p.apply(this, arguments);
36120
+ if (p) p.apply(this, arguments);
36492
36121
  }
36493
36122
  }
36494
36123
  }
@@ -38591,8 +38220,7 @@ function axis_number(scale) {
38591
38220
  }
38592
38221
  function center(scale, offset) {
38593
38222
  offset = Math.max(0, scale.bandwidth() - offset * 2) / 2;
38594
- if (scale.round())
38595
- offset = Math.round(offset);
38223
+ if (scale.round()) offset = Math.round(offset);
38596
38224
  return (d) => +scale(d) + offset;
38597
38225
  }
38598
38226
  function entering() {
@@ -38679,10 +38307,7 @@ function axisLeft(scale) {
38679
38307
  ;// CONCATENATED MODULE: ./src/ChartInternal/Axis/AxisRendererHelper.ts
38680
38308
  var AxisRendererHelper_defProp = Object.defineProperty;
38681
38309
  var AxisRendererHelper_defNormalProp = (obj, key, value) => key in obj ? AxisRendererHelper_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
38682
- var AxisRendererHelper_publicField = (obj, key, value) => {
38683
- AxisRendererHelper_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
38684
- return value;
38685
- };
38310
+ var AxisRendererHelper_publicField = (obj, key, value) => AxisRendererHelper_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
38686
38311
 
38687
38312
 
38688
38313
  class AxisRendererHelper {
@@ -38806,10 +38431,7 @@ class AxisRendererHelper {
38806
38431
  ;// CONCATENATED MODULE: ./src/ChartInternal/Axis/AxisRenderer.ts
38807
38432
  var AxisRenderer_defProp = Object.defineProperty;
38808
38433
  var AxisRenderer_defNormalProp = (obj, key, value) => key in obj ? AxisRenderer_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
38809
- var AxisRenderer_publicField = (obj, key, value) => {
38810
- AxisRenderer_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
38811
- return value;
38812
- };
38434
+ var AxisRenderer_publicField = (obj, key, value) => AxisRenderer_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
38813
38435
 
38814
38436
 
38815
38437
 
@@ -39179,10 +38801,7 @@ class AxisRenderer {
39179
38801
  ;// CONCATENATED MODULE: ./src/ChartInternal/Axis/Axis.ts
39180
38802
  var Axis_defProp = Object.defineProperty;
39181
38803
  var Axis_defNormalProp = (obj, key, value) => key in obj ? Axis_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
39182
- var Axis_publicField = (obj, key, value) => {
39183
- Axis_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
39184
- return value;
39185
- };
38804
+ var Axis_publicField = (obj, key, value) => Axis_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
39186
38805
 
39187
38806
 
39188
38807
 
@@ -42492,6 +42111,18 @@ function smoothLines(el, type) {
42492
42111
 
42493
42112
  ;// CONCATENATED MODULE: ./src/config/Options/axis/y2.ts
42494
42113
  /* harmony default export */ var y2 = ({
42114
+ /**
42115
+ * Set clip-path attribute for y2 axis element
42116
+ * - **NOTE**: `clip-path` attribute for y2 Axis is set only when `axis.y2.inner` option is true.
42117
+ * @name axis․y2․clipPath
42118
+ * @memberof Options
42119
+ * @type {boolean}
42120
+ * @default true
42121
+ * @example
42122
+ * // don't set 'clip-path' attribute
42123
+ * clipPath: false
42124
+ */
42125
+ axis_y2_clipPath: true,
42495
42126
  /**
42496
42127
  * Show or hide y2 axis.
42497
42128
  * - **NOTE**:
@@ -43172,8 +42803,12 @@ var axis_spreadValues = (a, b) => {
43172
42803
  * - The object type should be as:
43173
42804
  * - start {number}: Start data point number. If not set, the start will be the first data point.
43174
42805
  * - [end] {number}: End data point number. If not set, the end will be the last data point.
43175
- * - [style.dasharray="2 2"] {object}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.
43176
- * - **NOTE:** Currently this option supports only line chart and dashed style. If this option specified, the line will be dashed only in the regions.
42806
+ * - [style.dasharray="2 2"] {string}: The first number specifies a distance for the filled area, and the second a distance for the unfilled area.
42807
+ * - **NOTE:**
42808
+ * - Supports only line type.
42809
+ * - `start` and `end` values should be in the exact x value range.
42810
+ * - Dashes will be applied using `stroke-dasharray` css property when data doesn't contain nullish value(or nullish value with `line.connectNull=true` set).
42811
+ * - Dashes will be applied via path command when data contains nullish value.
43177
42812
  * @name data․regions
43178
42813
  * @memberof Options
43179
42814
  * @type {object}
@@ -43296,14 +42931,12 @@ var slice = Array.prototype.slice;
43296
42931
  sum += v;
43297
42932
  }
43298
42933
  }
43299
- if (sortValues != null)
43300
- index.sort(function(i2, j2) {
43301
- return sortValues(arcs[i2], arcs[j2]);
43302
- });
43303
- else if (sort != null)
43304
- index.sort(function(i2, j2) {
43305
- return sort(data[i2], data[j2]);
43306
- });
42934
+ if (sortValues != null) index.sort(function(i2, j2) {
42935
+ return sortValues(arcs[i2], arcs[j2]);
42936
+ });
42937
+ else if (sort != null) index.sort(function(i2, j2) {
42938
+ return sort(data[i2], data[j2]);
42939
+ });
43307
42940
  for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {
43308
42941
  j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {
43309
42942
  data: data[j],
@@ -43348,10 +42981,8 @@ function path_append(strings) {
43348
42981
  }
43349
42982
  function appendRound(digits) {
43350
42983
  let d = Math.floor(digits);
43351
- if (!(d >= 0))
43352
- throw new Error(`invalid digits: ${digits}`);
43353
- if (d > 15)
43354
- return path_append;
42984
+ if (!(d >= 0)) throw new Error(`invalid digits: ${digits}`);
42985
+ if (d > 15) return path_append;
43355
42986
  const k = __pow(10, d);
43356
42987
  return function(strings) {
43357
42988
  this._ += strings[0];
@@ -43387,13 +43018,11 @@ class Path {
43387
43018
  }
43388
43019
  arcTo(x1, y1, x2, y2, r) {
43389
43020
  x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;
43390
- if (r < 0)
43391
- throw new Error(`negative radius: ${r}`);
43021
+ if (r < 0) throw new Error(`negative radius: ${r}`);
43392
43022
  let x0 = this._x1, y0 = this._y1, x21 = x2 - x1, y21 = y2 - y1, x01 = x0 - x1, y01 = y0 - y1, l01_2 = x01 * x01 + y01 * y01;
43393
43023
  if (this._x1 === null) {
43394
43024
  this._append`M${this._x1 = x1},${this._y1 = y1}`;
43395
- } else if (!(l01_2 > path_epsilon))
43396
- ;
43025
+ } else if (!(l01_2 > path_epsilon)) ;
43397
43026
  else if (!(Math.abs(y01 * x21 - y21 * x01) > path_epsilon) || !r) {
43398
43027
  this._append`L${this._x1 = x1},${this._y1 = y1}`;
43399
43028
  } else {
@@ -43406,18 +43035,15 @@ class Path {
43406
43035
  }
43407
43036
  arc(x, y, r, a0, a1, ccw) {
43408
43037
  x = +x, y = +y, r = +r, ccw = !!ccw;
43409
- if (r < 0)
43410
- throw new Error(`negative radius: ${r}`);
43038
+ if (r < 0) throw new Error(`negative radius: ${r}`);
43411
43039
  let dx = r * Math.cos(a0), dy = r * Math.sin(a0), x0 = x + dx, y0 = y + dy, cw = 1 ^ ccw, da = ccw ? a0 - a1 : a1 - a0;
43412
43040
  if (this._x1 === null) {
43413
43041
  this._append`M${x0},${y0}`;
43414
43042
  } else if (Math.abs(this._x1 - x0) > path_epsilon || Math.abs(this._y1 - y0) > path_epsilon) {
43415
43043
  this._append`L${x0},${y0}`;
43416
43044
  }
43417
- if (!r)
43418
- return;
43419
- if (da < 0)
43420
- da = da % path_tau + path_tau;
43045
+ if (!r) return;
43046
+ if (da < 0) da = da % path_tau + path_tau;
43421
43047
  if (da > tauEpsilon) {
43422
43048
  this._append`A${r},${r},0,1,${cw},${x - dx},${y - dy}A${r},${r},0,1,${cw},${this._x1 = x0},${this._y1 = y0}`;
43423
43049
  } else if (da > path_epsilon) {
@@ -43444,14 +43070,12 @@ function pathRound(digits = 3) {
43444
43070
  function withPath(shape) {
43445
43071
  let digits = 3;
43446
43072
  shape.digits = function(_) {
43447
- if (!arguments.length)
43448
- return digits;
43073
+ if (!arguments.length) return digits;
43449
43074
  if (_ == null) {
43450
43075
  digits = null;
43451
43076
  } else {
43452
43077
  const d = Math.floor(_);
43453
- if (!(d >= 0))
43454
- throw new RangeError(`invalid digits: ${_}`);
43078
+ if (!(d >= 0)) throw new RangeError(`invalid digits: ${_}`);
43455
43079
  digits = d;
43456
43080
  }
43457
43081
  return shape;
@@ -43480,15 +43104,13 @@ function arcPadAngle(d) {
43480
43104
  }
43481
43105
  function intersect(x0, y0, x1, y1, x2, y2, x3, y3) {
43482
43106
  var x10 = x1 - x0, y10 = y1 - y0, x32 = x3 - x2, y32 = y3 - y2, t = y32 * x10 - x32 * y10;
43483
- if (t * t < epsilon)
43484
- return;
43107
+ if (t * t < epsilon) return;
43485
43108
  t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;
43486
43109
  return [x0 + t * x10, y0 + t * y10];
43487
43110
  }
43488
43111
  function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
43489
43112
  var x01 = x0 - x1, y01 = y0 - y1, lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01), ox = lo * y01, oy = -lo * x01, x11 = x0 + ox, y11 = y0 + oy, x10 = x1 + ox, y10 = y1 + oy, x00 = (x11 + x10) / 2, y00 = (y11 + y10) / 2, dx = x10 - x11, dy = y10 - y11, d2 = dx * dx + dy * dy, r = r1 - rc, D = x11 * y10 - x10 * y11, d = (dy < 0 ? -1 : 1) * sqrt(math_max(0, r * r * d2 - D * D)), cx0 = (D * dy - dx * d) / d2, cy0 = (-D * dx - dy * d) / d2, cx1 = (D * dy + dx * d) / d2, cy1 = (-D * dx + dy * d) / d2, dx0 = cx0 - x00, dy0 = cy0 - y00, dx1 = cx1 - x00, dy1 = cy1 - y00;
43490
- if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1)
43491
- cx0 = cx1, cy0 = cy1;
43113
+ if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;
43492
43114
  return {
43493
43115
  cx: cx0,
43494
43116
  cy: cy0,
@@ -43502,12 +43124,9 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
43502
43124
  var innerRadius = arcInnerRadius, outerRadius = arcOuterRadius, cornerRadius = d3_shape_src_constant(0), padRadius = null, startAngle = arcStartAngle, endAngle = arcEndAngle, padAngle = arcPadAngle, context = null, path = withPath(arc);
43503
43125
  function arc() {
43504
43126
  var buffer, r, r0 = +innerRadius.apply(this, arguments), r1 = +outerRadius.apply(this, arguments), a0 = startAngle.apply(this, arguments) - halfPi, a1 = endAngle.apply(this, arguments) - halfPi, da = math_abs(a1 - a0), cw = a1 > a0;
43505
- if (!context)
43506
- context = buffer = path();
43507
- if (r1 < r0)
43508
- r = r1, r1 = r0, r0 = r;
43509
- if (!(r1 > epsilon))
43510
- context.moveTo(0, 0);
43127
+ if (!context) context = buffer = path();
43128
+ if (r1 < r0) r = r1, r1 = r0, r0 = r;
43129
+ if (!(r1 > epsilon)) context.moveTo(0, 0);
43511
43130
  else if (da > tau - epsilon) {
43512
43131
  context.moveTo(r1 * cos(a0), r1 * sin(a0));
43513
43132
  context.arc(0, 0, r1, a0, a1, !cw);
@@ -43519,14 +43138,10 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
43519
43138
  var a01 = a0, a11 = a1, a00 = a0, a10 = a1, da0 = da, da1 = da, ap = padAngle.apply(this, arguments) / 2, rp = ap > epsilon && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)), rc = math_min(math_abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), rc0 = rc, rc1 = rc, t0, t1;
43520
43139
  if (rp > epsilon) {
43521
43140
  var p0 = asin(rp / r0 * sin(ap)), p1 = asin(rp / r1 * sin(ap));
43522
- if ((da0 -= p0 * 2) > epsilon)
43523
- p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
43524
- else
43525
- da0 = 0, a00 = a10 = (a0 + a1) / 2;
43526
- if ((da1 -= p1 * 2) > epsilon)
43527
- p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
43528
- else
43529
- da1 = 0, a01 = a11 = (a0 + a1) / 2;
43141
+ if ((da0 -= p0 * 2) > epsilon) p0 *= cw ? 1 : -1, a00 += p0, a10 -= p0;
43142
+ else da0 = 0, a00 = a10 = (a0 + a1) / 2;
43143
+ if ((da1 -= p1 * 2) > epsilon) p1 *= cw ? 1 : -1, a01 += p1, a11 -= p1;
43144
+ else da1 = 0, a01 = a11 = (a0 + a1) / 2;
43530
43145
  }
43531
43146
  var x01 = r1 * cos(a01), y01 = r1 * sin(a01), x10 = r0 * cos(a10), y10 = r0 * sin(a10);
43532
43147
  if (rc > epsilon) {
@@ -43541,40 +43156,33 @@ function cornerTangents(x0, y0, x1, y1, r1, rc, cw) {
43541
43156
  }
43542
43157
  }
43543
43158
  }
43544
- if (!(da1 > epsilon))
43545
- context.moveTo(x01, y01);
43159
+ if (!(da1 > epsilon)) context.moveTo(x01, y01);
43546
43160
  else if (rc1 > epsilon) {
43547
43161
  t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);
43548
43162
  t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);
43549
43163
  context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);
43550
- if (rc1 < rc)
43551
- context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
43164
+ if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
43552
43165
  else {
43553
43166
  context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
43554
43167
  context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);
43555
43168
  context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
43556
43169
  }
43557
- } else
43558
- context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
43559
- if (!(r0 > epsilon) || !(da0 > epsilon))
43560
- context.lineTo(x10, y10);
43170
+ } else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);
43171
+ if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);
43561
43172
  else if (rc0 > epsilon) {
43562
43173
  t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);
43563
43174
  t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);
43564
43175
  context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);
43565
- if (rc0 < rc)
43566
- context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
43176
+ if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);
43567
43177
  else {
43568
43178
  context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);
43569
43179
  context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);
43570
43180
  context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);
43571
43181
  }
43572
- } else
43573
- context.arc(0, 0, r0, a10, a00, cw);
43182
+ } else context.arc(0, 0, r0, a10, a00, cw);
43574
43183
  }
43575
43184
  context.closePath();
43576
- if (buffer)
43577
- return context = null, buffer + "" || null;
43185
+ if (buffer) return context = null, buffer + "" || null;
43578
43186
  }
43579
43187
  arc.centroid = function() {
43580
43188
  var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;
@@ -44471,20 +44079,15 @@ function point_y(p) {
44471
44079
  y = typeof y === "function" ? y : y === void 0 ? point_y : d3_shape_src_constant(y);
44472
44080
  function line(data) {
44473
44081
  var i, n = (data = d3_shape_src_array(data)).length, d, defined0 = false, buffer;
44474
- if (context == null)
44475
- output = curve(buffer = path());
44082
+ if (context == null) output = curve(buffer = path());
44476
44083
  for (i = 0; i <= n; ++i) {
44477
44084
  if (!(i < n && defined(d = data[i], i, data)) === defined0) {
44478
- if (defined0 = !defined0)
44479
- output.lineStart();
44480
- else
44481
- output.lineEnd();
44085
+ if (defined0 = !defined0) output.lineStart();
44086
+ else output.lineEnd();
44482
44087
  }
44483
- if (defined0)
44484
- output.point(+x(d, i, data), +y(d, i, data));
44088
+ if (defined0) output.point(+x(d, i, data), +y(d, i, data));
44485
44089
  }
44486
- if (buffer)
44487
- return output = null, buffer + "" || null;
44090
+ if (buffer) return output = null, buffer + "" || null;
44488
44091
  }
44489
44092
  line.x = function(_) {
44490
44093
  return arguments.length ? (x = typeof _ === "function" ? _ : d3_shape_src_constant(+_), line) : x;
@@ -44518,8 +44121,7 @@ function point_y(p) {
44518
44121
  y1 = typeof y1 === "function" ? y1 : y1 === void 0 ? point_y : d3_shape_src_constant(+y1);
44519
44122
  function area(data) {
44520
44123
  var i, j, k, n = (data = d3_shape_src_array(data)).length, d, defined0 = false, buffer, x0z = new Array(n), y0z = new Array(n);
44521
- if (context == null)
44522
- output = curve(buffer = path());
44124
+ if (context == null) output = curve(buffer = path());
44523
44125
  for (i = 0; i <= n; ++i) {
44524
44126
  if (!(i < n && defined(d = data[i], i, data)) === defined0) {
44525
44127
  if (defined0 = !defined0) {
@@ -44541,8 +44143,7 @@ function point_y(p) {
44541
44143
  output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);
44542
44144
  }
44543
44145
  }
44544
- if (buffer)
44545
- return output = null, buffer + "" || null;
44146
+ if (buffer) return output = null, buffer + "" || null;
44546
44147
  }
44547
44148
  function arealine() {
44548
44149
  return src_line().defined(defined).curve(curve).context(context);
@@ -45504,6 +45105,37 @@ function updateRatio(data) {
45504
45105
 
45505
45106
 
45506
45107
 
45108
+ function getStrokeDashArray(start, end, pattern, isLastX = false) {
45109
+ const dash = start ? [start, 0] : pattern;
45110
+ for (let i = start ? start : pattern.reduce((a, c) => a + c); i <= end; ) {
45111
+ pattern.forEach((v) => {
45112
+ if (i + v <= end) {
45113
+ dash.push(v);
45114
+ }
45115
+ i += v;
45116
+ });
45117
+ }
45118
+ dash.length % 2 !== 0 && dash.push(isLastX ? pattern[1] : 0);
45119
+ return {
45120
+ dash: dash.join(" "),
45121
+ length: dash.reduce((a, b) => a + b, 0)
45122
+ };
45123
+ }
45124
+ function getRegions(d, _regions, isTimeSeries) {
45125
+ const $$ = this;
45126
+ const regions = [];
45127
+ const dasharray = "2 2";
45128
+ if (isDefined(_regions)) {
45129
+ const getValue = (v, def) => isUndefined(v) ? def : isTimeSeries ? parseDate.call($$, v) : v;
45130
+ for (let i = 0, reg; reg = _regions[i]; i++) {
45131
+ const start = getValue(reg.start, d[0].x);
45132
+ const end = getValue(reg.end, d[d.length - 1].x);
45133
+ const style = reg.style || { dasharray };
45134
+ regions[i] = { start, end, style };
45135
+ }
45136
+ }
45137
+ return regions;
45138
+ }
45507
45139
  /* harmony default export */ var line = ({
45508
45140
  initLine() {
45509
45141
  const { $el } = this;
@@ -45548,6 +45180,7 @@ function updateRatio(data) {
45548
45180
  * @param {boolean} withTransition With or without transition
45549
45181
  * @param {boolean} isSub Subchart draw
45550
45182
  * @returns {Array}
45183
+ * @private
45551
45184
  */
45552
45185
  redrawLine(drawFn, withTransition, isSub = false) {
45553
45186
  const $$ = this;
@@ -45624,26 +45257,27 @@ function updateRatio(data) {
45624
45257
  return path || "M 0 0";
45625
45258
  };
45626
45259
  },
45260
+ /**
45261
+ * Set regions dasharray and get path
45262
+ * @param {Array} d Data object
45263
+ * @param {Function} x x scale function
45264
+ * @param {Function} y y scale function
45265
+ * @param {object} _regions regions to be set
45266
+ * @returns {stirng} Path string
45267
+ * @private
45268
+ */
45627
45269
  lineWithRegions(d, x, y, _regions) {
45628
45270
  const $$ = this;
45629
45271
  const { config } = $$;
45630
45272
  const isRotated = config.axis_rotated;
45631
45273
  const isTimeSeries = $$.axis.isTimeSeries();
45632
- const regions = [];
45633
45274
  const dasharray = "2 2";
45275
+ const regions = getRegions.bind($$)(d, _regions, isTimeSeries);
45276
+ const hasNullDataValue = $$.hasNullDataValue(d);
45634
45277
  let xp;
45635
45278
  let yp;
45636
45279
  let diff;
45637
45280
  let diffx2;
45638
- if (isDefined(_regions)) {
45639
- const getValue = (v, def) => isUndefined(v) ? def : isTimeSeries ? parseDate.call($$, v) : v;
45640
- for (let i = 0, reg; reg = _regions[i]; i++) {
45641
- const start = getValue(reg.start, d[0].x);
45642
- const end = getValue(reg.end, d[d.length - 1].x);
45643
- const style = reg.style || { dasharray };
45644
- regions[i] = { start, end, style };
45645
- }
45646
- }
45647
45281
  const xValue = isRotated ? (dt) => y(dt.value) : (dt) => x(dt.x);
45648
45282
  const yValue = isRotated ? (dt) => x(dt.x) : (dt) => y(dt.value);
45649
45283
  const generateM = (points) => `M${points[0][0]},${points[0][1]}L${points[1][0]},${points[1][1]}`;
@@ -45655,17 +45289,36 @@ function updateRatio(data) {
45655
45289
  const points = isRotated ? [[y(yp(k)), x(xv0)], [y(yp(k + diff)), x(xv1)]] : [[x(xv0), y(yp(k))], [x(xv1), y(yp(k + diff))]];
45656
45290
  return generateM(points);
45657
45291
  } : (d0, d1, k, otherDiff) => {
45658
- const points = isRotated ? [[y(yp(k), true), x(xp(k))], [
45659
- y(yp(k + otherDiff), true),
45660
- x(xp(k + otherDiff))
45661
- ]] : [[x(xp(k), true), y(yp(k))], [
45662
- x(xp(k + otherDiff), true),
45663
- y(yp(k + otherDiff))
45664
- ]];
45292
+ const x0 = x(d1.x, !isRotated);
45293
+ const y0 = y(d1.value, isRotated);
45294
+ const gap = k + otherDiff;
45295
+ const xValue2 = x(xp(k), !isRotated);
45296
+ const yValue2 = y(yp(k), isRotated);
45297
+ let xDiff = x(xp(gap), !isRotated);
45298
+ let yDiff = y(yp(gap), isRotated);
45299
+ if (xDiff > x0) {
45300
+ xDiff = x0;
45301
+ }
45302
+ if (d0.value > d1.value && (isRotated ? yDiff < y0 : yDiff > y0)) {
45303
+ yDiff = y0;
45304
+ }
45305
+ const points = [
45306
+ [xValue2, yValue2],
45307
+ [xDiff, yDiff]
45308
+ ];
45309
+ isRotated && points.forEach((v) => v.reverse());
45665
45310
  return generateM(points);
45666
45311
  };
45667
45312
  const axisType = { x: $$.axis.getAxisType("x"), y: $$.axis.getAxisType("y") };
45668
45313
  let path = "";
45314
+ const target = $$.$el.line.filter(({ id }) => id === d[0].id);
45315
+ const tempNode = target.clone().style("display", "none");
45316
+ const getLength = (node, path2) => node.attr("d", path2).node().getTotalLength();
45317
+ const dashArray = {
45318
+ dash: [],
45319
+ lastLength: 0
45320
+ };
45321
+ let isLastX = false;
45669
45322
  for (let i = 0, data; data = d[i]; i++) {
45670
45323
  const prevData = d[i - 1];
45671
45324
  const hasPrevData = prevData && isValue(prevData.value);
@@ -45676,26 +45329,61 @@ function updateRatio(data) {
45676
45329
  if (isUndefined(regions) || !style || !hasPrevData) {
45677
45330
  path += `${i && hasPrevData ? "L" : "M"}${xValue(data)},${yValue(data)}`;
45678
45331
  } else if (hasPrevData) {
45679
- try {
45680
- style = style.dasharray.split(" ");
45681
- } catch (e) {
45682
- style = dasharray.split(" ");
45683
- }
45332
+ style = ((style == null ? void 0 : style.dasharray) || dasharray).split(" ").map(Number);
45684
45333
  xp = getScale(axisType.x, prevData.x, data.x);
45685
45334
  yp = getScale(axisType.y, prevData.value, data.value);
45686
- const dx = x(data.x) - x(prevData.x);
45687
- const dy = y(data.value) - y(prevData.value);
45688
- const dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
45689
- diff = style[0] / dd;
45690
- diffx2 = diff * style[1];
45691
- for (let j = diff; j <= 1; j += diffx2) {
45692
- path += sWithRegion(prevData, data, j, diff);
45693
- if (j + diffx2 >= 1) {
45694
- path += sWithRegion(prevData, data, 1, 0);
45335
+ if (hasNullDataValue) {
45336
+ const dx = x(data.x) - x(prevData.x);
45337
+ const dy = y(data.value) - y(prevData.value);
45338
+ const dd = Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2));
45339
+ diff = style[0] / dd;
45340
+ diffx2 = diff * style[1];
45341
+ for (let j = diff; j <= 1; j += diffx2) {
45342
+ path += sWithRegion(prevData, data, j, diff);
45343
+ if (j + diffx2 >= 1) {
45344
+ path += sWithRegion(prevData, data, 1, 0);
45345
+ }
45695
45346
  }
45347
+ } else {
45348
+ let points = [];
45349
+ isLastX = data.x === d[d.length - 1].x;
45350
+ if (isTimeSeries) {
45351
+ const x0 = +prevData.x;
45352
+ const xv0 = new Date(x0);
45353
+ const xv1 = new Date(x0 + (+data.x - x0));
45354
+ points = [
45355
+ [x(xv0), y(yp(0))],
45356
+ // M
45357
+ [x(xv1), y(yp(1))]
45358
+ // L
45359
+ ];
45360
+ } else {
45361
+ points = [
45362
+ [x(xp(0)), y(yp(0))],
45363
+ // M
45364
+ [x(xp(1)), y(yp(1))]
45365
+ // L
45366
+ ];
45367
+ }
45368
+ isRotated && points.forEach((v) => v.reverse());
45369
+ const startLength = getLength(tempNode, path);
45370
+ const endLength = getLength(tempNode, path += `L${points[1].join(",")}`);
45371
+ const strokeDashArray = getStrokeDashArray(
45372
+ startLength - dashArray.lastLength,
45373
+ endLength - dashArray.lastLength,
45374
+ style,
45375
+ isLastX
45376
+ );
45377
+ dashArray.lastLength += strokeDashArray.length;
45378
+ dashArray.dash.push(strokeDashArray.dash);
45696
45379
  }
45697
45380
  }
45698
45381
  }
45382
+ if (dashArray.dash.length) {
45383
+ !isLastX && dashArray.dash.push(getLength(tempNode, path));
45384
+ tempNode.remove();
45385
+ target.attr("stroke-dasharray", dashArray.dash.join(" "));
45386
+ }
45699
45387
  return path;
45700
45388
  },
45701
45389
  isWithinRegions(withinX, withinRegions) {
@@ -46549,11 +46237,8 @@ const cacheKeyTextWidth = KEY.radarTextWidth;
46549
46237
  ;// CONCATENATED MODULE: ./node_modules/d3-hierarchy/src/hierarchy/count.js
46550
46238
  function count(node) {
46551
46239
  var sum = 0, children = node.children, i = children && children.length;
46552
- if (!i)
46553
- sum = 1;
46554
- else
46555
- while (--i >= 0)
46556
- sum += children[i].value;
46240
+ if (!i) sum = 1;
46241
+ else while (--i >= 0) sum += children[i].value;
46557
46242
  node.value = sum;
46558
46243
  }
46559
46244
  /* harmony default export */ function hierarchy_count() {
@@ -46614,8 +46299,7 @@ function count(node) {
46614
46299
  /* harmony default export */ function sum(value) {
46615
46300
  return this.eachAfter(function(node) {
46616
46301
  var sum = +value(node.data) || 0, children = node.children, i = children && children.length;
46617
- while (--i >= 0)
46618
- sum += children[i].value;
46302
+ while (--i >= 0) sum += children[i].value;
46619
46303
  node.value = sum;
46620
46304
  });
46621
46305
  }
@@ -46644,8 +46328,7 @@ function count(node) {
46644
46328
  return nodes;
46645
46329
  }
46646
46330
  function leastCommonAncestor(a, b) {
46647
- if (a === b)
46648
- return a;
46331
+ if (a === b) return a;
46649
46332
  var aNodes = a.ancestors(), bNodes = b.ancestors(), c = null;
46650
46333
  a = aNodes.pop();
46651
46334
  b = bNodes.pop();
@@ -46726,8 +46409,7 @@ function leastCommonAncestor(a, b) {
46726
46409
  function hierarchy(data, children) {
46727
46410
  if (data instanceof Map) {
46728
46411
  data = [void 0, data];
46729
- if (children === void 0)
46730
- children = mapChildren;
46412
+ if (children === void 0) children = mapChildren;
46731
46413
  } else if (children === void 0) {
46732
46414
  children = objectChildren;
46733
46415
  }
@@ -46754,8 +46436,7 @@ function mapChildren(d) {
46754
46436
  return Array.isArray(d) ? d[1] : null;
46755
46437
  }
46756
46438
  function copyData(node) {
46757
- if (node.data.value !== void 0)
46758
- node.value = node.data.value;
46439
+ if (node.data.value !== void 0) node.value = node.data.value;
46759
46440
  node.data = node.data.data;
46760
46441
  }
46761
46442
  function computeHeight(node) {
@@ -46830,10 +46511,8 @@ function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
46830
46511
  minRatio = Math.max(maxValue / beta, beta / minValue);
46831
46512
  for (; i1 < n; ++i1) {
46832
46513
  sumValue += nodeValue = nodes[i1].value;
46833
- if (nodeValue < minValue)
46834
- minValue = nodeValue;
46835
- if (nodeValue > maxValue)
46836
- maxValue = nodeValue;
46514
+ if (nodeValue < minValue) minValue = nodeValue;
46515
+ if (nodeValue > maxValue) maxValue = nodeValue;
46837
46516
  beta = sumValue * sumValue * alpha;
46838
46517
  newRatio = Math.max(maxValue / beta, beta / minValue);
46839
46518
  if (newRatio > minRatio) {
@@ -46843,10 +46522,8 @@ function squarifyRatio(ratio, parent, x0, y0, x1, y1) {
46843
46522
  minRatio = newRatio;
46844
46523
  }
46845
46524
  rows.push(row = { value: sumValue, dice: dx < dy, children: nodes.slice(i0, i1) });
46846
- if (row.dice)
46847
- dice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
46848
- else
46849
- treemap_slice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
46525
+ if (row.dice) dice(row, x0, y0, x1, value ? y0 += dy * sumValue / value : y1);
46526
+ else treemap_slice(row, x0, y0, value ? x0 += dx * sumValue / value : x1, y1);
46850
46527
  value -= sumValue, i0 = i1;
46851
46528
  }
46852
46529
  return rows;
@@ -46866,8 +46543,7 @@ function optional(f) {
46866
46543
  return f == null ? null : required(f);
46867
46544
  }
46868
46545
  function required(f) {
46869
- if (typeof f !== "function")
46870
- throw new Error();
46546
+ if (typeof f !== "function") throw new Error();
46871
46547
  return f;
46872
46548
  }
46873
46549
 
@@ -46894,16 +46570,13 @@ function constantZero() {
46894
46570
  root.y1 = dy;
46895
46571
  root.eachBefore(positionNode);
46896
46572
  paddingStack = [0];
46897
- if (round)
46898
- root.eachBefore(treemap_round);
46573
+ if (round) root.eachBefore(treemap_round);
46899
46574
  return root;
46900
46575
  }
46901
46576
  function positionNode(node) {
46902
46577
  var p = paddingStack[node.depth], x0 = node.x0 + p, y0 = node.y0 + p, x1 = node.x1 - p, y1 = node.y1 - p;
46903
- if (x1 < x0)
46904
- x0 = x1 = (x0 + x1) / 2;
46905
- if (y1 < y0)
46906
- y0 = y1 = (y0 + y1) / 2;
46578
+ if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
46579
+ if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
46907
46580
  node.x0 = x0;
46908
46581
  node.y0 = y0;
46909
46582
  node.x1 = x1;
@@ -46914,10 +46587,8 @@ function constantZero() {
46914
46587
  y0 += paddingTop(node) - p;
46915
46588
  x1 -= paddingRight(node) - p;
46916
46589
  y1 -= paddingBottom(node) - p;
46917
- if (x1 < x0)
46918
- x0 = x1 = (x0 + x1) / 2;
46919
- if (y1 < y0)
46920
- y0 = y1 = (y0 + y1) / 2;
46590
+ if (x1 < x0) x0 = x1 = (x0 + x1) / 2;
46591
+ if (y1 < y0) y0 = y1 = (y0 + y1) / 2;
46921
46592
  tile(node, x0, y0, x1, y1);
46922
46593
  }
46923
46594
  }
@@ -46971,13 +46642,10 @@ function constantZero() {
46971
46642
  var valueOffset = sums[i2], valueTarget = value / 2 + valueOffset, k = i2 + 1, hi = j - 1;
46972
46643
  while (k < hi) {
46973
46644
  var mid = k + hi >>> 1;
46974
- if (sums[mid] < valueTarget)
46975
- k = mid + 1;
46976
- else
46977
- hi = mid;
46645
+ if (sums[mid] < valueTarget) k = mid + 1;
46646
+ else hi = mid;
46978
46647
  }
46979
- if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i2 + 1 < k)
46980
- --k;
46648
+ if (valueTarget - sums[k - 1] < sums[k] - valueTarget && i2 + 1 < k) --k;
46981
46649
  var valueLeft = sums[k] - valueOffset, valueRight = value - valueLeft;
46982
46650
  if (x12 - x02 > y12 - y02) {
46983
46651
  var xk = value ? (x02 * valueRight + x12 * valueLeft) / value : x12;
@@ -47008,12 +46676,9 @@ function constantZero() {
47008
46676
  var rows, row, nodes, i, j = -1, n, m = rows.length, value = parent.value;
47009
46677
  while (++j < m) {
47010
46678
  row = rows[j], nodes = row.children;
47011
- for (i = row.value = 0, n = nodes.length; i < n; ++i)
47012
- row.value += nodes[i].value;
47013
- if (row.dice)
47014
- dice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);
47015
- else
47016
- treemap_slice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);
46679
+ for (i = row.value = 0, n = nodes.length; i < n; ++i) row.value += nodes[i].value;
46680
+ if (row.dice) dice(row, x0, y0, x1, value ? y0 += (y1 - y0) * row.value / value : y1);
46681
+ else treemap_slice(row, x0, y0, value ? x0 += (x1 - x0) * row.value / value : x1, y1);
47017
46682
  value -= row.value;
47018
46683
  }
47019
46684
  } else {
@@ -47479,14 +47144,19 @@ ${percentValue}%`;
47479
47144
  * @property {number} [bar.radius] Set the radius of bar edge in pixel.
47480
47145
  * @property {number} [bar.radius.ratio] Set the radius ratio of bar edge in relative the bar's width.
47481
47146
  * @property {number} [bar.sensitivity=2] The senstivity offset value for interaction boundary.
47482
- * @property {number} [bar.width] Change the width of bar chart.
47147
+ * @property {number|Function|object} [bar.width] Change the width of bar chart.
47483
47148
  * @property {number} [bar.width.ratio=0.6] Change the width of bar chart by ratio.
47149
+ * - **NOTE:** Criteria for ratio.
47150
+ * - When x ticks count is same with the data count, the baseline for ratio is the minimum interval value of x ticks.
47151
+ * - ex. when timeseries x values are: [2024-01-01, 2024-02-01, 2024-03-01], the minimum interval will be `2024-02-01 ~ 2024-03-01`
47152
+ * - if the minimum interval is 30px, then ratio=1 means 30px.
47153
+ * - When x ticks count is lower than the data count, the baseline will be calculated as `chart width / data count`.
47154
+ * - ex. when chart width is 500, data count is 5, then ratio=1 means 100px.
47484
47155
  * @property {number} [bar.width.max] The maximum width value for ratio.
47485
47156
  * @property {number} [bar.width.dataname] Change the width of bar for indicated dataset only.
47486
- * - **NOTE:**
47487
- * - Works only for non-stacked bar
47488
- * - Bars are centered accoding its total width value
47489
47157
  * @property {number} [bar.width.dataname.ratio=0.6] Change the width of bar chart by ratio.
47158
+ * - **NOTE:**
47159
+ * - Works only for non-stacked bar
47490
47160
  * @property {number} [bar.width.dataname.max] The maximum width value for ratio.
47491
47161
  * @property {boolean} [bar.zerobased=true] Set if min or max value will be 0 on bar chart.
47492
47162
  * @see [Demo: bar front](https://naver.github.io/billboard.js/demo/#BarChartOptions.BarFront)
@@ -47554,7 +47224,15 @@ ${percentValue}%`;
47554
47224
  *
47555
47225
  * width: 10,
47556
47226
  *
47557
- * // or
47227
+ * // or specify width callback. The callback will receive width, targetsNum, maxDataCount as arguments.
47228
+ * // - width: chart area width
47229
+ * // - targetsNum: number of targets
47230
+ * // - maxDataCount: maximum data count among targets
47231
+ * width: function(width, targetsNum, maxDataCount) {
47232
+ * return width / (targetsNum * maxDataCount);
47233
+ * }
47234
+ *
47235
+ * // or specify ratio & max
47558
47236
  * width: {
47559
47237
  * ratio: 0.2,
47560
47238
  * max: 20
@@ -48535,6 +48213,7 @@ function extendArc(module, option) {
48535
48213
  }
48536
48214
  let resolver_shape_area = () => (extendLine(shape_area, [Options_shape_area]), (resolver_shape_area = () => TYPE.AREA)());
48537
48215
  let areaLineRange = () => (extendLine(shape_area, [Options_shape_area]), (areaLineRange = () => TYPE.AREA_LINE_RANGE)());
48216
+ let areaStepRange = () => (extendLine(shape_area, [Options_shape_area]), (areaStepRange = () => TYPE.AREA_STEP_RANGE)());
48538
48217
  let areaSpline = () => (extendLine(shape_area, [Options_shape_area, spline]), (areaSpline = () => TYPE.AREA_SPLINE)());
48539
48218
  let areaSplineRange = () => (extendLine(shape_area, [Options_shape_area, spline]), (areaSplineRange = () => TYPE.AREA_SPLINE_RANGE)());
48540
48219
  let areaStep = () => (extendLine(shape_area, [Options_shape_area]), (areaStep = () => TYPE.AREA_STEP)());
@@ -48577,7 +48256,7 @@ const bb = {
48577
48256
  * bb.version; // "1.0.0"
48578
48257
  * @memberof bb
48579
48258
  */
48580
- version: "3.12.3",
48259
+ version: "3.13.0-next.1",
48581
48260
  /**
48582
48261
  * Generate chart
48583
48262
  * - **NOTE:** Bear in mind for the possiblity of ***throwing an error***, during the generation when: