billboard.js 3.13.0 → 3.14.0-next.2

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 (70) hide show
  1. package/README.md +1 -1
  2. package/dist/billboard.css +1 -1
  3. package/dist/billboard.js +349 -176
  4. package/dist/billboard.min.css +1 -1
  5. package/dist/billboard.min.js +10 -10
  6. package/dist/billboard.pkgd.js +572 -399
  7. package/dist/billboard.pkgd.min.js +18 -18
  8. package/dist/plugin/billboardjs-plugin-bubblecompare.js +7 -4
  9. package/dist/plugin/billboardjs-plugin-bubblecompare.min.js +2 -2
  10. package/dist/plugin/billboardjs-plugin-sparkline.js +37 -11
  11. package/dist/plugin/billboardjs-plugin-sparkline.min.js +3 -3
  12. package/dist/plugin/billboardjs-plugin-stanford.js +41 -15
  13. package/dist/plugin/billboardjs-plugin-stanford.min.js +3 -3
  14. package/dist/plugin/billboardjs-plugin-tableview.js +37 -11
  15. package/dist/plugin/billboardjs-plugin-tableview.min.js +6 -6
  16. package/dist/plugin/billboardjs-plugin-textoverlap.js +36 -10
  17. package/dist/plugin/billboardjs-plugin-textoverlap.min.js +3 -3
  18. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.js +50 -50
  19. package/dist/plugin/pkgd/billboardjs-plugin-bubblecompare.pkgd.min.js +2 -2
  20. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.js +138 -115
  21. package/dist/plugin/pkgd/billboardjs-plugin-sparkline.pkgd.min.js +6 -6
  22. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.js +178 -155
  23. package/dist/plugin/pkgd/billboardjs-plugin-stanford.pkgd.min.js +11 -11
  24. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.js +138 -115
  25. package/dist/plugin/pkgd/billboardjs-plugin-tableview.pkgd.min.js +2 -2
  26. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.js +150 -127
  27. package/dist/plugin/pkgd/billboardjs-plugin-textoverlap.pkgd.min.js +7 -7
  28. package/dist/theme/dark.css +1 -1
  29. package/dist/theme/dark.min.css +1 -1
  30. package/dist/theme/datalab.css +1 -1
  31. package/dist/theme/datalab.min.css +1 -1
  32. package/dist/theme/graph.css +1 -1
  33. package/dist/theme/graph.min.css +1 -1
  34. package/dist/theme/insight.css +1 -1
  35. package/dist/theme/insight.min.css +1 -1
  36. package/dist/theme/modern.css +1 -1
  37. package/dist/theme/modern.min.css +1 -1
  38. package/dist-esm/billboard.js +267 -67
  39. package/dist-esm/plugin/billboardjs-plugin-bubblecompare.js +3 -3
  40. package/dist-esm/plugin/billboardjs-plugin-sparkline.js +3 -3
  41. package/dist-esm/plugin/billboardjs-plugin-stanford.js +3 -3
  42. package/dist-esm/plugin/billboardjs-plugin-tableview.js +3 -3
  43. package/dist-esm/plugin/billboardjs-plugin-textoverlap.js +3 -3
  44. package/package.json +32 -31
  45. package/src/Chart/Chart.ts +11 -0
  46. package/src/ChartInternal/Axis/AxisRenderer.ts +6 -2
  47. package/src/ChartInternal/Axis/AxisRendererHelper.ts +13 -8
  48. package/src/ChartInternal/ChartInternal.ts +9 -7
  49. package/src/ChartInternal/data/data.ts +18 -4
  50. package/src/ChartInternal/data/load.ts +4 -0
  51. package/src/ChartInternal/interactions/eventrect.ts +11 -7
  52. package/src/ChartInternal/interactions/interaction.ts +21 -6
  53. package/src/ChartInternal/interactions/zoom.ts +11 -3
  54. package/src/ChartInternal/internals/legend.ts +16 -6
  55. package/src/ChartInternal/internals/size.ts +10 -5
  56. package/src/ChartInternal/internals/tooltip.ts +54 -2
  57. package/src/ChartInternal/internals/type.ts +2 -1
  58. package/src/ChartInternal/shape/arc.ts +2 -1
  59. package/src/ChartInternal/shape/funnel.ts +4 -2
  60. package/src/ChartInternal/shape/radar.ts +5 -1
  61. package/src/ChartInternal/shape/treemap.ts +4 -2
  62. package/src/config/Options/axis/axis.ts +30 -0
  63. package/src/config/Options/axis/y2.ts +13 -0
  64. package/src/config/Options/common/legend.ts +6 -3
  65. package/src/config/Options/common/main.ts +18 -7
  66. package/src/config/Options/interaction/interaction.ts +8 -2
  67. package/src/module/error.ts +11 -7
  68. package/src/module/util.ts +61 -7
  69. package/types/axis.d.ts +7 -0
  70. package/types/options.d.ts +15 -5
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.13.0
8
+ * @version 3.14.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -82,6 +82,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__3__;
82
82
  /******/
83
83
  /************************************************************************/
84
84
  var __webpack_exports__ = {};
85
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
86
+ !function() {
85
87
 
86
88
  // EXPORTS
87
89
  __webpack_require__.d(__webpack_exports__, {
@@ -92,7 +94,7 @@ __webpack_require__.d(__webpack_exports__, {
92
94
  var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(3);
93
95
  // EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
94
96
  var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(1);
95
- ;// CONCATENATED MODULE: ./src/module/browser.ts
97
+ ;// ./src/module/browser.ts
96
98
  function getGlobal() {
97
99
  return typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof global === "object" && global !== null && global.Object === Object && global || typeof self === "object" && self !== null && self.Object === Object && self || Function("return this")();
98
100
  }
@@ -118,7 +120,7 @@ const [
118
120
  ] = getFallback(win);
119
121
 
120
122
 
121
- ;// CONCATENATED MODULE: ./src/module/util.ts
123
+ ;// ./src/module/util.ts
122
124
  var __defProp = Object.defineProperty;
123
125
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
124
126
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -337,6 +339,13 @@ function getScrollPosition(node) {
337
339
  y: ((_e = (_d = win.pageYOffset) != null ? _d : win.scrollY) != null ? _e : 0) + ((_f = node.scrollTop) != null ? _f : 0)
338
340
  };
339
341
  }
342
+ function getTransformCTM(node, x = 0, y = 0, inverse = true) {
343
+ const point = new DOMPoint(x, y);
344
+ const screen = node.getScreenCTM();
345
+ return point.matrixTransform(
346
+ inverse ? screen == null ? void 0 : screen.inverse() : screen
347
+ );
348
+ }
340
349
  function getTranslation(node) {
341
350
  const transform = node ? node.transform : null;
342
351
  const baseVal = transform && transform.baseVal;
@@ -484,12 +493,28 @@ function parseDate(date) {
484
493
  }
485
494
  return parsedDate;
486
495
  }
496
+ function hasViewBox(svg) {
497
+ const attr = svg.attr("viewBox");
498
+ return attr ? /(\d+(\.\d+)?){3}/.test(attr) : false;
499
+ }
500
+ function hasStyle(node, condition, all = false) {
501
+ const isD3Node = !!node.node;
502
+ let has = false;
503
+ for (const [key, value] of Object.entries(condition)) {
504
+ has = isD3Node ? node.style(key) === value : node.style[key] === value;
505
+ if (all === false && has) {
506
+ break;
507
+ }
508
+ }
509
+ return has;
510
+ }
487
511
  function isTabVisible() {
488
512
  var _a, _b;
489
513
  return ((_a = doc) == null ? void 0 : _a.hidden) === false || ((_b = doc) == null ? void 0 : _b.visibilityState) === "visible";
490
514
  }
491
515
  function convertInputType(mouse, touch) {
492
516
  const { DocumentTouch, matchMedia, navigator } = win;
517
+ const hasPointerCoarse = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)").matches;
493
518
  let hasTouch = false;
494
519
  if (touch) {
495
520
  if (navigator && "maxTouchPoints" in navigator) {
@@ -497,7 +522,7 @@ function convertInputType(mouse, touch) {
497
522
  } else if ("ontouchmove" in win || DocumentTouch && doc instanceof DocumentTouch) {
498
523
  hasTouch = true;
499
524
  } else {
500
- if (matchMedia == null ? void 0 : matchMedia("(pointer:coarse)").matches) {
525
+ if (hasPointerCoarse) {
501
526
  hasTouch = true;
502
527
  } else {
503
528
  const UA = navigator.userAgent;
@@ -505,7 +530,7 @@ function convertInputType(mouse, touch) {
505
530
  }
506
531
  }
507
532
  }
508
- const hasMouse = mouse && ((matchMedia == null ? void 0 : matchMedia("any-hover:hover").matches) || (matchMedia == null ? void 0 : matchMedia("any-pointer:fine").matches));
533
+ const hasMouse = mouse && !hasPointerCoarse && (matchMedia == null ? void 0 : matchMedia("(pointer:fine)").matches);
509
534
  return hasMouse && "mouse" || hasTouch && "touch" || "mouse";
510
535
  }
511
536
  function runUntil(fn, conditionFn) {
@@ -516,7 +541,7 @@ function runUntil(fn, conditionFn) {
516
541
  }
517
542
  }
518
543
 
519
- ;// CONCATENATED MODULE: ./src/config/config.ts
544
+ ;// ./src/config/config.ts
520
545
 
521
546
  function loadConfig(config) {
522
547
  const thisConfig = this.config;
@@ -546,7 +571,7 @@ function loadConfig(config) {
546
571
  }
547
572
  }
548
573
 
549
- ;// CONCATENATED MODULE: ./src/Plugin/Plugin.ts
574
+ ;// ./src/Plugin/Plugin.ts
550
575
  var Plugin_defProp = Object.defineProperty;
551
576
  var Plugin_defNormalProp = (obj, key, value) => key in obj ? Plugin_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
552
577
  var __publicField = (obj, key, value) => Plugin_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -596,9 +621,9 @@ class Plugin {
596
621
  });
597
622
  }
598
623
  }
599
- __publicField(Plugin, "version", "3.13.0");
624
+ __publicField(Plugin, "version", "3.14.0-next.2");
600
625
 
601
- ;// CONCATENATED MODULE: ./src/Plugin/tableview/const.ts
626
+ ;// ./src/Plugin/tableview/const.ts
602
627
 
603
628
  const defaultStyle = {
604
629
  id: "__tableview-style__",
@@ -638,7 +663,7 @@ const tpl = {
638
663
  tbody: `<td>{=value}</td>`
639
664
  };
640
665
 
641
- ;// CONCATENATED MODULE: ./src/Plugin/tableview/Options.ts
666
+ ;// ./src/Plugin/tableview/Options.ts
642
667
  class Options {
643
668
  constructor() {
644
669
  return {
@@ -737,7 +762,7 @@ class Options {
737
762
  }
738
763
  }
739
764
 
740
- ;// CONCATENATED MODULE: ./src/Plugin/tableview/index.ts
765
+ ;// ./src/Plugin/tableview/index.ts
741
766
  var tableview_defProp = Object.defineProperty;
742
767
  var __defProps = Object.defineProperties;
743
768
  var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
@@ -849,6 +874,7 @@ class TableView extends Plugin {
849
874
  }
850
875
  }
851
876
 
877
+ }();
852
878
  __webpack_exports__ = __webpack_exports__["default"];
853
879
  /******/ return __webpack_exports__;
854
880
  /******/ })()
@@ -5,12 +5,12 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.13.0
8
+ * @version 3.14.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
- */(function(c,u){typeof exports=="object"&&typeof module=="object"?module.exports=u(require("d3-brush"),require("d3-selection")):typeof define=="function"&&define.amd?define("bb",["d3-brush","d3-selection"],u):typeof exports=="object"?exports.bb=u(require("d3-brush"),require("d3-selection")):(c.bb=c.bb||{},c.bb.plugin=c.bb.plugin||{},c.bb.plugin.tableview=u(c.d3,c.d3))})(this,function(j,c){return function(){"use strict";var u={853:function(e){e.exports=j},747:function(e){e.exports=c}},C={};function a(e){var t=C[e];if(t!==void 0)return t.exports;var n=C[e]={exports:{}};return u[e](n,n.exports,a),n.exports}(function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();var p={};a.d(p,{default:function(){return fe}});var be=a(853),he=a(747);function R(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function q(e){const t=typeof(e==null?void 0:e.requestAnimationFrame)=="function"&&typeof(e==null?void 0:e.cancelAnimationFrame)=="function",n=typeof(e==null?void 0:e.requestIdleCallback)=="function"&&typeof(e==null?void 0:e.cancelIdleCallback)=="function",o=r=>setTimeout(r,1),i=r=>clearTimeout(r);return[t?e.requestAnimationFrame:o,t?e.cancelAnimationFrame:i,n?e.requestIdleCallback:o,n?e.cancelIdleCallback:i]}const m=R(),V=m==null?void 0:m.document,[pe,me,ge,_e]=q(m);var L=Object.defineProperty,S=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,M=(e,t,n)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D=(e,t)=>{for(var n in t||(t={}))U.call(t,n)&&M(e,n,t[n]);if(S)for(var n of S(t))z.call(t,n)&&M(e,n,t[n]);return e};const ve=e=>e||e===0,X=e=>typeof e=="function",g=e=>typeof e=="string",_=e=>typeof e=="number",Y=e=>typeof e=="undefined",A=e=>typeof e!="undefined",ye=e=>typeof e=="boolean",we=e=>Math.ceil(e/10)*10,Oe=e=>Math.ceil(e)+.5,xe=e=>e[1]-e[0],O=e=>typeof e=="object",H=e=>Y(e)||e===null||g(e)&&e.length===0||O(e)&&!(e instanceof Date)&&Object.keys(e).length===0||_(e)&&isNaN(e),k=e=>!H(e),x=e=>Array.isArray(e),v=e=>e&&!(e!=null&&e.nodeType)&&O(e)&&!x(e);function Ee(e,t,n){return A(e[t])?e[t]:n}function Pe(e,t){let n=!1;return Object.keys(e).forEach(o=>e[o]===t&&(n=!0)),n}function $e(e,t,...n){const o=X(e);return o&&e.call(t,...n),o}function Te(e,t){let n=0;const o=function(...i){!--n&&t.apply(this,...i)};"duration"in e?e.each(()=>++n).on("end",o):(++n,e.call(o))}function je(e){return g(e)?e.replace(/<(script|img)?/ig,"&lt;").replace(/(script)?>/ig,"&gt;"):e}function Ce(e,t,n=[-1,1],o=!1){if(!(!e||!g(t)))if(t.indexOf(`
12
- `)===-1)e.text(t);else{const i=[e.text(),t].map(r=>r.replace(/[\s\n]/g,""));if(i[0]!==i[1]){const r=t.split(`
13
- `),l=o?r.length-1:1;e.html(""),r.forEach((s,T)=>{e.append("tspan").attr("x",0).attr("dy",`${T===0?n[0]*l:n[1]}em`).text(s)})}}}function G(e){const{x:t,y:n,width:o,height:i}=e.getBBox();return[{x:t,y:n+i},{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+i}]}function Se(e){const{width:t,height:n}=e.getBoundingClientRect(),o=G(e),i=o[0].x,r=Math.min(o[0].y,o[1].y);return{x:i,y:r,width:t,height:n}}function Me(e,t){var n;const o=e&&((n=e.touches||e.sourceEvent&&e.sourceEvent.touches)==null?void 0:n[0]);let i=[0,0];try{i=d3Pointer(o||e,t)}catch(r){}return i.map(r=>isNaN(r)?0:r)}function K(e){const{event:t,$el:n}=e,o=n.subchart.main||n.main;let i;return t&&t.type==="brush"?i=t.selection:o&&(i=o.select(".bb-brush").node())&&(i=d3BrushSelection(i)),i}function De(e){return!("rect"in e)||"rect"in e&&e.hasAttribute("width")&&e.rect.width!==+e.getAttribute("width")?e.rect=e.getBoundingClientRect():e.rect}function Ae(e=!0,t=0,n=1e4){const o=window.crypto||window.msCrypto,i=o?t+o.getRandomValues(new Uint32Array(1))[0]%(n-t+1):Math.floor(Math.random()*(n-t)+t);return e?String(i):i}function N(e,t,n,o,i){if(n>o)return-1;const r=Math.floor((n+o)/2);let{x:l,w:s=0}=e[r];return i&&(l=e[r].y,s=e[r].h),t>=l&&t<=l+s?r:t<l?N(e,t,n,r-1,i):N(e,t,r+1,o,i)}function Ne(e){const t=K(e);return t?t[0]===t[1]:!0}function Ie(...e){const t=n=>{if(v(n)&&n.constructor){const o=new n.constructor;for(const i in n)o[i]=t(n[i]);return o}return n};return e.map(n=>t(n)).reduce((n,o)=>D(D({},n),o))}function W(e={},t){x(t)&&t.forEach(n=>W(e,n));for(const n in t)/^\d+$/.test(n)||n in e||(e[n]=t[n]);return e}const Fe=e=>e.charAt(0).toUpperCase()+e.slice(1);function Be(e,t="-"){return e.split(t).map((n,o)=>o?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const J=e=>[].slice.call(e);function Re(e,t,n){const{rootSelector:o="",sheet:i}=e,l=`${o} ${(s=>s.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,"."))(t)} {${n.join(";")}}`;return i[i.insertRule?"insertRule":"addRule"](l,i.cssRules.length)}function qe(e){let t=[];return e.forEach(n=>{var o;try{n.cssRules&&n.cssRules.length&&(t=t.concat(J(n.cssRules)))}catch(i){(o=window.console)==null||o.warn(`Error while reading rules from ${n.href}: ${i.toString()}`)}}),t}function Ve(e){var t,n,o,i,r,l;return{x:((n=(t=window.pageXOffset)!=null?t:window.scrollX)!=null?n:0)+((o=e.scrollLeft)!=null?o:0),y:((r=(i=window.pageYOffset)!=null?i:window.scrollY)!=null?r:0)+((l=e.scrollTop)!=null?l:0)}}function Le(e){const t=e?e.transform:null,n=t&&t.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ue(e){const t=e[0]instanceof Date,n=(t?e.map(Number):e).filter((o,i,r)=>r.indexOf(o)===i);return t?n.map(o=>new Date(o)):n}function ze(e){return e&&e.length?e.reduce((t,n)=>t.concat(n)):[]}function E(e,...t){if(!t.length||t.length===1&&!t[0])return e;const n=t.shift();return v(e)&&v(n)&&Object.keys(n).forEach(o=>{const i=n[o];v(i)?(!e[o]&&(e[o]={}),e[o]=E(e[o],i)):e[o]=x(i)?i.concat():i}),E(e,...t)}function Q(e,t=!0){let n;return e[0]instanceof Date?n=t?(o,i)=>o-i:(o,i)=>i-o:t&&!e.every(isNaN)?n=(o,i)=>o-i:t||(n=(o,i)=>o>i&&-1||o<i&&1||o===i&&0),e.concat().sort(n)}function Xe(e,t){let n=t.filter(o=>k(o));return n.length?_(n[0])?n=Math[e](...n):n[0]instanceof Date&&(n=Q(n,e==="min")[0]):n=void 0,n}const Ye=(e,t,n=1)=>{const o=[],i=Math.max(0,Math.ceil((t-e)/n))|0;for(let r=e;r<i;r++)o.push(e+r*n);return o},He={mouse:(()=>{const e=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(t,n,o=e())=>{t.dispatchEvent(new MouseEvent(n,o))}}catch(t){return(n,o,i=e())=>{const r=V.createEvent("MouseEvent");r.initMouseEvent(o,i.bubbles,i.cancelable,m,0,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(r)}}})(),touch:(e,t,n)=>{const o=new Touch(E({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(t,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}};function y(e,t){let n=e;for(const o in t)n=n.replace(new RegExp(`{=${o}}`,"g"),t[o]);return n}function ke(e){var t;let n;if(e instanceof Date)n=e;else if(g(e)){const{config:o,format:i}=this;n=(t=i.dataTime(o.data_xFormat)(e))!=null?t:new Date(e)}else _(e)&&!isNaN(e)&&(n=new Date(+e));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),n}function Ge(){var e,t;return((e=document)==null?void 0:e.hidden)===!1||((t=document)==null?void 0:t.visibilityState)==="visible"}function Ke(e,t){const{DocumentTouch:n,matchMedia:o,navigator:i}=window;let r=!1;if(t)if(i&&"maxTouchPoints"in i)r=i.maxTouchPoints>0;else if("ontouchmove"in window||n&&document instanceof n)r=!0;else if(o!=null&&o("(pointer:coarse)").matches)r=!0;else{const s=i.userAgent;r=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(s)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(s)}return e&&((o==null?void 0:o("any-hover:hover").matches)||(o==null?void 0:o("any-pointer:fine").matches))&&"mouse"||r&&"touch"||"mouse"}function Z(e,t){t()===!1?requestAnimationFrame(()=>Z(e,t)):e()}function ee(e){const t=this.config;let n,o,i;const r=()=>{const l=o.shift();if(l&&n&&O(n)&&l in n)return n=n[l],r();if(!l)return n};Object.keys(t).forEach(l=>{n=e,o=l.split("_"),i=r(),A(i)&&(t[l]=i)}),this.api&&(this.state.orgConfig=e)}var te=Object.defineProperty,ne=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,P=(e,t,n)=>ne(e,typeof t!="symbol"?t+"":t,n);class I{constructor(t={}){P(this,"$$"),P(this,"options"),this.options=t}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(t=>{this[t]=null,delete this[t]})}}P(I,"version","3.13.0");const f={id:"__tableview-style__",class:"bb-tableview",rule:`.bb-tableview {
11
+ */(function(c,u){typeof exports=="object"&&typeof module=="object"?module.exports=u(require("d3-brush"),require("d3-selection")):typeof define=="function"&&define.amd?define("bb",["d3-brush","d3-selection"],u):typeof exports=="object"?exports.bb=u(require("d3-brush"),require("d3-selection")):(c.bb=c.bb||{},c.bb.plugin=c.bb.plugin||{},c.bb.plugin.tableview=u(c.d3,c.d3))})(this,function(j,c){return function(){"use strict";var u={853:function(e){e.exports=j},747:function(e){e.exports=c}},C={};function a(e){var t=C[e];if(t!==void 0)return t.exports;var n=C[e]={exports:{}};return u[e](n,n.exports,a),n.exports}(function(){a.d=function(e,t){for(var n in t)a.o(t,n)&&!a.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})}})(),function(){a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}}();var m={};a.d(m,{default:function(){return fe}});var be=a(853),he=a(747);function R(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function q(e){const t=typeof(e==null?void 0:e.requestAnimationFrame)=="function"&&typeof(e==null?void 0:e.cancelAnimationFrame)=="function",n=typeof(e==null?void 0:e.requestIdleCallback)=="function"&&typeof(e==null?void 0:e.cancelIdleCallback)=="function",o=i=>setTimeout(i,1),r=i=>clearTimeout(i);return[t?e.requestAnimationFrame:o,t?e.cancelAnimationFrame:r,n?e.requestIdleCallback:o,n?e.cancelIdleCallback:r]}const g=R(),V=g==null?void 0:g.document,[pe,me,ge,_e]=q(g);var L=Object.defineProperty,S=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,M=(e,t,n)=>t in e?L(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,D=(e,t)=>{for(var n in t||(t={}))U.call(t,n)&&M(e,n,t[n]);if(S)for(var n of S(t))z.call(t,n)&&M(e,n,t[n]);return e};const ve=e=>e||e===0,X=e=>typeof e=="function",_=e=>typeof e=="string",v=e=>typeof e=="number",Y=e=>typeof e=="undefined",A=e=>typeof e!="undefined",ye=e=>typeof e=="boolean",we=e=>Math.ceil(e/10)*10,Oe=e=>Math.ceil(e)+.5,xe=e=>e[1]-e[0],x=e=>typeof e=="object",k=e=>Y(e)||e===null||_(e)&&e.length===0||x(e)&&!(e instanceof Date)&&Object.keys(e).length===0||v(e)&&isNaN(e),H=e=>!k(e),E=e=>Array.isArray(e),y=e=>e&&!(e!=null&&e.nodeType)&&x(e)&&!E(e);function Ee(e,t,n){return A(e[t])?e[t]:n}function Pe(e,t){let n=!1;return Object.keys(e).forEach(o=>e[o]===t&&(n=!0)),n}function Te(e,t,...n){const o=X(e);return o&&e.call(t,...n),o}function $e(e,t){let n=0;const o=function(...r){!--n&&t.apply(this,...r)};"duration"in e?e.each(()=>++n).on("end",o):(++n,e.call(o))}function je(e){return _(e)?e.replace(/<(script|img)?/ig,"&lt;").replace(/(script)?>/ig,"&gt;"):e}function Ce(e,t,n=[-1,1],o=!1){if(!(!e||!_(t)))if(t.indexOf(`
12
+ `)===-1)e.text(t);else{const r=[e.text(),t].map(i=>i.replace(/[\s\n]/g,""));if(r[0]!==r[1]){const i=t.split(`
13
+ `),s=o?i.length-1:1;e.html(""),i.forEach((l,d)=>{e.append("tspan").attr("x",0).attr("dy",`${d===0?n[0]*s:n[1]}em`).text(l)})}}}function G(e){const{x:t,y:n,width:o,height:r}=e.getBBox();return[{x:t,y:n+r},{x:t,y:n},{x:t+o,y:n},{x:t+o,y:n+r}]}function Se(e){const{width:t,height:n}=e.getBoundingClientRect(),o=G(e),r=o[0].x,i=Math.min(o[0].y,o[1].y);return{x:r,y:i,width:t,height:n}}function Me(e,t){var n;const o=e&&((n=e.touches||e.sourceEvent&&e.sourceEvent.touches)==null?void 0:n[0]);let r=[0,0];try{r=d3Pointer(o||e,t)}catch(i){}return r.map(i=>isNaN(i)?0:i)}function K(e){const{event:t,$el:n}=e,o=n.subchart.main||n.main;let r;return t&&t.type==="brush"?r=t.selection:o&&(r=o.select(".bb-brush").node())&&(r=d3BrushSelection(r)),r}function De(e){return!("rect"in e)||"rect"in e&&e.hasAttribute("width")&&e.rect.width!==+e.getAttribute("width")?e.rect=e.getBoundingClientRect():e.rect}function Ae(e=!0,t=0,n=1e4){const o=window.crypto||window.msCrypto,r=o?t+o.getRandomValues(new Uint32Array(1))[0]%(n-t+1):Math.floor(Math.random()*(n-t)+t);return e?String(r):r}function N(e,t,n,o,r){if(n>o)return-1;const i=Math.floor((n+o)/2);let{x:s,w:l=0}=e[i];return r&&(s=e[i].y,l=e[i].h),t>=s&&t<=s+l?i:t<s?N(e,t,n,i-1,r):N(e,t,i+1,o,r)}function Ne(e){const t=K(e);return t?t[0]===t[1]:!0}function Be(...e){const t=n=>{if(y(n)&&n.constructor){const o=new n.constructor;for(const r in n)o[r]=t(n[r]);return o}return n};return e.map(n=>t(n)).reduce((n,o)=>D(D({},n),o))}function W(e={},t){E(t)&&t.forEach(n=>W(e,n));for(const n in t)/^\d+$/.test(n)||n in e||(e[n]=t[n]);return e}const Ie=e=>e.charAt(0).toUpperCase()+e.slice(1);function Fe(e,t="-"){return e.split(t).map((n,o)=>o?n.charAt(0).toUpperCase()+n.slice(1).toLowerCase():n.toLowerCase()).join("")}const J=e=>[].slice.call(e);function Re(e,t,n){const{rootSelector:o="",sheet:r}=e,s=`${o} ${(l=>l.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,"."))(t)} {${n.join(";")}}`;return r[r.insertRule?"insertRule":"addRule"](s,r.cssRules.length)}function qe(e){let t=[];return e.forEach(n=>{var o;try{n.cssRules&&n.cssRules.length&&(t=t.concat(J(n.cssRules)))}catch(r){(o=window.console)==null||o.warn(`Error while reading rules from ${n.href}: ${r.toString()}`)}}),t}function Ve(e){var t,n,o,r,i,s;return{x:((n=(t=window.pageXOffset)!=null?t:window.scrollX)!=null?n:0)+((o=e.scrollLeft)!=null?o:0),y:((i=(r=window.pageYOffset)!=null?r:window.scrollY)!=null?i:0)+((s=e.scrollTop)!=null?s:0)}}function Le(e,t=0,n=0,o=!0){const r=new DOMPoint(t,n),i=e.getScreenCTM();return r.matrixTransform(o?i==null?void 0:i.inverse():i)}function Ue(e){const t=e?e.transform:null,n=t&&t.baseVal;return n&&n.numberOfItems?n.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function ze(e){const t=e[0]instanceof Date,n=(t?e.map(Number):e).filter((o,r,i)=>i.indexOf(o)===r);return t?n.map(o=>new Date(o)):n}function Xe(e){return e&&e.length?e.reduce((t,n)=>t.concat(n)):[]}function P(e,...t){if(!t.length||t.length===1&&!t[0])return e;const n=t.shift();return y(e)&&y(n)&&Object.keys(n).forEach(o=>{const r=n[o];y(r)?(!e[o]&&(e[o]={}),e[o]=P(e[o],r)):e[o]=E(r)?r.concat():r}),P(e,...t)}function Q(e,t=!0){let n;return e[0]instanceof Date?n=t?(o,r)=>o-r:(o,r)=>r-o:t&&!e.every(isNaN)?n=(o,r)=>o-r:t||(n=(o,r)=>o>r&&-1||o<r&&1||o===r&&0),e.concat().sort(n)}function Ye(e,t){let n=t.filter(o=>H(o));return n.length?v(n[0])?n=Math[e](...n):n[0]instanceof Date&&(n=Q(n,e==="min")[0]):n=void 0,n}const ke=(e,t,n=1)=>{const o=[],r=Math.max(0,Math.ceil((t-e)/n))|0;for(let i=e;i<r;i++)o.push(e+i*n);return o},He={mouse:(()=>{const e=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(t,n,o=e())=>{t.dispatchEvent(new MouseEvent(n,o))}}catch(t){return(n,o,r=e())=>{const i=V.createEvent("MouseEvent");i.initMouseEvent(o,r.bubbles,r.cancelable,g,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}}})(),touch:(e,t,n)=>{const o=new Touch(P({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},n));e.dispatchEvent(new TouchEvent(t,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}};function w(e,t){let n=e;for(const o in t)n=n.replace(new RegExp(`{=${o}}`,"g"),t[o]);return n}function Ge(e){var t;let n;if(e instanceof Date)n=e;else if(_(e)){const{config:o,format:r}=this;n=(t=r.dataTime(o.data_xFormat)(e))!=null?t:new Date(e)}else v(e)&&!isNaN(e)&&(n=new Date(+e));return(!n||isNaN(+n))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),n}function Ke(e){const t=e.attr("viewBox");return t?/(\d+(\.\d+)?){3}/.test(t):!1}function We(e,t,n=!1){const o=!!e.node;let r=!1;for(const[i,s]of Object.entries(t))if(r=o?e.style(i)===s:e.style[i]===s,n===!1&&r)break;return r}function Je(){var e,t;return((e=document)==null?void 0:e.hidden)===!1||((t=document)==null?void 0:t.visibilityState)==="visible"}function Qe(e,t){const{DocumentTouch:n,matchMedia:o,navigator:r}=window,i=o==null?void 0:o("(pointer:coarse)").matches;let s=!1;if(t)if(r&&"maxTouchPoints"in r)s=r.maxTouchPoints>0;else if("ontouchmove"in window||n&&document instanceof n)s=!0;else if(i)s=!0;else{const d=r.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(d)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(d)}return e&&!i&&(o==null?void 0:o("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function Z(e,t){t()===!1?requestAnimationFrame(()=>Z(e,t)):e()}function ee(e){const t=this.config;let n,o,r;const i=()=>{const s=o.shift();if(s&&n&&x(n)&&s in n)return n=n[s],i();if(!s)return n};Object.keys(t).forEach(s=>{n=e,o=s.split("_"),r=i(),A(r)&&(t[s]=r)}),this.api&&(this.state.orgConfig=e)}var te=Object.defineProperty,ne=(e,t,n)=>t in e?te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,T=(e,t,n)=>ne(e,typeof t!="symbol"?t+"":t,n);class B{constructor(t={}){T(this,"$$"),T(this,"options"),this.options=t}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(t=>{this[t]=null,delete this[t]})}}T(B,"version","3.14.0-next.2");const f={id:"__tableview-style__",class:"bb-tableview",rule:`.bb-tableview {
14
14
  border-collapse:collapse;
15
15
  border-spacing:0;
16
16
  background:#fff;
@@ -34,6 +34,6 @@
34
34
  font-size:1.1em;
35
35
  font-weight:700;
36
36
  margin-bottom: -1px;
37
- }`},h={body:`<caption>{=title}</caption>
37
+ }`},p={body:`<caption>{=title}</caption>
38
38
  <thead><tr>{=thead}</tr></thead>
39
- <tbody>{=tbody}</tbody>`,thead:'<th scope="col">{=title}</th>',tbodyHeader:'<th scope="row">{=value}</th>',tbody:"<td>{=value}</td>"};class oe{constructor(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let n=t;return this.$$.axis.isCategorized()?n=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(n=t.toLocaleDateString()),n},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-"}}}var ie=Object.defineProperty,re=Object.defineProperties,le=Object.getOwnPropertyDescriptors,F=Object.getOwnPropertySymbols,se=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,$=(e,t,n)=>t in e?ie(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ae=(e,t)=>{for(var n in t||(t={}))se.call(t,n)&&$(e,n,t[n]);if(F)for(var n of F(t))ce.call(t,n)&&$(e,n,t[n]);return e},ue=(e,t)=>re(e,le(t)),B=(e,t,n)=>$(e,typeof t!="symbol"?t+"":t,n);class fe extends I{constructor(t){return super(t),B(this,"config"),B(this,"element"),this.config=new oe,this}$beforeInit(){ee.call(this,this.options)}$init(){const{class:t,selector:n,style:o}=this.config;let i=document.querySelector(n||`.${t||f.class}`);if(!i){const r=this.$$.$el.chart.node();i=document.createElement("table"),r.parentNode.insertBefore(i,r.nextSibling)}if(i.tagName!=="TABLE"){const r=document.createElement("table");i.appendChild(r),i=r}if(o&&!document.getElementById(f.id)){const r=document.createElement("style");r.id=f.id,r.innerHTML=f.rule,(document.head||document.getElementsByTagName("head")[0]).appendChild(r)}i.classList.add(...[o&&f.class,t].filter(Boolean)),this.element=i}generateTable(){const{$$:t,config:n,element:o}=this,i=t.filterTargetsToShow(t.data.targets);let r=y(h.thead,{title:i.length?this.config.categoryTitle:""}),l="";const s=[];i.forEach(w=>{r+=y(h.thead,{title:w.id}),w.values.forEach((d,b)=>{s[b]||(s[b]=[d.x]),s[b].push(d.value)})}),s.forEach(w=>{l+=`<tr>${w.map((d,b)=>y(b?h.tbody:h.tbodyHeader,{value:b===0?n.categoryFormat.bind(this)(d):_(d)?d.toLocaleString():n.nullString})).join("")}</tr>`});const T=/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/ig,de=y(h.body,ue(ae({},n),{title:n.title||t.config.title_text||"",thead:r,tbody:l})).replace(T,"");o.innerHTML=de}$redraw(){const{state:t}=this.$$;!(t.resizing||!this.config.updateOnToggle&&t.toggling)&&this.generateTable()}$willDestroy(){var t,n;if((t=this.element.parentNode)==null||t.removeChild(this.element),this.$$.charts.length===1){const o=document.getElementById(f.id);(n=o==null?void 0:o.parentNode)==null||n.removeChild(o)}}}return p=p.default,p}()});
39
+ <tbody>{=tbody}</tbody>`,thead:'<th scope="col">{=title}</th>',tbodyHeader:'<th scope="row">{=value}</th>',tbody:"<td>{=value}</td>"};class oe{constructor(){return{selector:void 0,categoryTitle:"Category",categoryFormat:function(t){let n=t;return this.$$.axis.isCategorized()?n=this.$$.categoryName(t):this.$$.axis.isTimeSeries()&&(n=t.toLocaleDateString()),n},class:void 0,style:!0,title:void 0,updateOnToggle:!0,nullString:"-"}}}var re=Object.defineProperty,ie=Object.defineProperties,se=Object.getOwnPropertyDescriptors,I=Object.getOwnPropertySymbols,le=Object.prototype.hasOwnProperty,ce=Object.prototype.propertyIsEnumerable,$=(e,t,n)=>t in e?re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ae=(e,t)=>{for(var n in t||(t={}))le.call(t,n)&&$(e,n,t[n]);if(I)for(var n of I(t))ce.call(t,n)&&$(e,n,t[n]);return e},ue=(e,t)=>ie(e,se(t)),F=(e,t,n)=>$(e,typeof t!="symbol"?t+"":t,n);class fe extends B{constructor(t){return super(t),F(this,"config"),F(this,"element"),this.config=new oe,this}$beforeInit(){ee.call(this,this.options)}$init(){const{class:t,selector:n,style:o}=this.config;let r=document.querySelector(n||`.${t||f.class}`);if(!r){const i=this.$$.$el.chart.node();r=document.createElement("table"),i.parentNode.insertBefore(r,i.nextSibling)}if(r.tagName!=="TABLE"){const i=document.createElement("table");r.appendChild(i),r=i}if(o&&!document.getElementById(f.id)){const i=document.createElement("style");i.id=f.id,i.innerHTML=f.rule,(document.head||document.getElementsByTagName("head")[0]).appendChild(i)}r.classList.add(...[o&&f.class,t].filter(Boolean)),this.element=r}generateTable(){const{$$:t,config:n,element:o}=this,r=t.filterTargetsToShow(t.data.targets);let i=w(p.thead,{title:r.length?this.config.categoryTitle:""}),s="";const l=[];r.forEach(O=>{i+=w(p.thead,{title:O.id}),O.values.forEach((b,h)=>{l[h]||(l[h]=[b.x]),l[h].push(b.value)})}),l.forEach(O=>{s+=`<tr>${O.map((b,h)=>w(h?p.tbody:p.tbodyHeader,{value:h===0?n.categoryFormat.bind(this)(b):v(b)?b.toLocaleString():n.nullString})).join("")}</tr>`});const d=/(<\/?(script|img)[^>]*>|<[^>]+><\/[^>]+>)/ig,de=w(p.body,ue(ae({},n),{title:n.title||t.config.title_text||"",thead:i,tbody:s})).replace(d,"");o.innerHTML=de}$redraw(){const{state:t}=this.$$;!(t.resizing||!this.config.updateOnToggle&&t.toggling)&&this.generateTable()}$willDestroy(){var t,n;if((t=this.element.parentNode)==null||t.removeChild(this.element),this.$$.charts.length===1){const o=document.getElementById(f.id);(n=o==null?void 0:o.parentNode)==null||n.removeChild(o)}}}return m=m.default,m}()});
@@ -5,7 +5,7 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.13.0
8
+ * @version 3.14.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
11
  */
@@ -97,6 +97,8 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__1__;
97
97
  /******/
98
98
  /************************************************************************/
99
99
  var __webpack_exports__ = {};
100
+ // This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
101
+ !function() {
100
102
 
101
103
  // EXPORTS
102
104
  __webpack_require__.d(__webpack_exports__, {
@@ -111,7 +113,7 @@ var external_commonjs_d3_polygon_commonjs2_d3_polygon_amd_d3_polygon_root_d3_ =
111
113
  var external_commonjs_d3_brush_commonjs2_d3_brush_amd_d3_brush_root_d3_ = __webpack_require__(3);
112
114
  // EXTERNAL MODULE: external {"commonjs":"d3-selection","commonjs2":"d3-selection","amd":"d3-selection","root":"d3"}
113
115
  var external_commonjs_d3_selection_commonjs2_d3_selection_amd_d3_selection_root_d3_ = __webpack_require__(1);
114
- ;// CONCATENATED MODULE: ./src/module/browser.ts
116
+ ;// ./src/module/browser.ts
115
117
  function getGlobal() {
116
118
  return typeof globalThis === "object" && globalThis !== null && globalThis.Object === Object && globalThis || typeof global === "object" && global !== null && global.Object === Object && global || typeof self === "object" && self !== null && self.Object === Object && self || Function("return this")();
117
119
  }
@@ -137,7 +139,7 @@ const [
137
139
  ] = getFallback(win);
138
140
 
139
141
 
140
- ;// CONCATENATED MODULE: ./src/module/util.ts
142
+ ;// ./src/module/util.ts
141
143
  var __defProp = Object.defineProperty;
142
144
  var __getOwnPropSymbols = Object.getOwnPropertySymbols;
143
145
  var __hasOwnProp = Object.prototype.hasOwnProperty;
@@ -356,6 +358,13 @@ function getScrollPosition(node) {
356
358
  y: ((_e = (_d = win.pageYOffset) != null ? _d : win.scrollY) != null ? _e : 0) + ((_f = node.scrollTop) != null ? _f : 0)
357
359
  };
358
360
  }
361
+ function getTransformCTM(node, x = 0, y = 0, inverse = true) {
362
+ const point = new DOMPoint(x, y);
363
+ const screen = node.getScreenCTM();
364
+ return point.matrixTransform(
365
+ inverse ? screen == null ? void 0 : screen.inverse() : screen
366
+ );
367
+ }
359
368
  function getTranslation(node) {
360
369
  const transform = node ? node.transform : null;
361
370
  const baseVal = transform && transform.baseVal;
@@ -503,12 +512,28 @@ function parseDate(date) {
503
512
  }
504
513
  return parsedDate;
505
514
  }
515
+ function hasViewBox(svg) {
516
+ const attr = svg.attr("viewBox");
517
+ return attr ? /(\d+(\.\d+)?){3}/.test(attr) : false;
518
+ }
519
+ function hasStyle(node, condition, all = false) {
520
+ const isD3Node = !!node.node;
521
+ let has = false;
522
+ for (const [key, value] of Object.entries(condition)) {
523
+ has = isD3Node ? node.style(key) === value : node.style[key] === value;
524
+ if (all === false && has) {
525
+ break;
526
+ }
527
+ }
528
+ return has;
529
+ }
506
530
  function isTabVisible() {
507
531
  var _a, _b;
508
532
  return ((_a = doc) == null ? void 0 : _a.hidden) === false || ((_b = doc) == null ? void 0 : _b.visibilityState) === "visible";
509
533
  }
510
534
  function convertInputType(mouse, touch) {
511
535
  const { DocumentTouch, matchMedia, navigator } = win;
536
+ const hasPointerCoarse = matchMedia == null ? void 0 : matchMedia("(pointer:coarse)").matches;
512
537
  let hasTouch = false;
513
538
  if (touch) {
514
539
  if (navigator && "maxTouchPoints" in navigator) {
@@ -516,7 +541,7 @@ function convertInputType(mouse, touch) {
516
541
  } else if ("ontouchmove" in win || DocumentTouch && doc instanceof DocumentTouch) {
517
542
  hasTouch = true;
518
543
  } else {
519
- if (matchMedia == null ? void 0 : matchMedia("(pointer:coarse)").matches) {
544
+ if (hasPointerCoarse) {
520
545
  hasTouch = true;
521
546
  } else {
522
547
  const UA = navigator.userAgent;
@@ -524,7 +549,7 @@ function convertInputType(mouse, touch) {
524
549
  }
525
550
  }
526
551
  }
527
- const hasMouse = mouse && ((matchMedia == null ? void 0 : matchMedia("any-hover:hover").matches) || (matchMedia == null ? void 0 : matchMedia("any-pointer:fine").matches));
552
+ const hasMouse = mouse && !hasPointerCoarse && (matchMedia == null ? void 0 : matchMedia("(pointer:fine)").matches);
528
553
  return hasMouse && "mouse" || hasTouch && "touch" || "mouse";
529
554
  }
530
555
  function runUntil(fn, conditionFn) {
@@ -535,7 +560,7 @@ function runUntil(fn, conditionFn) {
535
560
  }
536
561
  }
537
562
 
538
- ;// CONCATENATED MODULE: ./src/config/config.ts
563
+ ;// ./src/config/config.ts
539
564
 
540
565
  function loadConfig(config) {
541
566
  const thisConfig = this.config;
@@ -565,7 +590,7 @@ function loadConfig(config) {
565
590
  }
566
591
  }
567
592
 
568
- ;// CONCATENATED MODULE: ./src/Plugin/Plugin.ts
593
+ ;// ./src/Plugin/Plugin.ts
569
594
  var Plugin_defProp = Object.defineProperty;
570
595
  var Plugin_defNormalProp = (obj, key, value) => key in obj ? Plugin_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
571
596
  var __publicField = (obj, key, value) => Plugin_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -615,9 +640,9 @@ class Plugin {
615
640
  });
616
641
  }
617
642
  }
618
- __publicField(Plugin, "version", "3.13.0");
643
+ __publicField(Plugin, "version", "3.14.0-next.2");
619
644
 
620
- ;// CONCATENATED MODULE: ./src/Plugin/textoverlap/Options.ts
645
+ ;// ./src/Plugin/textoverlap/Options.ts
621
646
  class Options {
622
647
  constructor() {
623
648
  return {
@@ -657,7 +682,7 @@ class Options {
657
682
  }
658
683
  }
659
684
 
660
- ;// CONCATENATED MODULE: ./src/Plugin/textoverlap/index.ts
685
+ ;// ./src/Plugin/textoverlap/index.ts
661
686
  var textoverlap_defProp = Object.defineProperty;
662
687
  var textoverlap_defNormalProp = (obj, key, value) => key in obj ? textoverlap_defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
663
688
  var textoverlap_publicField = (obj, key, value) => textoverlap_defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
@@ -727,6 +752,7 @@ class TextOverlap extends Plugin {
727
752
  }
728
753
  }
729
754
 
755
+ }();
730
756
  __webpack_exports__ = __webpack_exports__["default"];
731
757
  /******/ return __webpack_exports__;
732
758
  /******/ })()
@@ -5,9 +5,9 @@
5
5
  * billboard.js, JavaScript chart library
6
6
  * https://naver.github.io/billboard.js/
7
7
  *
8
- * @version 3.13.0
8
+ * @version 3.14.0-next.2
9
9
  * @requires billboard.js
10
10
  * @summary billboard.js plugin
11
- */(function(l,u){typeof exports=="object"&&typeof module=="object"?module.exports=u(require("d3-delaunay"),require("d3-polygon"),require("d3-brush"),require("d3-selection")):typeof define=="function"&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-brush","d3-selection"],u):typeof exports=="object"?exports.bb=u(require("d3-delaunay"),require("d3-polygon"),require("d3-brush"),require("d3-selection")):(l.bb=l.bb||{},l.bb.plugin=l.bb.plugin||{},l.bb.plugin.textoverlap=u(l.d3,l.d3,l.d3,l.d3))})(this,function(w,l,u,C){return function(){"use strict";var D={853:function(e){e.exports=u},348:function(e){e.exports=w},263:function(e){e.exports=l},747:function(e){e.exports=C}},O={};function a(e){var n=O[e];if(n!==void 0)return n.exports;var t=O[e]={exports:{}};return D[e](t,t.exports,a),t.exports}(function(){a.d=function(e,n){for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})}})(),function(){a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}();var d={};a.d(d,{default:function(){return oe}});var q=a(348),P=a(263),fe=a(853),de=a(747);function R(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function F(e){const n=typeof(e==null?void 0:e.requestAnimationFrame)=="function"&&typeof(e==null?void 0:e.cancelAnimationFrame)=="function",t=typeof(e==null?void 0:e.requestIdleCallback)=="function"&&typeof(e==null?void 0:e.cancelIdleCallback)=="function",o=i=>setTimeout(i,1),r=i=>clearTimeout(i);return[n?e.requestAnimationFrame:o,n?e.cancelAnimationFrame:r,t?e.requestIdleCallback:o,t?e.cancelIdleCallback:r]}const p=R(),I=p==null?void 0:p.document,[pe,he,be,me]=F(p);var S=Object.defineProperty,E=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,$=(e,n,t)=>n in e?S(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,j=(e,n)=>{for(var t in n||(n={}))B.call(n,t)&&$(e,t,n[t]);if(E)for(var t of E(n))N.call(n,t)&&$(e,t,n[t]);return e};const _e=e=>e||e===0,V=e=>typeof e=="function",h=e=>typeof e=="string",m=e=>typeof e=="number",U=e=>typeof e=="undefined",A=e=>typeof e!="undefined",ge=e=>typeof e=="boolean",ye=e=>Math.ceil(e/10)*10,ve=e=>Math.ceil(e)+.5,xe=e=>e[1]-e[0],_=e=>typeof e=="object",X=e=>U(e)||e===null||h(e)&&e.length===0||_(e)&&!(e instanceof Date)&&Object.keys(e).length===0||m(e)&&isNaN(e),Y=e=>!X(e),g=e=>Array.isArray(e),b=e=>e&&!(e!=null&&e.nodeType)&&_(e)&&!g(e);function we(e,n,t){return A(e[n])?e[n]:t}function Oe(e,n){let t=!1;return Object.keys(e).forEach(o=>e[o]===n&&(t=!0)),t}function Pe(e,n,...t){const o=V(e);return o&&e.call(n,...t),o}function Ee(e,n){let t=0;const o=function(...r){!--t&&n.apply(this,...r)};"duration"in e?e.each(()=>++t).on("end",o):(++t,e.call(o))}function $e(e){return h(e)?e.replace(/<(script|img)?/ig,"&lt;").replace(/(script)?>/ig,"&gt;"):e}function je(e,n,t=[-1,1],o=!1){if(!(!e||!h(n)))if(n.indexOf(`
11
+ */(function(l,u){typeof exports=="object"&&typeof module=="object"?module.exports=u(require("d3-delaunay"),require("d3-polygon"),require("d3-brush"),require("d3-selection")):typeof define=="function"&&define.amd?define("bb",["d3-delaunay","d3-polygon","d3-brush","d3-selection"],u):typeof exports=="object"?exports.bb=u(require("d3-delaunay"),require("d3-polygon"),require("d3-brush"),require("d3-selection")):(l.bb=l.bb||{},l.bb.plugin=l.bb.plugin||{},l.bb.plugin.textoverlap=u(l.d3,l.d3,l.d3,l.d3))})(this,function(w,l,u,C){return function(){"use strict";var D={853:function(e){e.exports=u},348:function(e){e.exports=w},263:function(e){e.exports=l},747:function(e){e.exports=C}},O={};function a(e){var n=O[e];if(n!==void 0)return n.exports;var t=O[e]={exports:{}};return D[e](t,t.exports,a),t.exports}(function(){a.d=function(e,n){for(var t in n)a.o(n,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})}})(),function(){a.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)}}();var p={};a.d(p,{default:function(){return oe}});var q=a(348),P=a(263),fe=a(853),de=a(747);function R(){return typeof globalThis=="object"&&globalThis!==null&&globalThis.Object===Object&&globalThis||typeof global=="object"&&global!==null&&global.Object===Object&&global||typeof self=="object"&&self!==null&&self.Object===Object&&self||Function("return this")()}function F(e){const n=typeof(e==null?void 0:e.requestAnimationFrame)=="function"&&typeof(e==null?void 0:e.cancelAnimationFrame)=="function",t=typeof(e==null?void 0:e.requestIdleCallback)=="function"&&typeof(e==null?void 0:e.cancelIdleCallback)=="function",o=i=>setTimeout(i,1),r=i=>clearTimeout(i);return[n?e.requestAnimationFrame:o,n?e.cancelAnimationFrame:r,t?e.requestIdleCallback:o,t?e.cancelIdleCallback:r]}const h=R(),S=h==null?void 0:h.document,[pe,he,be,me]=F(h);var I=Object.defineProperty,E=Object.getOwnPropertySymbols,B=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,M=(e,n,t)=>n in e?I(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,T=(e,n)=>{for(var t in n||(n={}))B.call(n,t)&&M(e,t,n[t]);if(E)for(var t of E(n))N.call(n,t)&&M(e,t,n[t]);return e};const _e=e=>e||e===0,V=e=>typeof e=="function",b=e=>typeof e=="string",_=e=>typeof e=="number",U=e=>typeof e=="undefined",j=e=>typeof e!="undefined",ge=e=>typeof e=="boolean",ye=e=>Math.ceil(e/10)*10,ve=e=>Math.ceil(e)+.5,xe=e=>e[1]-e[0],g=e=>typeof e=="object",X=e=>U(e)||e===null||b(e)&&e.length===0||g(e)&&!(e instanceof Date)&&Object.keys(e).length===0||_(e)&&isNaN(e),Y=e=>!X(e),y=e=>Array.isArray(e),m=e=>e&&!(e!=null&&e.nodeType)&&g(e)&&!y(e);function we(e,n,t){return j(e[n])?e[n]:t}function Oe(e,n){let t=!1;return Object.keys(e).forEach(o=>e[o]===n&&(t=!0)),t}function Pe(e,n,...t){const o=V(e);return o&&e.call(n,...t),o}function Ee(e,n){let t=0;const o=function(...r){!--t&&n.apply(this,...r)};"duration"in e?e.each(()=>++t).on("end",o):(++t,e.call(o))}function Me(e){return b(e)?e.replace(/<(script|img)?/ig,"&lt;").replace(/(script)?>/ig,"&gt;"):e}function Te(e,n,t=[-1,1],o=!1){if(!(!e||!b(n)))if(n.indexOf(`
12
12
  `)===-1)e.text(n);else{const r=[e.text(),n].map(i=>i.replace(/[\s\n]/g,""));if(r[0]!==r[1]){const i=n.split(`
13
- `),s=o?i.length-1:1;e.html(""),i.forEach((c,x)=>{e.append("tspan").attr("x",0).attr("dy",`${x===0?t[0]*s:t[1]}em`).text(c)})}}}function L(e){const{x:n,y:t,width:o,height:r}=e.getBBox();return[{x:n,y:t+r},{x:n,y:t},{x:n+o,y:t},{x:n+o,y:t+r}]}function Ae(e){const{width:n,height:t}=e.getBoundingClientRect(),o=L(e),r=o[0].x,i=Math.min(o[0].y,o[1].y);return{x:r,y:i,width:n,height:t}}function Me(e,n){var t;const o=e&&((t=e.touches||e.sourceEvent&&e.sourceEvent.touches)==null?void 0:t[0]);let r=[0,0];try{r=d3Pointer(o||e,n)}catch(i){}return r.map(i=>isNaN(i)?0:i)}function z(e){const{event:n,$el:t}=e,o=t.subchart.main||t.main;let r;return n&&n.type==="brush"?r=n.selection:o&&(r=o.select(".bb-brush").node())&&(r=d3BrushSelection(r)),r}function Te(e){return!("rect"in e)||"rect"in e&&e.hasAttribute("width")&&e.rect.width!==+e.getAttribute("width")?e.rect=e.getBoundingClientRect():e.rect}function Ce(e=!0,n=0,t=1e4){const o=window.crypto||window.msCrypto,r=o?n+o.getRandomValues(new Uint32Array(1))[0]%(t-n+1):Math.floor(Math.random()*(t-n)+n);return e?String(r):r}function M(e,n,t,o,r){if(t>o)return-1;const i=Math.floor((t+o)/2);let{x:s,w:c=0}=e[i];return r&&(s=e[i].y,c=e[i].h),n>=s&&n<=s+c?i:n<s?M(e,n,t,i-1,r):M(e,n,i+1,o,r)}function De(e){const n=z(e);return n?n[0]===n[1]:!0}function qe(...e){const n=t=>{if(b(t)&&t.constructor){const o=new t.constructor;for(const r in t)o[r]=n(t[r]);return o}return t};return e.map(t=>n(t)).reduce((t,o)=>j(j({},t),o))}function G(e={},n){g(n)&&n.forEach(t=>G(e,t));for(const t in n)/^\d+$/.test(t)||t in e||(e[t]=n[t]);return e}const Re=e=>e.charAt(0).toUpperCase()+e.slice(1);function Fe(e,n="-"){return e.split(n).map((t,o)=>o?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()).join("")}const H=e=>[].slice.call(e);function Ie(e,n,t){const{rootSelector:o="",sheet:r}=e,s=`${o} ${(c=>c.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,"."))(n)} {${t.join(";")}}`;return r[r.insertRule?"insertRule":"addRule"](s,r.cssRules.length)}function Se(e){let n=[];return e.forEach(t=>{var o;try{t.cssRules&&t.cssRules.length&&(n=n.concat(H(t.cssRules)))}catch(r){(o=window.console)==null||o.warn(`Error while reading rules from ${t.href}: ${r.toString()}`)}}),n}function Be(e){var n,t,o,r,i,s;return{x:((t=(n=window.pageXOffset)!=null?n:window.scrollX)!=null?t:0)+((o=e.scrollLeft)!=null?o:0),y:((i=(r=window.pageYOffset)!=null?r:window.scrollY)!=null?i:0)+((s=e.scrollTop)!=null?s:0)}}function Ne(e){const n=e?e.transform:null,t=n&&n.baseVal;return t&&t.numberOfItems?t.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ve(e){const n=e[0]instanceof Date,t=(n?e.map(Number):e).filter((o,r,i)=>i.indexOf(o)===r);return n?t.map(o=>new Date(o)):t}function Ue(e){return e&&e.length?e.reduce((n,t)=>n.concat(t)):[]}function y(e,...n){if(!n.length||n.length===1&&!n[0])return e;const t=n.shift();return b(e)&&b(t)&&Object.keys(t).forEach(o=>{const r=t[o];b(r)?(!e[o]&&(e[o]={}),e[o]=y(e[o],r)):e[o]=g(r)?r.concat():r}),y(e,...n)}function K(e,n=!0){let t;return e[0]instanceof Date?t=n?(o,r)=>o-r:(o,r)=>r-o:n&&!e.every(isNaN)?t=(o,r)=>o-r:n||(t=(o,r)=>o>r&&-1||o<r&&1||o===r&&0),e.concat().sort(t)}function Xe(e,n){let t=n.filter(o=>Y(o));return t.length?m(t[0])?t=Math[e](...t):t[0]instanceof Date&&(t=K(t,e==="min")[0]):t=void 0,t}const Ye=(e,n,t=1)=>{const o=[],r=Math.max(0,Math.ceil((n-e)/t))|0;for(let i=e;i<r;i++)o.push(e+i*t);return o},Le={mouse:(()=>{const e=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(n,t,o=e())=>{n.dispatchEvent(new MouseEvent(t,o))}}catch(n){return(t,o,r=e())=>{const i=I.createEvent("MouseEvent");i.initMouseEvent(o,r.bubbles,r.cancelable,p,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}})(),touch:(e,n,t)=>{const o=new Touch(y({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},t));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}};function ze(e,n){let t=e;for(const o in n)t=t.replace(new RegExp(`{=${o}}`,"g"),n[o]);return t}function Ge(e){var n;let t;if(e instanceof Date)t=e;else if(h(e)){const{config:o,format:r}=this;t=(n=r.dataTime(o.data_xFormat)(e))!=null?n:new Date(e)}else m(e)&&!isNaN(e)&&(t=new Date(+e));return(!t||isNaN(+t))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),t}function He(){var e,n;return((e=document)==null?void 0:e.hidden)===!1||((n=document)==null?void 0:n.visibilityState)==="visible"}function Ke(e,n){const{DocumentTouch:t,matchMedia:o,navigator:r}=window;let i=!1;if(n)if(r&&"maxTouchPoints"in r)i=r.maxTouchPoints>0;else if("ontouchmove"in window||t&&document instanceof t)i=!0;else if(o!=null&&o("(pointer:coarse)").matches)i=!0;else{const c=r.userAgent;i=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(c)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(c)}return e&&((o==null?void 0:o("any-hover:hover").matches)||(o==null?void 0:o("any-pointer:fine").matches))&&"mouse"||i&&"touch"||"mouse"}function W(e,n){n()===!1?requestAnimationFrame(()=>W(e,n)):e()}function k(e){const n=this.config;let t,o,r;const i=()=>{const s=o.shift();if(s&&t&&_(t)&&s in t)return t=t[s],i();if(!s)return t};Object.keys(n).forEach(s=>{t=e,o=s.split("_"),r=i(),A(r)&&(n[s]=r)}),this.api&&(this.state.orgConfig=e)}var J=Object.defineProperty,Q=(e,n,t)=>n in e?J(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,v=(e,n,t)=>Q(e,typeof n!="symbol"?n+"":n,t);class T{constructor(n={}){v(this,"$$"),v(this,"options"),this.options=n}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(n=>{this[n]=null,delete this[n]})}}v(T,"version","3.13.0");class Z{constructor(){return{selector:void 0,extent:1,area:0}}}var ee=Object.defineProperty,te=(e,n,t)=>n in e?ee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ne=(e,n,t)=>te(e,typeof n!="symbol"?n+"":n,t);class oe extends T{constructor(n){return super(n),ne(this,"config"),this.config=new Z,this}$init(){k.call(this,this.options)}$redraw(){const{$$:{$el:n},config:{selector:t}}=this,o=t?n.main.selectAll(t):n.text;!o.empty()&&this.preventLabelOverlap(o)}generateVoronoi(n){const{$$:t}=this,{scale:o}=t,[r,i]=["x","y"].map(s=>o[s].domain());return[r[1],i[0]]=[i[0],r[1]],q.Delaunay.from(n).voronoi([...r,...i])}preventLabelOverlap(n){const{extent:t,area:o}=this.config,r=n.data().map(c=>[c.index,c.value]),i=this.generateVoronoi(r);let s=0;n.each(function(){const c=i.cellPolygon(s);if(c&&this){const[x,re]=r[s],[ie,se]=(0,P.polygonCentroid)(c),ce=Math.abs((0,P.polygonArea)(c)),f=Math.round(Math.atan2(se-re,ie-x)/Math.PI*2),le=t*(f===0?1:-1),ae=f===-1?-t:t+5,ue=Math.abs(f)===1?"middle":f===0?"start":"end";this.style.display=ce<o?"none":"",this.setAttribute("text-anchor",ue),this.setAttribute("dy",`0.${f===1?71:35}em`),this.setAttribute("transform",`translate(${le}, ${ae})`)}s++})}}return d=d.default,d}()});
13
+ `),s=o?i.length-1:1;e.html(""),i.forEach((c,f)=>{e.append("tspan").attr("x",0).attr("dy",`${f===0?t[0]*s:t[1]}em`).text(c)})}}}function L(e){const{x:n,y:t,width:o,height:r}=e.getBBox();return[{x:n,y:t+r},{x:n,y:t},{x:n+o,y:t},{x:n+o,y:t+r}]}function je(e){const{width:n,height:t}=e.getBoundingClientRect(),o=L(e),r=o[0].x,i=Math.min(o[0].y,o[1].y);return{x:r,y:i,width:n,height:t}}function $e(e,n){var t;const o=e&&((t=e.touches||e.sourceEvent&&e.sourceEvent.touches)==null?void 0:t[0]);let r=[0,0];try{r=d3Pointer(o||e,n)}catch(i){}return r.map(i=>isNaN(i)?0:i)}function z(e){const{event:n,$el:t}=e,o=t.subchart.main||t.main;let r;return n&&n.type==="brush"?r=n.selection:o&&(r=o.select(".bb-brush").node())&&(r=d3BrushSelection(r)),r}function Ae(e){return!("rect"in e)||"rect"in e&&e.hasAttribute("width")&&e.rect.width!==+e.getAttribute("width")?e.rect=e.getBoundingClientRect():e.rect}function Ce(e=!0,n=0,t=1e4){const o=window.crypto||window.msCrypto,r=o?n+o.getRandomValues(new Uint32Array(1))[0]%(t-n+1):Math.floor(Math.random()*(t-n)+n);return e?String(r):r}function $(e,n,t,o,r){if(t>o)return-1;const i=Math.floor((t+o)/2);let{x:s,w:c=0}=e[i];return r&&(s=e[i].y,c=e[i].h),n>=s&&n<=s+c?i:n<s?$(e,n,t,i-1,r):$(e,n,i+1,o,r)}function De(e){const n=z(e);return n?n[0]===n[1]:!0}function qe(...e){const n=t=>{if(m(t)&&t.constructor){const o=new t.constructor;for(const r in t)o[r]=n(t[r]);return o}return t};return e.map(t=>n(t)).reduce((t,o)=>T(T({},t),o))}function k(e={},n){y(n)&&n.forEach(t=>k(e,t));for(const t in n)/^\d+$/.test(t)||t in e||(e[t]=n[t]);return e}const Re=e=>e.charAt(0).toUpperCase()+e.slice(1);function Fe(e,n="-"){return e.split(n).map((t,o)=>o?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():t.toLowerCase()).join("")}const G=e=>[].slice.call(e);function Se(e,n,t){const{rootSelector:o="",sheet:r}=e,s=`${o} ${(c=>c.replace(/\s?(bb-)/g,".$1").replace(/\.+/g,"."))(n)} {${t.join(";")}}`;return r[r.insertRule?"insertRule":"addRule"](s,r.cssRules.length)}function Ie(e){let n=[];return e.forEach(t=>{var o;try{t.cssRules&&t.cssRules.length&&(n=n.concat(G(t.cssRules)))}catch(r){(o=window.console)==null||o.warn(`Error while reading rules from ${t.href}: ${r.toString()}`)}}),n}function Be(e){var n,t,o,r,i,s;return{x:((t=(n=window.pageXOffset)!=null?n:window.scrollX)!=null?t:0)+((o=e.scrollLeft)!=null?o:0),y:((i=(r=window.pageYOffset)!=null?r:window.scrollY)!=null?i:0)+((s=e.scrollTop)!=null?s:0)}}function Ne(e,n=0,t=0,o=!0){const r=new DOMPoint(n,t),i=e.getScreenCTM();return r.matrixTransform(o?i==null?void 0:i.inverse():i)}function Ve(e){const n=e?e.transform:null,t=n&&n.baseVal;return t&&t.numberOfItems?t.getItem(0).matrix:{a:0,b:0,c:0,d:0,e:0,f:0}}function Ue(e){const n=e[0]instanceof Date,t=(n?e.map(Number):e).filter((o,r,i)=>i.indexOf(o)===r);return n?t.map(o=>new Date(o)):t}function Xe(e){return e&&e.length?e.reduce((n,t)=>n.concat(t)):[]}function v(e,...n){if(!n.length||n.length===1&&!n[0])return e;const t=n.shift();return m(e)&&m(t)&&Object.keys(t).forEach(o=>{const r=t[o];m(r)?(!e[o]&&(e[o]={}),e[o]=v(e[o],r)):e[o]=y(r)?r.concat():r}),v(e,...n)}function H(e,n=!0){let t;return e[0]instanceof Date?t=n?(o,r)=>o-r:(o,r)=>r-o:n&&!e.every(isNaN)?t=(o,r)=>o-r:n||(t=(o,r)=>o>r&&-1||o<r&&1||o===r&&0),e.concat().sort(t)}function Ye(e,n){let t=n.filter(o=>Y(o));return t.length?_(t[0])?t=Math[e](...t):t[0]instanceof Date&&(t=H(t,e==="min")[0]):t=void 0,t}const Le=(e,n,t=1)=>{const o=[],r=Math.max(0,Math.ceil((n-e)/t))|0;for(let i=e;i<r;i++)o.push(e+i*t);return o},ze={mouse:(()=>{const e=()=>({bubbles:!1,cancelable:!1,screenX:0,screenY:0,clientX:0,clientY:0});try{return new MouseEvent("t"),(n,t,o=e())=>{n.dispatchEvent(new MouseEvent(t,o))}}catch(n){return(t,o,r=e())=>{const i=S.createEvent("MouseEvent");i.initMouseEvent(o,r.bubbles,r.cancelable,h,0,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),t.dispatchEvent(i)}}})(),touch:(e,n,t)=>{const o=new Touch(v({identifier:Date.now(),target:e,radiusX:2.5,radiusY:2.5,rotationAngle:10,force:.5},t));e.dispatchEvent(new TouchEvent(n,{cancelable:!0,bubbles:!0,shiftKey:!0,touches:[o],targetTouches:[],changedTouches:[o]}))}};function ke(e,n){let t=e;for(const o in n)t=t.replace(new RegExp(`{=${o}}`,"g"),n[o]);return t}function Ge(e){var n;let t;if(e instanceof Date)t=e;else if(b(e)){const{config:o,format:r}=this;t=(n=r.dataTime(o.data_xFormat)(e))!=null?n:new Date(e)}else _(e)&&!isNaN(e)&&(t=new Date(+e));return(!t||isNaN(+t))&&console&&console.error&&console.error(`Failed to parse x '${e}' to Date object`),t}function He(e){const n=e.attr("viewBox");return n?/(\d+(\.\d+)?){3}/.test(n):!1}function Ke(e,n,t=!1){const o=!!e.node;let r=!1;for(const[i,s]of Object.entries(n))if(r=o?e.style(i)===s:e.style[i]===s,t===!1&&r)break;return r}function We(){var e,n;return((e=document)==null?void 0:e.hidden)===!1||((n=document)==null?void 0:n.visibilityState)==="visible"}function Je(e,n){const{DocumentTouch:t,matchMedia:o,navigator:r}=window,i=o==null?void 0:o("(pointer:coarse)").matches;let s=!1;if(n)if(r&&"maxTouchPoints"in r)s=r.maxTouchPoints>0;else if("ontouchmove"in window||t&&document instanceof t)s=!0;else if(i)s=!0;else{const f=r.userAgent;s=/\b(BlackBerry|webOS|iPhone|IEMobile)\b/i.test(f)||/\b(Android|Windows Phone|iPad|iPod)\b/i.test(f)}return e&&!i&&(o==null?void 0:o("(pointer:fine)").matches)&&"mouse"||s&&"touch"||"mouse"}function K(e,n){n()===!1?requestAnimationFrame(()=>K(e,n)):e()}function W(e){const n=this.config;let t,o,r;const i=()=>{const s=o.shift();if(s&&t&&g(t)&&s in t)return t=t[s],i();if(!s)return t};Object.keys(n).forEach(s=>{t=e,o=s.split("_"),r=i(),j(r)&&(n[s]=r)}),this.api&&(this.state.orgConfig=e)}var J=Object.defineProperty,Q=(e,n,t)=>n in e?J(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,x=(e,n,t)=>Q(e,typeof n!="symbol"?n+"":n,t);class A{constructor(n={}){x(this,"$$"),x(this,"options"),this.options=n}$beforeInit(){}$init(){}$afterInit(){}$redraw(){}$willDestroy(){Object.keys(this).forEach(n=>{this[n]=null,delete this[n]})}}x(A,"version","3.14.0-next.2");class Z{constructor(){return{selector:void 0,extent:1,area:0}}}var ee=Object.defineProperty,te=(e,n,t)=>n in e?ee(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t,ne=(e,n,t)=>te(e,typeof n!="symbol"?n+"":n,t);class oe extends A{constructor(n){return super(n),ne(this,"config"),this.config=new Z,this}$init(){W.call(this,this.options)}$redraw(){const{$$:{$el:n},config:{selector:t}}=this,o=t?n.main.selectAll(t):n.text;!o.empty()&&this.preventLabelOverlap(o)}generateVoronoi(n){const{$$:t}=this,{scale:o}=t,[r,i]=["x","y"].map(s=>o[s].domain());return[r[1],i[0]]=[i[0],r[1]],q.Delaunay.from(n).voronoi([...r,...i])}preventLabelOverlap(n){const{extent:t,area:o}=this.config,r=n.data().map(c=>[c.index,c.value]),i=this.generateVoronoi(r);let s=0;n.each(function(){const c=i.cellPolygon(s);if(c&&this){const[f,re]=r[s],[ie,se]=(0,P.polygonCentroid)(c),ce=Math.abs((0,P.polygonArea)(c)),d=Math.round(Math.atan2(se-re,ie-f)/Math.PI*2),le=t*(d===0?1:-1),ae=d===-1?-t:t+5,ue=Math.abs(d)===1?"middle":d===0?"start":"end";this.style.display=ce<o?"none":"",this.setAttribute("text-anchor",ue),this.setAttribute("dy",`0.${d===1?71:35}em`),this.setAttribute("transform",`translate(${le}, ${ae})`)}s++})}}return p=p.default,p}()});