diff --git a/public/app/plugins/panel/sankey-panel-0.5.0/module.js b/public/app/plugins/panel/sankey-panel-0.5.0/module.js index 582e66794f89..2df56352dea8 100644 --- a/public/app/plugins/panel/sankey-panel-0.5.0/module.js +++ b/public/app/plugins/panel/sankey-panel-0.5.0/module.js @@ -1,1244 +1,6876 @@ -/*! For license information please see module.js.LICENSE.txt */ -define(['react', 'd3', '@grafana/data', '@grafana/ui'], function (t, e, n, r) { - return (function (t) { - var e = {}; - function n(r) { - if (e[r]) return e[r].exports; - var o = (e[r] = { i: r, l: !1, exports: {} }); - return t[r].call(o.exports, o, o.exports, n), (o.l = !0), o.exports; - } - return ( - (n.m = t), - (n.c = e), - (n.d = function (t, e, r) { - n.o(t, e) || Object.defineProperty(t, e, { enumerable: !0, get: r }); - }), - (n.r = function (t) { - 'undefined' != typeof Symbol && - Symbol.toStringTag && - Object.defineProperty(t, Symbol.toStringTag, { value: 'Module' }), - Object.defineProperty(t, '__esModule', { value: !0 }); - }), - (n.t = function (t, e) { - if ((1 & e && (t = n(t)), 8 & e)) return t; - if (4 & e && 'object' == typeof t && t && t.__esModule) return t; - var r = Object.create(null); - if ((n.r(r), Object.defineProperty(r, 'default', { enumerable: !0, value: t }), 2 & e && 'string' != typeof t)) - for (var o in t) - n.d( - r, - o, - function (e) { - return t[e]; - }.bind(null, o) - ); - return r; - }), - (n.n = function (t) { - var e = - t && t.__esModule - ? function () { - return t.default; - } - : function () { - return t; - }; - return n.d(e, 'a', e), e; - }), - (n.o = function (t, e) { - return Object.prototype.hasOwnProperty.call(t, e); - }), - (n.p = '/'), - n((n.s = 5)) - ); - })([ - function (e, n) { - e.exports = t; - }, - function (t, n) { - t.exports = e; - }, - function (t, e) { - t.exports = n; - }, - function (t, e) { - t.exports = r; - }, - , - function (t, e, n) { - 'use strict'; - n.r(e); - var r = {}; - n.r(r), - n.d(r, 'sankey', function () { - return M; - }), - n.d(r, 'sankeyCenter', function () { - return _; - }), - n.d(r, 'sankeyLeft', function () { - return d; - }), - n.d(r, 'sankeyRight', function () { - return g; - }), - n.d(r, 'sankeyJustify', function () { - return y; - }), - n.d(r, 'sankeyLinkHorizontal', function () { - return D; - }); - var o = n(2); - function i(t, e) { - var n = 'function' == typeof Symbol && t[Symbol.iterator]; - if (!n) return t; - var r, - o, - i = n.call(t), - a = []; - try { - for (; (void 0 === e || e-- > 0) && !(r = i.next()).done; ) a.push(r.value); - } catch (t) { - o = { error: t }; - } finally { - try { - r && !r.done && (n = i.return) && n.call(i); - } finally { - if (o) throw o.error; - } - } - return a; - } - var a = n(0), - s = n.n(a), - u = n(1); - function l(t, e) { - let n = 0; - if (void 0 === e) for (let e of t) (e = +e) && (n += e); - else { - let r = -1; - for (let o of t) (o = +e(o, ++r, t)) && (n += o); - } - return n; +define(["@grafana/data","@grafana/ui","d3","react"], function(__WEBPACK_EXTERNAL_MODULE__grafana_data__, __WEBPACK_EXTERNAL_MODULE__grafana_ui__, __WEBPACK_EXTERNAL_MODULE_d3__, __WEBPACK_EXTERNAL_MODULE_react__) { return /******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; +/******/ +/******/ // The require function +/******/ function __webpack_require__(moduleId) { +/******/ +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) { +/******/ return installedModules[moduleId].exports; +/******/ } +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ i: moduleId, +/******/ l: false, +/******/ exports: {} +/******/ }; +/******/ +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); +/******/ +/******/ // Flag the module as loaded +/******/ module.l = true; +/******/ +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } +/******/ +/******/ +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; +/******/ +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; +/******/ +/******/ // define getter function for harmony exports +/******/ __webpack_require__.d = function(exports, name, getter) { +/******/ if(!__webpack_require__.o(exports, name)) { +/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); +/******/ } +/******/ }; +/******/ +/******/ // define __esModule on exports +/******/ __webpack_require__.r = function(exports) { +/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { +/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); +/******/ } +/******/ Object.defineProperty(exports, '__esModule', { value: true }); +/******/ }; +/******/ +/******/ // create a fake namespace object +/******/ // mode & 1: value is a module id, require it +/******/ // mode & 2: merge all properties of value into the ns +/******/ // mode & 4: return value when already ns object +/******/ // mode & 8|1: behave like require +/******/ __webpack_require__.t = function(value, mode) { +/******/ if(mode & 1) value = __webpack_require__(value); +/******/ if(mode & 8) return value; +/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; +/******/ var ns = Object.create(null); +/******/ __webpack_require__.r(ns); +/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); +/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); +/******/ return ns; +/******/ }; +/******/ +/******/ // getDefaultExport function for compatibility with non-harmony modules +/******/ __webpack_require__.n = function(module) { +/******/ var getter = module && module.__esModule ? +/******/ function getDefault() { return module['default']; } : +/******/ function getModuleExports() { return module; }; +/******/ __webpack_require__.d(getter, 'a', getter); +/******/ return getter; +/******/ }; +/******/ +/******/ // Object.prototype.hasOwnProperty.call +/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; +/******/ +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = "/"; +/******/ +/******/ +/******/ // Load entry module and return exports +/******/ return __webpack_require__(__webpack_require__.s = "./module.ts"); +/******/ }) +/************************************************************************/ +/******/ ({ + +/***/ "../node_modules/d3-path/src/index.js": +/*!********************************************!*\ + !*** ../node_modules/d3-path/src/index.js ***! + \********************************************/ +/*! exports provided: path */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _path_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./path.js */ "../node_modules/d3-path/src/path.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "path", function() { return _path_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + + + + +/***/ }), + +/***/ "../node_modules/d3-path/src/path.js": +/*!*******************************************!*\ + !*** ../node_modules/d3-path/src/path.js ***! + \*******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var pi = Math.PI, + tau = 2 * pi, + epsilon = 1e-6, + tauEpsilon = tau - epsilon; + +function Path() { + this._x0 = this._y0 = // start of current subpath + this._x1 = this._y1 = null; // end of current subpath + this._ = ""; +} + +function path() { + return new Path; +} + +Path.prototype = path.prototype = { + constructor: Path, + moveTo: function(x, y) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y); + }, + closePath: function() { + if (this._x1 !== null) { + this._x1 = this._x0, this._y1 = this._y0; + this._ += "Z"; + } + }, + lineTo: function(x, y) { + this._ += "L" + (this._x1 = +x) + "," + (this._y1 = +y); + }, + quadraticCurveTo: function(x1, y1, x, y) { + this._ += "Q" + (+x1) + "," + (+y1) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { + this._ += "C" + (+x1) + "," + (+y1) + "," + (+x2) + "," + (+y2) + "," + (this._x1 = +x) + "," + (this._y1 = +y); + }, + arcTo: function(x1, y1, x2, y2, r) { + x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r; + var x0 = this._x1, + y0 = this._y1, + x21 = x2 - x1, + y21 = y2 - y1, + x01 = x0 - x1, + y01 = y0 - y1, + l01_2 = x01 * x01 + y01 * y01; + + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + + // Is this path empty? Move to (x1,y1). + if (this._x1 === null) { + this._ += "M" + (this._x1 = x1) + "," + (this._y1 = y1); + } + + // Or, is (x1,y1) coincident with (x0,y0)? Do nothing. + else if (!(l01_2 > epsilon)); + + // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear? + // Equivalently, is (x1,y1) coincident with (x2,y2)? + // Or, is the radius zero? Line to (x1,y1). + else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) { + this._ += "L" + (this._x1 = x1) + "," + (this._y1 = y1); + } + + // Otherwise, draw an arc! + else { + var x20 = x2 - x0, + y20 = y2 - y0, + l21_2 = x21 * x21 + y21 * y21, + l20_2 = x20 * x20 + y20 * y20, + l21 = Math.sqrt(l21_2), + l01 = Math.sqrt(l01_2), + l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2), + t01 = l / l01, + t21 = l / l21; + + // If the start tangent is not coincident with (x0,y0), line to. + if (Math.abs(t01 - 1) > epsilon) { + this._ += "L" + (x1 + t01 * x01) + "," + (y1 + t01 * y01); } - function c(t, e) { - let n; - if (void 0 === e) for (const e of t) null != e && (n < e || (void 0 === n && e >= e)) && (n = e); - else { - let r = -1; - for (let o of t) null != (o = e(o, ++r, t)) && (n < o || (void 0 === n && o >= o)) && (n = o); + + this._ += "A" + r + "," + r + ",0,0," + (+(y01 * x20 > x01 * y20)) + "," + (this._x1 = x1 + t21 * x21) + "," + (this._y1 = y1 + t21 * y21); + } + }, + arc: function(x, y, r, a0, a1, ccw) { + x = +x, y = +y, r = +r, ccw = !!ccw; + var 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; + + // Is the radius negative? Error. + if (r < 0) throw new Error("negative radius: " + r); + + // Is this path empty? Move to (x0,y0). + if (this._x1 === null) { + this._ += "M" + x0 + "," + y0; + } + + // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0). + else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) { + this._ += "L" + x0 + "," + y0; + } + + // Is this arc empty? We’re done. + if (!r) return; + + // Does the angle go the wrong way? Flip the direction. + if (da < 0) da = da % tau + tau; + + // Is this a complete circle? Draw two arcs to complete the circle. + if (da > tauEpsilon) { + this._ += "A" + r + "," + r + ",0,1," + cw + "," + (x - dx) + "," + (y - dy) + "A" + r + "," + r + ",0,1," + cw + "," + (this._x1 = x0) + "," + (this._y1 = y0); + } + + // Is this arc non-empty? Draw an arc! + else if (da > epsilon) { + this._ += "A" + r + "," + r + ",0," + (+(da >= pi)) + "," + cw + "," + (this._x1 = x + r * Math.cos(a1)) + "," + (this._y1 = y + r * Math.sin(a1)); + } + }, + rect: function(x, y, w, h) { + this._ += "M" + (this._x0 = this._x1 = +x) + "," + (this._y0 = this._y1 = +y) + "h" + (+w) + "v" + (+h) + "h" + (-w) + "Z"; + }, + toString: function() { + return this._; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (path); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/array.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/array.js ***! + \********************************************************************/ +/*! exports provided: slice, map */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "map", function() { return map; }); +var array = Array.prototype; + +var slice = array.slice; +var map = array.map; + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js": +/*!************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js ***! + \************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/bin.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/bin.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/array.js"); +/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisect.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/bisect.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/constant.js"); +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./extent.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/extent.js"); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./identity.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/identity.js"); +/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./nice.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/nice.js"); +/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./ticks.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ticks.js"); +/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./threshold/sturges.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/sturges.js"); + + + + + + + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var value = _identity_js__WEBPACK_IMPORTED_MODULE_4__["default"], + domain = _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"], + threshold = _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_7__["default"]; + + function histogram(data) { + if (!Array.isArray(data)) data = Array.from(data); + + var i, + n = data.length, + x, + values = new Array(n); + + for (i = 0; i < n; ++i) { + values[i] = value(data[i], i, data); + } + + var xz = domain(values), + x0 = xz[0], + x1 = xz[1], + tz = threshold(values, x0, x1); + + // Convert number of thresholds into uniform thresholds, + // and nice the default domain accordingly. + if (!Array.isArray(tz)) { + tz = +tz; + if (domain === _extent_js__WEBPACK_IMPORTED_MODULE_3__["default"]) [x0, x1] = Object(_nice_js__WEBPACK_IMPORTED_MODULE_5__["default"])(x0, x1, tz); + tz = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_6__["default"])(x0, x1, tz); + if (tz[tz.length - 1] === x1) tz.pop(); // exclusive + } + + // Remove any thresholds outside the domain. + var m = tz.length; + while (tz[0] <= x0) tz.shift(), --m; + while (tz[m - 1] > x1) tz.pop(), --m; + + var bins = new Array(m + 1), + bin; + + // Initialize bins. + for (i = 0; i <= m; ++i) { + bin = bins[i] = []; + bin.x0 = i > 0 ? tz[i - 1] : x0; + bin.x1 = i < m ? tz[i] : x1; + } + + // Assign data to bins by value, ignoring any outside the domain. + for (i = 0; i < n; ++i) { + x = values[i]; + if (x0 <= x && x <= x1) { + bins[Object(_bisect_js__WEBPACK_IMPORTED_MODULE_1__["default"])(tz, x, 0, m)].push(data[i]); + } + } + + return bins; + } + + histogram.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : value; + }; + + histogram.domain = function(_) { + return arguments.length ? (domain = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])([_[0], _[1]]), histogram) : domain; + }; + + histogram.thresholds = function(_) { + return arguments.length ? (threshold = typeof _ === "function" ? _ : Array.isArray(_) ? Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)) : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), histogram) : threshold; + }; + + return histogram; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/bisect.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/bisect.js ***! + \*********************************************************************/ +/*! exports provided: bisectRight, bisectLeft, bisectCenter, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return bisectRight; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return bisectLeft; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return bisectCenter; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); +/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./bisector.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/bisector.js"); +/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./number.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/number.js"); + + + + +const ascendingBisect = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]); +const bisectRight = ascendingBisect.right; +const bisectLeft = ascendingBisect.left; +const bisectCenter = Object(_bisector_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_number_js__WEBPACK_IMPORTED_MODULE_2__["default"]).center; +/* harmony default export */ __webpack_exports__["default"] = (bisectRight); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/bisector.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/bisector.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(f) { + let delta = f; + let compare = f; + + if (f.length === 1) { + delta = (d, x) => f(d) - x; + compare = ascendingComparator(f); + } + + function left(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + const mid = (lo + hi) >>> 1; + if (compare(a[mid], x) < 0) lo = mid + 1; + else hi = mid; + } + return lo; + } + + function right(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + while (lo < hi) { + const mid = (lo + hi) >>> 1; + if (compare(a[mid], x) > 0) hi = mid; + else lo = mid + 1; + } + return lo; + } + + function center(a, x, lo, hi) { + if (lo == null) lo = 0; + if (hi == null) hi = a.length; + const i = left(a, x, lo, hi - 1); + return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i; + } + + return {left, center, right}; +}); + +function ascendingComparator(f) { + return (d, x) => Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(f(d), x); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/constant.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/constant.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function() { + return x; + }; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/count.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/count.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return count; }); +function count(values, valueof) { + let count = 0; + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + ++count; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + ++count; + } + } + } + return count; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/cross.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/cross.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cross; }); +function length(array) { + return array.length | 0; +} + +function empty(length) { + return !(length > 0); +} + +function arrayify(values) { + return typeof values !== "object" || "length" in values ? values : Array.from(values); +} + +function reducer(reduce) { + return values => reduce(...values); +} + +function cross(...values) { + const reduce = typeof values[values.length - 1] === "function" && reducer(values.pop()); + values = values.map(arrayify); + const lengths = values.map(length); + const j = values.length - 1; + const index = new Array(j + 1).fill(0); + const product = []; + if (j < 0 || lengths.some(empty)) return product; + while (true) { + product.push(index.map((j, i) => values[i][j])); + let i = j; + while (++index[i] === lengths[i]) { + if (i === 0) return reduce ? product.map(reduce) : product; + index[i--] = 0; + } + } +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/cumsum.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/cumsum.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return cumsum; }); +function cumsum(values, valueof) { + var sum = 0, index = 0; + return Float64Array.from(values, valueof === undefined + ? v => (sum += +v || 0) + : v => (sum += +valueof(v, index++, values) || 0)); +} + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/descending.js": +/*!*************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/descending.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/deviation.js": +/*!************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/deviation.js ***! + \************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return deviation; }); +/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./variance.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/variance.js"); + + +function deviation(values, valueof) { + const v = Object(_variance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, valueof); + return v ? Math.sqrt(v) : v; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/difference.js": +/*!*************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/difference.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return difference; }); +function difference(values, ...others) { + values = new Set(values); + for (const other of others) { + for (const value of other) { + values.delete(value); + } + } + return values; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/disjoint.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/disjoint.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return disjoint; }); +function disjoint(values, other) { + const iterator = other[Symbol.iterator](), set = new Set(); + for (const v of values) { + if (set.has(v)) return false; + let value, done; + while (({value, done} = iterator.next())) { + if (done) break; + if (Object.is(v, value)) return false; + set.add(value); + } + } + return true; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/every.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/every.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return every; }); +function every(values, test) { + if (typeof test !== "function") throw new TypeError("test is not a function"); + let index = -1; + for (const value of values) { + if (!test(value, ++index, values)) { + return false; + } + } + return true; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/extent.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/extent.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { + let min; + let max; + if (valueof === undefined) { + for (const value of values) { + if (value != null) { + if (min === undefined) { + if (value >= value) min = max = value; + } else { + if (min > value) min = value; + if (max < value) max = value; } - return n; } - function h(t, e) { - let n; - if (void 0 === e) for (const e of t) null != e && (n > e || (void 0 === n && e >= e)) && (n = e); - else { - let r = -1; - for (let o of t) null != (o = e(o, ++r, t)) && (n > o || (void 0 === n && o >= o)) && (n = o); + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null) { + if (min === undefined) { + if (value >= value) min = max = value; + } else { + if (min > value) min = value; + if (max < value) max = value; } - return n; } - function f(t) { - return t.target.depth; + } + } + return [min, max]; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/filter.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/filter.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return filter; }); +function filter(values, test) { + if (typeof test !== "function") throw new TypeError("test is not a function"); + const array = []; + let index = -1; + for (const value of values) { + if (test(value, ++index, values)) { + array.push(value); + } + } + return array; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/fsum.js": +/*!*******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/fsum.js ***! + \*******************************************************************/ +/*! exports provided: Adder, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return Adder; }); +// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423 +class Adder { + constructor() { + this._partials = new Float64Array(32); + this._n = 0; + } + add(x) { + const p = this._partials; + let i = 0; + for (let j = 0; j < this._n && j < 32; j++) { + const y = p[j], + hi = x + y, + lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x); + if (lo) p[i++] = lo; + x = hi; + } + p[i] = x; + this._n = i + 1; + return this; + } + valueOf() { + const p = this._partials; + let n = this._n, x, y, lo, hi = 0; + if (n > 0) { + hi = p[--n]; + while (n > 0) { + x = hi; + y = p[--n]; + hi = x + y; + lo = y - (hi - x); + if (lo) break; } - function d(t) { - return t.depth; + if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) { + y = lo * 2; + x = hi + y; + if (y == x - hi) hi = x; } - function g(t, e) { - return e - 1 - t.height; + } + return hi; + } +} + +/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { + const adder = new Adder(); + if (valueof === undefined) { + for (let value of values) { + if (value = +value) { + adder.add(value); } - function y(t, e) { - return t.sourceLinks.length ? t.depth : e - 1; + } + } else { + let index = -1; + for (let value of values) { + if (value = +valueof(value, ++index, values)) { + adder.add(value); } - function _(t) { - return t.targetLinks.length ? t.depth : t.sourceLinks.length ? h(t.sourceLinks, f) - 1 : 0; + } + } + return +adder; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/greatest.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/greatest.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return greatest; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); + + +function greatest(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { + let max; + let defined = false; + if (compare.length === 1) { + let maxValue; + for (const element of values) { + const value = compare(element); + if (defined + ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, maxValue) > 0 + : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, value) === 0) { + max = element; + maxValue = value; + defined = true; } - function p(t) { - return function () { - return t; - }; + } + } else { + for (const value of values) { + if (defined + ? compare(value, max) > 0 + : compare(value, value) === 0) { + max = value; + defined = true; } - function v(t, e) { - return m(t.source, e.source) || t.index - e.index; + } + } + return max; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/greatestIndex.js": +/*!****************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/greatestIndex.js ***! + \****************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return greatestIndex; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); +/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./maxIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/maxIndex.js"); + + + +function greatestIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { + if (compare.length === 1) return Object(_maxIndex_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, compare); + let maxValue; + let max = -1; + let index = -1; + for (const value of values) { + ++index; + if (max < 0 + ? compare(value, value) === 0 + : compare(value, maxValue) > 0) { + maxValue = value; + max = index; + } + } + return max; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/group.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/group.js ***! + \********************************************************************/ +/*! exports provided: default, groups, rollup, rollups, index, indexes */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return group; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return groups; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return rollup; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return rollups; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "index", function() { return index; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return indexes; }); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./identity.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/identity.js"); + + +function group(values, ...keys) { + return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"], _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"], keys); +} + +function groups(values, ...keys) { + return nest(values, Array.from, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"], keys); +} + +function rollup(values, reduce, ...keys) { + return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"], reduce, keys); +} + +function rollups(values, reduce, ...keys) { + return nest(values, Array.from, reduce, keys); +} + +function index(values, ...keys) { + return nest(values, _identity_js__WEBPACK_IMPORTED_MODULE_0__["default"], unique, keys); +} + +function indexes(values, ...keys) { + return nest(values, Array.from, unique, keys); +} + +function unique(values) { + if (values.length !== 1) throw new Error("duplicate key"); + return values[0]; +} + +function nest(values, map, reduce, keys) { + return (function regroup(values, i) { + if (i >= keys.length) return reduce(values); + const groups = new Map(); + const keyof = keys[i++]; + let index = -1; + for (const value of values) { + const key = keyof(value, ++index, values); + const group = groups.get(key); + if (group) group.push(value); + else groups.set(key, [value]); + } + for (const [key, values] of groups) { + groups.set(key, regroup(values, i)); + } + return map(groups); + })(values, 0); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/identity.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/identity.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return x; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/index.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/index.js ***! + \********************************************************************/ +/*! exports provided: bisect, bisectRight, bisectLeft, bisectCenter, ascending, bisector, count, cross, cumsum, descending, deviation, extent, fsum, Adder, group, groups, index, indexes, rollup, rollups, bin, histogram, thresholdFreedmanDiaconis, thresholdScott, thresholdSturges, max, maxIndex, mean, median, merge, min, minIndex, nice, pairs, permute, quantile, quantileSorted, quickselect, range, least, leastIndex, greatest, greatestIndex, scan, shuffle, shuffler, sum, ticks, tickIncrement, tickStep, transpose, variance, zip, every, some, filter, map, reduce, reverse, sort, difference, disjoint, intersection, subset, superset, union */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _bisect_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./bisect.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/bisect.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisect", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectRight", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectRight"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectLeft", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectLeft"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisectCenter", function() { return _bisect_js__WEBPACK_IMPORTED_MODULE_0__["bisectCenter"]; }); + +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ascending", function() { return _ascending_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _bisector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./bisector.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/bisector.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bisector", function() { return _bisector_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./count.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/count.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "count", function() { return _count_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _cross_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./cross.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/cross.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cross", function() { return _cross_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _cumsum_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./cumsum.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/cumsum.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "cumsum", function() { return _cumsum_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./descending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/descending.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "descending", function() { return _descending_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./deviation.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/deviation.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "deviation", function() { return _deviation_js__WEBPACK_IMPORTED_MODULE_7__["default"]; }); + +/* harmony import */ var _extent_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./extent.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/extent.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "extent", function() { return _extent_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony import */ var _fsum_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./fsum.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/fsum.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "fsum", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Adder", function() { return _fsum_js__WEBPACK_IMPORTED_MODULE_9__["Adder"]; }); + +/* harmony import */ var _group_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./group.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/group.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "group", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "groups", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["groups"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "index", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["index"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "indexes", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["indexes"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollup", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["rollup"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "rollups", function() { return _group_js__WEBPACK_IMPORTED_MODULE_10__["rollups"]; }); + +/* harmony import */ var _bin_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./bin.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/bin.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "bin", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "histogram", function() { return _bin_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./threshold/freedmanDiaconis.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/freedmanDiaconis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdFreedmanDiaconis", function() { return _threshold_freedmanDiaconis_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _threshold_scott_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./threshold/scott.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/scott.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdScott", function() { return _threshold_scott_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony import */ var _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./threshold/sturges.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/sturges.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "thresholdSturges", function() { return _threshold_sturges_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./max.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/max.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "max", function() { return _max_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* harmony import */ var _maxIndex_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./maxIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/maxIndex.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "maxIndex", function() { return _maxIndex_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* harmony import */ var _mean_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./mean.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/mean.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "mean", function() { return _mean_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); + +/* harmony import */ var _median_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./median.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/median.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "median", function() { return _median_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); + +/* harmony import */ var _merge_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./merge.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/merge.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "merge", function() { return _merge_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); + +/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./min.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/min.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "min", function() { return _min_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); + +/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./minIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/minIndex.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "minIndex", function() { return _minIndex_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); + +/* harmony import */ var _nice_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./nice.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/nice.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "nice", function() { return _nice_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); + +/* harmony import */ var _pairs_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./pairs.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/pairs.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pairs", function() { return _pairs_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); + +/* harmony import */ var _permute_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./permute.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/permute.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "permute", function() { return _permute_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); + +/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./quantile.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/quantile.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantile", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return _quantile_js__WEBPACK_IMPORTED_MODULE_25__["quantileSorted"]; }); + +/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./quickselect.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/quickselect.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "quickselect", function() { return _quickselect_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); + +/* harmony import */ var _range_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./range.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/range.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "range", function() { return _range_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); + +/* harmony import */ var _least_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./least.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/least.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "least", function() { return _least_js__WEBPACK_IMPORTED_MODULE_28__["default"]; }); + +/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./leastIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/leastIndex.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "leastIndex", function() { return _leastIndex_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); + +/* harmony import */ var _greatest_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./greatest.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/greatest.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatest", function() { return _greatest_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); + +/* harmony import */ var _greatestIndex_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./greatestIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/greatestIndex.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "greatestIndex", function() { return _greatestIndex_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); + +/* harmony import */ var _scan_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./scan.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/scan.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "scan", function() { return _scan_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); + +/* harmony import */ var _shuffle_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./shuffle.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/shuffle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffle", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return _shuffle_js__WEBPACK_IMPORTED_MODULE_33__["shuffler"]; }); + +/* harmony import */ var _sum_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./sum.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/sum.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return _sum_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); + +/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./ticks.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ticks.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ticks", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_35__["tickIncrement"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return _ticks_js__WEBPACK_IMPORTED_MODULE_35__["tickStep"]; }); + +/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./transpose.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/transpose.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "transpose", function() { return _transpose_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); + +/* harmony import */ var _variance_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./variance.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/variance.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "variance", function() { return _variance_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); + +/* harmony import */ var _zip_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./zip.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/zip.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "zip", function() { return _zip_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); + +/* harmony import */ var _every_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./every.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/every.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "every", function() { return _every_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); + +/* harmony import */ var _some_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./some.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/some.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "some", function() { return _some_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); + +/* harmony import */ var _filter_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./filter.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/filter.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "filter", function() { return _filter_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); + +/* harmony import */ var _map_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./map.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/map.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "map", function() { return _map_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); + +/* harmony import */ var _reduce_js__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./reduce.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/reduce.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reduce", function() { return _reduce_js__WEBPACK_IMPORTED_MODULE_43__["default"]; }); + +/* harmony import */ var _reverse_js__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./reverse.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/reverse.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "reverse", function() { return _reverse_js__WEBPACK_IMPORTED_MODULE_44__["default"]; }); + +/* harmony import */ var _sort_js__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./sort.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/sort.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sort", function() { return _sort_js__WEBPACK_IMPORTED_MODULE_45__["default"]; }); + +/* harmony import */ var _difference_js__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./difference.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/difference.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "difference", function() { return _difference_js__WEBPACK_IMPORTED_MODULE_46__["default"]; }); + +/* harmony import */ var _disjoint_js__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./disjoint.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/disjoint.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "disjoint", function() { return _disjoint_js__WEBPACK_IMPORTED_MODULE_47__["default"]; }); + +/* harmony import */ var _intersection_js__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./intersection.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/intersection.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "intersection", function() { return _intersection_js__WEBPACK_IMPORTED_MODULE_48__["default"]; }); + +/* harmony import */ var _subset_js__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./subset.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/subset.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "subset", function() { return _subset_js__WEBPACK_IMPORTED_MODULE_49__["default"]; }); + +/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./superset.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/superset.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "superset", function() { return _superset_js__WEBPACK_IMPORTED_MODULE_50__["default"]; }); + +/* harmony import */ var _union_js__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./union.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/union.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "union", function() { return _union_js__WEBPACK_IMPORTED_MODULE_51__["default"]; }); + + + + + + + + + + + + + // Deprecated; use bin. + + + + + + + + + + + + + + + + + + + + + // Deprecated; use leastIndex. + + + + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/intersection.js": +/*!***************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/intersection.js ***! + \***************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return intersection; }); +/* harmony import */ var _set_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./set.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/set.js"); + + +function intersection(values, ...others) { + values = new Set(values); + others = others.map(_set_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + out: for (const value of values) { + for (const other of others) { + if (!other.has(value)) { + values.delete(value); + continue out; } - function k(t, e) { - return m(t.target, e.target) || t.index - e.index; + } + } + return values; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/least.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/least.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return least; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); + + +function least(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { + let min; + let defined = false; + if (compare.length === 1) { + let minValue; + for (const element of values) { + const value = compare(element); + if (defined + ? Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, minValue) < 0 + : Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(value, value) === 0) { + min = element; + minValue = value; + defined = true; } - function m(t, e) { - return t.y0 - e.y0; + } + } else { + for (const value of values) { + if (defined + ? compare(value, min) < 0 + : compare(value, value) === 0) { + min = value; + defined = true; } - function b(t) { - return t.value; + } + } + return min; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/leastIndex.js": +/*!*************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/leastIndex.js ***! + \*************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return leastIndex; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); +/* harmony import */ var _minIndex_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./minIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/minIndex.js"); + + + +function leastIndex(values, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { + if (compare.length === 1) return Object(_minIndex_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, compare); + let minValue; + let min = -1; + let index = -1; + for (const value of values) { + ++index; + if (min < 0 + ? compare(value, value) === 0 + : compare(value, minValue) < 0) { + minValue = value; + min = index; + } + } + return min; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/map.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/map.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return map; }); +function map(values, mapper) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + if (typeof mapper !== "function") throw new TypeError("mapper is not a function"); + return Array.from(values, (value, index) => mapper(value, index, values)); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/max.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/max.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return max; }); +function max(values, valueof) { + let max; + if (valueof === undefined) { + for (const value of values) { + if (value != null + && (max < value || (max === undefined && value >= value))) { + max = value; } - function x(t) { - return t.index; + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null + && (max < value || (max === undefined && value >= value))) { + max = value; } - function w(t) { - return t.nodes; + } + } + return max; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/maxIndex.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/maxIndex.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return maxIndex; }); +function maxIndex(values, valueof) { + let max; + let maxIndex = -1; + let index = -1; + if (valueof === undefined) { + for (const value of values) { + ++index; + if (value != null + && (max < value || (max === undefined && value >= value))) { + max = value, maxIndex = index; } - function L(t) { - return t.links; + } + } else { + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null + && (max < value || (max === undefined && value >= value))) { + max = value, maxIndex = index; } - function S(t, e) { - const n = t.get(e); - if (!n) throw new Error('missing: ' + e); - return n; + } + } + return maxIndex; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/mean.js": +/*!*******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/mean.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return mean; }); +function mean(values, valueof) { + let count = 0; + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + ++count, sum += value; } - function A({ nodes: t }) { - for (const e of t) { - let t = e.y0, - n = t; - for (const n of e.sourceLinks) (n.y0 = t + n.width / 2), (t += n.width); - for (const t of e.targetLinks) (t.y1 = n + t.width / 2), (n += t.width); - } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + ++count, sum += value; } - function M() { - let t, - e, - n, - r = 0, - o = 0, - i = 1, - a = 1, - s = 24, - u = 8, - f = x, - d = y, - g = w, - _ = L, - M = 6; - function O() { - const t = { nodes: g.apply(null, arguments), links: _.apply(null, arguments) }; - return T(t), j(t), C(t), P(t), V(t), A(t), t; - } - function T({ nodes: t, links: e }) { - for (const [e, n] of t.entries()) (n.index = e), (n.sourceLinks = []), (n.targetLinks = []); - const r = new Map(t.map((e, n) => [f(e, n, t), e])); - for (const [t, n] of e.entries()) { - n.index = t; - let { source: e, target: o } = n; - 'object' != typeof e && (e = n.source = S(r, e)), - 'object' != typeof o && (o = n.target = S(r, o)), - e.sourceLinks.push(n), - o.targetLinks.push(n); - } - if (null != n) for (const { sourceLinks: e, targetLinks: r } of t) e.sort(n), r.sort(n); - } - function j({ nodes: t }) { - for (const e of t) - e.value = void 0 === e.fixedValue ? Math.max(l(e.sourceLinks, b), l(e.targetLinks, b)) : e.fixedValue; - } - function C({ nodes: t }) { - const e = t.length; - let n = new Set(t), - r = new Set(), - o = 0; - for (; n.size; ) { - for (const t of n) { - t.depth = o; - for (const { target: e } of t.sourceLinks) r.add(e); - } - if (++o > e) throw new Error('circular link'); - (n = r), (r = new Set()); - } - } - function P({ nodes: t }) { - const e = t.length; - let n = new Set(t), - r = new Set(), - o = 0; - for (; n.size; ) { - for (const t of n) { - t.height = o; - for (const { source: e } of t.targetLinks) r.add(e); - } - if (++o > e) throw new Error('circular link'); - (n = r), (r = new Set()); - } - } - function V(n) { - const f = (function ({ nodes: t }) { - const n = c(t, (t) => t.depth) + 1, - o = (i - r - s) / (n - 1), - a = new Array(n); - for (const e of t) { - const t = Math.max(0, Math.min(n - 1, Math.floor(d.call(null, e, n)))); - (e.layer = t), (e.x0 = r + t * o), (e.x1 = e.x0 + s), a[t] ? a[t].push(e) : (a[t] = [e]); - } - if (e) for (const t of a) t.sort(e); - return a; - })(n); - (t = Math.min(u, (a - o) / (c(f, (t) => t.length) - 1))), - (function (e) { - const n = h(e, (e) => (a - o - (e.length - 1) * t) / l(e, b)); - for (const r of e) { - let e = o; - for (const o of r) { - (o.y0 = e), (o.y1 = e + o.value * n), (e = o.y1 + t); - for (const t of o.sourceLinks) t.width = t.value * n; - } - e = (a - e + t) / (r.length + 1); - for (let t = 0; t < r.length; ++t) { - const n = r[t]; - (n.y0 += e * (t + 1)), (n.y1 += e * (t + 1)); - } - I(r); - } - })(f); - for (let t = 0; t < M; ++t) { - const e = Math.pow(0.99, t), - n = Math.max(1 - e, (t + 1) / M); - B(f, e, n), E(f, e, n); - } - } - function E(t, n, r) { - for (let o = 1, i = t.length; o < i; ++o) { - const i = t[o]; - for (const t of i) { - let e = 0, - r = 0; - for (const { source: n, value: o } of t.targetLinks) { - let i = o * (t.layer - n.layer); - (e += J(n, t) * i), (r += i); - } - if (!(r > 0)) continue; - let o = (e / r - t.y0) * n; - (t.y0 += o), (t.y1 += o), G(t); - } - void 0 === e && i.sort(m), H(i, r); - } + } + } + if (count) return sum / count; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/median.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/median.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./quantile.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/quantile.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(values, valueof) { + return Object(_quantile_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, 0.5, valueof); +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/merge.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/merge.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return merge; }); +function* flatten(arrays) { + for (const array of arrays) { + yield* array; + } +} + +function merge(arrays) { + return Array.from(flatten(arrays)); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/min.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/min.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return min; }); +function min(values, valueof) { + let min; + if (valueof === undefined) { + for (const value of values) { + if (value != null + && (min > value || (min === undefined && value >= value))) { + min = value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null + && (min > value || (min === undefined && value >= value))) { + min = value; + } + } + } + return min; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/minIndex.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/minIndex.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return minIndex; }); +function minIndex(values, valueof) { + let min; + let minIndex = -1; + let index = -1; + if (valueof === undefined) { + for (const value of values) { + ++index; + if (value != null + && (min > value || (min === undefined && value >= value))) { + min = value, minIndex = index; + } + } + } else { + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null + && (min > value || (min === undefined && value >= value))) { + min = value, minIndex = index; + } + } + } + return minIndex; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/nice.js": +/*!*******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/nice.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return nice; }); +/* harmony import */ var _ticks_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ticks.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ticks.js"); + + +function nice(start, stop, count) { + let prestep; + while (true) { + const step = Object(_ticks_js__WEBPACK_IMPORTED_MODULE_0__["tickIncrement"])(start, stop, count); + if (step === prestep || step === 0 || !isFinite(step)) { + return [start, stop]; + } else if (step > 0) { + start = Math.floor(start / step) * step; + stop = Math.ceil(stop / step) * step; + } else if (step < 0) { + start = Math.ceil(start * step) / step; + stop = Math.floor(stop * step) / step; + } + prestep = step; + } +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/number.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/number.js ***! + \*********************************************************************/ +/*! exports provided: default, numbers */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "numbers", function() { return numbers; }); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return x === null ? NaN : +x; +}); + +function* numbers(values, valueof) { + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + yield value; + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + yield value; + } + } + } +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/pairs.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/pairs.js ***! + \********************************************************************/ +/*! exports provided: default, pair */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return pairs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pair", function() { return pair; }); +function pairs(values, pairof = pair) { + const pairs = []; + let previous; + let first = false; + for (const value of values) { + if (first) pairs.push(pairof(previous, value)); + previous = value; + first = true; + } + return pairs; +} + +function pair(a, b) { + return [a, b]; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/permute.js": +/*!**********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/permute.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(source, keys) { + return Array.from(keys, key => source[key]); +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/quantile.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/quantile.js ***! + \***********************************************************************/ +/*! exports provided: default, quantileSorted */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quantile; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "quantileSorted", function() { return quantileSorted; }); +/* harmony import */ var _max_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./max.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/max.js"); +/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./min.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/min.js"); +/* harmony import */ var _quickselect_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./quickselect.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/quickselect.js"); +/* harmony import */ var _number_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./number.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/number.js"); + + + + + +function quantile(values, p, valueof) { + values = Float64Array.from(Object(_number_js__WEBPACK_IMPORTED_MODULE_3__["numbers"])(values, valueof)); + if (!(n = values.length)) return; + if ((p = +p) <= 0 || n < 2) return Object(_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values); + if (p >= 1) return Object(_max_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values); + var n, + i = (n - 1) * p, + i0 = Math.floor(i), + value0 = Object(_max_js__WEBPACK_IMPORTED_MODULE_0__["default"])(Object(_quickselect_js__WEBPACK_IMPORTED_MODULE_2__["default"])(values, i0).subarray(0, i0 + 1)), + value1 = Object(_min_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values.subarray(i0 + 1)); + return value0 + (value1 - value0) * (i - i0); +} + +function quantileSorted(values, p, valueof = _number_js__WEBPACK_IMPORTED_MODULE_3__["default"]) { + if (!(n = values.length)) return; + if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values); + if (p >= 1) return +valueof(values[n - 1], n - 1, values); + var n, + i = (n - 1) * p, + i0 = Math.floor(i), + value0 = +valueof(values[i0], i0, values), + value1 = +valueof(values[i0 + 1], i0 + 1, values); + return value0 + (value1 - value0) * (i - i0); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/quickselect.js": +/*!**************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/quickselect.js ***! + \**************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return quickselect; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); + + +// Based on https://github.com/mourner/quickselect +// ISC license, Copyright 2018 Vladimir Agafonkin. +function quickselect(array, k, left = 0, right = array.length - 1, compare = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { + while (right > left) { + if (right - left > 600) { + const n = right - left + 1; + const m = k - left + 1; + const z = Math.log(n); + const s = 0.5 * Math.exp(2 * z / 3); + const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1); + const newLeft = Math.max(left, Math.floor(k - m * s / n + sd)); + const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd)); + quickselect(array, k, newLeft, newRight, compare); + } + + const t = array[k]; + let i = left; + let j = right; + + swap(array, left, k); + if (compare(array[right], t) > 0) swap(array, left, right); + + while (i < j) { + swap(array, i, j), ++i, --j; + while (compare(array[i], t) < 0) ++i; + while (compare(array[j], t) > 0) --j; + } + + if (compare(array[left], t) === 0) swap(array, left, j); + else ++j, swap(array, j, right); + + if (j <= k) left = j + 1; + if (k <= j) right = j - 1; + } + return array; +} + +function swap(array, i, j) { + const t = array[i]; + array[i] = array[j]; + array[j] = t; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/range.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/range.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, step) { + start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step; + + var i = -1, + n = Math.max(0, Math.ceil((stop - start) / step)) | 0, + range = new Array(n); + + while (++i < n) { + range[i] = start + i * step; + } + + return range; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/reduce.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/reduce.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return reduce; }); +function reduce(values, reducer, value) { + if (typeof reducer !== "function") throw new TypeError("reducer is not a function"); + const iterator = values[Symbol.iterator](); + let done, next, index = -1; + if (arguments.length < 3) { + ({done, value} = iterator.next()); + if (done) return; + ++index; + } + while (({done, value: next} = iterator.next()), !done) { + value = reducer(value, next, ++index, values); + } + return value; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/reverse.js": +/*!**********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/reverse.js ***! + \**********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return reverse; }); +function reverse(values) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + return Array.from(values).reverse(); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/scan.js": +/*!*******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/scan.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return scan; }); +/* harmony import */ var _leastIndex_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./leastIndex.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/leastIndex.js"); + + +function scan(values, compare) { + const index = Object(_leastIndex_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values, compare); + return index < 0 ? undefined : index; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/set.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/set.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return set; }); +function set(values) { + return values instanceof Set ? values : new Set(values); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/shuffle.js": +/*!**********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/shuffle.js ***! + \**********************************************************************/ +/*! exports provided: default, shuffler */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "shuffler", function() { return shuffler; }); +/* harmony default export */ __webpack_exports__["default"] = (shuffler(Math.random)); + +function shuffler(random) { + return function shuffle(array, i0 = 0, i1 = array.length) { + let m = i1 - (i0 = +i0); + while (m) { + const i = random() * m-- | 0, t = array[m + i0]; + array[m + i0] = array[i + i0]; + array[i + i0] = t; + } + return array; + }; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/some.js": +/*!*******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/some.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return some; }); +function some(values, test) { + if (typeof test !== "function") throw new TypeError("test is not a function"); + let index = -1; + for (const value of values) { + if (test(value, ++index, values)) { + return true; + } + } + return false; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/sort.js": +/*!*******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/sort.js ***! + \*******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sort; }); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js"); + + +function sort(values, comparator = _ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"]) { + if (typeof values[Symbol.iterator] !== "function") throw new TypeError("values is not iterable"); + return Array.from(values).sort(comparator); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/subset.js": +/*!*********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/subset.js ***! + \*********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return subset; }); +/* harmony import */ var _superset_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./superset.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/superset.js"); + + +function subset(values, other) { + return Object(_superset_js__WEBPACK_IMPORTED_MODULE_0__["default"])(other, values); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/sum.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/sum.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return sum; }); +function sum(values, valueof) { + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value = +value) { + sum += value; + } + } + } else { + let index = -1; + for (let value of values) { + if (value = +valueof(value, ++index, values)) { + sum += value; + } + } + } + return sum; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/superset.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/superset.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return superset; }); +function superset(values, other) { + const iterator = values[Symbol.iterator](), set = new Set(); + for (const o of other) { + if (set.has(o)) continue; + let value, done; + while (({value, done} = iterator.next())) { + if (done) return false; + set.add(value); + if (Object.is(o, value)) break; + } + } + return true; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/freedmanDiaconis.js": +/*!*****************************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/threshold/freedmanDiaconis.js ***! + \*****************************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/count.js"); +/* harmony import */ var _quantile_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../quantile.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/quantile.js"); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { + return Math.ceil((max - min) / (2 * (Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, 0.75) - Object(_quantile_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values, 0.25)) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values), -1 / 3))); +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/scott.js": +/*!******************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/threshold/scott.js ***! + \******************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/count.js"); +/* harmony import */ var _deviation_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../deviation.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/deviation.js"); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(values, min, max) { + return Math.ceil((max - min) / (3.5 * Object(_deviation_js__WEBPACK_IMPORTED_MODULE_1__["default"])(values) * Math.pow(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values), -1 / 3))); +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/threshold/sturges.js": +/*!********************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/threshold/sturges.js ***! + \********************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _count_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../count.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/count.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(values) { + return Math.ceil(Math.log(Object(_count_js__WEBPACK_IMPORTED_MODULE_0__["default"])(values)) / Math.LN2) + 1; +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/ticks.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/ticks.js ***! + \********************************************************************/ +/*! exports provided: default, tickIncrement, tickStep */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickIncrement", function() { return tickIncrement; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tickStep", function() { return tickStep; }); +var e10 = Math.sqrt(50), + e5 = Math.sqrt(10), + e2 = Math.sqrt(2); + +/* harmony default export */ __webpack_exports__["default"] = (function(start, stop, count) { + var reverse, + i = -1, + n, + ticks, + step; + + stop = +stop, start = +start, count = +count; + if (start === stop && count > 0) return [start]; + if (reverse = stop < start) n = start, start = stop, stop = n; + if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return []; + + if (step > 0) { + start = Math.ceil(start / step); + stop = Math.floor(stop / step); + ticks = new Array(n = Math.ceil(stop - start + 1)); + while (++i < n) ticks[i] = (start + i) * step; + } else { + step = -step; + start = Math.ceil(start * step); + stop = Math.floor(stop * step); + ticks = new Array(n = Math.ceil(stop - start + 1)); + while (++i < n) ticks[i] = (start + i) / step; + } + + if (reverse) ticks.reverse(); + + return ticks; +}); + +function tickIncrement(start, stop, count) { + var step = (stop - start) / Math.max(0, count), + power = Math.floor(Math.log(step) / Math.LN10), + error = step / Math.pow(10, power); + return power >= 0 + ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power) + : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1); +} + +function tickStep(start, stop, count) { + var step0 = Math.abs(stop - start) / Math.max(0, count), + step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)), + error = step0 / step1; + if (error >= e10) step1 *= 10; + else if (error >= e5) step1 *= 5; + else if (error >= e2) step1 *= 2; + return stop < start ? -step1 : step1; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/transpose.js": +/*!************************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/transpose.js ***! + \************************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./min.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/min.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(matrix) { + if (!(n = matrix.length)) return []; + for (var i = -1, m = Object(_min_js__WEBPACK_IMPORTED_MODULE_0__["default"])(matrix, length), transpose = new Array(m); ++i < m;) { + for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) { + row[j] = matrix[j][i]; + } + } + return transpose; +}); + +function length(d) { + return d.length; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/union.js": +/*!********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/union.js ***! + \********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return union; }); +function union(...others) { + const set = new Set(); + for (const other of others) { + for (const o of other) { + set.add(o); + } + } + return set; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/variance.js": +/*!***********************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/variance.js ***! + \***********************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return variance; }); +function variance(values, valueof) { + let count = 0; + let delta; + let mean = 0; + let sum = 0; + if (valueof === undefined) { + for (let value of values) { + if (value != null && (value = +value) >= value) { + delta = value - mean; + mean += delta / ++count; + sum += delta * (value - mean); + } + } + } else { + let index = -1; + for (let value of values) { + if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) { + delta = value - mean; + mean += delta / ++count; + sum += delta * (value - mean); + } + } + } + if (count > 1) return sum / (count - 1); +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/node_modules/d3-array/src/zip.js": +/*!******************************************************************!*\ + !*** ../node_modules/d3-sankey/node_modules/d3-array/src/zip.js ***! + \******************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _transpose_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./transpose.js */ "../node_modules/d3-sankey/node_modules/d3-array/src/transpose.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(_transpose_js__WEBPACK_IMPORTED_MODULE_0__["default"])(arguments); +}); + + +/***/ }), + +/***/ "../node_modules/d3-sankey/src/align.js": +/*!**********************************************!*\ + !*** ../node_modules/d3-sankey/src/align.js ***! + \**********************************************/ +/*! exports provided: left, right, justify, center */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "left", function() { return left; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "right", function() { return right; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "justify", function() { return justify; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "center", function() { return center; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "../node_modules/d3-sankey/node_modules/d3-array/src/index.js"); + + +function targetDepth(d) { + return d.target.depth; +} + +function left(node) { + return node.depth; +} + +function right(node, n) { + return n - 1 - node.height; +} + +function justify(node, n) { + return node.sourceLinks.length ? node.depth : n - 1; +} + +function center(node) { + return node.targetLinks.length ? node.depth + : node.sourceLinks.length ? Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["min"])(node.sourceLinks, targetDepth) - 1 + : 0; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/src/constant.js": +/*!*************************************************!*\ + !*** ../node_modules/d3-sankey/src/constant.js ***! + \*************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return constant; }); +function constant(x) { + return function() { + return x; + }; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/src/index.js": +/*!**********************************************!*\ + !*** ../node_modules/d3-sankey/src/index.js ***! + \**********************************************/ +/*! exports provided: sankey, sankeyCenter, sankeyLeft, sankeyRight, sankeyJustify, sankeyLinkHorizontal */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _sankey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./sankey.js */ "../node_modules/d3-sankey/src/sankey.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sankey", function() { return _sankey_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./align.js */ "../node_modules/d3-sankey/src/align.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sankeyCenter", function() { return _align_js__WEBPACK_IMPORTED_MODULE_1__["center"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sankeyLeft", function() { return _align_js__WEBPACK_IMPORTED_MODULE_1__["left"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sankeyRight", function() { return _align_js__WEBPACK_IMPORTED_MODULE_1__["right"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sankeyJustify", function() { return _align_js__WEBPACK_IMPORTED_MODULE_1__["justify"]; }); + +/* harmony import */ var _sankeyLinkHorizontal_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./sankeyLinkHorizontal.js */ "../node_modules/d3-sankey/src/sankeyLinkHorizontal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "sankeyLinkHorizontal", function() { return _sankeyLinkHorizontal_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + + + + + + +/***/ }), + +/***/ "../node_modules/d3-sankey/src/sankey.js": +/*!***********************************************!*\ + !*** ../node_modules/d3-sankey/src/sankey.js ***! + \***********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return Sankey; }); +/* harmony import */ var d3_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-array */ "../node_modules/d3-sankey/node_modules/d3-array/src/index.js"); +/* harmony import */ var _align_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./align.js */ "../node_modules/d3-sankey/src/align.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-sankey/src/constant.js"); + + + + +function ascendingSourceBreadth(a, b) { + return ascendingBreadth(a.source, b.source) || a.index - b.index; +} + +function ascendingTargetBreadth(a, b) { + return ascendingBreadth(a.target, b.target) || a.index - b.index; +} + +function ascendingBreadth(a, b) { + return a.y0 - b.y0; +} + +function value(d) { + return d.value; +} + +function defaultId(d) { + return d.index; +} + +function defaultNodes(graph) { + return graph.nodes; +} + +function defaultLinks(graph) { + return graph.links; +} + +function find(nodeById, id) { + const node = nodeById.get(id); + if (!node) throw new Error("missing: " + id); + return node; +} + +function computeLinkBreadths({nodes}) { + for (const node of nodes) { + let y0 = node.y0; + let y1 = y0; + for (const link of node.sourceLinks) { + link.y0 = y0 + link.width / 2; + y0 += link.width; + } + for (const link of node.targetLinks) { + link.y1 = y1 + link.width / 2; + y1 += link.width; + } + } +} + +function Sankey() { + let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent + let dx = 24; // nodeWidth + let dy = 8, py; // nodePadding + let id = defaultId; + let align = _align_js__WEBPACK_IMPORTED_MODULE_1__["justify"]; + let sort; + let linkSort; + let nodes = defaultNodes; + let links = defaultLinks; + let iterations = 6; + + function sankey() { + const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)}; + computeNodeLinks(graph); + computeNodeValues(graph); + computeNodeDepths(graph); + computeNodeHeights(graph); + computeNodeBreadths(graph); + computeLinkBreadths(graph); + return graph; + } + + sankey.update = function(graph) { + computeLinkBreadths(graph); + return graph; + }; + + sankey.nodeId = function(_) { + return arguments.length ? (id = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), sankey) : id; + }; + + sankey.nodeAlign = function(_) { + return arguments.length ? (align = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), sankey) : align; + }; + + sankey.nodeSort = function(_) { + return arguments.length ? (sort = _, sankey) : sort; + }; + + sankey.nodeWidth = function(_) { + return arguments.length ? (dx = +_, sankey) : dx; + }; + + sankey.nodePadding = function(_) { + return arguments.length ? (dy = py = +_, sankey) : dy; + }; + + sankey.nodes = function(_) { + return arguments.length ? (nodes = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), sankey) : nodes; + }; + + sankey.links = function(_) { + return arguments.length ? (links = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(_), sankey) : links; + }; + + sankey.linkSort = function(_) { + return arguments.length ? (linkSort = _, sankey) : linkSort; + }; + + sankey.size = function(_) { + return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0]; + }; + + sankey.extent = function(_) { + return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]]; + }; + + sankey.iterations = function(_) { + return arguments.length ? (iterations = +_, sankey) : iterations; + }; + + function computeNodeLinks({nodes, links}) { + for (const [i, node] of nodes.entries()) { + node.index = i; + node.sourceLinks = []; + node.targetLinks = []; + } + const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d])); + for (const [i, link] of links.entries()) { + link.index = i; + let {source, target} = link; + if (typeof source !== "object") source = link.source = find(nodeById, source); + if (typeof target !== "object") target = link.target = find(nodeById, target); + source.sourceLinks.push(link); + target.targetLinks.push(link); + } + if (linkSort != null) { + for (const {sourceLinks, targetLinks} of nodes) { + sourceLinks.sort(linkSort); + targetLinks.sort(linkSort); + } + } + } + + function computeNodeValues({nodes}) { + for (const node of nodes) { + node.value = node.fixedValue === undefined + ? Math.max(Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.sourceLinks, value), Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(node.targetLinks, value)) + : node.fixedValue; + } + } + + function computeNodeDepths({nodes}) { + const n = nodes.length; + let current = new Set(nodes); + let next = new Set; + let x = 0; + while (current.size) { + for (const node of current) { + node.depth = x; + for (const {target} of node.sourceLinks) { + next.add(target); } - function B(t, n, r) { - for (let o = t.length - 2; o >= 0; --o) { - const i = t[o]; - for (const t of i) { - let e = 0, - r = 0; - for (const { target: n, value: o } of t.sourceLinks) { - let i = o * (n.layer - t.layer); - (e += R(t, n) * i), (r += i); - } - if (!(r > 0)) continue; - let o = (e / r - t.y0) * n; - (t.y0 += o), (t.y1 += o), G(t); - } - void 0 === e && i.sort(m), H(i, r); - } + } + if (++x > n) throw new Error("circular link"); + current = next; + next = new Set; + } + } + + function computeNodeHeights({nodes}) { + const n = nodes.length; + let current = new Set(nodes); + let next = new Set; + let x = 0; + while (current.size) { + for (const node of current) { + node.height = x; + for (const {source} of node.targetLinks) { + next.add(source); } - function H(e, n) { - const r = e.length >> 1, - i = e[r]; - z(e, i.y0 - t, r - 1, n), N(e, i.y1 + t, r + 1, n), z(e, a, e.length - 1, n), N(e, o, 0, n); + } + if (++x > n) throw new Error("circular link"); + current = next; + next = new Set; + } + } + + function computeNodeLayers({nodes}) { + const x = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(nodes, d => d.depth) + 1; + const kx = (x1 - x0 - dx) / (x - 1); + const columns = new Array(x); + for (const node of nodes) { + const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x)))); + node.layer = i; + node.x0 = x0 + i * kx; + node.x1 = node.x0 + dx; + if (columns[i]) columns[i].push(node); + else columns[i] = [node]; + } + if (sort) for (const column of columns) { + column.sort(sort); + } + return columns; + } + + function initializeNodeBreadths(columns) { + const ky = Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["min"])(columns, c => (y1 - y0 - (c.length - 1) * py) / Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["sum"])(c, value)); + for (const nodes of columns) { + let y = y0; + for (const node of nodes) { + node.y0 = y; + node.y1 = y + node.value * ky; + y = node.y1 + py; + for (const link of node.sourceLinks) { + link.width = link.value * ky; } - function N(e, n, r, o) { - for (; r < e.length; ++r) { - const i = e[r], - a = (n - i.y0) * o; - a > 1e-6 && ((i.y0 += a), (i.y1 += a)), (n = i.y1 + t); - } + } + y = (y1 - y + py) / (nodes.length + 1); + for (let i = 0; i < nodes.length; ++i) { + const node = nodes[i]; + node.y0 += y * (i + 1); + node.y1 += y * (i + 1); + } + reorderLinks(nodes); + } + } + + function computeNodeBreadths(graph) { + const columns = computeNodeLayers(graph); + py = Math.min(dy, (y1 - y0) / (Object(d3_array__WEBPACK_IMPORTED_MODULE_0__["max"])(columns, c => c.length) - 1)); + initializeNodeBreadths(columns); + for (let i = 0; i < iterations; ++i) { + const alpha = Math.pow(0.99, i); + const beta = Math.max(1 - alpha, (i + 1) / iterations); + relaxRightToLeft(columns, alpha, beta); + relaxLeftToRight(columns, alpha, beta); + } + } + + // Reposition each node based on its incoming (target) links. + function relaxLeftToRight(columns, alpha, beta) { + for (let i = 1, n = columns.length; i < n; ++i) { + const column = columns[i]; + for (const target of column) { + let y = 0; + let w = 0; + for (const {source, value} of target.targetLinks) { + let v = value * (target.layer - source.layer); + y += targetTop(source, target) * v; + w += v; } - function z(e, n, r, o) { - for (; r >= 0; --r) { - const i = e[r], - a = (i.y1 - n) * o; - a > 1e-6 && ((i.y0 -= a), (i.y1 -= a)), (n = i.y0 - t); - } + if (!(w > 0)) continue; + let dy = (y / w - target.y0) * alpha; + target.y0 += dy; + target.y1 += dy; + reorderNodeLinks(target); + } + if (sort === undefined) column.sort(ascendingBreadth); + resolveCollisions(column, beta); + } + } + + // Reposition each node based on its outgoing (source) links. + function relaxRightToLeft(columns, alpha, beta) { + for (let n = columns.length, i = n - 2; i >= 0; --i) { + const column = columns[i]; + for (const source of column) { + let y = 0; + let w = 0; + for (const {target, value} of source.sourceLinks) { + let v = value * (target.layer - source.layer); + y += sourceTop(source, target) * v; + w += v; } - function G({ sourceLinks: t, targetLinks: e }) { - if (void 0 === n) { - for (const { - source: { sourceLinks: t }, - } of e) - t.sort(k); - for (const { - target: { targetLinks: e }, - } of t) - e.sort(v); - } + if (!(w > 0)) continue; + let dy = (y / w - source.y0) * alpha; + source.y0 += dy; + source.y1 += dy; + reorderNodeLinks(source); + } + if (sort === undefined) column.sort(ascendingBreadth); + resolveCollisions(column, beta); + } + } + + function resolveCollisions(nodes, alpha) { + const i = nodes.length >> 1; + const subject = nodes[i]; + resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha); + resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha); + resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha); + resolveCollisionsTopToBottom(nodes, y0, 0, alpha); + } + + // Push any overlapping nodes down. + function resolveCollisionsTopToBottom(nodes, y, i, alpha) { + for (; i < nodes.length; ++i) { + const node = nodes[i]; + const dy = (y - node.y0) * alpha; + if (dy > 1e-6) node.y0 += dy, node.y1 += dy; + y = node.y1 + py; + } + } + + // Push any overlapping nodes up. + function resolveCollisionsBottomToTop(nodes, y, i, alpha) { + for (; i >= 0; --i) { + const node = nodes[i]; + const dy = (node.y1 - y) * alpha; + if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy; + y = node.y0 - py; + } + } + + function reorderNodeLinks({sourceLinks, targetLinks}) { + if (linkSort === undefined) { + for (const {source: {sourceLinks}} of targetLinks) { + sourceLinks.sort(ascendingTargetBreadth); + } + for (const {target: {targetLinks}} of sourceLinks) { + targetLinks.sort(ascendingSourceBreadth); + } + } + } + + function reorderLinks(nodes) { + if (linkSort === undefined) { + for (const {sourceLinks, targetLinks} of nodes) { + sourceLinks.sort(ascendingTargetBreadth); + targetLinks.sort(ascendingSourceBreadth); + } + } + } + + // Returns the target.y0 that would produce an ideal link from source to target. + function targetTop(source, target) { + let y = source.y0 - (source.sourceLinks.length - 1) * py / 2; + for (const {target: node, width} of source.sourceLinks) { + if (node === target) break; + y += width + py; + } + for (const {source: node, width} of target.targetLinks) { + if (node === source) break; + y -= width; + } + return y; + } + + // Returns the source.y0 that would produce an ideal link from source to target. + function sourceTop(source, target) { + let y = target.y0 - (target.targetLinks.length - 1) * py / 2; + for (const {source: node, width} of target.targetLinks) { + if (node === source) break; + y += width + py; + } + for (const {target: node, width} of source.sourceLinks) { + if (node === target) break; + y -= width; + } + return y; + } + + return sankey; +} + + +/***/ }), + +/***/ "../node_modules/d3-sankey/src/sankeyLinkHorizontal.js": +/*!*************************************************************!*\ + !*** ../node_modules/d3-sankey/src/sankeyLinkHorizontal.js ***! + \*************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_shape__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-shape */ "../node_modules/d3-shape/src/index.js"); + + +function horizontalSource(d) { + return [d.source.x1, d.y0]; +} + +function horizontalTarget(d) { + return [d.target.x0, d.y1]; +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return Object(d3_shape__WEBPACK_IMPORTED_MODULE_0__["linkHorizontal"])() + .source(horizontalSource) + .target(horizontalTarget); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/arc.js": +/*!*******************************************!*\ + !*** ../node_modules/d3-shape/src/arc.js ***! + \*******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "../node_modules/d3-path/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./math.js */ "../node_modules/d3-shape/src/math.js"); + + + + +function arcInnerRadius(d) { + return d.innerRadius; +} + +function arcOuterRadius(d) { + return d.outerRadius; +} + +function arcStartAngle(d) { + return d.startAngle; +} + +function arcEndAngle(d) { + return d.endAngle; +} + +function arcPadAngle(d) { + return d && d.padAngle; // Note: optional! +} + +function intersect(x0, y0, x1, y1, x2, y2, x3, y3) { + var x10 = x1 - x0, y10 = y1 - y0, + x32 = x3 - x2, y32 = y3 - y2, + t = y32 * x10 - x32 * y10; + if (t * t < _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) return; + t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t; + return [x0 + t * x10, y0 + t * y10]; +} + +// Compute perpendicular offset line of length rc. +// http://mathworld.wolfram.com/Circle-LineIntersection.html +function cornerTangents(x0, y0, x1, y1, r1, rc, cw) { + var x01 = x0 - x1, + y01 = y0 - y1, + lo = (cw ? rc : -rc) / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["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) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["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; + + // Pick the closer of the two intersection points. + // TODO Is there a faster way to determine which intersection to use? + if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1; + + return { + cx: cx0, + cy: cy0, + x01: -ox, + y01: -oy, + x11: cx0 * (r1 / r - 1), + y11: cy0 * (r1 / r - 1) + }; +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var innerRadius = arcInnerRadius, + outerRadius = arcOuterRadius, + cornerRadius = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), + padRadius = null, + startAngle = arcStartAngle, + endAngle = arcEndAngle, + padAngle = arcPadAngle, + context = null; + + function arc() { + var buffer, + r, + r0 = +innerRadius.apply(this, arguments), + r1 = +outerRadius.apply(this, arguments), + a0 = startAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + a1 = endAngle.apply(this, arguments) - _math_js__WEBPACK_IMPORTED_MODULE_2__["halfPi"], + da = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(a1 - a0), + cw = a1 > a0; + + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); + + // Ensure that the outer radius is always larger than the inner radius. + if (r1 < r0) r = r1, r1 = r0, r0 = r; + + // Is it a point? + if (!(r1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(0, 0); + + // Or is it a circle or annulus? + else if (da > _math_js__WEBPACK_IMPORTED_MODULE_2__["tau"] - _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + context.moveTo(r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a0), r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a0)); + context.arc(0, 0, r1, a0, a1, !cw); + if (r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + context.moveTo(r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a1), r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a1)); + context.arc(0, 0, r0, a1, a0, cw); + } + } + + // Or is it a circular or annular sector? + else { + var a01 = a0, + a11 = a1, + a00 = a0, + a10 = a1, + da0 = da, + da1 = da, + ap = padAngle.apply(this, arguments) / 2, + rp = (ap > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) && (padRadius ? +padRadius.apply(this, arguments) : Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(r0 * r0 + r1 * r1)), + rc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["abs"])(r1 - r0) / 2, +cornerRadius.apply(this, arguments)), + rc0 = rc, + rc1 = rc, + t0, + t1; + + // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0. + if (rp > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + var p0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)), + p1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["asin"])(rp / r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(ap)); + if ((da0 -= p0 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0; + else da0 = 0, a00 = a10 = (a0 + a1) / 2; + if ((da1 -= p1 * 2) > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1; + else da1 = 0, a01 = a11 = (a0 + a1) / 2; + } + + var x01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a01), + y01 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a01), + x10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a10), + y10 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a10); + + // Apply rounded corners? + if (rc > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + var x11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a11), + y11 = r1 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a11), + x00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a00), + y00 = r0 * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a00), + oc; + + // Restrict the corner radius according to the sector angle. + if (da < _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) { + var ax = x01 - oc[0], + ay = y01 - oc[1], + bx = x11 - oc[0], + by = y11 - oc[1], + kc = 1 / Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["acos"])((ax * bx + ay * by) / (Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(ax * ax + ay * ay) * Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(bx * bx + by * by))) / 2), + lc = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sqrt"])(oc[0] * oc[0] + oc[1] * oc[1]); + rc0 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r0 - lc) / (kc - 1)); + rc1 = Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["min"])(rc, (r1 - lc) / (kc + 1)); } - function I(t) { - if (void 0 === n) for (const { sourceLinks: e, targetLinks: n } of t) e.sort(k), n.sort(v); + } + + // Is the sector collapsed to a line? + if (!(da1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.moveTo(x01, y01); + + // Does the sector’s outer ring have rounded corners? + else if (rc1 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw); + t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw); + + context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01); + + // Have the corners merged? + if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); + + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); + context.arc(0, 0, r1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), !cw); + context.arc(t1.cx, t1.cy, rc1, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); } - function J(e, n) { - let r = e.y0 - ((e.sourceLinks.length - 1) * t) / 2; - for (const { target: o, width: i } of e.sourceLinks) { - if (o === n) break; - r += i + t; - } - for (const { source: t, width: o } of n.targetLinks) { - if (t === e) break; - r -= o; - } - return r; + } + + // Or is the outer ring just a circular arc? + else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw); + + // Is there no inner ring, and it’s a circular sector? + // Or perhaps it’s an annular sector collapsed due to padding? + if (!(r0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) || !(da0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"])) context.lineTo(x10, y10); + + // Does the sector’s inner ring (or point) have rounded corners? + else if (rc0 > _math_js__WEBPACK_IMPORTED_MODULE_2__["epsilon"]) { + t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw); + t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw); + + context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01); + + // Have the corners merged? + if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); + + // Otherwise, draw the two corners and the ring. + else { + context.arc(t0.cx, t0.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y01, t0.x01), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.y11, t0.x11), !cw); + context.arc(0, 0, r0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t0.cy + t0.y11, t0.cx + t0.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.cy + t1.y11, t1.cx + t1.x11), cw); + context.arc(t1.cx, t1.cy, rc0, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y11, t1.x11), Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["atan2"])(t1.y01, t1.x01), !cw); } - function R(e, n) { - let r = n.y0 - ((n.targetLinks.length - 1) * t) / 2; - for (const { source: o, width: i } of n.targetLinks) { - if (o === e) break; - r += i + t; - } - for (const { target: t, width: o } of e.sourceLinks) { - if (t === n) break; - r -= o; + } + + // Or is the inner ring just a circular arc? + else context.arc(0, 0, r0, a10, a00, cw); + } + + context.closePath(); + + if (buffer) return context = null, buffer + "" || null; + } + + arc.centroid = function() { + var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2, + a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - _math_js__WEBPACK_IMPORTED_MODULE_2__["pi"] / 2; + return [Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["cos"])(a) * r, Object(_math_js__WEBPACK_IMPORTED_MODULE_2__["sin"])(a) * r]; + }; + + arc.innerRadius = function(_) { + return arguments.length ? (innerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : innerRadius; + }; + + arc.outerRadius = function(_) { + return arguments.length ? (outerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : outerRadius; + }; + + arc.cornerRadius = function(_) { + return arguments.length ? (cornerRadius = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : cornerRadius; + }; + + arc.padRadius = function(_) { + return arguments.length ? (padRadius = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padRadius; + }; + + arc.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : startAngle; + }; + + arc.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : endAngle; + }; + + arc.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), arc) : padAngle; + }; + + arc.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), arc) : context; + }; + + return arc; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/area.js": +/*!********************************************!*\ + !*** ../node_modules/d3-shape/src/area.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "../node_modules/d3-path/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "../node_modules/d3-shape/src/curve/linear.js"); +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./line.js */ "../node_modules/d3-shape/src/line.js"); +/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./point.js */ "../node_modules/d3-shape/src/point.js"); + + + + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x0 = _point_js__WEBPACK_IMPORTED_MODULE_4__["x"], + x1 = null, + y0 = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(0), + y1 = _point_js__WEBPACK_IMPORTED_MODULE_4__["y"], + defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true), + context = null, + curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"], + output = null; + + function area(data) { + var i, + j, + k, + n = data.length, + d, + defined0 = false, + buffer, + x0z = new Array(n), + y0z = new Array(n); + + if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); + + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) { + j = i; + output.areaStart(); + output.lineStart(); + } else { + output.lineEnd(); + output.lineStart(); + for (k = i - 1; k >= j; --k) { + output.point(x0z[k], y0z[k]); } - return r; + output.lineEnd(); + output.areaEnd(); } - return ( - (O.update = function (t) { - return A(t), t; - }), - (O.nodeId = function (t) { - return arguments.length ? ((f = 'function' == typeof t ? t : p(t)), O) : f; - }), - (O.nodeAlign = function (t) { - return arguments.length ? ((d = 'function' == typeof t ? t : p(t)), O) : d; - }), - (O.nodeSort = function (t) { - return arguments.length ? ((e = t), O) : e; - }), - (O.nodeWidth = function (t) { - return arguments.length ? ((s = +t), O) : s; - }), - (O.nodePadding = function (e) { - return arguments.length ? ((u = t = +e), O) : u; - }), - (O.nodes = function (t) { - return arguments.length ? ((g = 'function' == typeof t ? t : p(t)), O) : g; - }), - (O.links = function (t) { - return arguments.length ? ((_ = 'function' == typeof t ? t : p(t)), O) : _; - }), - (O.linkSort = function (t) { - return arguments.length ? ((n = t), O) : n; - }), - (O.size = function (t) { - return arguments.length ? ((r = o = 0), (i = +t[0]), (a = +t[1]), O) : [i - r, a - o]; - }), - (O.extent = function (t) { - return arguments.length - ? ((r = +t[0][0]), (i = +t[1][0]), (o = +t[0][1]), (a = +t[1][1]), O) - : [ - [r, o], - [i, a], - ]; - }), - (O.iterations = function (t) { - return arguments.length ? ((M = +t), O) : M; - }), - O + } + if (defined0) { + x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data); + output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]); + } + } + + if (buffer) return output = null, buffer + "" || null; + } + + function arealine() { + return Object(_line_js__WEBPACK_IMPORTED_MODULE_3__["default"])().defined(defined).curve(curve).context(context); + } + + area.x = function(_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), x1 = null, area) : x0; + }; + + area.x0 = function(_) { + return arguments.length ? (x0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x0; + }; + + area.x1 = function(_) { + return arguments.length ? (x1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : x1; + }; + + area.y = function(_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), y1 = null, area) : y0; + }; + + area.y0 = function(_) { + return arguments.length ? (y0 = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y0; + }; + + area.y1 = function(_) { + return arguments.length ? (y1 = _ == null ? null : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), area) : y1; + }; + + area.lineX0 = + area.lineY0 = function() { + return arealine().x(x0).y(y0); + }; + + area.lineY1 = function() { + return arealine().x(x0).y(y1); + }; + + area.lineX1 = function() { + return arealine().x(x1).y(y0); + }; + + area.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), area) : defined; + }; + + area.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve; + }; + + area.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context; + }; + + return area; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/areaRadial.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/areaRadial.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "../node_modules/d3-shape/src/curve/radial.js"); +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "../node_modules/d3-shape/src/area.js"); +/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./lineRadial.js */ "../node_modules/d3-shape/src/lineRadial.js"); + + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var a = Object(_area_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"]), + c = a.curve, + x0 = a.lineX0, + x1 = a.lineX1, + y0 = a.lineY0, + y1 = a.lineY1; + + a.angle = a.x, delete a.x; + a.startAngle = a.x0, delete a.x0; + a.endAngle = a.x1, delete a.x1; + a.radius = a.y, delete a.y; + a.innerRadius = a.y0, delete a.y0; + a.outerRadius = a.y1, delete a.y1; + a.lineStartAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x0()); }, delete a.lineX0; + a.lineEndAngle = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(x1()); }, delete a.lineX1; + a.lineInnerRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y0()); }, delete a.lineY0; + a.lineOuterRadius = function() { return Object(_lineRadial_js__WEBPACK_IMPORTED_MODULE_2__["lineRadial"])(y1()); }, delete a.lineY1; + + a.curve = function(_) { + return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; + }; + + return a; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/array.js": +/*!*********************************************!*\ + !*** ../node_modules/d3-shape/src/array.js ***! + \*********************************************/ +/*! exports provided: slice */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "slice", function() { return slice; }); +var slice = Array.prototype.slice; + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/constant.js": +/*!************************************************!*\ + !*** ../node_modules/d3-shape/src/constant.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x) { + return function constant() { + return x; + }; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/basis.js": +/*!***************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/basis.js ***! + \***************************************************/ +/*! exports provided: point, Basis, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Basis", function() { return Basis; }); +function point(that, x, y) { + that._context.bezierCurveTo( + (2 * that._x0 + that._x1) / 3, + (2 * that._y0 + that._y1) / 3, + (that._x0 + 2 * that._x1) / 3, + (that._y0 + 2 * that._y1) / 3, + (that._x0 + 4 * that._x1 + x) / 6, + (that._y0 + 4 * that._y1 + y) / 6 + ); +} + +function Basis(context) { + this._context = context; +} + +Basis.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 3: point(this, this._x1, this._y1); // proceed + case 2: this._context.lineTo(this._x1, this._y1); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Basis(context); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/basisClosed.js": +/*!*********************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/basisClosed.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "../node_modules/d3-shape/src/noop.js"); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./basis.js */ "../node_modules/d3-shape/src/curve/basis.js"); + + + +function BasisClosed(context) { + this._context = context; +} + +BasisClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x2, this._y2); + this._context.closePath(); + break; + } + case 2: { + this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3); + this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x2, this._y2); + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._x2 = x, this._y2 = y; break; + case 1: this._point = 2; this._x3 = x, this._y3 = y; break; + case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break; + default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new BasisClosed(context); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/basisOpen.js": +/*!*******************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/basisOpen.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "../node_modules/d3-shape/src/curve/basis.js"); + + +function BasisOpen(context) { + this._context = context; +} + +BasisOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break; + case 3: this._point = 4; // proceed + default: Object(_basis_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new BasisOpen(context); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/bundle.js": +/*!****************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/bundle.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _basis_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./basis.js */ "../node_modules/d3-shape/src/curve/basis.js"); + + +function Bundle(context, beta) { + this._basis = new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context); + this._beta = beta; +} + +Bundle.prototype = { + lineStart: function() { + this._x = []; + this._y = []; + this._basis.lineStart(); + }, + lineEnd: function() { + var x = this._x, + y = this._y, + j = x.length - 1; + + if (j > 0) { + var x0 = x[0], + y0 = y[0], + dx = x[j] - x0, + dy = y[j] - y0, + i = -1, + t; + + while (++i <= j) { + t = i / j; + this._basis.point( + this._beta * x[i] + (1 - this._beta) * (x0 + t * dx), + this._beta * y[i] + (1 - this._beta) * (y0 + t * dy) ); } - var O = Math.PI, - T = 2 * O, - j = T - 1e-6; - function C() { - (this._x0 = this._y0 = this._x1 = this._y1 = null), (this._ = ''); - } - function P() { - return new C(); - } - C.prototype = P.prototype = { - constructor: C, - moveTo: function (t, e) { - this._ += 'M' + (this._x0 = this._x1 = +t) + ',' + (this._y0 = this._y1 = +e); - }, - closePath: function () { - null !== this._x1 && ((this._x1 = this._x0), (this._y1 = this._y0), (this._ += 'Z')); - }, - lineTo: function (t, e) { - this._ += 'L' + (this._x1 = +t) + ',' + (this._y1 = +e); - }, - quadraticCurveTo: function (t, e, n, r) { - this._ += 'Q' + +t + ',' + +e + ',' + (this._x1 = +n) + ',' + (this._y1 = +r); - }, - bezierCurveTo: function (t, e, n, r, o, i) { - this._ += 'C' + +t + ',' + +e + ',' + +n + ',' + +r + ',' + (this._x1 = +o) + ',' + (this._y1 = +i); - }, - arcTo: function (t, e, n, r, o) { - (t = +t), (e = +e), (n = +n), (r = +r), (o = +o); - var i = this._x1, - a = this._y1, - s = n - t, - u = r - e, - l = i - t, - c = a - e, - h = l * l + c * c; - if (o < 0) throw new Error('negative radius: ' + o); - if (null === this._x1) this._ += 'M' + (this._x1 = t) + ',' + (this._y1 = e); - else if (h > 1e-6) - if (Math.abs(c * s - u * l) > 1e-6 && o) { - var f = n - i, - d = r - a, - g = s * s + u * u, - y = f * f + d * d, - _ = Math.sqrt(g), - p = Math.sqrt(h), - v = o * Math.tan((O - Math.acos((g + h - y) / (2 * _ * p))) / 2), - k = v / p, - m = v / _; - Math.abs(k - 1) > 1e-6 && (this._ += 'L' + (t + k * l) + ',' + (e + k * c)), - (this._ += - 'A' + - o + - ',' + - o + - ',0,0,' + - +(c * f > l * d) + - ',' + - (this._x1 = t + m * s) + - ',' + - (this._y1 = e + m * u)); - } else this._ += 'L' + (this._x1 = t) + ',' + (this._y1 = e); - else; - }, - arc: function (t, e, n, r, o, i) { - (t = +t), (e = +e), (i = !!i); - var a = (n = +n) * Math.cos(r), - s = n * Math.sin(r), - u = t + a, - l = e + s, - c = 1 ^ i, - h = i ? r - o : o - r; - if (n < 0) throw new Error('negative radius: ' + n); - null === this._x1 - ? (this._ += 'M' + u + ',' + l) - : (Math.abs(this._x1 - u) > 1e-6 || Math.abs(this._y1 - l) > 1e-6) && (this._ += 'L' + u + ',' + l), - n && - (h < 0 && (h = (h % T) + T), - h > j - ? (this._ += - 'A' + - n + - ',' + - n + - ',0,1,' + - c + - ',' + - (t - a) + - ',' + - (e - s) + - 'A' + - n + - ',' + - n + - ',0,1,' + - c + - ',' + - (this._x1 = u) + - ',' + - (this._y1 = l)) - : h > 1e-6 && - (this._ += - 'A' + - n + - ',' + - n + - ',0,' + - +(h >= O) + - ',' + - c + - ',' + - (this._x1 = t + n * Math.cos(o)) + - ',' + - (this._y1 = e + n * Math.sin(o)))); - }, - rect: function (t, e, n, r) { - this._ += - 'M' + (this._x0 = this._x1 = +t) + ',' + (this._y0 = this._y1 = +e) + 'h' + +n + 'v' + +r + 'h' + -n + 'Z'; - }, - toString: function () { - return this._; - }, - }; - var V = P, - E = Array.prototype.slice, - B = function (t) { - return function () { - return t; - }; - }; - function H(t) { - return t[0]; - } - function N(t) { - return t[1]; - } - function z(t) { - return t.source; - } - function G(t) { - return t.target; - } - function I(t) { - var e = z, - n = G, - r = H, - o = N, - i = null; - function a() { - var a, - s = E.call(arguments), - u = e.apply(this, s), - l = n.apply(this, s); - if ( - (i || (i = a = V()), - t( - i, - +r.apply(this, ((s[0] = u), s)), - +o.apply(this, s), - +r.apply(this, ((s[0] = l), s)), - +o.apply(this, s) - ), - a) - ) - return (i = null), a + '' || null; + } + + this._x = this._y = null; + this._basis.lineEnd(); + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(beta) { + + function bundle(context) { + return beta === 1 ? new _basis_js__WEBPACK_IMPORTED_MODULE_0__["Basis"](context) : new Bundle(context, beta); + } + + bundle.beta = function(beta) { + return custom(+beta); + }; + + return bundle; +})(0.85)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/cardinal.js": +/*!******************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/cardinal.js ***! + \******************************************************/ +/*! exports provided: point, Cardinal, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Cardinal", function() { return Cardinal; }); +function point(that, x, y) { + that._context.bezierCurveTo( + that._x1 + that._k * (that._x2 - that._x0), + that._y1 + that._k * (that._y2 - that._y0), + that._x2 + that._k * (that._x1 - x), + that._y2 + that._k * (that._y1 - y), + that._x2, + that._y2 + ); +} + +function Cardinal(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +Cardinal.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x2, this._y2); break; + case 3: point(this, this._x1, this._y1); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; this._x1 = x, this._y1 = y; break; + case 2: this._point = 3; // proceed + default: point(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { + + function cardinal(context) { + return new Cardinal(context, tension); + } + + cardinal.tension = function(tension) { + return custom(+tension); + }; + + return cardinal; +})(0)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/cardinalClosed.js": +/*!************************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/cardinalClosed.js ***! + \************************************************************/ +/*! exports provided: CardinalClosed, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalClosed", function() { return CardinalClosed; }); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "../node_modules/d3-shape/src/noop.js"); +/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "../node_modules/d3-shape/src/curve/cardinal.js"); + + + +function CardinalClosed(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +CardinalClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._x3 = x, this._y3 = y; break; + case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; + case 2: this._point = 3; this._x5 = x, this._y5 = y; break; + default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { + + function cardinal(context) { + return new CardinalClosed(context, tension); + } + + cardinal.tension = function(tension) { + return custom(+tension); + }; + + return cardinal; +})(0)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/cardinalOpen.js": +/*!**********************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/cardinalOpen.js ***! + \**********************************************************/ +/*! exports provided: CardinalOpen, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CardinalOpen", function() { return CardinalOpen; }); +/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinal.js */ "../node_modules/d3-shape/src/curve/cardinal.js"); + + +function CardinalOpen(context, tension) { + this._context = context; + this._k = (1 - tension) / 6; +} + +CardinalOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; + case 3: this._point = 4; // proceed + default: Object(_cardinal_js__WEBPACK_IMPORTED_MODULE_0__["point"])(this, x, y); break; + } + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(tension) { + + function cardinal(context) { + return new CardinalOpen(context, tension); + } + + cardinal.tension = function(tension) { + return custom(+tension); + }; + + return cardinal; +})(0)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/catmullRom.js": +/*!********************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/catmullRom.js ***! + \********************************************************/ +/*! exports provided: point, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "point", function() { return point; }); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "../node_modules/d3-shape/src/math.js"); +/* harmony import */ var _cardinal_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./cardinal.js */ "../node_modules/d3-shape/src/curve/cardinal.js"); + + + +function point(that, x, y) { + var x1 = that._x1, + y1 = that._y1, + x2 = that._x2, + y2 = that._y2; + + if (that._l01_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { + var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a, + n = 3 * that._l01_a * (that._l01_a + that._l12_a); + x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n; + y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n; + } + + if (that._l23_a > _math_js__WEBPACK_IMPORTED_MODULE_0__["epsilon"]) { + var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a, + m = 3 * that._l23_a * (that._l23_a + that._l12_a); + x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m; + y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m; + } + + that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2); +} + +function CatmullRom(context, alpha) { + this._context = context; + this._alpha = alpha; +} + +CatmullRom.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x2, this._y2); break; + case 3: this.point(this._x2, this._y2); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; // proceed + default: point(this, x, y); break; + } + + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { + + function catmullRom(context) { + return alpha ? new CatmullRom(context, alpha) : new _cardinal_js__WEBPACK_IMPORTED_MODULE_1__["Cardinal"](context, 0); + } + + catmullRom.alpha = function(alpha) { + return custom(+alpha); + }; + + return catmullRom; +})(0.5)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/catmullRomClosed.js": +/*!**************************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/catmullRomClosed.js ***! + \**************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalClosed.js */ "../node_modules/d3-shape/src/curve/cardinalClosed.js"); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../noop.js */ "../node_modules/d3-shape/src/noop.js"); +/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./catmullRom.js */ "../node_modules/d3-shape/src/curve/catmullRom.js"); + + + + +function CatmullRomClosed(context, alpha) { + this._context = context; + this._alpha = alpha; +} + +CatmullRomClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_1__["default"], + lineStart: function() { + this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 = + this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 1: { + this._context.moveTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 2: { + this._context.lineTo(this._x3, this._y3); + this._context.closePath(); + break; + } + case 3: { + this.point(this._x3, this._y3); + this.point(this._x4, this._y4); + this.point(this._x5, this._y5); + break; + } + } + }, + point: function(x, y) { + x = +x, y = +y; + + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + + switch (this._point) { + case 0: this._point = 1; this._x3 = x, this._y3 = y; break; + case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break; + case 2: this._point = 3; this._x5 = x, this._y5 = y; break; + default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_2__["point"])(this, x, y); break; + } + + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { + + function catmullRom(context) { + return alpha ? new CatmullRomClosed(context, alpha) : new _cardinalClosed_js__WEBPACK_IMPORTED_MODULE_0__["CardinalClosed"](context, 0); + } + + catmullRom.alpha = function(alpha) { + return custom(+alpha); + }; + + return catmullRom; +})(0.5)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/catmullRomOpen.js": +/*!************************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/catmullRomOpen.js ***! + \************************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./cardinalOpen.js */ "../node_modules/d3-shape/src/curve/cardinalOpen.js"); +/* harmony import */ var _catmullRom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./catmullRom.js */ "../node_modules/d3-shape/src/curve/catmullRom.js"); + + + +function CatmullRomOpen(context, alpha) { + this._context = context; + this._alpha = alpha; +} + +CatmullRomOpen.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = this._x2 = + this._y0 = this._y1 = this._y2 = NaN; + this._l01_a = this._l12_a = this._l23_a = + this._l01_2a = this._l12_2a = this._l23_2a = + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + + if (this._point) { + var x23 = this._x2 - x, + y23 = this._y2 - y; + this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha)); + } + + switch (this._point) { + case 0: this._point = 1; break; + case 1: this._point = 2; break; + case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break; + case 3: this._point = 4; // proceed + default: Object(_catmullRom_js__WEBPACK_IMPORTED_MODULE_1__["point"])(this, x, y); break; + } + + this._l01_a = this._l12_a, this._l12_a = this._l23_a; + this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a; + this._x0 = this._x1, this._x1 = this._x2, this._x2 = x; + this._y0 = this._y1, this._y1 = this._y2, this._y2 = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = ((function custom(alpha) { + + function catmullRom(context) { + return alpha ? new CatmullRomOpen(context, alpha) : new _cardinalOpen_js__WEBPACK_IMPORTED_MODULE_0__["CardinalOpen"](context, 0); + } + + catmullRom.alpha = function(alpha) { + return custom(+alpha); + }; + + return catmullRom; +})(0.5)); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/linear.js": +/*!****************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/linear.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function Linear(context) { + this._context = context; +} + +Linear.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; // proceed + default: this._context.lineTo(x, y); break; + } + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Linear(context); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/linearClosed.js": +/*!**********************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/linearClosed.js ***! + \**********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _noop_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../noop.js */ "../node_modules/d3-shape/src/noop.js"); + + +function LinearClosed(context) { + this._context = context; +} + +LinearClosed.prototype = { + areaStart: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + areaEnd: _noop_js__WEBPACK_IMPORTED_MODULE_0__["default"], + lineStart: function() { + this._point = 0; + }, + lineEnd: function() { + if (this._point) this._context.closePath(); + }, + point: function(x, y) { + x = +x, y = +y; + if (this._point) this._context.lineTo(x, y); + else this._point = 1, this._context.moveTo(x, y); + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new LinearClosed(context); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/monotone.js": +/*!******************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/monotone.js ***! + \******************************************************/ +/*! exports provided: monotoneX, monotoneY */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneX", function() { return monotoneX; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "monotoneY", function() { return monotoneY; }); +function sign(x) { + return x < 0 ? -1 : 1; +} + +// Calculate the slopes of the tangents (Hermite-type interpolation) based on +// the following paper: Steffen, M. 1990. A Simple Method for Monotonic +// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO. +// NOV(II), P. 443, 1990. +function slope3(that, x2, y2) { + var h0 = that._x1 - that._x0, + h1 = x2 - that._x1, + s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0), + s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0), + p = (s0 * h1 + s1 * h0) / (h0 + h1); + return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0; +} + +// Calculate a one-sided slope. +function slope2(that, t) { + var h = that._x1 - that._x0; + return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t; +} + +// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations +// "you can express cubic Hermite interpolation in terms of cubic Bézier curves +// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1". +function point(that, t0, t1) { + var x0 = that._x0, + y0 = that._y0, + x1 = that._x1, + y1 = that._y1, + dx = (x1 - x0) / 3; + that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1); +} + +function MonotoneX(context) { + this._context = context; +} + +MonotoneX.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x0 = this._x1 = + this._y0 = this._y1 = + this._t0 = NaN; + this._point = 0; + }, + lineEnd: function() { + switch (this._point) { + case 2: this._context.lineTo(this._x1, this._y1); break; + case 3: point(this, this._t0, slope2(this, this._t0)); break; + } + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + this._line = 1 - this._line; + }, + point: function(x, y) { + var t1 = NaN; + + x = +x, y = +y; + if (x === this._x1 && y === this._y1) return; // Ignore coincident points. + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; break; + case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break; + default: point(this, this._t0, t1 = slope3(this, x, y)); break; + } + + this._x0 = this._x1, this._x1 = x; + this._y0 = this._y1, this._y1 = y; + this._t0 = t1; + } +} + +function MonotoneY(context) { + this._context = new ReflectContext(context); +} + +(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) { + MonotoneX.prototype.point.call(this, y, x); +}; + +function ReflectContext(context) { + this._context = context; +} + +ReflectContext.prototype = { + moveTo: function(x, y) { this._context.moveTo(y, x); }, + closePath: function() { this._context.closePath(); }, + lineTo: function(x, y) { this._context.lineTo(y, x); }, + bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); } +}; + +function monotoneX(context) { + return new MonotoneX(context); +} + +function monotoneY(context) { + return new MonotoneY(context); +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/natural.js": +/*!*****************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/natural.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +function Natural(context) { + this._context = context; +} + +Natural.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = []; + this._y = []; + }, + lineEnd: function() { + var x = this._x, + y = this._y, + n = x.length; + + if (n) { + this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]); + if (n === 2) { + this._context.lineTo(x[1], y[1]); + } else { + var px = controlPoints(x), + py = controlPoints(y); + for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) { + this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]); } - return ( - (a.source = function (t) { - return arguments.length ? ((e = t), a) : e; - }), - (a.target = function (t) { - return arguments.length ? ((n = t), a) : n; - }), - (a.x = function (t) { - return arguments.length ? ((r = 'function' == typeof t ? t : B(+t)), a) : r; - }), - (a.y = function (t) { - return arguments.length ? ((o = 'function' == typeof t ? t : B(+t)), a) : o; - }), - (a.context = function (t) { - return arguments.length ? ((i = null == t ? null : t), a) : i; - }), - a - ); } - function J(t, e, n, r, o) { - t.moveTo(e, n), t.bezierCurveTo((e = (e + r) / 2), n, e, o, r, o); + } + + if (this._line || (this._line !== 0 && n === 1)) this._context.closePath(); + this._line = 1 - this._line; + this._x = this._y = null; + }, + point: function(x, y) { + this._x.push(+x); + this._y.push(+y); + } +}; + +// See https://www.particleincell.com/2012/bezier-splines/ for derivation. +function controlPoints(x) { + var i, + n = x.length - 1, + m, + a = new Array(n), + b = new Array(n), + r = new Array(n); + a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1]; + for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1]; + a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n]; + for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1]; + a[n - 1] = r[n - 1] / b[n - 1]; + for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i]; + b[n - 1] = (x[n] + a[n - 1]) / 2; + for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1]; + return [a, b]; +} + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Natural(context); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/radial.js": +/*!****************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/radial.js ***! + \****************************************************/ +/*! exports provided: curveRadialLinear, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "curveRadialLinear", function() { return curveRadialLinear; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return curveRadial; }); +/* harmony import */ var _linear_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./linear.js */ "../node_modules/d3-shape/src/curve/linear.js"); + + +var curveRadialLinear = curveRadial(_linear_js__WEBPACK_IMPORTED_MODULE_0__["default"]); + +function Radial(curve) { + this._curve = curve; +} + +Radial.prototype = { + areaStart: function() { + this._curve.areaStart(); + }, + areaEnd: function() { + this._curve.areaEnd(); + }, + lineStart: function() { + this._curve.lineStart(); + }, + lineEnd: function() { + this._curve.lineEnd(); + }, + point: function(a, r) { + this._curve.point(r * Math.sin(a), r * -Math.cos(a)); + } +}; + +function curveRadial(curve) { + + function radial(context) { + return new Radial(curve(context)); + } + + radial._curve = curve; + + return radial; +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/curve/step.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/curve/step.js ***! + \**************************************************/ +/*! exports provided: default, stepBefore, stepAfter */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepBefore", function() { return stepBefore; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stepAfter", function() { return stepAfter; }); +function Step(context, t) { + this._context = context; + this._t = t; +} + +Step.prototype = { + areaStart: function() { + this._line = 0; + }, + areaEnd: function() { + this._line = NaN; + }, + lineStart: function() { + this._x = this._y = NaN; + this._point = 0; + }, + lineEnd: function() { + if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y); + if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath(); + if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line; + }, + point: function(x, y) { + x = +x, y = +y; + switch (this._point) { + case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break; + case 1: this._point = 2; // proceed + default: { + if (this._t <= 0) { + this._context.lineTo(this._x, y); + this._context.lineTo(x, y); + } else { + var x1 = this._x * (1 - this._t) + x * this._t; + this._context.lineTo(x1, this._y); + this._context.lineTo(x1, y); + } + break; + } + } + this._x = x, this._y = y; + } +}; + +/* harmony default export */ __webpack_exports__["default"] = (function(context) { + return new Step(context, 0.5); +}); + +function stepBefore(context) { + return new Step(context, 0); +} + +function stepAfter(context) { + return new Step(context, 1); +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/descending.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/descending.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(a, b) { + return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/identity.js": +/*!************************************************!*\ + !*** ../node_modules/d3-shape/src/identity.js ***! + \************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(d) { + return d; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/index.js": +/*!*********************************************!*\ + !*** ../node_modules/d3-shape/src/index.js ***! + \*********************************************/ +/*! exports provided: arc, area, line, pie, areaRadial, radialArea, lineRadial, radialLine, pointRadial, linkHorizontal, linkVertical, linkRadial, symbol, symbols, symbolCircle, symbolCross, symbolDiamond, symbolSquare, symbolStar, symbolTriangle, symbolWye, curveBasisClosed, curveBasisOpen, curveBasis, curveBundle, curveCardinalClosed, curveCardinalOpen, curveCardinal, curveCatmullRomClosed, curveCatmullRomOpen, curveCatmullRom, curveLinearClosed, curveLinear, curveMonotoneX, curveMonotoneY, curveNatural, curveStep, curveStepAfter, curveStepBefore, stack, stackOffsetExpand, stackOffsetDiverging, stackOffsetNone, stackOffsetSilhouette, stackOffsetWiggle, stackOrderAppearance, stackOrderAscending, stackOrderDescending, stackOrderInsideOut, stackOrderNone, stackOrderReverse */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _arc_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./arc.js */ "../node_modules/d3-shape/src/arc.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "arc", function() { return _arc_js__WEBPACK_IMPORTED_MODULE_0__["default"]; }); + +/* harmony import */ var _area_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./area.js */ "../node_modules/d3-shape/src/area.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "area", function() { return _area_js__WEBPACK_IMPORTED_MODULE_1__["default"]; }); + +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./line.js */ "../node_modules/d3-shape/src/line.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "line", function() { return _line_js__WEBPACK_IMPORTED_MODULE_2__["default"]; }); + +/* harmony import */ var _pie_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./pie.js */ "../node_modules/d3-shape/src/pie.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pie", function() { return _pie_js__WEBPACK_IMPORTED_MODULE_3__["default"]; }); + +/* harmony import */ var _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./areaRadial.js */ "../node_modules/d3-shape/src/areaRadial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "areaRadial", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialArea", function() { return _areaRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"]; }); + +/* harmony import */ var _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./lineRadial.js */ "../node_modules/d3-shape/src/lineRadial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "radialLine", function() { return _lineRadial_js__WEBPACK_IMPORTED_MODULE_5__["default"]; }); + +/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./pointRadial.js */ "../node_modules/d3-shape/src/pointRadial.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "pointRadial", function() { return _pointRadial_js__WEBPACK_IMPORTED_MODULE_6__["default"]; }); + +/* harmony import */ var _link_index_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./link/index.js */ "../node_modules/d3-shape/src/link/index.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkHorizontal"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkVertical"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return _link_index_js__WEBPACK_IMPORTED_MODULE_7__["linkRadial"]; }); + +/* harmony import */ var _symbol_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./symbol.js */ "../node_modules/d3-shape/src/symbol.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbol", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return _symbol_js__WEBPACK_IMPORTED_MODULE_8__["symbols"]; }); + +/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./symbol/circle.js */ "../node_modules/d3-shape/src/symbol/circle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCircle", function() { return _symbol_circle_js__WEBPACK_IMPORTED_MODULE_9__["default"]; }); + +/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./symbol/cross.js */ "../node_modules/d3-shape/src/symbol/cross.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolCross", function() { return _symbol_cross_js__WEBPACK_IMPORTED_MODULE_10__["default"]; }); + +/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./symbol/diamond.js */ "../node_modules/d3-shape/src/symbol/diamond.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolDiamond", function() { return _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_11__["default"]; }); + +/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./symbol/square.js */ "../node_modules/d3-shape/src/symbol/square.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolSquare", function() { return _symbol_square_js__WEBPACK_IMPORTED_MODULE_12__["default"]; }); + +/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./symbol/star.js */ "../node_modules/d3-shape/src/symbol/star.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolStar", function() { return _symbol_star_js__WEBPACK_IMPORTED_MODULE_13__["default"]; }); + +/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./symbol/triangle.js */ "../node_modules/d3-shape/src/symbol/triangle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolTriangle", function() { return _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_14__["default"]; }); + +/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./symbol/wye.js */ "../node_modules/d3-shape/src/symbol/wye.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "symbolWye", function() { return _symbol_wye_js__WEBPACK_IMPORTED_MODULE_15__["default"]; }); + +/* harmony import */ var _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./curve/basisClosed.js */ "../node_modules/d3-shape/src/curve/basisClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisClosed", function() { return _curve_basisClosed_js__WEBPACK_IMPORTED_MODULE_16__["default"]; }); + +/* harmony import */ var _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./curve/basisOpen.js */ "../node_modules/d3-shape/src/curve/basisOpen.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasisOpen", function() { return _curve_basisOpen_js__WEBPACK_IMPORTED_MODULE_17__["default"]; }); + +/* harmony import */ var _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./curve/basis.js */ "../node_modules/d3-shape/src/curve/basis.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBasis", function() { return _curve_basis_js__WEBPACK_IMPORTED_MODULE_18__["default"]; }); + +/* harmony import */ var _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./curve/bundle.js */ "../node_modules/d3-shape/src/curve/bundle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveBundle", function() { return _curve_bundle_js__WEBPACK_IMPORTED_MODULE_19__["default"]; }); + +/* harmony import */ var _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./curve/cardinalClosed.js */ "../node_modules/d3-shape/src/curve/cardinalClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalClosed", function() { return _curve_cardinalClosed_js__WEBPACK_IMPORTED_MODULE_20__["default"]; }); + +/* harmony import */ var _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./curve/cardinalOpen.js */ "../node_modules/d3-shape/src/curve/cardinalOpen.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinalOpen", function() { return _curve_cardinalOpen_js__WEBPACK_IMPORTED_MODULE_21__["default"]; }); + +/* harmony import */ var _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./curve/cardinal.js */ "../node_modules/d3-shape/src/curve/cardinal.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCardinal", function() { return _curve_cardinal_js__WEBPACK_IMPORTED_MODULE_22__["default"]; }); + +/* harmony import */ var _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./curve/catmullRomClosed.js */ "../node_modules/d3-shape/src/curve/catmullRomClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomClosed", function() { return _curve_catmullRomClosed_js__WEBPACK_IMPORTED_MODULE_23__["default"]; }); + +/* harmony import */ var _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./curve/catmullRomOpen.js */ "../node_modules/d3-shape/src/curve/catmullRomOpen.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRomOpen", function() { return _curve_catmullRomOpen_js__WEBPACK_IMPORTED_MODULE_24__["default"]; }); + +/* harmony import */ var _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./curve/catmullRom.js */ "../node_modules/d3-shape/src/curve/catmullRom.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveCatmullRom", function() { return _curve_catmullRom_js__WEBPACK_IMPORTED_MODULE_25__["default"]; }); + +/* harmony import */ var _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./curve/linearClosed.js */ "../node_modules/d3-shape/src/curve/linearClosed.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinearClosed", function() { return _curve_linearClosed_js__WEBPACK_IMPORTED_MODULE_26__["default"]; }); + +/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./curve/linear.js */ "../node_modules/d3-shape/src/curve/linear.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveLinear", function() { return _curve_linear_js__WEBPACK_IMPORTED_MODULE_27__["default"]; }); + +/* harmony import */ var _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./curve/monotone.js */ "../node_modules/d3-shape/src/curve/monotone.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneX", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneX"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveMonotoneY", function() { return _curve_monotone_js__WEBPACK_IMPORTED_MODULE_28__["monotoneY"]; }); + +/* harmony import */ var _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./curve/natural.js */ "../node_modules/d3-shape/src/curve/natural.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveNatural", function() { return _curve_natural_js__WEBPACK_IMPORTED_MODULE_29__["default"]; }); + +/* harmony import */ var _curve_step_js__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./curve/step.js */ "../node_modules/d3-shape/src/curve/step.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStep", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["default"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepAfter", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepAfter"]; }); + +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "curveStepBefore", function() { return _curve_step_js__WEBPACK_IMPORTED_MODULE_30__["stepBefore"]; }); + +/* harmony import */ var _stack_js__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./stack.js */ "../node_modules/d3-shape/src/stack.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stack", function() { return _stack_js__WEBPACK_IMPORTED_MODULE_31__["default"]; }); + +/* harmony import */ var _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./offset/expand.js */ "../node_modules/d3-shape/src/offset/expand.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetExpand", function() { return _offset_expand_js__WEBPACK_IMPORTED_MODULE_32__["default"]; }); + +/* harmony import */ var _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./offset/diverging.js */ "../node_modules/d3-shape/src/offset/diverging.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetDiverging", function() { return _offset_diverging_js__WEBPACK_IMPORTED_MODULE_33__["default"]; }); + +/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./offset/none.js */ "../node_modules/d3-shape/src/offset/none.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetNone", function() { return _offset_none_js__WEBPACK_IMPORTED_MODULE_34__["default"]; }); + +/* harmony import */ var _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./offset/silhouette.js */ "../node_modules/d3-shape/src/offset/silhouette.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetSilhouette", function() { return _offset_silhouette_js__WEBPACK_IMPORTED_MODULE_35__["default"]; }); + +/* harmony import */ var _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./offset/wiggle.js */ "../node_modules/d3-shape/src/offset/wiggle.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOffsetWiggle", function() { return _offset_wiggle_js__WEBPACK_IMPORTED_MODULE_36__["default"]; }); + +/* harmony import */ var _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./order/appearance.js */ "../node_modules/d3-shape/src/order/appearance.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAppearance", function() { return _order_appearance_js__WEBPACK_IMPORTED_MODULE_37__["default"]; }); + +/* harmony import */ var _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./order/ascending.js */ "../node_modules/d3-shape/src/order/ascending.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderAscending", function() { return _order_ascending_js__WEBPACK_IMPORTED_MODULE_38__["default"]; }); + +/* harmony import */ var _order_descending_js__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./order/descending.js */ "../node_modules/d3-shape/src/order/descending.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderDescending", function() { return _order_descending_js__WEBPACK_IMPORTED_MODULE_39__["default"]; }); + +/* harmony import */ var _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./order/insideOut.js */ "../node_modules/d3-shape/src/order/insideOut.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderInsideOut", function() { return _order_insideOut_js__WEBPACK_IMPORTED_MODULE_40__["default"]; }); + +/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./order/none.js */ "../node_modules/d3-shape/src/order/none.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderNone", function() { return _order_none_js__WEBPACK_IMPORTED_MODULE_41__["default"]; }); + +/* harmony import */ var _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./order/reverse.js */ "../node_modules/d3-shape/src/order/reverse.js"); +/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "stackOrderReverse", function() { return _order_reverse_js__WEBPACK_IMPORTED_MODULE_42__["default"]; }); + + + + + + // Note: radialArea is deprecated! + // Note: radialLine is deprecated! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/line.js": +/*!********************************************!*\ + !*** ../node_modules/d3-shape/src/line.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "../node_modules/d3-path/src/index.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./curve/linear.js */ "../node_modules/d3-shape/src/curve/linear.js"); +/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./point.js */ "../node_modules/d3-shape/src/point.js"); + + + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], + y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], + defined = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(true), + context = null, + curve = _curve_linear_js__WEBPACK_IMPORTED_MODULE_2__["default"], + output = null; + + function line(data) { + var i, + n = data.length, + d, + defined0 = false, + buffer; + + if (context == null) output = curve(buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])()); + + for (i = 0; i <= n; ++i) { + if (!(i < n && defined(d = data[i], i, data)) === defined0) { + if (defined0 = !defined0) output.lineStart(); + else output.lineEnd(); + } + if (defined0) output.point(+x(d, i, data), +y(d, i, data)); + } + + if (buffer) return output = null, buffer + "" || null; + } + + line.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : x; + }; + + line.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), line) : y; + }; + + line.defined = function(_) { + return arguments.length ? (defined = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(!!_), line) : defined; + }; + + line.curve = function(_) { + return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve; + }; + + line.context = function(_) { + return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context; + }; + + return line; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/lineRadial.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/lineRadial.js ***! + \**************************************************/ +/*! exports provided: lineRadial, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "lineRadial", function() { return lineRadial; }); +/* harmony import */ var _curve_radial_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./curve/radial.js */ "../node_modules/d3-shape/src/curve/radial.js"); +/* harmony import */ var _line_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./line.js */ "../node_modules/d3-shape/src/line.js"); + + + +function lineRadial(l) { + var c = l.curve; + + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + + l.curve = function(_) { + return arguments.length ? c(Object(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_)) : c()._curve; + }; + + return l; +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + return lineRadial(Object(_line_js__WEBPACK_IMPORTED_MODULE_1__["default"])().curve(_curve_radial_js__WEBPACK_IMPORTED_MODULE_0__["curveRadialLinear"])); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/link/index.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/link/index.js ***! + \**************************************************/ +/*! exports provided: linkHorizontal, linkVertical, linkRadial */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkHorizontal", function() { return linkHorizontal; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkVertical", function() { return linkVertical; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "linkRadial", function() { return linkRadial; }); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "../node_modules/d3-path/src/index.js"); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../array.js */ "../node_modules/d3-shape/src/array.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../constant.js */ "../node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _point_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../point.js */ "../node_modules/d3-shape/src/point.js"); +/* harmony import */ var _pointRadial_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../pointRadial.js */ "../node_modules/d3-shape/src/pointRadial.js"); + + + + + + +function linkSource(d) { + return d.source; +} + +function linkTarget(d) { + return d.target; +} + +function link(curve) { + var source = linkSource, + target = linkTarget, + x = _point_js__WEBPACK_IMPORTED_MODULE_3__["x"], + y = _point_js__WEBPACK_IMPORTED_MODULE_3__["y"], + context = null; + + function link() { + var buffer, argv = _array_js__WEBPACK_IMPORTED_MODULE_1__["slice"].call(arguments), s = source.apply(this, argv), t = target.apply(this, argv); + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); + curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv)); + if (buffer) return context = null, buffer + "" || null; + } + + link.source = function(_) { + return arguments.length ? (source = _, link) : source; + }; + + link.target = function(_) { + return arguments.length ? (target = _, link) : target; + }; + + link.x = function(_) { + return arguments.length ? (x = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : x; + }; + + link.y = function(_) { + return arguments.length ? (y = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_2__["default"])(+_), link) : y; + }; + + link.context = function(_) { + return arguments.length ? ((context = _ == null ? null : _), link) : context; + }; + + return link; +} + +function curveHorizontal(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1); +} + +function curveVertical(context, x0, y0, x1, y1) { + context.moveTo(x0, y0); + context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1); +} + +function curveRadial(context, x0, y0, x1, y1) { + var p0 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0), + p1 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x0, y0 = (y0 + y1) / 2), + p2 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y0), + p3 = Object(_pointRadial_js__WEBPACK_IMPORTED_MODULE_4__["default"])(x1, y1); + context.moveTo(p0[0], p0[1]); + context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]); +} + +function linkHorizontal() { + return link(curveHorizontal); +} + +function linkVertical() { + return link(curveVertical); +} + +function linkRadial() { + var l = link(curveRadial); + l.angle = l.x, delete l.x; + l.radius = l.y, delete l.y; + return l; +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/math.js": +/*!********************************************!*\ + !*** ../node_modules/d3-shape/src/math.js ***! + \********************************************/ +/*! exports provided: abs, atan2, cos, max, min, sin, sqrt, epsilon, pi, halfPi, tau, acos, asin */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "abs", function() { return abs; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "atan2", function() { return atan2; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "cos", function() { return cos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "max", function() { return max; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "min", function() { return min; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sin", function() { return sin; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sqrt", function() { return sqrt; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "epsilon", function() { return epsilon; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "pi", function() { return pi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "halfPi", function() { return halfPi; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "tau", function() { return tau; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "acos", function() { return acos; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "asin", function() { return asin; }); +var abs = Math.abs; +var atan2 = Math.atan2; +var cos = Math.cos; +var max = Math.max; +var min = Math.min; +var sin = Math.sin; +var sqrt = Math.sqrt; + +var epsilon = 1e-12; +var pi = Math.PI; +var halfPi = pi / 2; +var tau = 2 * pi; + +function acos(x) { + return x > 1 ? 0 : x < -1 ? pi : Math.acos(x); +} + +function asin(x) { + return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x); +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/noop.js": +/*!********************************************!*\ + !*** ../node_modules/d3-shape/src/noop.js ***! + \********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function() {}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/offset/diverging.js": +/*!********************************************************!*\ + !*** ../node_modules/d3-shape/src/offset/diverging.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) { + for (yp = yn = 0, i = 0; i < n; ++i) { + if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) { + d[0] = yp, d[1] = yp += dy; + } else if (dy < 0) { + d[1] = yn, d[0] = yn += dy; + } else { + d[0] = 0, d[1] = dy; } - function R(t) { - return [t.source.x1, t.y0]; + } + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/offset/expand.js": +/*!*****************************************************!*\ + !*** ../node_modules/d3-shape/src/offset/expand.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "../node_modules/d3-shape/src/offset/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) { + for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0; + if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y; + } + Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/offset/none.js": +/*!***************************************************!*\ + !*** ../node_modules/d3-shape/src/offset/none.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 1)) return; + for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) { + s0 = s1, s1 = series[order[i]]; + for (j = 0; j < m; ++j) { + s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1]; + } + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/offset/silhouette.js": +/*!*********************************************************!*\ + !*** ../node_modules/d3-shape/src/offset/silhouette.js ***! + \*********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "../node_modules/d3-shape/src/offset/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0)) return; + for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) { + for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0; + s0[j][1] += s0[j][0] = -y / 2; + } + Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/offset/wiggle.js": +/*!*****************************************************!*\ + !*** ../node_modules/d3-shape/src/offset/wiggle.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "../node_modules/d3-shape/src/offset/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series, order) { + if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return; + for (var y = 0, j = 1, s0, m, n; j < m; ++j) { + for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) { + var si = series[order[i]], + sij0 = si[j][1] || 0, + sij1 = si[j - 1][1] || 0, + s3 = (sij0 - sij1) / 2; + for (var k = 0; k < i; ++k) { + var sk = series[order[k]], + skj0 = sk[j][1] || 0, + skj1 = sk[j - 1][1] || 0; + s3 += skj0 - skj1; } - function W(t) { - return [t.target.x0, t.y1]; + s1 += sij0, s2 += s3 * sij0; + } + s0[j - 1][1] += s0[j - 1][0] = y; + if (s1) y -= s2 / s1; + } + s0[j - 1][1] += s0[j - 1][0] = y; + Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series, order); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/order/appearance.js": +/*!********************************************************!*\ + !*** ../node_modules/d3-shape/src/order/appearance.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "../node_modules/d3-shape/src/order/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var peaks = series.map(peak); + return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return peaks[a] - peaks[b]; }); +}); + +function peak(series) { + var i = -1, j = 0, n = series.length, vi, vj = -Infinity; + while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i; + return j; +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/order/ascending.js": +/*!*******************************************************!*\ + !*** ../node_modules/d3-shape/src/order/ascending.js ***! + \*******************************************************/ +/*! exports provided: default, sum */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "sum", function() { return sum; }); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "../node_modules/d3-shape/src/order/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var sums = series.map(sum); + return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).sort(function(a, b) { return sums[a] - sums[b]; }); +}); + +function sum(series) { + var s = 0, i = -1, n = series.length, v; + while (++i < n) if (v = +series[i][1]) s += v; + return s; +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/order/descending.js": +/*!********************************************************!*\ + !*** ../node_modules/d3-shape/src/order/descending.js ***! + \********************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-shape/src/order/ascending.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + return Object(_ascending_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/order/insideOut.js": +/*!*******************************************************!*\ + !*** ../node_modules/d3-shape/src/order/insideOut.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _appearance_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./appearance.js */ "../node_modules/d3-shape/src/order/appearance.js"); +/* harmony import */ var _ascending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ascending.js */ "../node_modules/d3-shape/src/order/ascending.js"); + + + +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var n = series.length, + i, + j, + sums = series.map(_ascending_js__WEBPACK_IMPORTED_MODULE_1__["sum"]), + order = Object(_appearance_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series), + top = 0, + bottom = 0, + tops = [], + bottoms = []; + + for (i = 0; i < n; ++i) { + j = order[i]; + if (top < bottom) { + top += sums[j]; + tops.push(j); + } else { + bottom += sums[j]; + bottoms.push(j); + } + } + + return bottoms.reverse().concat(tops); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/order/none.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/order/none.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + var n = series.length, o = new Array(n); + while (--n >= 0) o[n] = n; + return o; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/order/reverse.js": +/*!*****************************************************!*\ + !*** ../node_modules/d3-shape/src/order/reverse.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _none_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./none.js */ "../node_modules/d3-shape/src/order/none.js"); + + +/* harmony default export */ __webpack_exports__["default"] = (function(series) { + return Object(_none_js__WEBPACK_IMPORTED_MODULE_0__["default"])(series).reverse(); +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/pie.js": +/*!*******************************************!*\ + !*** ../node_modules/d3-shape/src/pie.js ***! + \*******************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _descending_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./descending.js */ "../node_modules/d3-shape/src/descending.js"); +/* harmony import */ var _identity_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity.js */ "../node_modules/d3-shape/src/identity.js"); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./math.js */ "../node_modules/d3-shape/src/math.js"); + + + + + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var value = _identity_js__WEBPACK_IMPORTED_MODULE_2__["default"], + sortValues = _descending_js__WEBPACK_IMPORTED_MODULE_1__["default"], + sort = null, + startAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0), + endAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"]), + padAngle = Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(0); + + function pie(data) { + var i, + n = data.length, + j, + k, + sum = 0, + index = new Array(n), + arcs = new Array(n), + a0 = +startAngle.apply(this, arguments), + da = Math.min(_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], Math.max(-_math_js__WEBPACK_IMPORTED_MODULE_3__["tau"], endAngle.apply(this, arguments) - a0)), + a1, + p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)), + pa = p * (da < 0 ? -1 : 1), + v; + + for (i = 0; i < n; ++i) { + if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) { + sum += v; } - var D = function () { - return I(J).source(R).target(W); + } + + // Optionally sort the arcs by previously-computed values or by data. + if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); }); + else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); }); + + // Compute the arcs! They are stored in the original data's order. + for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) { + j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = { + data: data[j], + index: i, + value: v, + startAngle: a0, + endAngle: a1, + padAngle: p }; - function q(t, e) { - for (var n = 0; n < e.length; n++) { - var r = e[n]; - (r.enumerable = r.enumerable || !1), - (r.configurable = !0), - 'value' in r && (r.writable = !0), - Object.defineProperty(t, r.key, r); + } + + return arcs; + } + + pie.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : value; + }; + + pie.sortValues = function(_) { + return arguments.length ? (sortValues = _, sort = null, pie) : sortValues; + }; + + pie.sort = function(_) { + return arguments.length ? (sort = _, sortValues = null, pie) : sort; + }; + + pie.startAngle = function(_) { + return arguments.length ? (startAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : startAngle; + }; + + pie.endAngle = function(_) { + return arguments.length ? (endAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : endAngle; + }; + + pie.padAngle = function(_) { + return arguments.length ? (padAngle = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_0__["default"])(+_), pie) : padAngle; + }; + + return pie; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/point.js": +/*!*********************************************!*\ + !*** ../node_modules/d3-shape/src/point.js ***! + \*********************************************/ +/*! exports provided: x, y */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "x", function() { return x; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "y", function() { return y; }); +function x(p) { + return p[0]; +} + +function y(p) { + return p[1]; +} + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/pointRadial.js": +/*!***************************************************!*\ + !*** ../node_modules/d3-shape/src/pointRadial.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = (function(x, y) { + return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)]; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/stack.js": +/*!*********************************************!*\ + !*** ../node_modules/d3-shape/src/stack.js ***! + \*********************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _array_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./array.js */ "../node_modules/d3-shape/src/array.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-shape/src/constant.js"); +/* harmony import */ var _offset_none_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./offset/none.js */ "../node_modules/d3-shape/src/offset/none.js"); +/* harmony import */ var _order_none_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./order/none.js */ "../node_modules/d3-shape/src/order/none.js"); + + + + + +function stackValue(d, key) { + return d[key]; +} + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var keys = Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])([]), + order = _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"], + offset = _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"], + value = stackValue; + + function stack(data) { + var kz = keys.apply(this, arguments), + i, + m = data.length, + n = kz.length, + sz = new Array(n), + oz; + + for (i = 0; i < n; ++i) { + for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) { + si[j] = sij = [0, +value(data[j], ki, j, data)]; + sij.data = data[j]; + } + si.key = ki; + } + + for (i = 0, oz = order(sz); i < n; ++i) { + sz[oz[i]].index = i; + } + + offset(sz, oz); + return sz; + } + + stack.keys = function(_) { + return arguments.length ? (keys = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : keys; + }; + + stack.value = function(_) { + return arguments.length ? (value = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(+_), stack) : value; + }; + + stack.order = function(_) { + return arguments.length ? (order = _ == null ? _order_none_js__WEBPACK_IMPORTED_MODULE_3__["default"] : typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_1__["default"])(_array_js__WEBPACK_IMPORTED_MODULE_0__["slice"].call(_)), stack) : order; + }; + + stack.offset = function(_) { + return arguments.length ? (offset = _ == null ? _offset_none_js__WEBPACK_IMPORTED_MODULE_2__["default"] : _, stack) : offset; + }; + + return stack; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol.js": +/*!**********************************************!*\ + !*** ../node_modules/d3-shape/src/symbol.js ***! + \**********************************************/ +/*! exports provided: symbols, default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "symbols", function() { return symbols; }); +/* harmony import */ var d3_path__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3-path */ "../node_modules/d3-path/src/index.js"); +/* harmony import */ var _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./symbol/circle.js */ "../node_modules/d3-shape/src/symbol/circle.js"); +/* harmony import */ var _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./symbol/cross.js */ "../node_modules/d3-shape/src/symbol/cross.js"); +/* harmony import */ var _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./symbol/diamond.js */ "../node_modules/d3-shape/src/symbol/diamond.js"); +/* harmony import */ var _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./symbol/star.js */ "../node_modules/d3-shape/src/symbol/star.js"); +/* harmony import */ var _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./symbol/square.js */ "../node_modules/d3-shape/src/symbol/square.js"); +/* harmony import */ var _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./symbol/triangle.js */ "../node_modules/d3-shape/src/symbol/triangle.js"); +/* harmony import */ var _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./symbol/wye.js */ "../node_modules/d3-shape/src/symbol/wye.js"); +/* harmony import */ var _constant_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./constant.js */ "../node_modules/d3-shape/src/constant.js"); + + + + + + + + + + +var symbols = [ + _symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"], + _symbol_cross_js__WEBPACK_IMPORTED_MODULE_2__["default"], + _symbol_diamond_js__WEBPACK_IMPORTED_MODULE_3__["default"], + _symbol_square_js__WEBPACK_IMPORTED_MODULE_5__["default"], + _symbol_star_js__WEBPACK_IMPORTED_MODULE_4__["default"], + _symbol_triangle_js__WEBPACK_IMPORTED_MODULE_6__["default"], + _symbol_wye_js__WEBPACK_IMPORTED_MODULE_7__["default"] +]; + +/* harmony default export */ __webpack_exports__["default"] = (function() { + var type = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_symbol_circle_js__WEBPACK_IMPORTED_MODULE_1__["default"]), + size = Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(64), + context = null; + + function symbol() { + var buffer; + if (!context) context = buffer = Object(d3_path__WEBPACK_IMPORTED_MODULE_0__["path"])(); + type.apply(this, arguments).draw(context, +size.apply(this, arguments)); + if (buffer) return context = null, buffer + "" || null; + } + + symbol.type = function(_) { + return arguments.length ? (type = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(_), symbol) : type; + }; + + symbol.size = function(_) { + return arguments.length ? (size = typeof _ === "function" ? _ : Object(_constant_js__WEBPACK_IMPORTED_MODULE_8__["default"])(+_), symbol) : size; + }; + + symbol.context = function(_) { + return arguments.length ? (context = _ == null ? null : _, symbol) : context; + }; + + return symbol; +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/circle.js": +/*!*****************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/circle.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "../node_modules/d3-shape/src/math.js"); + + +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size / _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"]); + context.moveTo(r, 0); + context.arc(0, 0, r, 0, _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"]); + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/cross.js": +/*!****************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/cross.js ***! + \****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size / 5) / 2; + context.moveTo(-3 * r, -r); + context.lineTo(-r, -r); + context.lineTo(-r, -3 * r); + context.lineTo(r, -3 * r); + context.lineTo(r, -r); + context.lineTo(3 * r, -r); + context.lineTo(3 * r, r); + context.lineTo(r, r); + context.lineTo(r, 3 * r); + context.lineTo(-r, 3 * r); + context.lineTo(-r, r); + context.lineTo(-3 * r, r); + context.closePath(); + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/diamond.js": +/*!******************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/diamond.js ***! + \******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var tan30 = Math.sqrt(1 / 3), + tan30_2 = tan30 * 2; + +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var y = Math.sqrt(size / tan30_2), + x = y * tan30; + context.moveTo(0, -y); + context.lineTo(x, 0); + context.lineTo(0, y); + context.lineTo(-x, 0); + context.closePath(); + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/square.js": +/*!*****************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/square.js ***! + \*****************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var w = Math.sqrt(size), + x = -w / 2; + context.rect(x, x, w, w); + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/star.js": +/*!***************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/star.js ***! + \***************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony import */ var _math_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../math.js */ "../node_modules/d3-shape/src/math.js"); + + +var ka = 0.89081309152928522810, + kr = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10) / Math.sin(7 * _math_js__WEBPACK_IMPORTED_MODULE_0__["pi"] / 10), + kx = Math.sin(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr, + ky = -Math.cos(_math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] / 10) * kr; + +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size * ka), + x = kx * r, + y = ky * r; + context.moveTo(0, -r); + context.lineTo(x, y); + for (var i = 1; i < 5; ++i) { + var a = _math_js__WEBPACK_IMPORTED_MODULE_0__["tau"] * i / 5, + c = Math.cos(a), + s = Math.sin(a); + context.lineTo(s * r, -c * r); + context.lineTo(c * x - s * y, s * x + c * y); + } + context.closePath(); + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/triangle.js": +/*!*******************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/triangle.js ***! + \*******************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var sqrt3 = Math.sqrt(3); + +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var y = -Math.sqrt(size / (sqrt3 * 3)); + context.moveTo(0, y * 2); + context.lineTo(-sqrt3 * y, -y); + context.lineTo(sqrt3 * y, -y); + context.closePath(); + } +}); + + +/***/ }), + +/***/ "../node_modules/d3-shape/src/symbol/wye.js": +/*!**************************************************!*\ + !*** ../node_modules/d3-shape/src/symbol/wye.js ***! + \**************************************************/ +/*! exports provided: default */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +var c = -0.5, + s = Math.sqrt(3) / 2, + k = 1 / Math.sqrt(12), + a = (k / 2 + 1) * 3; + +/* harmony default export */ __webpack_exports__["default"] = ({ + draw: function(context, size) { + var r = Math.sqrt(size / a), + x0 = r / 2, + y0 = r * k, + x1 = x0, + y1 = r * k + r, + x2 = -x1, + y2 = y1; + context.moveTo(x0, y0); + context.lineTo(x1, y1); + context.lineTo(x2, y2); + context.lineTo(c * x0 - s * y0, s * x0 + c * y0); + context.lineTo(c * x1 - s * y1, s * x1 + c * y1); + context.lineTo(c * x2 - s * y2, s * x2 + c * y2); + context.lineTo(c * x0 + s * y0, c * y0 - s * x0); + context.lineTo(c * x1 + s * y1, c * y1 - s * x1); + context.lineTo(c * x2 + s * y2, c * y2 - s * x2); + context.closePath(); + } +}); + + +/***/ }), + +/***/ "../node_modules/tslib/tslib.es6.js": +/*!******************************************!*\ + !*** ../node_modules/tslib/tslib.es6.js ***! + \******************************************/ +/*! exports provided: __extends, __assign, __rest, __decorate, __param, __metadata, __awaiter, __generator, __createBinding, __exportStar, __values, __read, __spread, __spreadArrays, __await, __asyncGenerator, __asyncDelegator, __asyncValues, __makeTemplateObject, __importStar, __importDefault, __classPrivateFieldGet, __classPrivateFieldSet */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__extends", function() { return __extends; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__assign", function() { return __assign; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__rest", function() { return __rest; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__decorate", function() { return __decorate; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__param", function() { return __param; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__metadata", function() { return __metadata; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__awaiter", function() { return __awaiter; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__generator", function() { return __generator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__createBinding", function() { return __createBinding; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__exportStar", function() { return __exportStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__values", function() { return __values; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__read", function() { return __read; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spread", function() { return __spread; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__spreadArrays", function() { return __spreadArrays; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__await", function() { return __await; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncGenerator", function() { return __asyncGenerator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncDelegator", function() { return __asyncDelegator; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__asyncValues", function() { return __asyncValues; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__makeTemplateObject", function() { return __makeTemplateObject; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importStar", function() { return __importStar; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__importDefault", function() { return __importDefault; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldGet", function() { return __classPrivateFieldGet; }); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "__classPrivateFieldSet", function() { return __classPrivateFieldSet; }); +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY +AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +***************************************************************************** */ +/* global Reflect, Promise */ + +var extendStatics = function(d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return extendStatics(d, b); +}; + +function __extends(d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); +} + +var __assign = function() { + __assign = Object.assign || function __assign(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; + } + return t; + } + return __assign.apply(this, arguments); +} + +function __rest(s, e) { + var t = {}; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) + t[p] = s[p]; + if (s != null && typeof Object.getOwnPropertySymbols === "function") + for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { + if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) + t[p[i]] = s[p[i]]; + } + return t; +} + +function __decorate(decorators, target, key, desc) { + var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; + if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); + else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; + return c > 3 && r && Object.defineProperty(target, key, r), r; +} + +function __param(paramIndex, decorator) { + return function (target, key) { decorator(target, key, paramIndex); } +} + +function __metadata(metadataKey, metadataValue) { + if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue); +} + +function __awaiter(thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +} + +function __generator(thisArg, body) { + var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; + return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; + function verb(n) { return function (v) { return step([n, v]); }; } + function step(op) { + if (f) throw new TypeError("Generator is already executing."); + while (_) try { + if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; + if (y = 0, t) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: case 1: t = op; break; + case 4: _.label++; return { value: op[1], done: false }; + case 5: _.label++; y = op[1]; op = [0]; continue; + case 7: op = _.ops.pop(); _.trys.pop(); continue; + default: + if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } + if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } + if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } + if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } + if (t[2]) _.ops.pop(); + _.trys.pop(); continue; + } + op = body.call(thisArg, _); + } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } + if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; + } +} + +function __createBinding(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +} + +function __exportStar(m, exports) { + for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p]; +} + +function __values(o) { + var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0; + if (m) return m.call(o); + if (o && typeof o.length === "number") return { + next: function () { + if (o && i >= o.length) o = void 0; + return { value: o && o[i++], done: !o }; } + }; + throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined."); +} + +function __read(o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +} + +function __spread() { + for (var ar = [], i = 0; i < arguments.length; i++) + ar = ar.concat(__read(arguments[i])); + return ar; +} + +function __spreadArrays() { + for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length; + for (var r = Array(s), k = 0, i = 0; i < il; i++) + for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) + r[k] = a[j]; + return r; +}; + +function __await(v) { + return this instanceof __await ? (this.v = v, this) : new __await(v); +} + +function __asyncGenerator(thisArg, _arguments, generator) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var g = generator.apply(thisArg, _arguments || []), i, q = []; + return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i; + function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; } + function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } } + function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); } + function fulfill(value) { resume("next", value); } + function reject(value) { resume("throw", value); } + function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); } +} + +function __asyncDelegator(o) { + var i, p; + return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i; + function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; } +} + +function __asyncValues(o) { + if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); + var m = o[Symbol.asyncIterator], i; + return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i); + function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; } + function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); } +} + +function __makeTemplateObject(cooked, raw) { + if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; } + return cooked; +}; + +function __importStar(mod) { + if (mod && mod.__esModule) return mod; + var result = {}; + if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; + result.default = mod; + return result; +} + +function __importDefault(mod) { + return (mod && mod.__esModule) ? mod : { default: mod }; +} + +function __classPrivateFieldGet(receiver, privateMap) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to get private field on non-instance"); + } + return privateMap.get(receiver); +} + +function __classPrivateFieldSet(receiver, privateMap, value) { + if (!privateMap.has(receiver)) { + throw new TypeError("attempted to set private field on non-instance"); + } + privateMap.set(receiver, value); + return value; +} + + +/***/ }), + +/***/ "./Error.tsx": +/*!*******************!*\ + !*** ./Error.tsx ***! + \*******************/ +/*! exports provided: ErrorMessage */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ErrorMessage", function() { return ErrorMessage; }); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _grafana_ui__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @grafana/ui */ "@grafana/ui"); +/* harmony import */ var _grafana_ui__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_grafana_ui__WEBPACK_IMPORTED_MODULE_1__); +// @ts-nocheck + + +var ErrorMessage = function ErrorMessage(_a) { + var message = _a.message; + return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("p", { + style: panelStyles + }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + style: containerStyles + }, react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_grafana_ui__WEBPACK_IMPORTED_MODULE_1__["Icon"], { + name: 'exclamation-triangle' + }), react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", { + style: messageStyles + }, message))); +}; +var panelStyles = { + height: '100%', + display: 'flex', + justifyContent: 'center', + alignItems: 'center' +}; +var containerStyles = { + padding: '15px 20px', + marginBottom: '4px', + position: 'relative', + color: 'rgb(255, 255, 255)', + textShadow: 'rgb(0 0 0 / 20%) 0px 1px 0px', + borderRadius: '3px', + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + background: 'linear-gradient(90deg, rgb(224, 47, 68), rgb(224, 47, 68))' +}; +var messageStyles = { + marginLeft: 10 +}; + +/***/ }), + +/***/ "./Sankey.js": +/*!*******************!*\ + !*** ./Sankey.js ***! + \*******************/ +/*! exports provided: Sankey */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Sankey", function() { return Sankey; }); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var d3_sankey__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! d3-sankey */ "../node_modules/d3-sankey/src/index.js"); +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + +function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } + +function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } + + + +var DISPLAY_VALUES = { + total: 'total', + percentage: 'percentage', + both: 'both', + none: 'none' +}; +var EDGE_COLORS = { + none: 'none', + path: 'path', + input: 'input', + output: 'output' +}; +var Sankey = /*#__PURE__*/function () { + function Sankey(svg, container) { + _classCallCheck(this, Sankey); + + this._svg = svg; + this._container = container || svg; + this._gBound = null; + this._data = null; + this._nodes = null; + this._links = null; + this._width = 0; + this._height = 0; + this._boundedWidth = 0; + this._boundedHeight = 0; + this._marginTop = 20; + this._marginRight = 20; + this._marginBottom = 20; + this._marginLeft = 20; + this._background = 'rgba(0, 0, 0, 0)'; + this._edgeColor = 'path'; + this._colorScheme = 'Tableau10'; + this._colorScale = null; + this._colorArray = ''; + this._sankeyAlignType = 'Justify'; + this._sankeyAlign = null; + this._sankeyGenerator = null; + this._sankeyNodeWith = 85; + this._sankeyNodePadding = 20; + this._svgNode = null; + this._svgLink = null; + this._displayValues = 'none'; + this._highlightOnHover = false; + } + + _createClass(Sankey, [{ + key: "_init", + value: function _init() { + this._setBoundDimensions(); + + this._setColorScale(); + + this._configureSankey(); + + this._calculateSankey(); + } // ---------------------------- DIMENSIONS ---------------------------- + + }, { + key: "_setBoundDimensions", + value: function _setBoundDimensions() { + this._boundedWidth = this._width - this._marginLeft - this._marginRight; + this._boundedHeight = this._height - this._marginTop - this._marginBottom; + } // ------------------------------ COLOR ------------------------------- + + }, { + key: "_setColorScale", + value: function _setColorScale() { + this._colorScale = d3__WEBPACK_IMPORTED_MODULE_0__["scaleOrdinal"](d3__WEBPACK_IMPORTED_MODULE_0__["scheme".concat(this._colorScheme)]); + } + }, { + key: "_color", + value: function _color(node) { + return this._colorScale(node.name); + } // ------------------------------ SANKEY ------------------------------- + + }, { + key: "_configureSankey", + value: function _configureSankey() { + this._sankeyAlign = d3_sankey__WEBPACK_IMPORTED_MODULE_1__["sankey".concat(this._sankeyAlignType)]; + this._sankeyGenerator = d3_sankey__WEBPACK_IMPORTED_MODULE_1__["sankey"]().nodeId(function (d) { + return d.name; + }).nodeAlign(this._sankeyAlign).nodeWidth(this._sankeyNodeWith).nodePadding(this._sankeyNodePadding).extent([[0, 0], [this._boundedWidth, this._boundedHeight]]); + } + }, { + key: "_calculateSankey", + value: function _calculateSankey() { + var sankeyData = this._sankeyGenerator({ + nodes: this._data.nodes.map(function (d) { + return Object.assign({}, d); + }), + links: this._data.links.map(function (d) { + return Object.assign({}, d); + }) + }); + + this._nodes = sankeyData.nodes; + this._links = sankeyData.links; + } // ---------------------------- VALIDATIONS ----------------------------- + + }, { + key: "_validate", + value: function _validate() { + return this._data && this._data.nodes && this._data.links && this._data.nodes.length > 0 && this._data.links.length > 0; + } // ------------------------------ HELPERS ------------------------------- + + }, { + key: "_setLinkGradient", + value: function _setLinkGradient() { + var _this = this; + + var gradient = this._svgLink.append('linearGradient').attr('id', function (d) { + return d.uid = "link-".concat(d.index, "-").concat(Math.random()); + }).attr('gradientUnits', 'userSpaceOnUse').attr('x1', function (d) { + return d.source.x1; + }).attr('x2', function (d) { + return d.target.x0; + }); + + gradient.append('stop').attr('offset', '0%').attr('stop-color', function (d) { + return _this._color(d.source); + }); + gradient.append('stop').attr('offset', '100%').attr('stop-color', function (d) { + return _this._color(d.target); + }); + } + }, { + key: "_setLinkStroke", + value: function _setLinkStroke(d) { + switch (this._edgeColor) { + case EDGE_COLORS.none: + return '#aaa'; + + case EDGE_COLORS.path: + return "url(#".concat(d.uid, ")"); + + case EDGE_COLORS.input: + return this._color(d.source); + + case EDGE_COLORS.output: + return this._color(d.target); + + default: + return; } - var F = 'total', - U = 'percentage', - Z = 'both', - Q = 'none', - K = 'path', - X = 'input', - Y = 'output', - $ = (function () { - function t(e, n) { - !(function (t, e) { - if (!(t instanceof e)) throw new TypeError('Cannot call a class as a function'); - })(this, t), - (this._svg = e), - (this._container = n || e), - (this._gBound = null), - (this._data = null), - (this._nodes = null), - (this._links = null), - (this._width = 0), - (this._height = 0), - (this._boundedWidth = 0), - (this._boundedHeight = 0), - (this._marginTop = 20), - (this._marginRight = 20), - (this._marginBottom = 20), - (this._marginLeft = 20), - (this._background = 'rgba(0, 0, 0, 0)'), - (this._edgeColor = 'path'), - (this._colorScheme = 'Tableau10'), - (this._colorScale = null), - (this._colorArray = ''), - (this._sankeyAlignType = 'Justify'), - (this._sankeyAlign = null), - (this._sankeyGenerator = null), - (this._sankeyNodeWith = 85), - (this._sankeyNodePadding = 20), - (this._svgNode = null), - (this._svgLink = null), - (this._displayValues = 'none'), - (this._highlightOnHover = !1); - } - var e, n, o; - return ( - (e = t), - (n = [ - { - key: '_init', - value: function () { - this._setBoundDimensions(), this._setColorScale(), this._configureSankey(), this._calculateSankey(); - }, - }, - { - key: '_setBoundDimensions', - value: function () { - (this._boundedWidth = this._width - this._marginLeft - this._marginRight), - (this._boundedHeight = this._height - this._marginTop - this._marginBottom); - }, - }, - { - key: '_setColorScale', - value: function () { - this._colorScale = u.scaleOrdinal(u['scheme'.concat(this._colorScheme)]); - }, - }, - { - key: '_color', - value: function (t) { - return this._colorScale(t.name); - }, - }, - { - key: '_configureSankey', - value: function () { - (this._sankeyAlign = r['sankey'.concat(this._sankeyAlignType)]), - (this._sankeyGenerator = M() - .nodeId(function (t) { - return t.name; - }) - .nodeAlign(this._sankeyAlign) - .nodeWidth(this._sankeyNodeWith) - .nodePadding(this._sankeyNodePadding) - .extent([ - [0, 0], - [this._boundedWidth, this._boundedHeight], - ])); - }, - }, - { - key: '_calculateSankey', - value: function () { - var t = this._sankeyGenerator({ - nodes: this._data.nodes.map(function (t) { - return Object.assign({}, t); - }), - links: this._data.links.map(function (t) { - return Object.assign({}, t); - }), - }); - (this._nodes = t.nodes), (this._links = t.links); - }, - }, - { - key: '_validate', - value: function () { - return ( - this._data && - this._data.nodes && - this._data.links && - this._data.nodes.length > 0 && - this._data.links.length > 0 - ); - }, - }, - { - key: '_setLinkGradient', - value: function () { - var t = this, - e = this._svgLink - .append('linearGradient') - .attr('id', function (t) { - return (t.uid = 'link-'.concat(t.index, '-').concat(Math.random())); - }) - .attr('gradientUnits', 'userSpaceOnUse') - .attr('x1', function (t) { - return t.source.x1; - }) - .attr('x2', function (t) { - return t.target.x0; - }); - e - .append('stop') - .attr('offset', '0%') - .attr('stop-color', function (e) { - return t._color(e.source); - }), - e - .append('stop') - .attr('offset', '100%') - .attr('stop-color', function (e) { - return t._color(e.target); - }); - }, - }, - { - key: '_setLinkStroke', - value: function (t) { - switch (this._edgeColor) { - case Q: - return '#aaa'; - case K: - return 'url(#'.concat(t.uid, ')'); - case X: - return this._color(t.source); - case Y: - return this._color(t.target); - default: - return; - } - }, - }, - { - key: '_showLinks', - value: function (t) { - var e = []; - [ - { linkType: 'sourceLinks', nodeType: 'target' }, - { linkType: 'targetLinks', nodeType: 'source' }, - ].forEach(function (n) { - t[n.linkType].forEach(function (t) { - e.push(t[n.nodeType]); - }); - }), - this._gBound.selectAll('.sankey-node').style('opacity', function (n) { - return t.name === n.name || - e.find(function (t) { - return t.name === n.name; - }) - ? '1' - : '0.2'; - }), - this._gBound.selectAll('.sankey-link').style('opacity', function (e) { - return !e || (e.source.name !== t.name && e.target.name !== t.name) ? '0.2' : '1'; - }); - }, - }, - { - key: '_showAll', - value: function () { - this._gBound.selectAll('.sankey-node').style('opacity', '1'), - this._gBound.selectAll('.sankey-link').style('opacity', '1'); - }, - }, - { - key: '_formatValue', - value: function (t) { - return u.format('.2~f')(t); - }, - }, - { - key: '_formatPercent', - value: function (t) { - return u.format('.2~%')(t); - }, - }, - { - key: '_formatThousand', - value: function (t) { - return u.format('.3~s')(t); - }, - }, - { - key: '_labelNode', - value: function (t) { - var e = this._nodes.filter(function (e) { - return e.depth === t.depth; - }), - n = u.sum(e, function (t) { - return t.value; - }), - r = this._formatThousand(t.value), - o = this._formatPercent(t.value / n), - i = t.name; - switch (this._displayValues) { - case F: - i = ''.concat(i, '\n ').concat(r); - break; - case U: - i = ''.concat(i, '\n ').concat(o); - break; - case Z: - i = ''.concat(i, '\n ').concat(o, ' - ').concat(r); - } - return i; - }, - }, - { - key: '_renderSVG', - value: function () { - var t = this; - this._container.style('background-color', this._background), - (this._gBound = this._container - .append('g') - .attr('transform', 'translate('.concat(this._marginLeft, ', ').concat(this._marginTop, ')'))), - (this._svgNode = this._gBound - .append('g') - .attr('stroke', '#000') - .selectAll('.sankey-node') - .data(this._nodes, function (t) { - return t.name; - }) - .join('rect') - .attr('class', 'sankey-node') - .attr('id', function (t) { - return t.name; - }) - .attr('x', function (t) { - return t.x0; - }) - .attr('y', function (t) { - return t.y0; - }) - .attr('rx', 2) - .attr('ry', 2) - .attr('height', function (t) { - return t.y1 - t.y0; - }) - .attr('width', function (t) { - return t.x1 - t.x0; - }) - .attr('stroke', function (e) { - var n = JSON.parse(t._colorArray); - return Object.keys(n).includes(e.name) ? n[e.name] : 'rgba(148, 153, 168, 1)'; - }) - .attr('fill', function (e) { - var n = JSON.parse(t._colorArray); - return Object.keys(n).includes(e.name) ? n[e.name] : 'rgba(148, 153, 168, 1)'; - }) - .on('mouseover', function (e) { - return t._highlightOnHover && t._showLinks(e); - }) - .on('mouseout', function (e) { - return t._highlightOnHover && t._showAll(); - })), - (this._svgLink = this._gBound - .append('g') - .attr('fill', 'none') - .attr('stroke-opacity', 0.3) - .selectAll('g') - .data(this._links, function (t) { - return ''.concat(t.source.name, '-').concat(t.target.name); - }) - .join('g') - .style('mix-blend-mode', 'multiply')), - 'path' === this._edgeColor && this._setLinkGradient(), - this._svgLink - .append('path') - .attr('class', 'sankey-link') - .attr('d', D()) - .attr('stroke', 'rgba(182, 185, 196, 1)') - .attr('stroke-width', function (t) { - return Math.max(1, t.width); - }), - this._gBound - .append('g') - .attr('font-family', 'sans-serif') - .attr('font-size', 10) - .selectAll('text') - .data(this._nodes) - .join('text') - .attr('x', function (t) { - return t.x0 + 8; - }) - .attr('y', function (t) { - return (t.y1 + t.y0) / 2; - }) - .attr('dy', '0.35em') - .text(function (e) { - return t._labelNode(e); - }), - this._gBound - .append('g') - .attr('font-family', 'sans-serif') - .attr('font-size', 10) - .selectAll('text') - .data(this._nodes) - .join('text') - .attr('x', function (t) { - return t.x0 + 8; - }) - .attr('font-size', 14) - .attr('font-weight', '700') - .attr('y', function (t) { - return (t.y1 + t.y0) / 2 + 16; - }) - .attr('dy', '0.35em') - .text(function (e) { - return t._formatValue(e.value); - }), - this._svgNode.append('title').text(function (e) { - return ''.concat(e.name, '\n').concat(t._formatValue(e.value)); - }), - this._svgLink.append('title').text(function (e) { - return '' - .concat(e.source.name, ' → ') - .concat(e.target.name, '\n') - .concat(t._formatValue(e.value)); - }); - }, - }, - { - key: 'data', - value: function (t) { - return arguments.length ? ((this._data = t), this) : this._data; - }, - }, - { - key: 'width', - value: function (t) { - return arguments.length ? ((this._width = +t), this) : this._width; - }, - }, - { - key: 'height', - value: function (t) { - return arguments.length ? ((this._height = +t), this) : this._height; - }, - }, - { - key: 'align', - value: function (t) { - return arguments.length ? ((this._sankeyAlignType = t), this) : this._sankeyAlignType; - }, - }, - { - key: 'colorScheme', - value: function (t) { - return arguments.length ? ((this._colorScheme = t), this) : this._colorScheme; - }, - }, - { - key: 'colorArray', - value: function (t) { - return arguments.length ? ((this._colorArray = t), this) : this._colorArray; - }, - }, - { - key: 'edgeColor', - value: function (t) { - return arguments.length ? ((this._edgeColor = t), this) : this._edgeColor; - }, - }, - { - key: 'displayValues', - value: function (t) { - return arguments.length ? ((this._displayValues = t), this) : this._displayValues; - }, - }, - { - key: 'highlightOnHover', - value: function (t) { - return arguments.length ? ((this._highlightOnHover = t), this) : this._highlightOnHover; - }, - }, - { - key: 'render', - value: function () { - return this._validate() && (this._init(), this._renderSVG()), this; - }, - }, - ]) && q(e.prototype, n), - o && q(e, o), - t - ); - })(), - tt = n(3), - et = function (t) { - var e = t.message; - return s.a.createElement( - 'p', - { style: nt }, - s.a.createElement( - 'div', - { style: rt }, - s.a.createElement(tt.Icon, { name: 'exclamation-triangle' }), - s.a.createElement('div', { style: ot }, e) - ) - ); - }, - nt = { height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' }, - rt = { - padding: '15px 20px', - marginBottom: '4px', - position: 'relative', - color: 'rgb(255, 255, 255)', - textShadow: 'rgb(0 0 0 / 20%) 0px 1px 0px', - borderRadius: '3px', - display: 'flex', - flexDirection: 'row', - alignItems: 'center', - background: 'linear-gradient(90deg, rgb(224, 47, 68), rgb(224, 47, 68))', - }, - ot = { marginLeft: 10 }; - n.d(e, 'plugin', function () { - return it; + } // NODE HOVER + + }, { + key: "_showLinks", + value: function _showLinks(currentNode) { + var linkedNodes = []; + var traverse = [{ + linkType: 'sourceLinks', + nodeType: 'target' + }, { + linkType: 'targetLinks', + nodeType: 'source' + }]; + traverse.forEach(function (step) { + currentNode[step.linkType].forEach(function (l) { + linkedNodes.push(l[step.nodeType]); + }); + }); // highlight linked nodes + + this._gBound.selectAll('.sankey-node').style('opacity', function (node) { + return currentNode.name === node.name || linkedNodes.find(function (linkedNode) { + return linkedNode.name === node.name; + }) ? '1' : '0.2'; + }); // highlight links + + + this._gBound.selectAll('.sankey-link').style('opacity', function (link) { + return link && (link.source.name === currentNode.name || link.target.name === currentNode.name) ? '1' : '0.2'; }); - var it = new o.PanelPlugin(function (t) { - var e = t.options, - n = t.data, - r = t.width, - o = t.height, - l = { source: 'source', target: 'target', value: 'value' }, - c = 'Required fields not present: ' + Object.keys(l).join(', '), - h = i(Object(a.useState)({ isError: !1, message: '' }), 2), - f = h[0], - d = h[1], - g = i(Object(a.useState)({ nodes: [], links: [] }), 2), - y = g[0], - _ = g[1]; - Object(a.useEffect)( - function () { - n.error ? d({ isError: !0, message: n.error.message }) : _(p()); - }, - [n] - ); - var p = function () { - var t = n.series[0], - e = t.fields.find(function (t) { - return t.name === l.source; - }), - r = t.fields.find(function (t) { - return t.name === l.target; - }), - o = t.fields.find(function (t) { - return t.name === l.value; - }), - i = null == e ? void 0 : e.values.toArray(), - a = null == r ? void 0 : r.values.toArray(), - s = null == o ? void 0 : o.values.toArray(); - if ( - (function (t, e, n) { - var r = !0; - if (!(t && e && n)) return d({ isError: !0, message: c }), !1; - var o = t.every(function (t) { - return 'string' == typeof t; - }), - i = e.every(function (t) { - return 'string' == typeof t; - }), - a = n.every(function (t) { - return 'number' == typeof t; - }); - return o && i && a - ? (d({}), r) - : (d({ - isError: !0, - message: - 'Fields should have the following types: source (string), target (string), value (numeric)', - }), - !1); - })(i, a, s) - ) { - var h = u.zip(i, a, s); - return { - nodes: Array.from(new Set(i.concat(a))).map(function (t) { - return { name: t }; - }), - links: h.map(function (t) { - return { source: t[0], target: t[1], value: +t[2].toFixed(2) }; - }), - }; - } - }, - v = function (t) { - var n = new $(t) - .width(r) - .height(o) - .align(e.align) - .edgeColor(e.edgeColor) - .colorScheme(e.colorScheme) - .displayValues(e.displayValues) - .highlightOnHover(e.highlightOnHover) - .colorArray(e.colorArray) - .data(y); - try { - n.render(); - } catch (t) { - d({ isError: !0, message: t.message }); - } - }; - return f.isError - ? s.a.createElement(et, { message: f.message }) - : s.a.createElement('svg', { - viewBox: '0 0 ' + r + ' ' + o, - ref: function (t) { - u.select(t).selectAll('*').remove(), u.select(t).call(v); - }, - }); - }).setPanelOptions(function (t) { - return t - .addSelect({ - path: 'align', - name: 'Align', - defaultValue: 'Justify', - settings: { - options: [ - { value: 'Justify', label: 'Justify' }, - { value: 'Left', label: 'Left' }, - { value: 'Right', label: 'Right' }, - { value: 'Center', label: 'Center' }, - ], - }, - }) - .addTextInput({ path: 'colorArray', name: 'Color Object', defaultValue: '' }) - .addSelect({ - path: 'colorScheme', - name: 'Color', - defaultValue: 'Tableau10', - settings: { - options: [ - { value: 'Tableau10', label: 'Tableau10' }, - { value: 'Category10', label: 'Category10' }, - { value: 'Accent', label: 'Accent' }, - { value: 'Dark2', label: 'Dark2' }, - { value: 'Paired', label: 'Paired' }, - { value: 'Pastel1', label: 'Pastel1' }, - { value: 'Pastel2', label: 'Pastel2' }, - { value: 'Set1', label: 'Set1' }, - { value: 'Set2', label: 'Set2' }, - { value: 'Set3', label: 'Set3' }, - ], - }, - }) - .addSelect({ - path: 'edgeColor', - name: 'Edge Color', - defaultValue: 'path', - settings: { - options: [ - { value: 'path', label: 'input-output' }, - { value: 'input', label: 'input' }, - { value: 'output', label: 'output' }, - { value: 'none', label: 'none' }, - ], - }, - }) - .addSelect({ - path: 'displayValues', - name: 'Display Values', - defaultValue: 'none', - settings: { - options: [ - { value: 'total', label: 'Totals' }, - { value: 'percentage', label: 'Percentages' }, - { value: 'both', label: 'Both' }, - { value: 'none', label: 'None' }, - ], - }, - }) - .addBooleanSwitch({ - path: 'highlightOnHover', - name: 'Highlight connections on node hover', - defaultValue: !1, - }); + } + }, { + key: "_showAll", + value: function _showAll() { + this._gBound.selectAll('.sankey-node').style('opacity', '1'); + + this._gBound.selectAll('.sankey-link').style('opacity', '1'); + } + }, { + key: "_formatValue", + value: // NODE LABELING + function _formatValue(value) { + return d3__WEBPACK_IMPORTED_MODULE_0__["format"]('.2~f')(value); + } + }, { + key: "_formatPercent", + value: function _formatPercent(percent) { + return d3__WEBPACK_IMPORTED_MODULE_0__["format"]('.2~%')(percent); + } + }, { + key: "_formatThousand", + value: function _formatThousand(value) { + return d3__WEBPACK_IMPORTED_MODULE_0__["format"]('.3~s')(value); + } + }, { + key: "_labelNode", + value: function _labelNode(currentNode) { + var nodesAtDepth = this._nodes.filter(function (node) { + return node.depth === currentNode.depth; + }); + + var totalAtDepth = d3__WEBPACK_IMPORTED_MODULE_0__["sum"](nodesAtDepth, function (node) { + return node.value; + }); + + var nodeValue = this._formatThousand(currentNode.value); + + var nodePercent = this._formatPercent(currentNode.value / totalAtDepth); + + var label = currentNode.name; + + switch (this._displayValues) { + case DISPLAY_VALUES.total: + label = "".concat(label, "\n ").concat(nodeValue); + break; + + case DISPLAY_VALUES.percentage: + label = "".concat(label, "\n ").concat(nodePercent); + break; + + case DISPLAY_VALUES.both: + label = "".concat(label, "\n ").concat(nodePercent, " - ").concat(nodeValue); + break; + + default: + break; + } + + return label; + } + }, { + key: "_renderSVG", + value: // ------------------------------ DRAWING ------------------------------- + function _renderSVG() { + var _this2 = this; + + // BACKGROUND + this._container.style('background-color', this._background); // BOUNDS + + + this._gBound = this._container.append('g').attr('transform', "translate(".concat(this._marginLeft, ", ").concat(this._marginTop, ")")); // NODES + + this._svgNode = this._gBound.append('g').attr('stroke', '#000').selectAll('.sankey-node').data(this._nodes, function (node) { + return node.name; + }).join('rect').attr('class', 'sankey-node').attr('id', function (d) { + return d.name; + }).attr('x', function (d) { + return d.x0; + }).attr('y', function (d) { + return d.y0; + }).attr('rx', 2).attr('ry', 2).attr('height', function (d) { + return d.y1 - d.y0; + }).attr('width', function (d) { + return d.x1 - d.x0; + }).attr('stroke', function (d) { + var colorArray = JSON.parse(_this2._colorArray); + + if (Object.keys(colorArray).includes(d.name)) { + return colorArray[d.name]; + } + + return "rgba(148, 153, 168, 1)"; + }).attr('fill', function (d) { + var colorArray = JSON.parse(_this2._colorArray); + + if (Object.keys(colorArray).includes(d.name)) { + return colorArray[d.name]; + } + + return "rgba(148, 153, 168, 1)"; + }).on('mouseover', function (d) { + return _this2._highlightOnHover && _this2._showLinks(d); + }).on('mouseout', function (_) { + return _this2._highlightOnHover && _this2._showAll(); + }); // LINKS + + this._svgLink = this._gBound.append('g').attr('fill', 'none').attr('stroke-opacity', 0.3).selectAll('g').data(this._links, function (link) { + return "".concat(link.source.name, "-").concat(link.target.name); + }).join('g').style('mix-blend-mode', 'multiply'); + if (this._edgeColor === 'path') this._setLinkGradient(); + + this._svgLink.append('path').attr('class', 'sankey-link').attr('d', d3_sankey__WEBPACK_IMPORTED_MODULE_1__["sankeyLinkHorizontal"]()).attr('stroke', "rgba(182, 185, 196, 1)").attr('stroke-width', function (d) { + return Math.max(1, d.width); + }); // LABELS + + + this._gBound.append('g').attr('font-family', 'sans-serif').attr('font-size', 10).selectAll('text').data(this._nodes).join('text').attr('x', function (d) { + return d.x0 + 8; + }).attr('y', function (d) { + return (d.y1 + d.y0) / 2; + }).attr('dy', '0.35em') //.attr('text-anchor', d => (d.x0 < this._width / 2 ? 'start' : 'end')) + .text(function (d) { + return _this2._labelNode(d); + }); + + this._gBound.append('g').attr('font-family', 'sans-serif').attr('font-size', 10).selectAll('text').data(this._nodes).join('text').attr('x', function (d) { + return d.x0 + 8; + }).attr('font-size', 14).attr('font-weight', '700').attr('y', function (d) { + return (d.y1 + d.y0) / 2 + 16; + }).attr('dy', '0.35em') //.attr('text-anchor', d => (d.x0 < this._width / 2 ? 'start' : 'end')) + .text(function (d) { + return _this2._formatValue(d.value); + }); + + this._svgNode.append('title').text(function (d) { + return "".concat(d.name, "\n").concat(_this2._formatValue(d.value)); + }); + + this._svgLink.append('title').text(function (d) { + return "".concat(d.source.name, " \u2192 ").concat(d.target.name, "\n").concat(_this2._formatValue(d.value)); + }); + } // ----------------------------------------------------------------------- + // ------------------------------ API ------------------------------ + // ----------------------------------------------------------------------- + + }, { + key: "data", + value: function data(_) { + return arguments.length ? (this._data = _, this) : this._data; + } + }, { + key: "width", + value: function width(_) { + return arguments.length ? (this._width = +_, this) : this._width; + } + }, { + key: "height", + value: function height(_) { + return arguments.length ? (this._height = +_, this) : this._height; + } + }, { + key: "align", + value: function align(_) { + return arguments.length ? (this._sankeyAlignType = _, this) : this._sankeyAlignType; + } + }, { + key: "colorScheme", + value: function colorScheme(_) { + return arguments.length ? (this._colorScheme = _, this) : this._colorScheme; + } + }, { + key: "colorArray", + value: function colorArray(_) { + return arguments.length ? (this._colorArray = _, this) : this._colorArray; + } + }, { + key: "edgeColor", + value: function edgeColor(_) { + return arguments.length ? (this._edgeColor = _, this) : this._edgeColor; + } + }, { + key: "displayValues", + value: function displayValues(_) { + return arguments.length ? (this._displayValues = _, this) : this._displayValues; + } + }, { + key: "highlightOnHover", + value: function highlightOnHover(_) { + return arguments.length ? (this._highlightOnHover = _, this) : this._highlightOnHover; + } + }, { + key: "render", + value: function render() { + if (!this._validate()) {// no graph data + } else { + this._init(); + + this._renderSVG(); + } + + return this; + } + }]); + + return Sankey; +}(); + +/***/ }), + +/***/ "./SankeyPanel.tsx": +/*!*************************!*\ + !*** ./SankeyPanel.tsx ***! + \*************************/ +/*! exports provided: SankeyPanel */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SankeyPanel", function() { return SankeyPanel; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! d3 */ "d3"); +/* harmony import */ var d3__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(d3__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var Sankey__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! Sankey */ "./Sankey.js"); +/* harmony import */ var Error__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! Error */ "./Error.tsx"); + // @ts-nocheck + + + + + +var SankeyPanel = function SankeyPanel(_a) { + var options = _a.options, + data = _a.data, + width = _a.width, + height = _a.height; // ------------------------ CHART CONSTANTS ----------------------- + + var CHART_REQUIRED_FIELDS = { + source: 'source', + target: 'target', + value: 'value' + }; // ------------------------ ERROR MESSAGES ------------------------ + + var requiredFieldsMsg = "Required fields not present: " + Object.keys(CHART_REQUIRED_FIELDS).join(', '); + var fieldTypeMsg = "Fields should have the following types: source (string), target (string), value (numeric)"; // ------------------------- REACT HOOKS -------------------------- + + var _b = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])({ + isError: false, + message: '' + }), 2), + error = _b[0], + setError = _b[1]; + + var _c = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__read"])(Object(react__WEBPACK_IMPORTED_MODULE_1__["useState"])({ + nodes: [], + links: [] + }), 2), + graph = _c[0], + setGraph = _c[1]; + + Object(react__WEBPACK_IMPORTED_MODULE_1__["useEffect"])(function () { + data.error ? setError({ + isError: true, + message: data.error.message + }) : setGraph(buildGraph()); + }, [data]); // ------------------------- DATA ACQUISITION ------------------------- + + var validate = function validate(sources, targets, values) { + var isValid = true; // REQUIRED FIELDS + + if (!(sources && targets && values)) { + setError({ + isError: true, + message: requiredFieldsMsg + }); + return isValid = false; + } // FIELD TYPES + + + var sourcesString = sources.every(function (d) { + return typeof d === 'string'; + }); + var targetsString = targets.every(function (d) { + return typeof d === 'string'; + }); + var valuesNumeric = values.every(function (d) { + return typeof d === 'number'; + }); + + if (!(sourcesString && targetsString && valuesNumeric)) { + setError({ + isError: true, + message: fieldTypeMsg + }); + return isValid = false; + } + + setError({}); + return isValid; + }; + + var buildGraph = function buildGraph() { + var frame = data.series[0]; + var sourceAccesor = frame.fields.find(function (field) { + return field.name === CHART_REQUIRED_FIELDS.source; + }); + var targetAccesor = frame.fields.find(function (field) { + return field.name === CHART_REQUIRED_FIELDS.target; + }); + var valueAccesor = frame.fields.find(function (field) { + return field.name === CHART_REQUIRED_FIELDS.value; + }); + var sources = sourceAccesor === null || sourceAccesor === void 0 ? void 0 : sourceAccesor.values.toArray(); + var targets = targetAccesor === null || targetAccesor === void 0 ? void 0 : targetAccesor.values.toArray(); + var values = valueAccesor === null || valueAccesor === void 0 ? void 0 : valueAccesor.values.toArray(); + var isValid = validate(sources, targets, values); + + if (!isValid) { + return; + } + + var zip = d3__WEBPACK_IMPORTED_MODULE_2__["zip"](sources, targets, values); + var nodes = Array.from(new Set(sources.concat(targets))).map(function (node) { + return { + name: node + }; + }); + var links = zip.map(function (d) { + return { + source: d[0], + target: d[1], + value: +d[2].toFixed(2) + }; + }); + var graph = { + nodes: nodes, + links: links + }; + return graph; + }; // ------------------------------- CHART ------------------------------ + + + var chart = function chart(svg) { + var sankey = new Sankey__WEBPACK_IMPORTED_MODULE_3__["Sankey"](svg).width(width).height(height).align(options.align).edgeColor(options.edgeColor).colorScheme(options.colorScheme).displayValues(options.displayValues).highlightOnHover(options.highlightOnHover).data(graph); + + try { + sankey.render(); + } catch (renderError) { + setError({ + isError: true, + message: renderError.message }); - }, - ]); + } + }; + + return error.isError ? react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(Error__WEBPACK_IMPORTED_MODULE_4__["ErrorMessage"], { + message: error.message + }) : react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement("svg", { + viewBox: "0 0 " + width + " " + height, + ref: function ref(node) { + d3__WEBPACK_IMPORTED_MODULE_2__["select"](node).selectAll('*').remove(); + d3__WEBPACK_IMPORTED_MODULE_2__["select"](node).call(chart); + } + }); +}; + +/***/ }), + +/***/ "./SankeyPanelFn.tsx": +/*!***************************!*\ + !*** ./SankeyPanelFn.tsx ***! + \***************************/ +/*! exports provided: SankeyPanelFn */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SankeyPanelFn", function() { return SankeyPanelFn; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "react"); +/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var SankeyPanel__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! SankeyPanel */ "./SankeyPanel.tsx"); +/* harmony import */ var transform_fn_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! transform-fn-data */ "./transform-fn-data.ts"); + + + + +var SankeyPanelFn = function SankeyPanelFn(_a) { + var data = _a.data, + props = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(_a, ["data"]); + + var transformFn = Object(react__WEBPACK_IMPORTED_MODULE_1__["useMemo"])(transform_fn_data__WEBPACK_IMPORTED_MODULE_3__["transformFnData"], []); + var transformedData = Object(react__WEBPACK_IMPORTED_MODULE_1__["useMemo"])(function () { + return transformFn(data); + }, [transformFn, data]); + return react__WEBPACK_IMPORTED_MODULE_1___default.a.createElement(SankeyPanel__WEBPACK_IMPORTED_MODULE_2__["SankeyPanel"], Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, props), { + data: transformedData + }))); +}; + +/***/ }), + +/***/ "./module.ts": +/*!*******************!*\ + !*** ./module.ts ***! + \*******************/ +/*! exports provided: plugin */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "plugin", function() { return plugin; }); +/* harmony import */ var _grafana_data__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @grafana/data */ "@grafana/data"); +/* harmony import */ var _grafana_data__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_grafana_data__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _SankeyPanelFn__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./SankeyPanelFn */ "./SankeyPanelFn.tsx"); + + +var plugin = new _grafana_data__WEBPACK_IMPORTED_MODULE_0__["PanelPlugin"](_SankeyPanelFn__WEBPACK_IMPORTED_MODULE_1__["SankeyPanelFn"]).setPanelOptions(function (builder) { + return builder.addSelect({ + path: 'align', + name: 'Align', + defaultValue: 'Justify', + settings: { + options: [{ + value: 'Justify', + label: 'Justify' + }, { + value: 'Left', + label: 'Left' + }, { + value: 'Right', + label: 'Right' + }, { + value: 'Center', + label: 'Center' + }] + } + }).addTextInput({ + path: 'colorArray', + name: 'Color Object', + defaultValue: '' + }).addSelect({ + path: 'colorScheme', + name: 'Color', + defaultValue: 'Tableau10', + settings: { + options: [{ + value: 'Tableau10', + label: 'Tableau10' + }, { + value: 'Category10', + label: 'Category10' + }, { + value: 'Accent', + label: 'Accent' + }, { + value: 'Dark2', + label: 'Dark2' + }, { + value: 'Paired', + label: 'Paired' + }, { + value: 'Pastel1', + label: 'Pastel1' + }, { + value: 'Pastel2', + label: 'Pastel2' + }, { + value: 'Set1', + label: 'Set1' + }, { + value: 'Set2', + label: 'Set2' + }, { + value: 'Set3', + label: 'Set3' + }] + } + }).addSelect({ + path: 'edgeColor', + name: 'Edge Color', + defaultValue: 'path', + settings: { + options: [{ + value: 'path', + label: 'input-output' + }, { + value: 'input', + label: 'input' + }, { + value: 'output', + label: 'output' + }, { + value: 'none', + label: 'none' + }] + } + }).addSelect({ + path: 'displayValues', + name: 'Display Values', + defaultValue: 'none', + settings: { + options: [{ + value: 'total', + label: 'Totals' + }, { + value: 'percentage', + label: 'Percentages' + }, { + value: 'both', + label: 'Both' + }, { + value: 'none', + label: 'None' + }] + } + }).addBooleanSwitch({ + path: 'highlightOnHover', + name: 'Highlight connections on node hover', + defaultValue: false + }); }); -//# sourceMappingURL=module.js.map + +/***/ }), + +/***/ "./transform-fn-data.ts": +/*!******************************!*\ + !*** ./transform-fn-data.ts ***! + \******************************/ +/*! exports provided: transformFnData */ +/***/ (function(module, __webpack_exports__, __webpack_require__) { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "transformFnData", function() { return transformFnData; }); +/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../node_modules/tslib/tslib.es6.js"); +/* harmony import */ var _grafana_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @grafana/data */ "@grafana/data"); +/* harmony import */ var _grafana_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_grafana_data__WEBPACK_IMPORTED_MODULE_1__); + // NOTE: implementation of toDataFrame: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/dataframe/processDataFrame.ts + + +function transformFnData() { + return function (_a) { + var series = _a.series, + other = Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__rest"])(_a, ["series"]); + + var transformedSeries = series.map(function (data) { + return Object(_grafana_data__WEBPACK_IMPORTED_MODULE_1__["toDataFrame"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, data), { + fields: data.fields.map(mapField()) + })); + }); + return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({ + series: transformedSeries + }, other); + }; +} +var SANKEY_FIELD_NAMES = ['source', 'target', 'value']; // @ts-ignore + +function mapField() { + return function (field, _, __) { + var _a; + + var isSankeyField = SANKEY_FIELD_NAMES.includes(field.name); + var isArrayVector = field.values instanceof _grafana_data__WEBPACK_IMPORTED_MODULE_1__["ArrayVector"] || typeof ((_a = field.values) === null || _a === void 0 ? void 0 : _a.toArray) === 'function'; + var isArray = Array.isArray(field.values); + + if (!isSankeyField || !field.values || !isArray && !isArrayVector) { + return field; + } + + var values = isArrayVector ? field.values.toArray() : isArray ? field.values : null; + + if (values === null) { + return field; + } + + var parsedValues = isSankeyField ? values.map(splitValue())[0].map(mapToNumber()) : null; + return Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])(Object(tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"])({}, field), { + type: (parsedValues === null || parsedValues === void 0 ? void 0 : parsedValues.every(isNumber())) ? _grafana_data__WEBPACK_IMPORTED_MODULE_1__["FieldType"].number : field.type, + values: parsedValues ? new _grafana_data__WEBPACK_IMPORTED_MODULE_1__["ArrayVector"](parsedValues) : values + }); + }; +} // @ts-ignore + + +function mapToNumber() { + return function (value, _, __) { + return Number.isNaN(Number(value)) ? value : Number(value); + }; +} // @ts-ignore + + +function splitValue() { + return function (value) { + return typeof value === 'string' ? value.split('|') : value; + }; +} // @ts-ignore + + +function isNumber() { + return function (value) { + return typeof value === 'number'; + }; +} + +/***/ }), + +/***/ "@grafana/data": +/*!********************************!*\ + !*** external "@grafana/data" ***! + \********************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_data__; + +/***/ }), + +/***/ "@grafana/ui": +/*!******************************!*\ + !*** external "@grafana/ui" ***! + \******************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_ui__; + +/***/ }), + +/***/ "d3": +/*!*********************!*\ + !*** external "d3" ***! + \*********************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_d3__; + +/***/ }), + +/***/ "react": +/*!************************!*\ + !*** external "react" ***! + \************************/ +/*! no static exports found */ +/***/ (function(module, exports) { + +module.exports = __WEBPACK_EXTERNAL_MODULE_react__; + +/***/ }) + +/******/ })});; +//# sourceMappingURL=module.js.map \ No newline at end of file diff --git a/public/app/plugins/panel/sankey-panel-0.5.0/module.js.map b/public/app/plugins/panel/sankey-panel-0.5.0/module.js.map index 0c44a00ad1a5..c6cd610d07a4 100644 --- a/public/app/plugins/panel/sankey-panel-0.5.0/module.js.map +++ b/public/app/plugins/panel/sankey-panel-0.5.0/module.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///external \"react\"","webpack:///external \"d3\"","webpack:///external \"@grafana/data\"","webpack:///external \"@grafana/ui\"","webpack:///../node_modules/tslib/tslib.es6.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/sum.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/max.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/min.js","webpack:///../node_modules/d3-sankey/src/align.js","webpack:///../node_modules/d3-sankey/src/constant.js","webpack:///../node_modules/d3-sankey/src/sankey.js","webpack:///../node_modules/d3-path/src/path.js","webpack:///../node_modules/d3-shape/src/array.js","webpack:///../node_modules/d3-shape/src/constant.js","webpack:///../node_modules/d3-shape/src/point.js","webpack:///../node_modules/d3-shape/src/link/index.js","webpack:///../node_modules/d3-sankey/src/sankeyLinkHorizontal.js","webpack:///./Sankey.js","webpack:///./Error.tsx","webpack:///./module.ts","webpack:///./SankeyPanel.tsx"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__WEBPACK_EXTERNAL_MODULE__0__","__WEBPACK_EXTERNAL_MODULE__1__","__WEBPACK_EXTERNAL_MODULE__2__","__WEBPACK_EXTERNAL_MODULE__3__","__read","iterator","e","ar","next","done","push","error","sum","values","valueof","undefined","index","max","min","targetDepth","target","depth","left","node","right","height","justify","sourceLinks","length","center","targetLinks","constant","x","ascendingSourceBreadth","a","b","ascendingBreadth","source","ascendingTargetBreadth","y0","defaultId","defaultNodes","graph","nodes","defaultLinks","links","find","nodeById","id","Error","computeLinkBreadths","y1","link","width","py","sort","linkSort","x0","x1","dx","dy","align","iterations","sankey","apply","arguments","computeNodeLinks","computeNodeValues","computeNodeDepths","computeNodeHeights","computeNodeBreadths","entries","Map","map","fixedValue","Math","current","Set","size","add","columns","kx","Array","floor","layer","column","computeNodeLayers","ky","y","reorderLinks","initializeNodeBreadths","alpha","pow","beta","relaxRightToLeft","relaxLeftToRight","w","v","targetTop","reorderNodeLinks","resolveCollisions","sourceTop","subject","resolveCollisionsBottomToTop","resolveCollisionsTopToBottom","update","nodeId","_","nodeAlign","nodeSort","nodeWidth","nodePadding","extent","pi","PI","tau","tauEpsilon","Path","this","_x0","_y0","_x1","_y1","path","constructor","moveTo","closePath","lineTo","quadraticCurveTo","bezierCurveTo","x2","y2","arcTo","x21","y21","x01","y01","l01_2","abs","x20","y20","l21_2","l20_2","l21","sqrt","l01","tan","acos","t01","t21","arc","a0","a1","ccw","cos","sin","cw","da","rect","h","toString","slice","linkSource","linkTarget","curve","context","buffer","argv","curveHorizontal","horizontalSource","horizontalTarget","DISPLAY_VALUES","EDGE_COLORS","Sankey","svg","container","_svg","_container","_gBound","_data","_nodes","_links","_width","_height","_boundedWidth","_boundedHeight","_marginTop","_marginRight","_marginBottom","_marginLeft","_background","_edgeColor","_colorScheme","_colorScale","_colorArray","_sankeyAlignType","_sankeyAlign","_sankeyGenerator","_sankeyNodeWith","_sankeyNodePadding","_svgNode","_svgLink","_displayValues","_highlightOnHover","_setBoundDimensions","_setColorScale","_configureSankey","_calculateSankey","d3","d3Sankey","sankeyData","assign","gradient","append","attr","uid","random","_color","currentNode","linkedNodes","linkType","nodeType","forEach","step","selectAll","style","linkedNode","percent","nodesAtDepth","filter","totalAtDepth","nodeValue","_formatThousand","nodePercent","_formatPercent","label","data","join","colorArray","JSON","parse","keys","includes","on","_showLinks","_showAll","_setLinkGradient","text","_labelNode","_formatValue","_validate","_init","_renderSVG","message","panelStyles","containerStyles","messageStyles","display","justifyContent","alignItems","padding","marginBottom","position","color","textShadow","borderRadius","flexDirection","background","marginLeft","options","CHART_REQUIRED_FIELDS","requiredFieldsMsg","isError","setError","setGraph","buildGraph","frame","series","sourceAccesor","fields","field","targetAccesor","valueAccesor","sources","toArray","targets","isValid","sourcesString","every","targetsString","valuesNumeric","validate","zip","from","concat","toFixed","chart","edgeColor","colorScheme","displayValues","highlightOnHover","render","renderError","viewBox","ref","remove","setPanelOptions","builder","addSelect","defaultValue","settings","addTextInput","addBooleanSwitch"],"mappings":";0FACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,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ACP0P,MAAO,QAET,CACE1P,MAAO,OACP0P,MAAO,QAET,CACE1P,MAAO,OACP0P,MAAO,YAKdyE,UAAU,CACTzL,KAAM,YACNpJ,KAAM,aACN8U,aAAc,OACdC,SAAU,CACRzC,QAAS,CACP,CACE5R,MAAO,OACP0P,MAAO,gBAET,CACE1P,MAAO,QACP0P,MAAO,SAET,CACE1P,MAAO,SACP0P,MAAO,UAET,CACE1P,MAAO,OACP0P,MAAO,YAKdyE,UAAU,CACTzL,KAAM,gBACNpJ,KAAM,iBACN8U,aAAc,OACdC,SAAU,CACRzC,QAAS,CACP,CACE5R,MAAO,QACP0P,MAAO,UAET,CACE1P,MAAO,aACP0P,MAAO,eAET,CACE1P,MAAO,OACP0P,MAAO,QAET,CACE1P,MAAO,OACP0P,MAAO,YAKd6E,iBAAiB,CAChB7L,KAAM,mBACNpJ,KAAM,sCACN8U,cAAc","file":"module.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 5);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__0__;","module.exports = __WEBPACK_EXTERNAL_MODULE__1__;","module.exports = __WEBPACK_EXTERNAL_MODULE__2__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n","export default function constant(x) {\n return function() {\n return x;\n };\n}\n","import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","export var slice = Array.prototype.slice;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n","import * as d3 from 'd3';\nimport * as d3Sankey from 'd3-sankey';\n\nconst DISPLAY_VALUES = { total: 'total', percentage: 'percentage', both: 'both', none: 'none' };\nconst EDGE_COLORS = { none: 'none', path: 'path', input: 'input', output: 'output'};\n\nexport class Sankey {\n constructor(svg, container) {\n this._svg = svg;\n this._container = container || svg;\n this._gBound = null;\n\n this._data = null;\n this._nodes = null;\n this._links = null;\n\n this._width = 0;\n this._height = 0;\n this._boundedWidth = 0;\n this._boundedHeight = 0;\n\n this._marginTop = 20;\n this._marginRight = 20;\n this._marginBottom = 20;\n this._marginLeft = 20;\n\n this._background = 'rgba(0, 0, 0, 0)';\n this._edgeColor = 'path';\n this._colorScheme = 'Tableau10';\n this._colorScale = null;\n this._colorArray = '';\n\n this._sankeyAlignType = 'Justify';\n this._sankeyAlign = null;\n this._sankeyGenerator = null;\n this._sankeyNodeWith = 85;\n this._sankeyNodePadding = 20;\n\n this._svgNode = null;\n this._svgLink = null;\n\n this._displayValues = 'none';\n this._highlightOnHover = false;\n\n }\n \n _init() {\n this._setBoundDimensions();\n this._setColorScale();\n this._configureSankey();\n this._calculateSankey();\n }\n\n // ---------------------------- DIMENSIONS ----------------------------\n\n _setBoundDimensions() {\n this._boundedWidth = this._width - this._marginLeft - this._marginRight;\n this._boundedHeight = this._height - this._marginTop - this._marginBottom;\n }\n\n // ------------------------------ COLOR -------------------------------\n\n _setColorScale() {\n this._colorScale = d3.scaleOrdinal(d3[`scheme${this._colorScheme}`]);\n }\n\n _color(node) {\n return this._colorScale(node.name);\n }\n\n // ------------------------------ SANKEY -------------------------------\n\n _configureSankey() {\n this._sankeyAlign = d3Sankey[`sankey${this._sankeyAlignType}`];\n\n this._sankeyGenerator = d3Sankey\n .sankey()\n .nodeId(d => d.name)\n .nodeAlign(this._sankeyAlign)\n .nodeWidth(this._sankeyNodeWith)\n .nodePadding(this._sankeyNodePadding)\n .extent([\n [0, 0],\n [this._boundedWidth, this._boundedHeight],\n ]);\n }\n\n _calculateSankey() {\n const sankeyData = this._sankeyGenerator({\n nodes: this._data.nodes.map(d => Object.assign({}, d)),\n links: this._data.links.map(d => Object.assign({}, d))\n });\n\n this._nodes = sankeyData.nodes;\n this._links = sankeyData.links;\n }\n\n // ---------------------------- VALIDATIONS -----------------------------\n\n _validate() {\n return this._data &&\n this._data.nodes &&\n this._data.links &&\n this._data.nodes.length > 0 &&\n this._data.links.length > 0\n }\n\n // ------------------------------ HELPERS -------------------------------\n\n _setLinkGradient() {\n const gradient = this._svgLink\n .append('linearGradient')\n .attr('id', d => (d.uid = `link-${d.index}-${Math.random()}`))\n .attr('gradientUnits', 'userSpaceOnUse')\n .attr('x1', d => d.source.x1)\n .attr('x2', d => d.target.x0);\n\n gradient\n .append('stop')\n .attr('offset', '0%')\n .attr('stop-color', d => this._color(d.source));\n\n gradient\n .append('stop')\n .attr('offset', '100%')\n .attr('stop-color', d => this._color(d.target));\n }\n\n _setLinkStroke(d) {\n switch (this._edgeColor) {\n case EDGE_COLORS.none:\n return '#aaa';\n case EDGE_COLORS.path:\n return `url(#${d.uid})`;\n case EDGE_COLORS.input:\n return this._color(d.source)\n case EDGE_COLORS.output:\n return this._color(d.target)\n default:\n return\n }\n }\n\n // NODE HOVER\n _showLinks(currentNode) {\n const linkedNodes = [];\n\n let traverse = [\n {\n linkType: 'sourceLinks',\n nodeType: 'target',\n },\n {\n linkType: 'targetLinks',\n nodeType: 'source',\n },\n ];\n\n traverse.forEach(step => {\n currentNode[step.linkType].forEach(l => {\n linkedNodes.push(l[step.nodeType]);\n });\n });\n\n // highlight linked nodes\n this._gBound\n .selectAll('.sankey-node')\n .style('opacity', node =>\n currentNode.name === node.name ||\n linkedNodes.find(linkedNode => linkedNode.name === node.name) ? \n '1' : '0.2'\n );\n\n // highlight links\n this._gBound\n .selectAll('.sankey-link')\n .style('opacity', link =>\n link && (\n link.source.name === currentNode.name || \n link.target.name === currentNode.name\n ) ? \n '1' : '0.2'\n );\n };\n\n _showAll() {\n this._gBound.selectAll('.sankey-node').style('opacity', '1');\n this._gBound.selectAll('.sankey-link').style('opacity', '1');\n };\n\n // NODE LABELING\n _formatValue(value) { return d3.format('.2~f')(value); }\n _formatPercent(percent) { return d3.format('.2~%')(percent); }\n _formatThousand(value) { return d3.format('.3~s')(value); }\n\n _labelNode(currentNode) {\n const nodesAtDepth = this._nodes.filter(node => node.depth === currentNode.depth);\n const totalAtDepth = d3.sum(nodesAtDepth, node => node.value);\n const nodeValue = this._formatThousand(currentNode.value);\n const nodePercent = this._formatPercent(currentNode.value / totalAtDepth);\n\n let label = currentNode.name;\n switch (this._displayValues) {\n case DISPLAY_VALUES.total:\n label = `${label}\n ${nodeValue}`;\n break;\n case DISPLAY_VALUES.percentage:\n label = `${label}\n ${nodePercent}`;\n break;\n case DISPLAY_VALUES.both:\n label = `${label}\n ${nodePercent} - ${nodeValue}`;\n break;\n default:\n break;\n }\n return label;\n };\n\n // ------------------------------ DRAWING -------------------------------\n\n _renderSVG() {\n // BACKGROUND\n this._container.style('background-color', this._background)\n\n // BOUNDS\n this._gBound = this._container.append('g')\n .attr('transform', `translate(${this._marginLeft}, ${this._marginTop})`);\n\n // NODES\n this._svgNode = this._gBound\n .append('g')\n .attr('stroke', '#000')\n .selectAll('.sankey-node')\n .data(this._nodes, node => node.name)\n .join('rect')\n .attr('class', 'sankey-node')\n .attr('id', d => d.name)\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('rx', 2)\n .attr('ry', 2)\n .attr('height', d => d.y1 - d.y0)\n .attr('width', d => d.x1 - d.x0)\n .attr('stroke', d => {\n const colorArray = JSON.parse(this._colorArray);\n if (Object.keys(colorArray).includes(d.name)) {\n return colorArray[d.name];\n }\n return \"rgba(148, 153, 168, 1)\";\n })\n .attr('fill', d => {\n const colorArray = JSON.parse(this._colorArray);\n if (Object.keys(colorArray).includes(d.name)) {\n return colorArray[d.name];\n }\n return \"rgba(148, 153, 168, 1)\";\n })\n .on('mouseover', d => this._highlightOnHover && this._showLinks(d))\n .on('mouseout', _ => this._highlightOnHover && this._showAll());\n\n // LINKS\n this._svgLink = this._gBound\n .append('g')\n .attr('fill', 'none')\n .attr('stroke-opacity', 0.3)\n .selectAll('g')\n .data(this._links, link => `${link.source.name}-${link.target.name}`)\n .join('g')\n .style('mix-blend-mode', 'multiply');\n\n if (this._edgeColor === 'path') this._setLinkGradient()\n\n this._svgLink\n .append('path')\n .attr('class', 'sankey-link')\n .attr('d', d3Sankey.sankeyLinkHorizontal())\n .attr('stroke', \"rgba(182, 185, 196, 1)\")\n .attr('stroke-width', d => Math.max(1, d.width)); \n\n // LABELS\n this._gBound\n .append('g')\n .attr('font-family', 'sans-serif')\n .attr('font-size', 10)\n .selectAll('text')\n .data(this._nodes)\n .join('text')\n .attr('x', d => d.x0 + 8)\n .attr('y', d => (d.y1 + d.y0) / 2)\n .attr('dy', '0.35em')\n //.attr('text-anchor', d => (d.x0 < this._width / 2 ? 'start' : 'end'))\n .text(d => this._labelNode(d));\n\n this._gBound\n .append('g')\n .attr('font-family', 'sans-serif')\n .attr('font-size', 10)\n .selectAll('text')\n .data(this._nodes)\n .join('text')\n .attr('x', d => d.x0 + 8)\n .attr('font-size', 14)\n .attr('font-weight', '700')\n .attr('y', d => ((d.y1 + d.y0) / 2) + 16)\n .attr('dy', '0.35em')\n //.attr('text-anchor', d => (d.x0 < this._width / 2 ? 'start' : 'end'))\n .text(d => this._formatValue(d.value));\n\n this._svgNode\n .append('title')\n .text(d => `${d.name}\\n${this._formatValue(d.value)}`);\n\n this._svgLink\n .append('title')\n .text(d => `${d.source.name} → ${d.target.name}\\n${this._formatValue(d.value)}`);\n }\n\n\n // ----------------------------------------------------------------------- \n // ------------------------------ API ------------------------------\n // ----------------------------------------------------------------------- \n\n data(_) {\n return arguments.length ? (this._data = _, this) : this._data;\n };\n\n width(_) {\n return arguments.length ? (this._width = +_, this) : this._width;\n };\n\n height(_) {\n return arguments.length ? (this._height = +_, this) : this._height;\n };\n\n align(_) {\n return arguments.length ? (this._sankeyAlignType = _, this) : this._sankeyAlignType;\n }\n\n colorScheme(_) {\n return arguments.length ? (this._colorScheme = _, this) : this._colorScheme;\n }\n\n colorArray(_) {\n return arguments.length ? (this._colorArray = _, this) : this._colorArray;\n }\n\n edgeColor(_) {\n return arguments.length ? (this._edgeColor = _, this) : this._edgeColor;\n }\n\n displayValues(_) {\n return arguments.length ? (this._displayValues = _, this) : this._displayValues;\n }\n\n highlightOnHover(_) {\n return arguments.length ? (this._highlightOnHover = _, this) : this._highlightOnHover;\n }\n\n render() {\n if (!this._validate()) {\n // no graph data\n }\n else {\n this._init();\n this._renderSVG()\n }\n return this;\n }\n}\n","// @ts-nocheck\nimport React from 'react';\nimport { Icon } from '@grafana/ui';\n\nexport const ErrorMessage = ({ message }) => ( \n

\n

\n \n
{message}
\n
\n

\n)\n\nconst panelStyles = {\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n}\n\nconst containerStyles = {\n padding: '15px 20px',\n marginBottom: '4px',\n position: 'relative',\n color: 'rgb(255, 255, 255)',\n textShadow: 'rgb(0 0 0 / 20%) 0px 1px 0px',\n borderRadius: '3px',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n background: 'linear-gradient(90deg, rgb(224, 47, 68), rgb(224, 47, 68))'\n}\n\nconst messageStyles = {\n marginLeft: 10\n}\n","import { PanelPlugin } from '@grafana/data';\nimport { SankeyOptions } from './types';\nimport { SankeyPanel } from './SankeyPanel';\n\nexport const plugin = new PanelPlugin(SankeyPanel).setPanelOptions((builder) => {\n return builder\n .addSelect({\n path: 'align',\n name: 'Align',\n defaultValue: 'Justify',\n settings: {\n options: [\n {\n value: 'Justify',\n label: 'Justify',\n },\n {\n value: 'Left',\n label: 'Left',\n },\n {\n value: 'Right',\n label: 'Right',\n },\n {\n value: 'Center',\n label: 'Center',\n },\n ],\n },\n })\n .addTextInput({\n path: 'colorArray',\n name: 'Color Object',\n defaultValue: '',\n })\n .addSelect({\n path: 'colorScheme',\n name: 'Color',\n defaultValue: 'Tableau10',\n settings: {\n options: [\n {\n value: 'Tableau10',\n label: 'Tableau10',\n },\n {\n value: 'Category10',\n label: 'Category10',\n },\n {\n value: 'Accent',\n label: 'Accent',\n },\n {\n value: 'Dark2',\n label: 'Dark2',\n },\n {\n value: 'Paired',\n label: 'Paired',\n },\n {\n value: 'Pastel1',\n label: 'Pastel1',\n },\n {\n value: 'Pastel2',\n label: 'Pastel2',\n },\n {\n value: 'Set1',\n label: 'Set1',\n },\n {\n value: 'Set2',\n label: 'Set2',\n },\n {\n value: 'Set3',\n label: 'Set3',\n },\n ],\n },\n })\n .addSelect({\n path: 'edgeColor',\n name: 'Edge Color',\n defaultValue: 'path',\n settings: {\n options: [\n {\n value: 'path',\n label: 'input-output',\n },\n {\n value: 'input',\n label: 'input',\n },\n {\n value: 'output',\n label: 'output',\n },\n {\n value: 'none',\n label: 'none',\n },\n ],\n },\n })\n .addSelect({\n path: 'displayValues',\n name: 'Display Values',\n defaultValue: 'none',\n settings: {\n options: [\n {\n value: 'total',\n label: 'Totals',\n },\n {\n value: 'percentage',\n label: 'Percentages',\n },\n {\n value: 'both',\n label: 'Both',\n },\n {\n value: 'none',\n label: 'None',\n },\n ],\n },\n })\n .addBooleanSwitch({\n path: 'highlightOnHover',\n name: 'Highlight connections on node hover',\n defaultValue: false,\n });\n});\n","// @ts-nocheck\nimport React, { useState, useEffect } from 'react';\nimport * as d3 from 'd3';\nimport { PanelProps } from '@grafana/data';\nimport { SankeyOptions } from 'types';\nimport { Sankey } from 'Sankey'\nimport { ErrorMessage } from 'Error'\n\ninterface Props extends PanelProps {}\n\nexport const SankeyPanel: React.FC = ({ options, data, width, height }) => {\n // ------------------------ CHART CONSTANTS -----------------------\n const CHART_REQUIRED_FIELDS = { source: 'source', target: 'target', value: 'value' };\n\n // ------------------------ ERROR MESSAGES ------------------------\n const requiredFieldsMsg = `Required fields not present: ${Object.keys(CHART_REQUIRED_FIELDS).join(', ')}`;\n const fieldTypeMsg = `Fields should have the following types: source (string), target (string), value (numeric)`;\n\n // ------------------------- REACT HOOKS --------------------------\n const [ error, setError ] = useState({ isError: false, message: '' })\n const [ graph, setGraph ] = useState({ nodes: [], links: [] })\n\n useEffect(() => {\n data.error\n ?\n setError({isError: true, message: data.error.message})\n :\n setGraph(buildGraph())\n }, [data])\n\n // ------------------------- DATA ACQUISITION -------------------------\n const validate = (sources, targets, values) => {\n let isValid = true;\n\n // REQUIRED FIELDS\n if (!(sources && targets && values)) {\n setError({ isError: true, message: requiredFieldsMsg })\n return isValid = false;\n }\n\n // FIELD TYPES\n const sourcesString = sources.every(d => typeof d === 'string')\n const targetsString = targets.every(d => typeof d === 'string')\n const valuesNumeric = values.every(d => typeof d === 'number')\n\n if (!(sourcesString && targetsString && valuesNumeric)) {\n setError({ isError: true, message: fieldTypeMsg })\n return isValid = false;\n }\n\n setError({});\n\n return isValid;\n }\n\n const buildGraph = () => {\n const frame = data.series[0];\n\n const sourceAccesor = frame.fields.find(field => field.name === CHART_REQUIRED_FIELDS.source);\n const targetAccesor = frame.fields.find(field => field.name === CHART_REQUIRED_FIELDS.target);\n const valueAccesor = frame.fields.find(field => field.name === CHART_REQUIRED_FIELDS.value);\n\n const sources = sourceAccesor?.values.toArray();\n const targets = targetAccesor?.values.toArray();\n const values = valueAccesor?.values.toArray();\n\n const isValid = validate(sources, targets, values);\n if (!isValid) {return}\n \n const zip = d3.zip(sources, targets, values);\n \n const nodes = Array.from(new Set(sources.concat(targets))).map(node => ({ name: node }));\n const links = zip.map(d => ({ source: d[0], target: d[1], value: +d[2].toFixed(2) }));\n const graph = { nodes, links };\n\n return graph\n }\n\n // ------------------------------- CHART ------------------------------\n const chart = svg => {\n const sankey = new Sankey(svg)\n .width(width)\n .height(height)\n .align(options.align)\n .edgeColor(options.edgeColor)\n .colorScheme(options.colorScheme)\n .displayValues(options.displayValues)\n .highlightOnHover(options.highlightOnHover)\n .colorArray(options.colorArray)\n .data(graph)\n\n try {\n sankey.render();\n } catch (renderError) {\n setError({isError: true, message: renderError.message})\n }\n };\n\n return (error.isError ?\n \n :\n {\n d3.select(node)\n .selectAll('*')\n .remove();\n d3.select(node).call(chart);\n }}\n />\n );\n};\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///../node_modules/d3-path/src/index.js","webpack:///../node_modules/d3-path/src/path.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/array.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/ascending.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/bin.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/bisect.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/bisector.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/constant.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/count.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/cross.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/cumsum.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/descending.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/deviation.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/difference.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/disjoint.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/every.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/extent.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/filter.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/fsum.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/greatest.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/greatestIndex.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/group.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/identity.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/index.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/intersection.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/least.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/leastIndex.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/map.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/max.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/maxIndex.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/mean.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/median.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/merge.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/min.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/minIndex.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/nice.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/number.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/pairs.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/permute.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/quantile.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/quickselect.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/range.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/reduce.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/reverse.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/scan.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/set.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/shuffle.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/some.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/sort.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/subset.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/sum.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/superset.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/threshold/freedmanDiaconis.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/threshold/scott.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/threshold/sturges.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/ticks.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/transpose.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/union.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/variance.js","webpack:///../node_modules/d3-sankey/node_modules/d3-array/src/zip.js","webpack:///../node_modules/d3-sankey/src/align.js","webpack:///../node_modules/d3-sankey/src/constant.js","webpack:///../node_modules/d3-sankey/src/index.js","webpack:///../node_modules/d3-sankey/src/sankey.js","webpack:///../node_modules/d3-sankey/src/sankeyLinkHorizontal.js","webpack:///../node_modules/d3-shape/src/arc.js","webpack:///../node_modules/d3-shape/src/area.js","webpack:///../node_modules/d3-shape/src/areaRadial.js","webpack:///../node_modules/d3-shape/src/array.js","webpack:///../node_modules/d3-shape/src/constant.js","webpack:///../node_modules/d3-shape/src/curve/basis.js","webpack:///../node_modules/d3-shape/src/curve/basisClosed.js","webpack:///../node_modules/d3-shape/src/curve/basisOpen.js","webpack:///../node_modules/d3-shape/src/curve/bundle.js","webpack:///../node_modules/d3-shape/src/curve/cardinal.js","webpack:///../node_modules/d3-shape/src/curve/cardinalClosed.js","webpack:///../node_modules/d3-shape/src/curve/cardinalOpen.js","webpack:///../node_modules/d3-shape/src/curve/catmullRom.js","webpack:///../node_modules/d3-shape/src/curve/catmullRomClosed.js","webpack:///../node_modules/d3-shape/src/curve/catmullRomOpen.js","webpack:///../node_modules/d3-shape/src/curve/linear.js","webpack:///../node_modules/d3-shape/src/curve/linearClosed.js","webpack:///../node_modules/d3-shape/src/curve/monotone.js","webpack:///../node_modules/d3-shape/src/curve/natural.js","webpack:///../node_modules/d3-shape/src/curve/radial.js","webpack:///../node_modules/d3-shape/src/curve/step.js","webpack:///../node_modules/d3-shape/src/descending.js","webpack:///../node_modules/d3-shape/src/identity.js","webpack:///../node_modules/d3-shape/src/index.js","webpack:///../node_modules/d3-shape/src/line.js","webpack:///../node_modules/d3-shape/src/lineRadial.js","webpack:///../node_modules/d3-shape/src/link/index.js","webpack:///../node_modules/d3-shape/src/math.js","webpack:///../node_modules/d3-shape/src/noop.js","webpack:///../node_modules/d3-shape/src/offset/diverging.js","webpack:///../node_modules/d3-shape/src/offset/expand.js","webpack:///../node_modules/d3-shape/src/offset/none.js","webpack:///../node_modules/d3-shape/src/offset/silhouette.js","webpack:///../node_modules/d3-shape/src/offset/wiggle.js","webpack:///../node_modules/d3-shape/src/order/appearance.js","webpack:///../node_modules/d3-shape/src/order/ascending.js","webpack:///../node_modules/d3-shape/src/order/descending.js","webpack:///../node_modules/d3-shape/src/order/insideOut.js","webpack:///../node_modules/d3-shape/src/order/none.js","webpack:///../node_modules/d3-shape/src/order/reverse.js","webpack:///../node_modules/d3-shape/src/pie.js","webpack:///../node_modules/d3-shape/src/point.js","webpack:///../node_modules/d3-shape/src/pointRadial.js","webpack:///../node_modules/d3-shape/src/stack.js","webpack:///../node_modules/d3-shape/src/symbol.js","webpack:///../node_modules/d3-shape/src/symbol/circle.js","webpack:///../node_modules/d3-shape/src/symbol/cross.js","webpack:///../node_modules/d3-shape/src/symbol/diamond.js","webpack:///../node_modules/d3-shape/src/symbol/square.js","webpack:///../node_modules/d3-shape/src/symbol/star.js","webpack:///../node_modules/d3-shape/src/symbol/triangle.js","webpack:///../node_modules/d3-shape/src/symbol/wye.js","webpack:///../node_modules/tslib/tslib.es6.js","webpack:///./Error.tsx","webpack:///./Sankey.js","webpack:///./SankeyPanel.tsx","webpack:///./SankeyPanelFn.tsx","webpack:///./module.ts","webpack:///./transform-fn-data.ts","webpack:///external \"@grafana/data\"","webpack:///external \"@grafana/ui\"","webpack:///external \"d3\"","webpack:///external \"react\""],"names":["DISPLAY_VALUES","total","percentage","both","none","EDGE_COLORS","path","input","output","Sankey","svg","container","_svg","_container","_gBound","_data","_nodes","_links","_width","_height","_boundedWidth","_boundedHeight","_marginTop","_marginRight","_marginBottom","_marginLeft","_background","_edgeColor","_colorScheme","_colorScale","_colorArray","_sankeyAlignType","_sankeyAlign","_sankeyGenerator","_sankeyNodeWith","_sankeyNodePadding","_svgNode","_svgLink","_displayValues","_highlightOnHover","_setBoundDimensions","_setColorScale","_configureSankey","_calculateSankey","d3","node","name","d3Sankey","nodeId","d","nodeAlign","nodeWidth","nodePadding","extent","sankeyData","nodes","map","Object","assign","links","length","gradient","append","attr","uid","index","Math","random","source","x1","target","x0","_color","currentNode","linkedNodes","traverse","linkType","nodeType","forEach","step","l","push","selectAll","style","find","linkedNode","link","value","percent","nodesAtDepth","filter","depth","totalAtDepth","nodeValue","_formatThousand","nodePercent","_formatPercent","label","data","join","y0","y1","colorArray","JSON","parse","keys","includes","on","_showLinks","_","_showAll","_setLinkGradient","max","width","text","_labelNode","_formatValue","arguments","_validate","_init","_renderSVG"],"mappings":";QAAA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;;QAEA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;;;QAGA;QACA;;QAEA;QACA;;QAEA;QACA;QACA;QACA,0CAA0C,gCAAgC;QAC1E;QACA;;QAEA;QACA;QACA;QACA,wDAAwD,kBAAkB;QAC1E;QACA,iDAAiD,cAAc;QAC/D;;QAEA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA;QACA,yCAAyC,iCAAiC;QAC1E,gHAAgH,mBAAmB,EAAE;QACrI;QACA;;QAEA;QACA;QACA;QACA,2BAA2B,0BAA0B,EAAE;QACvD,iCAAiC,eAAe;QAChD;QACA;QACA;;QAEA;QACA,sDAAsD,+DAA+D;;QAErH;QACA;;;QAGA;QACA;;;;;;;;;;;;;AClFA;AAAA;AAAA;AAAA;AAA0C;;;;;;;;;;;;;ACA1C;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA,6BAA6B;AAC7B;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AAC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A;AACA;AACA;AACA;;AAEA,UAAU;AACV,CAAC;;AAED;AACA,mBAAmB,6DAAS;AAC5B;;;;;;;;;;;;;AC7CA;AAAe;AACf;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;ACJD;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AChCA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA,C;;;;;;;;;;;;ACLA;AAAe;AACf;AACA,CAAC;;;;;;;;;;;;;ACFD;AAAA;AAAA;AAAqC;;AAEtB;AACf,YAAY,4DAAQ;AACpB;AACA;;;;;;;;;;;;;ACLA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA,aAAa,YAAY;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACZA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACTA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AC5BD;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACVA;AAAA;AAAA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,uBAAuB;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;;;;;;;;;;;;;AC3DD;AAAA;AAAA;AAAuC;;AAExB,oCAAoC,qDAAS;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAAS;AACrB,YAAY,6DAAS;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAuC;AACF;;AAEtB,yCAAyC,qDAAS;AACjE,mCAAmC,4DAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAqC;;AAEtB;AACf,sBAAsB,oDAAQ,EAAE,oDAAQ;AACxC;;AAEO;AACP,kCAAkC,oDAAQ;AAC1C;;AAEO;AACP,sBAAsB,oDAAQ;AAC9B;;AAEO;AACP;AACA;;AAEO;AACP,sBAAsB,oDAAQ;AAC9B;;AAEO;AACP;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;;;;;;;;;;;;AChDA;AAAe;AACf;AACA,CAAC;;;;;;;;;;;;;ACFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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N;;;;;;;;;;;;;ACnD5C;AAAA;AAAA;AAA2B;;AAEZ;AACf;AACA,sBAAsB,+CAAG;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAA;AAAuC;;AAExB,iCAAiC,qDAAS;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,YAAY,6DAAS;AACrB,YAAY,6DAAS;AACrB;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAA;AAAuC;AACF;;AAEtB,sCAAsC,qDAAS;AAC9D,mCAAmC,4DAAQ;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AAAA;AAAe;AACf;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AClBA;AAAA;AAAqC;;AAEtB;AACf,SAAS,4DAAQ;AACjB,CAAC;;;;;;;;;;;;;ACJD;AAAA;AAAA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA;;;;;;;;;;;;;ACRA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACrBA;AAAA;AAAA;AAAyC;;AAE1B;AACf;AACA;AACA,iBAAiB,+DAAa;AAC9B;AACA;AACA,KAAK;AACL;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACjBA;AAAA;AAAe;AACf;AACA,CAAC;;AAEM;AACP;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;ACdA;AAAe;AACf;AACA,CAAC;;;;;;;;;;;;;ACFD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA2B;AACA;AACgB;AACC;;AAE7B;AACf,6BAA6B,0DAAO;AACpC;AACA,qCAAqC,uDAAG;AACxC,qBAAqB,uDAAG;AACxB;AACA;AACA;AACA,eAAe,uDAAG,CAAC,+DAAW;AAC9B,eAAe,uDAAG;AAClB;AACA;;AAEO,6CAA6C,kDAAM;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC5BA;AAAA;AAAA;AAAuC;;AAEvC;AACA;AACe,6EAA6E,qDAAS;AACrG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;AC3CA;AAAe;AACf;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC;;;;;;;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;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA,CAAC;;AAEM;AACP;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACnDA;AAAA;AAA2B;;AAEZ;AACf;AACA,uBAAuB,uDAAG,2CAA2C,SAAS;AAC9E,0DAA0D,SAAS;AACnE;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;AACA;;;;;;;;;;;;;ACdA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACRA;AAAA;AAAe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;ACxBA;AAAA;AAAuC;;AAExB;AACf,SAAS,6DAAS;AAClB,CAAC;;;;;;;;;;;;;ACJD;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6B;;AAE7B;AACA;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;AAEO;AACP;AACA,kCAAkC,oDAAG;AACrC;AACA;;;;;;;;;;;;;ACtBA;AAAA;AAAe;AACf;AACA;AACA;AACA;;;;;;;;;;;;;ACJA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA8C;AACwE;AAC5C;;;;;;;;;;;;;ACF1E;AAAA;AAAA;AAAA;AAAA;AAAuC;AACJ;AACE;;AAErC;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf,qCAAqC;AACrC,cAAc;AACd,iBAAiB;AACjB;AACA,cAAc,iDAAO;AACrB;AACA;AACA;AACA;AACA;;AAEA;AACA,mBAAmB;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA,kEAAkE,4DAAQ;AAC1E;;AAEA;AACA,qEAAqE,4DAAQ;AAC7E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,qEAAqE,4DAAQ;AAC7E;;AAEA;AACA,qEAAqE,4DAAQ;AAC7E;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA,6BAA6B,aAAa;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,MAAM;AACpC;AACA;AACA,qBAAqB,oDAAG,2BAA2B,oDAAG;AACtD;AACA;AACA;;AAEA,8BAA8B,MAAM;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,+BAA+B,MAAM;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,8BAA8B,MAAM;AACpC,cAAc,oDAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,oDAAG,iDAAiD,oDAAG;AACtE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB,kBAAkB;AACvC;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,mCAAmC,oDAAG;AACtC;AACA,mBAAmB,gBAAgB;AACnC;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,uCAAuC,OAAO;AAC9C;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,2CAA2C,QAAQ;AACnD;AACA;AACA;AACA;AACA,oBAAoB,cAAc;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,kBAAkB;AAC5B;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,QAAQ;AAClB;AACA;AACA;AACA;AACA;AACA;;AAEA,6BAA6B,yBAAyB;AACtD;AACA,kBAAkB,SAAS,aAAa;AACxC;AACA;AACA,kBAAkB,SAAS,aAAa;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA,kBAAkB,yBAAyB;AAC3C;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA,gBAAgB,oBAAoB;AACpC;AACA;AACA;AACA;AACA;;AAEA;AACA;;;;;;;;;;;;;AChXA;AAAA;AAAwC;;AAExC;AACA;AACA;;AAEA;AACA;AACA;;AAEe;AACf,SAAS,+DAAc;AACvB;AACA;AACA,CAAC;;;;;;;;;;;;;ACdD;AAAA;AAAA;AAAA;AAA6B;AACQ;AACgE;;AAErG;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,yBAAyB;AACzB;;AAEA;AACA;AACA;AACA;AACA,cAAc,gDAAO;AAC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A;AACA,GAAG;AACH;AACA;AACA,8CAA8C;AAC9C,uDAAuD;AACvD;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B,sEAAsE;AACpG,8BAA8B;AAC9B,8BAA8B,oFAAoF;AAClH,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA,CAAC;;;;;;;;;;;;;AClDD;AAAA;AAAA;AAA8B;AACG;;AAEjC;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D,8BAA8B,4BAA4B;AAC1D,8BAA8B,4BAA4B,4FAA4F;AACtJ,eAAe,uDAAK,aAAa;AACjC;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA,CAAC;;;;;;;;;;;;;ACnDD;AAAA;AAAiC;;AAEjC;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B,oFAAoF,0EAA0E;AAC5L,8BAA8B;AAC9B,eAAe,uDAAK,aAAa;AACjC;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA,CAAC;;;;;;;;;;;;;ACtCD;AAAA;AAAiC;;AAEjC;AACA,oBAAoB,+CAAK;AACzB;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA,4BAA4B,+CAAK;AACjC;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,OAAO,EAAC;;;;;;;;;;;;;ACvDT;AAAA;AAAA;AAAO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uDAAuD;AACvD,8CAA8C;AAC9C;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B,sEAAsE;AACpG,8BAA8B,4BAA4B;AAC1D,8BAA8B;AAC9B,iCAAiC;AACjC;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;AC5DN;AAAA;AAAA;AAAA;AAA8B;AACM;;AAE7B;AACP;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B,4BAA4B;AAC1D,8BAA8B,kDAAkD;AAChF,8BAA8B,4BAA4B;AAC1D,eAAe,0DAAK,aAAa;AACjC;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;AC5DN;AAAA;AAAA;AAAoC;;AAE7B;AACP;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B,kGAAkG;AAChI,8BAA8B;AAC9B,eAAe,0DAAK,aAAa;AACjC;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,IAAI,EAAC;;;;;;;;;;;;;AChDN;AAAA;AAAA;AAAA;AAAmC;AACI;;AAEhC;AACP;AACA;AACA;AACA;;AAEA,oBAAoB,gDAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA,oBAAoB,gDAAO;AAC3B;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uDAAuD;AACvD,6CAA6C;AAC7C;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,sEAAsE;AACpG,8BAA8B;AAC9B,8BAA8B;AAC9B,iCAAiC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA,wDAAwD,qDAAQ;AAChE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;ACvFR;AAAA;AAAA;AAAA;AAAmD;AACrB;AACQ;;AAEtC;AACA;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B,4BAA4B;AAC1D,8BAA8B,kDAAkD;AAChF,8BAA8B,4BAA4B;AAC1D,eAAe,4DAAK,aAAa;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA,8DAA8D,iEAAc;AAC5E;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;ACzER;AAAA;AAAA;AAA+C;AACT;;AAEtC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA,8BAA8B;AAC9B,8BAA8B;AAC9B,8BAA8B,kGAAkG;AAChI,8BAA8B;AAC9B,eAAe,4DAAK,aAAa;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEe;;AAEf;AACA,4DAA4D,6DAAY;AACxE;;AAEA;AACA;AACA;;AAEA;AACA,CAAC,MAAM,EAAC;;;;;;;;;;;;;AC7DR;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B,sEAAsE;AACpG,8BAA8B;AAC9B,0CAA0C;AAC1C;AACA;AACA;;AAEe;AACf;AACA,CAAC;;;;;;;;;;;;;AC9BD;AAAA;AAA8B;;AAE9B;AACA;AACA;;AAEA;AACA,aAAa,gDAAI;AACjB,WAAW,gDAAI;AACf;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;;AAEe;AACf;AACA,CAAC;;;;;;;;;;;;;ACxBD;AAAA;AAAA;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,uDAAuD;AACvD,4DAA4D;AAC5D;AACA;AACA;AACA,GAAG;AACH;AACA;;AAEA;AACA,iDAAiD;AACjD;AACA,8BAA8B,sEAAsE;AACpG,8BAA8B;AAC9B,8BAA8B,wDAAwD;AACtF,8DAA8D;AAC9D;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA,0BAA0B,4BAA4B,EAAE;AACxD,yBAAyB,2BAA2B,EAAE;AACtD,0BAA0B,4BAA4B,EAAE;AACxD,iDAAiD,mDAAmD;AACpG;;AAEO;AACP;AACA;;AAEO;AACP;AACA;;;;;;;;;;;;;ACvGA;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,OAAO;AACP;AACA;AACA,gCAAgC,QAAQ;AACxC;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa,WAAW;AACxB;AACA,aAAa,OAAO;AACpB;AACA,iBAAiB,QAAQ;AACzB;AACA,aAAa,WAAW;AACxB;AACA;;AAEe;AACf;AACA,CAAC;;;;;;;;;;;;;AChED;AAAA;AAAA;AAAA;AAAsC;;AAE/B,oCAAoC,kDAAW;;AAEtD;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEe;;AAEf;AACA;AACA;;AAEA;;AAEA;AACA;;;;;;;;;;;;;ACnCA;AAAA;AAAA;AAAA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA,8BAA8B,sEAAsE;AACpG,8BAA8B;AAC9B;AACA;AACA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;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;ACjBF;AAAA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;ACbF;AAAe;AACf;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;ACNF;AAAA;AAAmC;;AAEnC;AACA,kBAAkB,2CAAE,sBAAsB,2CAAE;AAC5C,kBAAkB,4CAAG;AACrB,mBAAmB,4CAAG;;AAEP;AACf;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,OAAO;AAC1B,cAAc,4CAAG;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;ACvBF;AAAA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;ACVF;AAAA;AACA;AACA;AACA;;AAEe;AACf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC,EAAC;;;;;;;;;;;;;ACzBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;;AAEO;AACP;AACA,mBAAmB,sBAAsB;AACzC;AACA;;AAEO;AACP;AACA,gDAAgD,OAAO;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA;AACA;AACA,4DAA4D,cAAc;AAC1E;AACA;AACA;AACA;AACA;;AAEO;AACP;AACA;AACA,4CAA4C,QAAQ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C,GAAqD,KAAK,CAAC,IADzD;AAER,YAAM,EAAE,YAAY,GAAG,IAAI,yDAAJ,CAAgB,YAAhB,CAAH,GAAmC;AAF/C,KADV;AAKD,GAvBD;AAwBD,C,CAED;;;AACA,SAAS,WAAT,GAAoB;AAClB,SAAO,UAAC,KAAD,EAAW,CAAX,EAAsB,EAAtB,EAA6B;AAAK,WAAC,MAAM,CAAC,KAAP,CAAa,MAAM,CAAC,KAAD,CAAnB,IAA8B,KAA9B,GAAsC,MAAM,CAA7C,KAA6C,CAA7C;AAAqD,GAA9F;AACD,C,CAED;;;AACA,SAAS,UAAT,GAAmB;AACjB,SAAO,UAAC,KAAD,EAAS;AAAK,WAAC,OAAO,KAAP,KAAiB,QAAjB,GAA4B,KAAK,CAAC,KAAN,CAAY,GAAZ,CAA5B,GAAD;AAAsD,GAA3E;AACD,C,CAED;;;AACA,SAAS,QAAT,GAAiB;AACf,SAAO,UAAC,KAAD,EAAS;AAAK,kBAAO,KAAP;AAAyB,GAA9C;AACD,C;;;;;;;;;;;AC7DD,2D;;;;;;;;;;;ACAA,yD;;;;;;;;;;;ACAA,gD;;;;;;;;;;;ACAA,mD","file":"module.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./module.ts\");\n","export {default as path} from \"./path.js\";\n","var pi = Math.PI,\n tau = 2 * pi,\n epsilon = 1e-6,\n tauEpsilon = tau - epsilon;\n\nfunction Path() {\n this._x0 = this._y0 = // start of current subpath\n this._x1 = this._y1 = null; // end of current subpath\n this._ = \"\";\n}\n\nfunction path() {\n return new Path;\n}\n\nPath.prototype = path.prototype = {\n constructor: Path,\n moveTo: function(x, y) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y);\n },\n closePath: function() {\n if (this._x1 !== null) {\n this._x1 = this._x0, this._y1 = this._y0;\n this._ += \"Z\";\n }\n },\n lineTo: function(x, y) {\n this._ += \"L\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n quadraticCurveTo: function(x1, y1, x, y) {\n this._ += \"Q\" + (+x1) + \",\" + (+y1) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) {\n this._ += \"C\" + (+x1) + \",\" + (+y1) + \",\" + (+x2) + \",\" + (+y2) + \",\" + (this._x1 = +x) + \",\" + (this._y1 = +y);\n },\n arcTo: function(x1, y1, x2, y2, r) {\n x1 = +x1, y1 = +y1, x2 = +x2, y2 = +y2, r = +r;\n var x0 = this._x1,\n y0 = this._y1,\n x21 = x2 - x1,\n y21 = y2 - y1,\n x01 = x0 - x1,\n y01 = y0 - y1,\n l01_2 = x01 * x01 + y01 * y01;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x1,y1).\n if (this._x1 === null) {\n this._ += \"M\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Or, is (x1,y1) coincident with (x0,y0)? Do nothing.\n else if (!(l01_2 > epsilon));\n\n // Or, are (x0,y0), (x1,y1) and (x2,y2) collinear?\n // Equivalently, is (x1,y1) coincident with (x2,y2)?\n // Or, is the radius zero? Line to (x1,y1).\n else if (!(Math.abs(y01 * x21 - y21 * x01) > epsilon) || !r) {\n this._ += \"L\" + (this._x1 = x1) + \",\" + (this._y1 = y1);\n }\n\n // Otherwise, draw an arc!\n else {\n var x20 = x2 - x0,\n y20 = y2 - y0,\n l21_2 = x21 * x21 + y21 * y21,\n l20_2 = x20 * x20 + y20 * y20,\n l21 = Math.sqrt(l21_2),\n l01 = Math.sqrt(l01_2),\n l = r * Math.tan((pi - Math.acos((l21_2 + l01_2 - l20_2) / (2 * l21 * l01))) / 2),\n t01 = l / l01,\n t21 = l / l21;\n\n // If the start tangent is not coincident with (x0,y0), line to.\n if (Math.abs(t01 - 1) > epsilon) {\n this._ += \"L\" + (x1 + t01 * x01) + \",\" + (y1 + t01 * y01);\n }\n\n this._ += \"A\" + r + \",\" + r + \",0,0,\" + (+(y01 * x20 > x01 * y20)) + \",\" + (this._x1 = x1 + t21 * x21) + \",\" + (this._y1 = y1 + t21 * y21);\n }\n },\n arc: function(x, y, r, a0, a1, ccw) {\n x = +x, y = +y, r = +r, ccw = !!ccw;\n var dx = r * Math.cos(a0),\n dy = r * Math.sin(a0),\n x0 = x + dx,\n y0 = y + dy,\n cw = 1 ^ ccw,\n da = ccw ? a0 - a1 : a1 - a0;\n\n // Is the radius negative? Error.\n if (r < 0) throw new Error(\"negative radius: \" + r);\n\n // Is this path empty? Move to (x0,y0).\n if (this._x1 === null) {\n this._ += \"M\" + x0 + \",\" + y0;\n }\n\n // Or, is (x0,y0) not coincident with the previous point? Line to (x0,y0).\n else if (Math.abs(this._x1 - x0) > epsilon || Math.abs(this._y1 - y0) > epsilon) {\n this._ += \"L\" + x0 + \",\" + y0;\n }\n\n // Is this arc empty? We’re done.\n if (!r) return;\n\n // Does the angle go the wrong way? Flip the direction.\n if (da < 0) da = da % tau + tau;\n\n // Is this a complete circle? Draw two arcs to complete the circle.\n if (da > tauEpsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (x - dx) + \",\" + (y - dy) + \"A\" + r + \",\" + r + \",0,1,\" + cw + \",\" + (this._x1 = x0) + \",\" + (this._y1 = y0);\n }\n\n // Is this arc non-empty? Draw an arc!\n else if (da > epsilon) {\n this._ += \"A\" + r + \",\" + r + \",0,\" + (+(da >= pi)) + \",\" + cw + \",\" + (this._x1 = x + r * Math.cos(a1)) + \",\" + (this._y1 = y + r * Math.sin(a1));\n }\n },\n rect: function(x, y, w, h) {\n this._ += \"M\" + (this._x0 = this._x1 = +x) + \",\" + (this._y0 = this._y1 = +y) + \"h\" + (+w) + \"v\" + (+h) + \"h\" + (-w) + \"Z\";\n },\n toString: function() {\n return this._;\n }\n};\n\nexport default path;\n","var array = Array.prototype;\n\nexport var slice = array.slice;\nexport var map = array.map;\n","export default function(a, b) {\n return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;\n}\n","import {slice} from \"./array.js\";\nimport bisect from \"./bisect.js\";\nimport constant from \"./constant.js\";\nimport extent from \"./extent.js\";\nimport identity from \"./identity.js\";\nimport nice from \"./nice.js\";\nimport ticks from \"./ticks.js\";\nimport sturges from \"./threshold/sturges.js\";\n\nexport default function() {\n var value = identity,\n domain = extent,\n threshold = sturges;\n\n function histogram(data) {\n if (!Array.isArray(data)) data = Array.from(data);\n\n var i,\n n = data.length,\n x,\n values = new Array(n);\n\n for (i = 0; i < n; ++i) {\n values[i] = value(data[i], i, data);\n }\n\n var xz = domain(values),\n x0 = xz[0],\n x1 = xz[1],\n tz = threshold(values, x0, x1);\n\n // Convert number of thresholds into uniform thresholds,\n // and nice the default domain accordingly.\n if (!Array.isArray(tz)) {\n tz = +tz;\n if (domain === extent) [x0, x1] = nice(x0, x1, tz);\n tz = ticks(x0, x1, tz);\n if (tz[tz.length - 1] === x1) tz.pop(); // exclusive\n }\n\n // Remove any thresholds outside the domain.\n var m = tz.length;\n while (tz[0] <= x0) tz.shift(), --m;\n while (tz[m - 1] > x1) tz.pop(), --m;\n\n var bins = new Array(m + 1),\n bin;\n\n // Initialize bins.\n for (i = 0; i <= m; ++i) {\n bin = bins[i] = [];\n bin.x0 = i > 0 ? tz[i - 1] : x0;\n bin.x1 = i < m ? tz[i] : x1;\n }\n\n // Assign data to bins by value, ignoring any outside the domain.\n for (i = 0; i < n; ++i) {\n x = values[i];\n if (x0 <= x && x <= x1) {\n bins[bisect(tz, x, 0, m)].push(data[i]);\n }\n }\n\n return bins;\n }\n\n histogram.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(_), histogram) : value;\n };\n\n histogram.domain = function(_) {\n return arguments.length ? (domain = typeof _ === \"function\" ? _ : constant([_[0], _[1]]), histogram) : domain;\n };\n\n histogram.thresholds = function(_) {\n return arguments.length ? (threshold = typeof _ === \"function\" ? _ : Array.isArray(_) ? constant(slice.call(_)) : constant(_), histogram) : threshold;\n };\n\n return histogram;\n}\n","import ascending from \"./ascending.js\";\nimport bisector from \"./bisector.js\";\nimport number from \"./number.js\";\n\nconst ascendingBisect = bisector(ascending);\nexport const bisectRight = ascendingBisect.right;\nexport const bisectLeft = ascendingBisect.left;\nexport const bisectCenter = bisector(number).center;\nexport default bisectRight;\n","import ascending from \"./ascending.js\";\n\nexport default function(f) {\n let delta = f;\n let compare = f;\n\n if (f.length === 1) {\n delta = (d, x) => f(d) - x;\n compare = ascendingComparator(f);\n }\n\n function left(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) < 0) lo = mid + 1;\n else hi = mid;\n }\n return lo;\n }\n\n function right(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n while (lo < hi) {\n const mid = (lo + hi) >>> 1;\n if (compare(a[mid], x) > 0) hi = mid;\n else lo = mid + 1;\n }\n return lo;\n }\n\n function center(a, x, lo, hi) {\n if (lo == null) lo = 0;\n if (hi == null) hi = a.length;\n const i = left(a, x, lo, hi - 1);\n return i > lo && delta(a[i - 1], x) > -delta(a[i], x) ? i - 1 : i;\n }\n\n return {left, center, right};\n}\n\nfunction ascendingComparator(f) {\n return (d, x) => ascending(f(d), x);\n}\n","export default function(x) {\n return function() {\n return x;\n };\n}\n","export default function count(values, valueof) {\n let count = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count;\n }\n }\n }\n return count;\n}\n","function length(array) {\n return array.length | 0;\n}\n\nfunction empty(length) {\n return !(length > 0);\n}\n\nfunction arrayify(values) {\n return typeof values !== \"object\" || \"length\" in values ? values : Array.from(values);\n}\n\nfunction reducer(reduce) {\n return values => reduce(...values);\n}\n\nexport default function cross(...values) {\n const reduce = typeof values[values.length - 1] === \"function\" && reducer(values.pop());\n values = values.map(arrayify);\n const lengths = values.map(length);\n const j = values.length - 1;\n const index = new Array(j + 1).fill(0);\n const product = [];\n if (j < 0 || lengths.some(empty)) return product;\n while (true) {\n product.push(index.map((j, i) => values[i][j]));\n let i = j;\n while (++index[i] === lengths[i]) {\n if (i === 0) return reduce ? product.map(reduce) : product;\n index[i--] = 0;\n }\n }\n}\n","export default function cumsum(values, valueof) {\n var sum = 0, index = 0;\n return Float64Array.from(values, valueof === undefined\n ? v => (sum += +v || 0)\n : v => (sum += +valueof(v, index++, values) || 0));\n}","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","import variance from \"./variance.js\";\n\nexport default function deviation(values, valueof) {\n const v = variance(values, valueof);\n return v ? Math.sqrt(v) : v;\n}\n","export default function difference(values, ...others) {\n values = new Set(values);\n for (const other of others) {\n for (const value of other) {\n values.delete(value);\n }\n }\n return values;\n}\n","export default function disjoint(values, other) {\n const iterator = other[Symbol.iterator](), set = new Set();\n for (const v of values) {\n if (set.has(v)) return false;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) break;\n if (Object.is(v, value)) return false;\n set.add(value);\n }\n }\n return true;\n}\n","export default function every(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (!test(value, ++index, values)) {\n return false;\n }\n }\n return true;\n}\n","export default function(values, valueof) {\n let min;\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null) {\n if (min === undefined) {\n if (value >= value) min = max = value;\n } else {\n if (min > value) min = value;\n if (max < value) max = value;\n }\n }\n }\n }\n return [min, max];\n}\n","export default function filter(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n const array = [];\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n array.push(value);\n }\n }\n return array;\n}\n","// https://github.com/python/cpython/blob/a74eea238f5baba15797e2e8b570d153bc8690a7/Modules/mathmodule.c#L1423\nexport class Adder {\n constructor() {\n this._partials = new Float64Array(32);\n this._n = 0;\n }\n add(x) {\n const p = this._partials;\n let i = 0;\n for (let j = 0; j < this._n && j < 32; j++) {\n const y = p[j],\n hi = x + y,\n lo = Math.abs(x) < Math.abs(y) ? x - (hi - y) : y - (hi - x);\n if (lo) p[i++] = lo;\n x = hi;\n }\n p[i] = x;\n this._n = i + 1;\n return this;\n }\n valueOf() {\n const p = this._partials;\n let n = this._n, x, y, lo, hi = 0;\n if (n > 0) {\n hi = p[--n];\n while (n > 0) {\n x = hi;\n y = p[--n];\n hi = x + y;\n lo = y - (hi - x);\n if (lo) break;\n }\n if (n > 0 && ((lo < 0 && p[n - 1] < 0) || (lo > 0 && p[n - 1] > 0))) {\n y = lo * 2;\n x = hi + y;\n if (y == x - hi) hi = x;\n }\n }\n return hi;\n }\n}\n\nexport default function(values, valueof) {\n const adder = new Adder();\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n adder.add(value);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n adder.add(value);\n }\n }\n }\n return +adder;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function greatest(values, compare = ascending) {\n let max;\n let defined = false;\n if (compare.length === 1) {\n let maxValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, maxValue) > 0\n : ascending(value, value) === 0) {\n max = element;\n maxValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, max) > 0\n : compare(value, value) === 0) {\n max = value;\n defined = true;\n }\n }\n }\n return max;\n}\n","import ascending from \"./ascending.js\";\nimport maxIndex from \"./maxIndex.js\";\n\nexport default function greatestIndex(values, compare = ascending) {\n if (compare.length === 1) return maxIndex(values, compare);\n let maxValue;\n let max = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (max < 0\n ? compare(value, value) === 0\n : compare(value, maxValue) > 0) {\n maxValue = value;\n max = index;\n }\n }\n return max;\n}\n","import identity from \"./identity.js\";\n\nexport default function group(values, ...keys) {\n return nest(values, identity, identity, keys);\n}\n\nexport function groups(values, ...keys) {\n return nest(values, Array.from, identity, keys);\n}\n\nexport function rollup(values, reduce, ...keys) {\n return nest(values, identity, reduce, keys);\n}\n\nexport function rollups(values, reduce, ...keys) {\n return nest(values, Array.from, reduce, keys);\n}\n\nexport function index(values, ...keys) {\n return nest(values, identity, unique, keys);\n}\n\nexport function indexes(values, ...keys) {\n return nest(values, Array.from, unique, keys);\n}\n\nfunction unique(values) {\n if (values.length !== 1) throw new Error(\"duplicate key\");\n return values[0];\n}\n\nfunction nest(values, map, reduce, keys) {\n return (function regroup(values, i) {\n if (i >= keys.length) return reduce(values);\n const groups = new Map();\n const keyof = keys[i++];\n let index = -1;\n for (const value of values) {\n const key = keyof(value, ++index, values);\n const group = groups.get(key);\n if (group) group.push(value);\n else groups.set(key, [value]);\n }\n for (const [key, values] of groups) {\n groups.set(key, regroup(values, i));\n }\n return map(groups);\n })(values, 0);\n}\n","export default function(x) {\n return x;\n}\n","export {default as bisect, bisectRight, bisectLeft, bisectCenter} from \"./bisect.js\";\nexport {default as ascending} from \"./ascending.js\";\nexport {default as bisector} from \"./bisector.js\";\nexport {default as count} from \"./count.js\";\nexport {default as cross} from \"./cross.js\";\nexport {default as cumsum} from \"./cumsum.js\";\nexport {default as descending} from \"./descending.js\";\nexport {default as deviation} from \"./deviation.js\";\nexport {default as extent} from \"./extent.js\";\nexport {default as fsum, Adder} from \"./fsum.js\";\nexport {default as group, groups, index, indexes, rollup, rollups} from \"./group.js\";\nexport {default as bin, default as histogram} from \"./bin.js\"; // Deprecated; use bin.\nexport {default as thresholdFreedmanDiaconis} from \"./threshold/freedmanDiaconis.js\";\nexport {default as thresholdScott} from \"./threshold/scott.js\";\nexport {default as thresholdSturges} from \"./threshold/sturges.js\";\nexport {default as max} from \"./max.js\";\nexport {default as maxIndex} from \"./maxIndex.js\";\nexport {default as mean} from \"./mean.js\";\nexport {default as median} from \"./median.js\";\nexport {default as merge} from \"./merge.js\";\nexport {default as min} from \"./min.js\";\nexport {default as minIndex} from \"./minIndex.js\";\nexport {default as nice} from \"./nice.js\";\nexport {default as pairs} from \"./pairs.js\";\nexport {default as permute} from \"./permute.js\";\nexport {default as quantile, quantileSorted} from \"./quantile.js\";\nexport {default as quickselect} from \"./quickselect.js\";\nexport {default as range} from \"./range.js\";\nexport {default as least} from \"./least.js\";\nexport {default as leastIndex} from \"./leastIndex.js\";\nexport {default as greatest} from \"./greatest.js\";\nexport {default as greatestIndex} from \"./greatestIndex.js\";\nexport {default as scan} from \"./scan.js\"; // Deprecated; use leastIndex.\nexport {default as shuffle, shuffler} from \"./shuffle.js\";\nexport {default as sum} from \"./sum.js\";\nexport {default as ticks, tickIncrement, tickStep} from \"./ticks.js\";\nexport {default as transpose} from \"./transpose.js\";\nexport {default as variance} from \"./variance.js\";\nexport {default as zip} from \"./zip.js\";\nexport {default as every} from \"./every.js\";\nexport {default as some} from \"./some.js\";\nexport {default as filter} from \"./filter.js\";\nexport {default as map} from \"./map.js\";\nexport {default as reduce} from \"./reduce.js\";\nexport {default as reverse} from \"./reverse.js\";\nexport {default as sort} from \"./sort.js\";\nexport {default as difference} from \"./difference.js\";\nexport {default as disjoint} from \"./disjoint.js\";\nexport {default as intersection} from \"./intersection.js\";\nexport {default as subset} from \"./subset.js\";\nexport {default as superset} from \"./superset.js\";\nexport {default as union} from \"./union.js\";\n","import set from \"./set.js\";\n\nexport default function intersection(values, ...others) {\n values = new Set(values);\n others = others.map(set);\n out: for (const value of values) {\n for (const other of others) {\n if (!other.has(value)) {\n values.delete(value);\n continue out;\n }\n }\n }\n return values;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function least(values, compare = ascending) {\n let min;\n let defined = false;\n if (compare.length === 1) {\n let minValue;\n for (const element of values) {\n const value = compare(element);\n if (defined\n ? ascending(value, minValue) < 0\n : ascending(value, value) === 0) {\n min = element;\n minValue = value;\n defined = true;\n }\n }\n } else {\n for (const value of values) {\n if (defined\n ? compare(value, min) < 0\n : compare(value, value) === 0) {\n min = value;\n defined = true;\n }\n }\n }\n return min;\n}\n","import ascending from \"./ascending.js\";\nimport minIndex from \"./minIndex.js\";\n\nexport default function leastIndex(values, compare = ascending) {\n if (compare.length === 1) return minIndex(values, compare);\n let minValue;\n let min = -1;\n let index = -1;\n for (const value of values) {\n ++index;\n if (min < 0\n ? compare(value, value) === 0\n : compare(value, minValue) < 0) {\n minValue = value;\n min = index;\n }\n }\n return min;\n}\n","export default function map(values, mapper) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n if (typeof mapper !== \"function\") throw new TypeError(\"mapper is not a function\");\n return Array.from(values, (value, index) => mapper(value, index, values));\n}\n","export default function max(values, valueof) {\n let max;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value;\n }\n }\n }\n return max;\n}\n","export default function maxIndex(values, valueof) {\n let max;\n let maxIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (max < value || (max === undefined && value >= value))) {\n max = value, maxIndex = index;\n }\n }\n }\n return maxIndex;\n}\n","export default function mean(values, valueof) {\n let count = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n ++count, sum += value;\n }\n }\n }\n if (count) return sum / count;\n}\n","import quantile from \"./quantile.js\";\n\nexport default function(values, valueof) {\n return quantile(values, 0.5, valueof);\n}\n","function* flatten(arrays) {\n for (const array of arrays) {\n yield* array;\n }\n}\n\nexport default function merge(arrays) {\n return Array.from(flatten(arrays));\n}\n","export default function min(values, valueof) {\n let min;\n if (valueof === undefined) {\n for (const value of values) {\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value;\n }\n }\n }\n return min;\n}\n","export default function minIndex(values, valueof) {\n let min;\n let minIndex = -1;\n let index = -1;\n if (valueof === undefined) {\n for (const value of values) {\n ++index;\n if (value != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n } else {\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null\n && (min > value || (min === undefined && value >= value))) {\n min = value, minIndex = index;\n }\n }\n }\n return minIndex;\n}\n","import {tickIncrement} from \"./ticks.js\";\n\nexport default function nice(start, stop, count) {\n let prestep;\n while (true) {\n const step = tickIncrement(start, stop, count);\n if (step === prestep || step === 0 || !isFinite(step)) {\n return [start, stop];\n } else if (step > 0) {\n start = Math.floor(start / step) * step;\n stop = Math.ceil(stop / step) * step;\n } else if (step < 0) {\n start = Math.ceil(start * step) / step;\n stop = Math.floor(stop * step) / step;\n }\n prestep = step;\n }\n}\n","export default function(x) {\n return x === null ? NaN : +x;\n}\n\nexport function* numbers(values, valueof) {\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n yield value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n yield value;\n }\n }\n }\n}\n","export default function pairs(values, pairof = pair) {\n const pairs = [];\n let previous;\n let first = false;\n for (const value of values) {\n if (first) pairs.push(pairof(previous, value));\n previous = value;\n first = true;\n }\n return pairs;\n}\n\nexport function pair(a, b) {\n return [a, b];\n}\n","export default function(source, keys) {\n return Array.from(keys, key => source[key]);\n}\n","import max from \"./max.js\";\nimport min from \"./min.js\";\nimport quickselect from \"./quickselect.js\";\nimport number, {numbers} from \"./number.js\";\n\nexport default function quantile(values, p, valueof) {\n values = Float64Array.from(numbers(values, valueof));\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return min(values);\n if (p >= 1) return max(values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = max(quickselect(values, i0).subarray(0, i0 + 1)),\n value1 = min(values.subarray(i0 + 1));\n return value0 + (value1 - value0) * (i - i0);\n}\n\nexport function quantileSorted(values, p, valueof = number) {\n if (!(n = values.length)) return;\n if ((p = +p) <= 0 || n < 2) return +valueof(values[0], 0, values);\n if (p >= 1) return +valueof(values[n - 1], n - 1, values);\n var n,\n i = (n - 1) * p,\n i0 = Math.floor(i),\n value0 = +valueof(values[i0], i0, values),\n value1 = +valueof(values[i0 + 1], i0 + 1, values);\n return value0 + (value1 - value0) * (i - i0);\n}\n","import ascending from \"./ascending.js\";\n\n// Based on https://github.com/mourner/quickselect\n// ISC license, Copyright 2018 Vladimir Agafonkin.\nexport default function quickselect(array, k, left = 0, right = array.length - 1, compare = ascending) {\n while (right > left) {\n if (right - left > 600) {\n const n = right - left + 1;\n const m = k - left + 1;\n const z = Math.log(n);\n const s = 0.5 * Math.exp(2 * z / 3);\n const sd = 0.5 * Math.sqrt(z * s * (n - s) / n) * (m - n / 2 < 0 ? -1 : 1);\n const newLeft = Math.max(left, Math.floor(k - m * s / n + sd));\n const newRight = Math.min(right, Math.floor(k + (n - m) * s / n + sd));\n quickselect(array, k, newLeft, newRight, compare);\n }\n\n const t = array[k];\n let i = left;\n let j = right;\n\n swap(array, left, k);\n if (compare(array[right], t) > 0) swap(array, left, right);\n\n while (i < j) {\n swap(array, i, j), ++i, --j;\n while (compare(array[i], t) < 0) ++i;\n while (compare(array[j], t) > 0) --j;\n }\n\n if (compare(array[left], t) === 0) swap(array, left, j);\n else ++j, swap(array, j, right);\n\n if (j <= k) left = j + 1;\n if (k <= j) right = j - 1;\n }\n return array;\n}\n\nfunction swap(array, i, j) {\n const t = array[i];\n array[i] = array[j];\n array[j] = t;\n}\n","export default function(start, stop, step) {\n start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;\n\n var i = -1,\n n = Math.max(0, Math.ceil((stop - start) / step)) | 0,\n range = new Array(n);\n\n while (++i < n) {\n range[i] = start + i * step;\n }\n\n return range;\n}\n","export default function reduce(values, reducer, value) {\n if (typeof reducer !== \"function\") throw new TypeError(\"reducer is not a function\");\n const iterator = values[Symbol.iterator]();\n let done, next, index = -1;\n if (arguments.length < 3) {\n ({done, value} = iterator.next());\n if (done) return;\n ++index;\n }\n while (({done, value: next} = iterator.next()), !done) {\n value = reducer(value, next, ++index, values);\n }\n return value;\n}\n","export default function reverse(values) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n return Array.from(values).reverse();\n}\n","import leastIndex from \"./leastIndex.js\";\n\nexport default function scan(values, compare) {\n const index = leastIndex(values, compare);\n return index < 0 ? undefined : index;\n}\n","export default function set(values) {\n return values instanceof Set ? values : new Set(values);\n}\n","export default shuffler(Math.random);\n\nexport function shuffler(random) {\n return function shuffle(array, i0 = 0, i1 = array.length) {\n let m = i1 - (i0 = +i0);\n while (m) {\n const i = random() * m-- | 0, t = array[m + i0];\n array[m + i0] = array[i + i0];\n array[i + i0] = t;\n }\n return array;\n };\n}\n","export default function some(values, test) {\n if (typeof test !== \"function\") throw new TypeError(\"test is not a function\");\n let index = -1;\n for (const value of values) {\n if (test(value, ++index, values)) {\n return true;\n }\n }\n return false;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function sort(values, comparator = ascending) {\n if (typeof values[Symbol.iterator] !== \"function\") throw new TypeError(\"values is not iterable\");\n return Array.from(values).sort(comparator);\n}\n","import superset from \"./superset.js\";\n\nexport default function subset(values, other) {\n return superset(other, values);\n}\n","export default function sum(values, valueof) {\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value = +value) {\n sum += value;\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if (value = +valueof(value, ++index, values)) {\n sum += value;\n }\n }\n }\n return sum;\n}\n","export default function superset(values, other) {\n const iterator = values[Symbol.iterator](), set = new Set();\n for (const o of other) {\n if (set.has(o)) continue;\n let value, done;\n while (({value, done} = iterator.next())) {\n if (done) return false;\n set.add(value);\n if (Object.is(o, value)) break;\n }\n }\n return true;\n}\n","import count from \"../count.js\";\nimport quantile from \"../quantile.js\";\n\nexport default function(values, min, max) {\n return Math.ceil((max - min) / (2 * (quantile(values, 0.75) - quantile(values, 0.25)) * Math.pow(count(values), -1 / 3)));\n}\n","import count from \"../count.js\";\nimport deviation from \"../deviation.js\";\n\nexport default function(values, min, max) {\n return Math.ceil((max - min) / (3.5 * deviation(values) * Math.pow(count(values), -1 / 3)));\n}\n","import count from \"../count.js\";\n\nexport default function(values) {\n return Math.ceil(Math.log(count(values)) / Math.LN2) + 1;\n}\n","var e10 = Math.sqrt(50),\n e5 = Math.sqrt(10),\n e2 = Math.sqrt(2);\n\nexport default function(start, stop, count) {\n var reverse,\n i = -1,\n n,\n ticks,\n step;\n\n stop = +stop, start = +start, count = +count;\n if (start === stop && count > 0) return [start];\n if (reverse = stop < start) n = start, start = stop, stop = n;\n if ((step = tickIncrement(start, stop, count)) === 0 || !isFinite(step)) return [];\n\n if (step > 0) {\n start = Math.ceil(start / step);\n stop = Math.floor(stop / step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n while (++i < n) ticks[i] = (start + i) * step;\n } else {\n step = -step;\n start = Math.ceil(start * step);\n stop = Math.floor(stop * step);\n ticks = new Array(n = Math.ceil(stop - start + 1));\n while (++i < n) ticks[i] = (start + i) / step;\n }\n\n if (reverse) ticks.reverse();\n\n return ticks;\n}\n\nexport function tickIncrement(start, stop, count) {\n var step = (stop - start) / Math.max(0, count),\n power = Math.floor(Math.log(step) / Math.LN10),\n error = step / Math.pow(10, power);\n return power >= 0\n ? (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1) * Math.pow(10, power)\n : -Math.pow(10, -power) / (error >= e10 ? 10 : error >= e5 ? 5 : error >= e2 ? 2 : 1);\n}\n\nexport function tickStep(start, stop, count) {\n var step0 = Math.abs(stop - start) / Math.max(0, count),\n step1 = Math.pow(10, Math.floor(Math.log(step0) / Math.LN10)),\n error = step0 / step1;\n if (error >= e10) step1 *= 10;\n else if (error >= e5) step1 *= 5;\n else if (error >= e2) step1 *= 2;\n return stop < start ? -step1 : step1;\n}\n","import min from \"./min.js\";\n\nexport default function(matrix) {\n if (!(n = matrix.length)) return [];\n for (var i = -1, m = min(matrix, length), transpose = new Array(m); ++i < m;) {\n for (var j = -1, n, row = transpose[i] = new Array(n); ++j < n;) {\n row[j] = matrix[j][i];\n }\n }\n return transpose;\n}\n\nfunction length(d) {\n return d.length;\n}\n","export default function union(...others) {\n const set = new Set();\n for (const other of others) {\n for (const o of other) {\n set.add(o);\n }\n }\n return set;\n}\n","export default function variance(values, valueof) {\n let count = 0;\n let delta;\n let mean = 0;\n let sum = 0;\n if (valueof === undefined) {\n for (let value of values) {\n if (value != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n } else {\n let index = -1;\n for (let value of values) {\n if ((value = valueof(value, ++index, values)) != null && (value = +value) >= value) {\n delta = value - mean;\n mean += delta / ++count;\n sum += delta * (value - mean);\n }\n }\n }\n if (count > 1) return sum / (count - 1);\n}\n","import transpose from \"./transpose.js\";\n\nexport default function() {\n return transpose(arguments);\n}\n","import {min} from \"d3-array\";\n\nfunction targetDepth(d) {\n return d.target.depth;\n}\n\nexport function left(node) {\n return node.depth;\n}\n\nexport function right(node, n) {\n return n - 1 - node.height;\n}\n\nexport function justify(node, n) {\n return node.sourceLinks.length ? node.depth : n - 1;\n}\n\nexport function center(node) {\n return node.targetLinks.length ? node.depth\n : node.sourceLinks.length ? min(node.sourceLinks, targetDepth) - 1\n : 0;\n}\n","export default function constant(x) {\n return function() {\n return x;\n };\n}\n","export {default as sankey} from \"./sankey.js\";\nexport {center as sankeyCenter, left as sankeyLeft, right as sankeyRight, justify as sankeyJustify} from \"./align.js\";\nexport {default as sankeyLinkHorizontal} from \"./sankeyLinkHorizontal.js\";\n","import {max, min, sum} from \"d3-array\";\nimport {justify} from \"./align.js\";\nimport constant from \"./constant.js\";\n\nfunction ascendingSourceBreadth(a, b) {\n return ascendingBreadth(a.source, b.source) || a.index - b.index;\n}\n\nfunction ascendingTargetBreadth(a, b) {\n return ascendingBreadth(a.target, b.target) || a.index - b.index;\n}\n\nfunction ascendingBreadth(a, b) {\n return a.y0 - b.y0;\n}\n\nfunction value(d) {\n return d.value;\n}\n\nfunction defaultId(d) {\n return d.index;\n}\n\nfunction defaultNodes(graph) {\n return graph.nodes;\n}\n\nfunction defaultLinks(graph) {\n return graph.links;\n}\n\nfunction find(nodeById, id) {\n const node = nodeById.get(id);\n if (!node) throw new Error(\"missing: \" + id);\n return node;\n}\n\nfunction computeLinkBreadths({nodes}) {\n for (const node of nodes) {\n let y0 = node.y0;\n let y1 = y0;\n for (const link of node.sourceLinks) {\n link.y0 = y0 + link.width / 2;\n y0 += link.width;\n }\n for (const link of node.targetLinks) {\n link.y1 = y1 + link.width / 2;\n y1 += link.width;\n }\n }\n}\n\nexport default function Sankey() {\n let x0 = 0, y0 = 0, x1 = 1, y1 = 1; // extent\n let dx = 24; // nodeWidth\n let dy = 8, py; // nodePadding\n let id = defaultId;\n let align = justify;\n let sort;\n let linkSort;\n let nodes = defaultNodes;\n let links = defaultLinks;\n let iterations = 6;\n\n function sankey() {\n const graph = {nodes: nodes.apply(null, arguments), links: links.apply(null, arguments)};\n computeNodeLinks(graph);\n computeNodeValues(graph);\n computeNodeDepths(graph);\n computeNodeHeights(graph);\n computeNodeBreadths(graph);\n computeLinkBreadths(graph);\n return graph;\n }\n\n sankey.update = function(graph) {\n computeLinkBreadths(graph);\n return graph;\n };\n\n sankey.nodeId = function(_) {\n return arguments.length ? (id = typeof _ === \"function\" ? _ : constant(_), sankey) : id;\n };\n\n sankey.nodeAlign = function(_) {\n return arguments.length ? (align = typeof _ === \"function\" ? _ : constant(_), sankey) : align;\n };\n\n sankey.nodeSort = function(_) {\n return arguments.length ? (sort = _, sankey) : sort;\n };\n\n sankey.nodeWidth = function(_) {\n return arguments.length ? (dx = +_, sankey) : dx;\n };\n\n sankey.nodePadding = function(_) {\n return arguments.length ? (dy = py = +_, sankey) : dy;\n };\n\n sankey.nodes = function(_) {\n return arguments.length ? (nodes = typeof _ === \"function\" ? _ : constant(_), sankey) : nodes;\n };\n\n sankey.links = function(_) {\n return arguments.length ? (links = typeof _ === \"function\" ? _ : constant(_), sankey) : links;\n };\n\n sankey.linkSort = function(_) {\n return arguments.length ? (linkSort = _, sankey) : linkSort;\n };\n\n sankey.size = function(_) {\n return arguments.length ? (x0 = y0 = 0, x1 = +_[0], y1 = +_[1], sankey) : [x1 - x0, y1 - y0];\n };\n\n sankey.extent = function(_) {\n return arguments.length ? (x0 = +_[0][0], x1 = +_[1][0], y0 = +_[0][1], y1 = +_[1][1], sankey) : [[x0, y0], [x1, y1]];\n };\n\n sankey.iterations = function(_) {\n return arguments.length ? (iterations = +_, sankey) : iterations;\n };\n\n function computeNodeLinks({nodes, links}) {\n for (const [i, node] of nodes.entries()) {\n node.index = i;\n node.sourceLinks = [];\n node.targetLinks = [];\n }\n const nodeById = new Map(nodes.map((d, i) => [id(d, i, nodes), d]));\n for (const [i, link] of links.entries()) {\n link.index = i;\n let {source, target} = link;\n if (typeof source !== \"object\") source = link.source = find(nodeById, source);\n if (typeof target !== \"object\") target = link.target = find(nodeById, target);\n source.sourceLinks.push(link);\n target.targetLinks.push(link);\n }\n if (linkSort != null) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(linkSort);\n targetLinks.sort(linkSort);\n }\n }\n }\n\n function computeNodeValues({nodes}) {\n for (const node of nodes) {\n node.value = node.fixedValue === undefined\n ? Math.max(sum(node.sourceLinks, value), sum(node.targetLinks, value))\n : node.fixedValue;\n }\n }\n\n function computeNodeDepths({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.depth = x;\n for (const {target} of node.sourceLinks) {\n next.add(target);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeHeights({nodes}) {\n const n = nodes.length;\n let current = new Set(nodes);\n let next = new Set;\n let x = 0;\n while (current.size) {\n for (const node of current) {\n node.height = x;\n for (const {source} of node.targetLinks) {\n next.add(source);\n }\n }\n if (++x > n) throw new Error(\"circular link\");\n current = next;\n next = new Set;\n }\n }\n\n function computeNodeLayers({nodes}) {\n const x = max(nodes, d => d.depth) + 1;\n const kx = (x1 - x0 - dx) / (x - 1);\n const columns = new Array(x);\n for (const node of nodes) {\n const i = Math.max(0, Math.min(x - 1, Math.floor(align.call(null, node, x))));\n node.layer = i;\n node.x0 = x0 + i * kx;\n node.x1 = node.x0 + dx;\n if (columns[i]) columns[i].push(node);\n else columns[i] = [node];\n }\n if (sort) for (const column of columns) {\n column.sort(sort);\n }\n return columns;\n }\n\n function initializeNodeBreadths(columns) {\n const ky = min(columns, c => (y1 - y0 - (c.length - 1) * py) / sum(c, value));\n for (const nodes of columns) {\n let y = y0;\n for (const node of nodes) {\n node.y0 = y;\n node.y1 = y + node.value * ky;\n y = node.y1 + py;\n for (const link of node.sourceLinks) {\n link.width = link.value * ky;\n }\n }\n y = (y1 - y + py) / (nodes.length + 1);\n for (let i = 0; i < nodes.length; ++i) {\n const node = nodes[i];\n node.y0 += y * (i + 1);\n node.y1 += y * (i + 1);\n }\n reorderLinks(nodes);\n }\n }\n\n function computeNodeBreadths(graph) {\n const columns = computeNodeLayers(graph);\n py = Math.min(dy, (y1 - y0) / (max(columns, c => c.length) - 1));\n initializeNodeBreadths(columns);\n for (let i = 0; i < iterations; ++i) {\n const alpha = Math.pow(0.99, i);\n const beta = Math.max(1 - alpha, (i + 1) / iterations);\n relaxRightToLeft(columns, alpha, beta);\n relaxLeftToRight(columns, alpha, beta);\n }\n }\n\n // Reposition each node based on its incoming (target) links.\n function relaxLeftToRight(columns, alpha, beta) {\n for (let i = 1, n = columns.length; i < n; ++i) {\n const column = columns[i];\n for (const target of column) {\n let y = 0;\n let w = 0;\n for (const {source, value} of target.targetLinks) {\n let v = value * (target.layer - source.layer);\n y += targetTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - target.y0) * alpha;\n target.y0 += dy;\n target.y1 += dy;\n reorderNodeLinks(target);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n // Reposition each node based on its outgoing (source) links.\n function relaxRightToLeft(columns, alpha, beta) {\n for (let n = columns.length, i = n - 2; i >= 0; --i) {\n const column = columns[i];\n for (const source of column) {\n let y = 0;\n let w = 0;\n for (const {target, value} of source.sourceLinks) {\n let v = value * (target.layer - source.layer);\n y += sourceTop(source, target) * v;\n w += v;\n }\n if (!(w > 0)) continue;\n let dy = (y / w - source.y0) * alpha;\n source.y0 += dy;\n source.y1 += dy;\n reorderNodeLinks(source);\n }\n if (sort === undefined) column.sort(ascendingBreadth);\n resolveCollisions(column, beta);\n }\n }\n\n function resolveCollisions(nodes, alpha) {\n const i = nodes.length >> 1;\n const subject = nodes[i];\n resolveCollisionsBottomToTop(nodes, subject.y0 - py, i - 1, alpha);\n resolveCollisionsTopToBottom(nodes, subject.y1 + py, i + 1, alpha);\n resolveCollisionsBottomToTop(nodes, y1, nodes.length - 1, alpha);\n resolveCollisionsTopToBottom(nodes, y0, 0, alpha);\n }\n\n // Push any overlapping nodes down.\n function resolveCollisionsTopToBottom(nodes, y, i, alpha) {\n for (; i < nodes.length; ++i) {\n const node = nodes[i];\n const dy = (y - node.y0) * alpha;\n if (dy > 1e-6) node.y0 += dy, node.y1 += dy;\n y = node.y1 + py;\n }\n }\n\n // Push any overlapping nodes up.\n function resolveCollisionsBottomToTop(nodes, y, i, alpha) {\n for (; i >= 0; --i) {\n const node = nodes[i];\n const dy = (node.y1 - y) * alpha;\n if (dy > 1e-6) node.y0 -= dy, node.y1 -= dy;\n y = node.y0 - py;\n }\n }\n\n function reorderNodeLinks({sourceLinks, targetLinks}) {\n if (linkSort === undefined) {\n for (const {source: {sourceLinks}} of targetLinks) {\n sourceLinks.sort(ascendingTargetBreadth);\n }\n for (const {target: {targetLinks}} of sourceLinks) {\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n function reorderLinks(nodes) {\n if (linkSort === undefined) {\n for (const {sourceLinks, targetLinks} of nodes) {\n sourceLinks.sort(ascendingTargetBreadth);\n targetLinks.sort(ascendingSourceBreadth);\n }\n }\n }\n\n // Returns the target.y0 that would produce an ideal link from source to target.\n function targetTop(source, target) {\n let y = source.y0 - (source.sourceLinks.length - 1) * py / 2;\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y += width + py;\n }\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y -= width;\n }\n return y;\n }\n\n // Returns the source.y0 that would produce an ideal link from source to target.\n function sourceTop(source, target) {\n let y = target.y0 - (target.targetLinks.length - 1) * py / 2;\n for (const {source: node, width} of target.targetLinks) {\n if (node === source) break;\n y += width + py;\n }\n for (const {target: node, width} of source.sourceLinks) {\n if (node === target) break;\n y -= width;\n }\n return y;\n }\n\n return sankey;\n}\n","import {linkHorizontal} from \"d3-shape\";\n\nfunction horizontalSource(d) {\n return [d.source.x1, d.y0];\n}\n\nfunction horizontalTarget(d) {\n return [d.target.x0, d.y1];\n}\n\nexport default function() {\n return linkHorizontal()\n .source(horizontalSource)\n .target(horizontalTarget);\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport {abs, acos, asin, atan2, cos, epsilon, halfPi, max, min, pi, sin, sqrt, tau} from \"./math.js\";\n\nfunction arcInnerRadius(d) {\n return d.innerRadius;\n}\n\nfunction arcOuterRadius(d) {\n return d.outerRadius;\n}\n\nfunction arcStartAngle(d) {\n return d.startAngle;\n}\n\nfunction arcEndAngle(d) {\n return d.endAngle;\n}\n\nfunction arcPadAngle(d) {\n return d && d.padAngle; // Note: optional!\n}\n\nfunction intersect(x0, y0, x1, y1, x2, y2, x3, y3) {\n var x10 = x1 - x0, y10 = y1 - y0,\n x32 = x3 - x2, y32 = y3 - y2,\n t = y32 * x10 - x32 * y10;\n if (t * t < epsilon) return;\n t = (x32 * (y0 - y2) - y32 * (x0 - x2)) / t;\n return [x0 + t * x10, y0 + t * y10];\n}\n\n// Compute perpendicular offset line of length rc.\n// http://mathworld.wolfram.com/Circle-LineIntersection.html\nfunction cornerTangents(x0, y0, x1, y1, r1, rc, cw) {\n var x01 = x0 - x1,\n y01 = y0 - y1,\n lo = (cw ? rc : -rc) / sqrt(x01 * x01 + y01 * y01),\n ox = lo * y01,\n oy = -lo * x01,\n x11 = x0 + ox,\n y11 = y0 + oy,\n x10 = x1 + ox,\n y10 = y1 + oy,\n x00 = (x11 + x10) / 2,\n y00 = (y11 + y10) / 2,\n dx = x10 - x11,\n dy = y10 - y11,\n d2 = dx * dx + dy * dy,\n r = r1 - rc,\n D = x11 * y10 - x10 * y11,\n d = (dy < 0 ? -1 : 1) * sqrt(max(0, r * r * d2 - D * D)),\n cx0 = (D * dy - dx * d) / d2,\n cy0 = (-D * dx - dy * d) / d2,\n cx1 = (D * dy + dx * d) / d2,\n cy1 = (-D * dx + dy * d) / d2,\n dx0 = cx0 - x00,\n dy0 = cy0 - y00,\n dx1 = cx1 - x00,\n dy1 = cy1 - y00;\n\n // Pick the closer of the two intersection points.\n // TODO Is there a faster way to determine which intersection to use?\n if (dx0 * dx0 + dy0 * dy0 > dx1 * dx1 + dy1 * dy1) cx0 = cx1, cy0 = cy1;\n\n return {\n cx: cx0,\n cy: cy0,\n x01: -ox,\n y01: -oy,\n x11: cx0 * (r1 / r - 1),\n y11: cy0 * (r1 / r - 1)\n };\n}\n\nexport default function() {\n var innerRadius = arcInnerRadius,\n outerRadius = arcOuterRadius,\n cornerRadius = constant(0),\n padRadius = null,\n startAngle = arcStartAngle,\n endAngle = arcEndAngle,\n padAngle = arcPadAngle,\n context = null;\n\n function arc() {\n var buffer,\n r,\n r0 = +innerRadius.apply(this, arguments),\n r1 = +outerRadius.apply(this, arguments),\n a0 = startAngle.apply(this, arguments) - halfPi,\n a1 = endAngle.apply(this, arguments) - halfPi,\n da = abs(a1 - a0),\n cw = a1 > a0;\n\n if (!context) context = buffer = path();\n\n // Ensure that the outer radius is always larger than the inner radius.\n if (r1 < r0) r = r1, r1 = r0, r0 = r;\n\n // Is it a point?\n if (!(r1 > epsilon)) context.moveTo(0, 0);\n\n // Or is it a circle or annulus?\n else if (da > tau - epsilon) {\n context.moveTo(r1 * cos(a0), r1 * sin(a0));\n context.arc(0, 0, r1, a0, a1, !cw);\n if (r0 > epsilon) {\n context.moveTo(r0 * cos(a1), r0 * sin(a1));\n context.arc(0, 0, r0, a1, a0, cw);\n }\n }\n\n // Or is it a circular or annular sector?\n else {\n var a01 = a0,\n a11 = a1,\n a00 = a0,\n a10 = a1,\n da0 = da,\n da1 = da,\n ap = padAngle.apply(this, arguments) / 2,\n rp = (ap > epsilon) && (padRadius ? +padRadius.apply(this, arguments) : sqrt(r0 * r0 + r1 * r1)),\n rc = min(abs(r1 - r0) / 2, +cornerRadius.apply(this, arguments)),\n rc0 = rc,\n rc1 = rc,\n t0,\n t1;\n\n // Apply padding? Note that since r1 ≥ r0, da1 ≥ da0.\n if (rp > epsilon) {\n var p0 = asin(rp / r0 * sin(ap)),\n p1 = asin(rp / r1 * sin(ap));\n if ((da0 -= p0 * 2) > epsilon) p0 *= (cw ? 1 : -1), a00 += p0, a10 -= p0;\n else da0 = 0, a00 = a10 = (a0 + a1) / 2;\n if ((da1 -= p1 * 2) > epsilon) p1 *= (cw ? 1 : -1), a01 += p1, a11 -= p1;\n else da1 = 0, a01 = a11 = (a0 + a1) / 2;\n }\n\n var x01 = r1 * cos(a01),\n y01 = r1 * sin(a01),\n x10 = r0 * cos(a10),\n y10 = r0 * sin(a10);\n\n // Apply rounded corners?\n if (rc > epsilon) {\n var x11 = r1 * cos(a11),\n y11 = r1 * sin(a11),\n x00 = r0 * cos(a00),\n y00 = r0 * sin(a00),\n oc;\n\n // Restrict the corner radius according to the sector angle.\n if (da < pi && (oc = intersect(x01, y01, x00, y00, x11, y11, x10, y10))) {\n var ax = x01 - oc[0],\n ay = y01 - oc[1],\n bx = x11 - oc[0],\n by = y11 - oc[1],\n kc = 1 / sin(acos((ax * bx + ay * by) / (sqrt(ax * ax + ay * ay) * sqrt(bx * bx + by * by))) / 2),\n lc = sqrt(oc[0] * oc[0] + oc[1] * oc[1]);\n rc0 = min(rc, (r0 - lc) / (kc - 1));\n rc1 = min(rc, (r1 - lc) / (kc + 1));\n }\n }\n\n // Is the sector collapsed to a line?\n if (!(da1 > epsilon)) context.moveTo(x01, y01);\n\n // Does the sector’s outer ring have rounded corners?\n else if (rc1 > epsilon) {\n t0 = cornerTangents(x00, y00, x01, y01, r1, rc1, cw);\n t1 = cornerTangents(x11, y11, x10, y10, r1, rc1, cw);\n\n context.moveTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc1 < rc) context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc1, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r1, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), !cw);\n context.arc(t1.cx, t1.cy, rc1, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the outer ring just a circular arc?\n else context.moveTo(x01, y01), context.arc(0, 0, r1, a01, a11, !cw);\n\n // Is there no inner ring, and it’s a circular sector?\n // Or perhaps it’s an annular sector collapsed due to padding?\n if (!(r0 > epsilon) || !(da0 > epsilon)) context.lineTo(x10, y10);\n\n // Does the sector’s inner ring (or point) have rounded corners?\n else if (rc0 > epsilon) {\n t0 = cornerTangents(x10, y10, x11, y11, r0, -rc0, cw);\n t1 = cornerTangents(x01, y01, x00, y00, r0, -rc0, cw);\n\n context.lineTo(t0.cx + t0.x01, t0.cy + t0.y01);\n\n // Have the corners merged?\n if (rc0 < rc) context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t1.y01, t1.x01), !cw);\n\n // Otherwise, draw the two corners and the ring.\n else {\n context.arc(t0.cx, t0.cy, rc0, atan2(t0.y01, t0.x01), atan2(t0.y11, t0.x11), !cw);\n context.arc(0, 0, r0, atan2(t0.cy + t0.y11, t0.cx + t0.x11), atan2(t1.cy + t1.y11, t1.cx + t1.x11), cw);\n context.arc(t1.cx, t1.cy, rc0, atan2(t1.y11, t1.x11), atan2(t1.y01, t1.x01), !cw);\n }\n }\n\n // Or is the inner ring just a circular arc?\n else context.arc(0, 0, r0, a10, a00, cw);\n }\n\n context.closePath();\n\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n arc.centroid = function() {\n var r = (+innerRadius.apply(this, arguments) + +outerRadius.apply(this, arguments)) / 2,\n a = (+startAngle.apply(this, arguments) + +endAngle.apply(this, arguments)) / 2 - pi / 2;\n return [cos(a) * r, sin(a) * r];\n };\n\n arc.innerRadius = function(_) {\n return arguments.length ? (innerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : innerRadius;\n };\n\n arc.outerRadius = function(_) {\n return arguments.length ? (outerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : outerRadius;\n };\n\n arc.cornerRadius = function(_) {\n return arguments.length ? (cornerRadius = typeof _ === \"function\" ? _ : constant(+_), arc) : cornerRadius;\n };\n\n arc.padRadius = function(_) {\n return arguments.length ? (padRadius = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), arc) : padRadius;\n };\n\n arc.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : startAngle;\n };\n\n arc.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : endAngle;\n };\n\n arc.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), arc) : padAngle;\n };\n\n arc.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), arc) : context;\n };\n\n return arc;\n}\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport line from \"./line.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function() {\n var x0 = pointX,\n x1 = null,\n y0 = constant(0),\n y1 = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function area(data) {\n var i,\n j,\n k,\n n = data.length,\n d,\n defined0 = false,\n buffer,\n x0z = new Array(n),\n y0z = new Array(n);\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) {\n j = i;\n output.areaStart();\n output.lineStart();\n } else {\n output.lineEnd();\n output.lineStart();\n for (k = i - 1; k >= j; --k) {\n output.point(x0z[k], y0z[k]);\n }\n output.lineEnd();\n output.areaEnd();\n }\n }\n if (defined0) {\n x0z[i] = +x0(d, i, data), y0z[i] = +y0(d, i, data);\n output.point(x1 ? +x1(d, i, data) : x0z[i], y1 ? +y1(d, i, data) : y0z[i]);\n }\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n function arealine() {\n return line().defined(defined).curve(curve).context(context);\n }\n\n area.x = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), x1 = null, area) : x0;\n };\n\n area.x0 = function(_) {\n return arguments.length ? (x0 = typeof _ === \"function\" ? _ : constant(+_), area) : x0;\n };\n\n area.x1 = function(_) {\n return arguments.length ? (x1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : x1;\n };\n\n area.y = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), y1 = null, area) : y0;\n };\n\n area.y0 = function(_) {\n return arguments.length ? (y0 = typeof _ === \"function\" ? _ : constant(+_), area) : y0;\n };\n\n area.y1 = function(_) {\n return arguments.length ? (y1 = _ == null ? null : typeof _ === \"function\" ? _ : constant(+_), area) : y1;\n };\n\n area.lineX0 =\n area.lineY0 = function() {\n return arealine().x(x0).y(y0);\n };\n\n area.lineY1 = function() {\n return arealine().x(x0).y(y1);\n };\n\n area.lineX1 = function() {\n return arealine().x(x1).y(y0);\n };\n\n area.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), area) : defined;\n };\n\n area.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), area) : curve;\n };\n\n area.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), area) : context;\n };\n\n return area;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport area from \"./area.js\";\nimport {lineRadial} from \"./lineRadial.js\";\n\nexport default function() {\n var a = area().curve(curveRadialLinear),\n c = a.curve,\n x0 = a.lineX0,\n x1 = a.lineX1,\n y0 = a.lineY0,\n y1 = a.lineY1;\n\n a.angle = a.x, delete a.x;\n a.startAngle = a.x0, delete a.x0;\n a.endAngle = a.x1, delete a.x1;\n a.radius = a.y, delete a.y;\n a.innerRadius = a.y0, delete a.y0;\n a.outerRadius = a.y1, delete a.y1;\n a.lineStartAngle = function() { return lineRadial(x0()); }, delete a.lineX0;\n a.lineEndAngle = function() { return lineRadial(x1()); }, delete a.lineX1;\n a.lineInnerRadius = function() { return lineRadial(y0()); }, delete a.lineY0;\n a.lineOuterRadius = function() { return lineRadial(y1()); }, delete a.lineY1;\n\n a.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return a;\n}\n","export var slice = Array.prototype.slice;\n","export default function(x) {\n return function constant() {\n return x;\n };\n}\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n (2 * that._x0 + that._x1) / 3,\n (2 * that._y0 + that._y1) / 3,\n (that._x0 + 2 * that._x1) / 3,\n (that._y0 + 2 * that._y1) / 3,\n (that._x0 + 4 * that._x1 + x) / 6,\n (that._y0 + 4 * that._y1 + y) / 6\n );\n}\n\nexport function Basis(context) {\n this._context = context;\n}\n\nBasis.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 3: point(this, this._x1, this._y1); // proceed\n case 2: this._context.lineTo(this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._context.lineTo((5 * this._x0 + this._x1) / 6, (5 * this._y0 + this._y1) / 6); // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new Basis(context);\n}\n","import noop from \"../noop.js\";\nimport {point} from \"./basis.js\";\n\nfunction BasisClosed(context) {\n this._context = context;\n}\n\nBasisClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x2, this._y2);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.moveTo((this._x2 + 2 * this._x3) / 3, (this._y2 + 2 * this._y3) / 3);\n this._context.lineTo((this._x3 + 2 * this._x2) / 3, (this._y3 + 2 * this._y2) / 3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x2, this._y2);\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x2 = x, this._y2 = y; break;\n case 1: this._point = 2; this._x3 = x, this._y3 = y; break;\n case 2: this._point = 3; this._x4 = x, this._y4 = y; this._context.moveTo((this._x0 + 4 * this._x1 + x) / 6, (this._y0 + 4 * this._y1 + y) / 6); break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisClosed(context);\n}\n","import {point} from \"./basis.js\";\n\nfunction BasisOpen(context) {\n this._context = context;\n}\n\nBasisOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; var x0 = (this._x0 + 4 * this._x1 + x) / 6, y0 = (this._y0 + 4 * this._y1 + y) / 6; this._line ? this._context.lineTo(x0, y0) : this._context.moveTo(x0, y0); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n }\n};\n\nexport default function(context) {\n return new BasisOpen(context);\n}\n","import {Basis} from \"./basis.js\";\n\nfunction Bundle(context, beta) {\n this._basis = new Basis(context);\n this._beta = beta;\n}\n\nBundle.prototype = {\n lineStart: function() {\n this._x = [];\n this._y = [];\n this._basis.lineStart();\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n j = x.length - 1;\n\n if (j > 0) {\n var x0 = x[0],\n y0 = y[0],\n dx = x[j] - x0,\n dy = y[j] - y0,\n i = -1,\n t;\n\n while (++i <= j) {\n t = i / j;\n this._basis.point(\n this._beta * x[i] + (1 - this._beta) * (x0 + t * dx),\n this._beta * y[i] + (1 - this._beta) * (y0 + t * dy)\n );\n }\n }\n\n this._x = this._y = null;\n this._basis.lineEnd();\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\nexport default (function custom(beta) {\n\n function bundle(context) {\n return beta === 1 ? new Basis(context) : new Bundle(context, beta);\n }\n\n bundle.beta = function(beta) {\n return custom(+beta);\n };\n\n return bundle;\n})(0.85);\n","export function point(that, x, y) {\n that._context.bezierCurveTo(\n that._x1 + that._k * (that._x2 - that._x0),\n that._y1 + that._k * (that._y2 - that._y0),\n that._x2 + that._k * (that._x1 - x),\n that._y2 + that._k * (that._y1 - y),\n that._x2,\n that._y2\n );\n}\n\nexport function Cardinal(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinal.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: point(this, this._x1, this._y1); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; this._x1 = x, this._y1 = y; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new Cardinal(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import noop from \"../noop.js\";\nimport {point} from \"./cardinal.js\";\n\nexport function CardinalClosed(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalClosed(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {point} from \"./cardinal.js\";\n\nexport function CardinalOpen(context, tension) {\n this._context = context;\n this._k = (1 - tension) / 6;\n}\n\nCardinalOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(tension) {\n\n function cardinal(context) {\n return new CardinalOpen(context, tension);\n }\n\n cardinal.tension = function(tension) {\n return custom(+tension);\n };\n\n return cardinal;\n})(0);\n","import {epsilon} from \"../math.js\";\nimport {Cardinal} from \"./cardinal.js\";\n\nexport function point(that, x, y) {\n var x1 = that._x1,\n y1 = that._y1,\n x2 = that._x2,\n y2 = that._y2;\n\n if (that._l01_a > epsilon) {\n var a = 2 * that._l01_2a + 3 * that._l01_a * that._l12_a + that._l12_2a,\n n = 3 * that._l01_a * (that._l01_a + that._l12_a);\n x1 = (x1 * a - that._x0 * that._l12_2a + that._x2 * that._l01_2a) / n;\n y1 = (y1 * a - that._y0 * that._l12_2a + that._y2 * that._l01_2a) / n;\n }\n\n if (that._l23_a > epsilon) {\n var b = 2 * that._l23_2a + 3 * that._l23_a * that._l12_a + that._l12_2a,\n m = 3 * that._l23_a * (that._l23_a + that._l12_a);\n x2 = (x2 * b + that._x1 * that._l23_2a - x * that._l12_2a) / m;\n y2 = (y2 * b + that._y1 * that._l23_2a - y * that._l12_2a) / m;\n }\n\n that._context.bezierCurveTo(x1, y1, x2, y2, that._x2, that._y2);\n}\n\nfunction CatmullRom(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRom.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x2, this._y2); break;\n case 3: this.point(this._x2, this._y2); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRom(context, alpha) : new Cardinal(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalClosed} from \"./cardinalClosed.js\";\nimport noop from \"../noop.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomClosed(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._x0 = this._x1 = this._x2 = this._x3 = this._x4 = this._x5 =\n this._y0 = this._y1 = this._y2 = this._y3 = this._y4 = this._y5 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 1: {\n this._context.moveTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 2: {\n this._context.lineTo(this._x3, this._y3);\n this._context.closePath();\n break;\n }\n case 3: {\n this.point(this._x3, this._y3);\n this.point(this._x4, this._y4);\n this.point(this._x5, this._y5);\n break;\n }\n }\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; this._x3 = x, this._y3 = y; break;\n case 1: this._point = 2; this._context.moveTo(this._x4 = x, this._y4 = y); break;\n case 2: this._point = 3; this._x5 = x, this._y5 = y; break;\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomClosed(context, alpha) : new CardinalClosed(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","import {CardinalOpen} from \"./cardinalOpen.js\";\nimport {point} from \"./catmullRom.js\";\n\nfunction CatmullRomOpen(context, alpha) {\n this._context = context;\n this._alpha = alpha;\n}\n\nCatmullRomOpen.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 = this._x2 =\n this._y0 = this._y1 = this._y2 = NaN;\n this._l01_a = this._l12_a = this._l23_a =\n this._l01_2a = this._l12_2a = this._l23_2a =\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 3)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n\n if (this._point) {\n var x23 = this._x2 - x,\n y23 = this._y2 - y;\n this._l23_a = Math.sqrt(this._l23_2a = Math.pow(x23 * x23 + y23 * y23, this._alpha));\n }\n\n switch (this._point) {\n case 0: this._point = 1; break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; this._line ? this._context.lineTo(this._x2, this._y2) : this._context.moveTo(this._x2, this._y2); break;\n case 3: this._point = 4; // proceed\n default: point(this, x, y); break;\n }\n\n this._l01_a = this._l12_a, this._l12_a = this._l23_a;\n this._l01_2a = this._l12_2a, this._l12_2a = this._l23_2a;\n this._x0 = this._x1, this._x1 = this._x2, this._x2 = x;\n this._y0 = this._y1, this._y1 = this._y2, this._y2 = y;\n }\n};\n\nexport default (function custom(alpha) {\n\n function catmullRom(context) {\n return alpha ? new CatmullRomOpen(context, alpha) : new CardinalOpen(context, 0);\n }\n\n catmullRom.alpha = function(alpha) {\n return custom(+alpha);\n };\n\n return catmullRom;\n})(0.5);\n","function Linear(context) {\n this._context = context;\n}\n\nLinear.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: this._context.lineTo(x, y); break;\n }\n }\n};\n\nexport default function(context) {\n return new Linear(context);\n}\n","import noop from \"../noop.js\";\n\nfunction LinearClosed(context) {\n this._context = context;\n}\n\nLinearClosed.prototype = {\n areaStart: noop,\n areaEnd: noop,\n lineStart: function() {\n this._point = 0;\n },\n lineEnd: function() {\n if (this._point) this._context.closePath();\n },\n point: function(x, y) {\n x = +x, y = +y;\n if (this._point) this._context.lineTo(x, y);\n else this._point = 1, this._context.moveTo(x, y);\n }\n};\n\nexport default function(context) {\n return new LinearClosed(context);\n}\n","function sign(x) {\n return x < 0 ? -1 : 1;\n}\n\n// Calculate the slopes of the tangents (Hermite-type interpolation) based on\n// the following paper: Steffen, M. 1990. A Simple Method for Monotonic\n// Interpolation in One Dimension. Astronomy and Astrophysics, Vol. 239, NO.\n// NOV(II), P. 443, 1990.\nfunction slope3(that, x2, y2) {\n var h0 = that._x1 - that._x0,\n h1 = x2 - that._x1,\n s0 = (that._y1 - that._y0) / (h0 || h1 < 0 && -0),\n s1 = (y2 - that._y1) / (h1 || h0 < 0 && -0),\n p = (s0 * h1 + s1 * h0) / (h0 + h1);\n return (sign(s0) + sign(s1)) * Math.min(Math.abs(s0), Math.abs(s1), 0.5 * Math.abs(p)) || 0;\n}\n\n// Calculate a one-sided slope.\nfunction slope2(that, t) {\n var h = that._x1 - that._x0;\n return h ? (3 * (that._y1 - that._y0) / h - t) / 2 : t;\n}\n\n// According to https://en.wikipedia.org/wiki/Cubic_Hermite_spline#Representations\n// \"you can express cubic Hermite interpolation in terms of cubic Bézier curves\n// with respect to the four values p0, p0 + m0 / 3, p1 - m1 / 3, p1\".\nfunction point(that, t0, t1) {\n var x0 = that._x0,\n y0 = that._y0,\n x1 = that._x1,\n y1 = that._y1,\n dx = (x1 - x0) / 3;\n that._context.bezierCurveTo(x0 + dx, y0 + dx * t0, x1 - dx, y1 - dx * t1, x1, y1);\n}\n\nfunction MonotoneX(context) {\n this._context = context;\n}\n\nMonotoneX.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x0 = this._x1 =\n this._y0 = this._y1 =\n this._t0 = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n switch (this._point) {\n case 2: this._context.lineTo(this._x1, this._y1); break;\n case 3: point(this, this._t0, slope2(this, this._t0)); break;\n }\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n this._line = 1 - this._line;\n },\n point: function(x, y) {\n var t1 = NaN;\n\n x = +x, y = +y;\n if (x === this._x1 && y === this._y1) return; // Ignore coincident points.\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; break;\n case 2: this._point = 3; point(this, slope2(this, t1 = slope3(this, x, y)), t1); break;\n default: point(this, this._t0, t1 = slope3(this, x, y)); break;\n }\n\n this._x0 = this._x1, this._x1 = x;\n this._y0 = this._y1, this._y1 = y;\n this._t0 = t1;\n }\n}\n\nfunction MonotoneY(context) {\n this._context = new ReflectContext(context);\n}\n\n(MonotoneY.prototype = Object.create(MonotoneX.prototype)).point = function(x, y) {\n MonotoneX.prototype.point.call(this, y, x);\n};\n\nfunction ReflectContext(context) {\n this._context = context;\n}\n\nReflectContext.prototype = {\n moveTo: function(x, y) { this._context.moveTo(y, x); },\n closePath: function() { this._context.closePath(); },\n lineTo: function(x, y) { this._context.lineTo(y, x); },\n bezierCurveTo: function(x1, y1, x2, y2, x, y) { this._context.bezierCurveTo(y1, x1, y2, x2, y, x); }\n};\n\nexport function monotoneX(context) {\n return new MonotoneX(context);\n}\n\nexport function monotoneY(context) {\n return new MonotoneY(context);\n}\n","function Natural(context) {\n this._context = context;\n}\n\nNatural.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = [];\n this._y = [];\n },\n lineEnd: function() {\n var x = this._x,\n y = this._y,\n n = x.length;\n\n if (n) {\n this._line ? this._context.lineTo(x[0], y[0]) : this._context.moveTo(x[0], y[0]);\n if (n === 2) {\n this._context.lineTo(x[1], y[1]);\n } else {\n var px = controlPoints(x),\n py = controlPoints(y);\n for (var i0 = 0, i1 = 1; i1 < n; ++i0, ++i1) {\n this._context.bezierCurveTo(px[0][i0], py[0][i0], px[1][i0], py[1][i0], x[i1], y[i1]);\n }\n }\n }\n\n if (this._line || (this._line !== 0 && n === 1)) this._context.closePath();\n this._line = 1 - this._line;\n this._x = this._y = null;\n },\n point: function(x, y) {\n this._x.push(+x);\n this._y.push(+y);\n }\n};\n\n// See https://www.particleincell.com/2012/bezier-splines/ for derivation.\nfunction controlPoints(x) {\n var i,\n n = x.length - 1,\n m,\n a = new Array(n),\n b = new Array(n),\n r = new Array(n);\n a[0] = 0, b[0] = 2, r[0] = x[0] + 2 * x[1];\n for (i = 1; i < n - 1; ++i) a[i] = 1, b[i] = 4, r[i] = 4 * x[i] + 2 * x[i + 1];\n a[n - 1] = 2, b[n - 1] = 7, r[n - 1] = 8 * x[n - 1] + x[n];\n for (i = 1; i < n; ++i) m = a[i] / b[i - 1], b[i] -= m, r[i] -= m * r[i - 1];\n a[n - 1] = r[n - 1] / b[n - 1];\n for (i = n - 2; i >= 0; --i) a[i] = (r[i] - a[i + 1]) / b[i];\n b[n - 1] = (x[n] + a[n - 1]) / 2;\n for (i = 0; i < n - 1; ++i) b[i] = 2 * x[i + 1] - a[i + 1];\n return [a, b];\n}\n\nexport default function(context) {\n return new Natural(context);\n}\n","import curveLinear from \"./linear.js\";\n\nexport var curveRadialLinear = curveRadial(curveLinear);\n\nfunction Radial(curve) {\n this._curve = curve;\n}\n\nRadial.prototype = {\n areaStart: function() {\n this._curve.areaStart();\n },\n areaEnd: function() {\n this._curve.areaEnd();\n },\n lineStart: function() {\n this._curve.lineStart();\n },\n lineEnd: function() {\n this._curve.lineEnd();\n },\n point: function(a, r) {\n this._curve.point(r * Math.sin(a), r * -Math.cos(a));\n }\n};\n\nexport default function curveRadial(curve) {\n\n function radial(context) {\n return new Radial(curve(context));\n }\n\n radial._curve = curve;\n\n return radial;\n}\n","function Step(context, t) {\n this._context = context;\n this._t = t;\n}\n\nStep.prototype = {\n areaStart: function() {\n this._line = 0;\n },\n areaEnd: function() {\n this._line = NaN;\n },\n lineStart: function() {\n this._x = this._y = NaN;\n this._point = 0;\n },\n lineEnd: function() {\n if (0 < this._t && this._t < 1 && this._point === 2) this._context.lineTo(this._x, this._y);\n if (this._line || (this._line !== 0 && this._point === 1)) this._context.closePath();\n if (this._line >= 0) this._t = 1 - this._t, this._line = 1 - this._line;\n },\n point: function(x, y) {\n x = +x, y = +y;\n switch (this._point) {\n case 0: this._point = 1; this._line ? this._context.lineTo(x, y) : this._context.moveTo(x, y); break;\n case 1: this._point = 2; // proceed\n default: {\n if (this._t <= 0) {\n this._context.lineTo(this._x, y);\n this._context.lineTo(x, y);\n } else {\n var x1 = this._x * (1 - this._t) + x * this._t;\n this._context.lineTo(x1, this._y);\n this._context.lineTo(x1, y);\n }\n break;\n }\n }\n this._x = x, this._y = y;\n }\n};\n\nexport default function(context) {\n return new Step(context, 0.5);\n}\n\nexport function stepBefore(context) {\n return new Step(context, 0);\n}\n\nexport function stepAfter(context) {\n return new Step(context, 1);\n}\n","export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","export {default as arc} from \"./arc.js\";\nexport {default as area} from \"./area.js\";\nexport {default as line} from \"./line.js\";\nexport {default as pie} from \"./pie.js\";\nexport {default as areaRadial, default as radialArea} from \"./areaRadial.js\"; // Note: radialArea is deprecated!\nexport {default as lineRadial, default as radialLine} from \"./lineRadial.js\"; // Note: radialLine is deprecated!\nexport {default as pointRadial} from \"./pointRadial.js\";\nexport {linkHorizontal, linkVertical, linkRadial} from \"./link/index.js\";\n\nexport {default as symbol, symbols} from \"./symbol.js\";\nexport {default as symbolCircle} from \"./symbol/circle.js\";\nexport {default as symbolCross} from \"./symbol/cross.js\";\nexport {default as symbolDiamond} from \"./symbol/diamond.js\";\nexport {default as symbolSquare} from \"./symbol/square.js\";\nexport {default as symbolStar} from \"./symbol/star.js\";\nexport {default as symbolTriangle} from \"./symbol/triangle.js\";\nexport {default as symbolWye} from \"./symbol/wye.js\";\n\nexport {default as curveBasisClosed} from \"./curve/basisClosed.js\";\nexport {default as curveBasisOpen} from \"./curve/basisOpen.js\";\nexport {default as curveBasis} from \"./curve/basis.js\";\nexport {default as curveBundle} from \"./curve/bundle.js\";\nexport {default as curveCardinalClosed} from \"./curve/cardinalClosed.js\";\nexport {default as curveCardinalOpen} from \"./curve/cardinalOpen.js\";\nexport {default as curveCardinal} from \"./curve/cardinal.js\";\nexport {default as curveCatmullRomClosed} from \"./curve/catmullRomClosed.js\";\nexport {default as curveCatmullRomOpen} from \"./curve/catmullRomOpen.js\";\nexport {default as curveCatmullRom} from \"./curve/catmullRom.js\";\nexport {default as curveLinearClosed} from \"./curve/linearClosed.js\";\nexport {default as curveLinear} from \"./curve/linear.js\";\nexport {monotoneX as curveMonotoneX, monotoneY as curveMonotoneY} from \"./curve/monotone.js\";\nexport {default as curveNatural} from \"./curve/natural.js\";\nexport {default as curveStep, stepAfter as curveStepAfter, stepBefore as curveStepBefore} from \"./curve/step.js\";\n\nexport {default as stack} from \"./stack.js\";\nexport {default as stackOffsetExpand} from \"./offset/expand.js\";\nexport {default as stackOffsetDiverging} from \"./offset/diverging.js\";\nexport {default as stackOffsetNone} from \"./offset/none.js\";\nexport {default as stackOffsetSilhouette} from \"./offset/silhouette.js\";\nexport {default as stackOffsetWiggle} from \"./offset/wiggle.js\";\nexport {default as stackOrderAppearance} from \"./order/appearance.js\";\nexport {default as stackOrderAscending} from \"./order/ascending.js\";\nexport {default as stackOrderDescending} from \"./order/descending.js\";\nexport {default as stackOrderInsideOut} from \"./order/insideOut.js\";\nexport {default as stackOrderNone} from \"./order/none.js\";\nexport {default as stackOrderReverse} from \"./order/reverse.js\";\n","import {path} from \"d3-path\";\nimport constant from \"./constant.js\";\nimport curveLinear from \"./curve/linear.js\";\nimport {x as pointX, y as pointY} from \"./point.js\";\n\nexport default function() {\n var x = pointX,\n y = pointY,\n defined = constant(true),\n context = null,\n curve = curveLinear,\n output = null;\n\n function line(data) {\n var i,\n n = data.length,\n d,\n defined0 = false,\n buffer;\n\n if (context == null) output = curve(buffer = path());\n\n for (i = 0; i <= n; ++i) {\n if (!(i < n && defined(d = data[i], i, data)) === defined0) {\n if (defined0 = !defined0) output.lineStart();\n else output.lineEnd();\n }\n if (defined0) output.point(+x(d, i, data), +y(d, i, data));\n }\n\n if (buffer) return output = null, buffer + \"\" || null;\n }\n\n line.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), line) : x;\n };\n\n line.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), line) : y;\n };\n\n line.defined = function(_) {\n return arguments.length ? (defined = typeof _ === \"function\" ? _ : constant(!!_), line) : defined;\n };\n\n line.curve = function(_) {\n return arguments.length ? (curve = _, context != null && (output = curve(context)), line) : curve;\n };\n\n line.context = function(_) {\n return arguments.length ? (_ == null ? context = output = null : output = curve(context = _), line) : context;\n };\n\n return line;\n}\n","import curveRadial, {curveRadialLinear} from \"./curve/radial.js\";\nimport line from \"./line.js\";\n\nexport function lineRadial(l) {\n var c = l.curve;\n\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n\n l.curve = function(_) {\n return arguments.length ? c(curveRadial(_)) : c()._curve;\n };\n\n return l;\n}\n\nexport default function() {\n return lineRadial(line().curve(curveRadialLinear));\n}\n","import {path} from \"d3-path\";\nimport {slice} from \"../array.js\";\nimport constant from \"../constant.js\";\nimport {x as pointX, y as pointY} from \"../point.js\";\nimport pointRadial from \"../pointRadial.js\";\n\nfunction linkSource(d) {\n return d.source;\n}\n\nfunction linkTarget(d) {\n return d.target;\n}\n\nfunction link(curve) {\n var source = linkSource,\n target = linkTarget,\n x = pointX,\n y = pointY,\n context = null;\n\n function link() {\n var buffer, argv = slice.call(arguments), s = source.apply(this, argv), t = target.apply(this, argv);\n if (!context) context = buffer = path();\n curve(context, +x.apply(this, (argv[0] = s, argv)), +y.apply(this, argv), +x.apply(this, (argv[0] = t, argv)), +y.apply(this, argv));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n link.source = function(_) {\n return arguments.length ? (source = _, link) : source;\n };\n\n link.target = function(_) {\n return arguments.length ? (target = _, link) : target;\n };\n\n link.x = function(_) {\n return arguments.length ? (x = typeof _ === \"function\" ? _ : constant(+_), link) : x;\n };\n\n link.y = function(_) {\n return arguments.length ? (y = typeof _ === \"function\" ? _ : constant(+_), link) : y;\n };\n\n link.context = function(_) {\n return arguments.length ? ((context = _ == null ? null : _), link) : context;\n };\n\n return link;\n}\n\nfunction curveHorizontal(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0 = (x0 + x1) / 2, y0, x0, y1, x1, y1);\n}\n\nfunction curveVertical(context, x0, y0, x1, y1) {\n context.moveTo(x0, y0);\n context.bezierCurveTo(x0, y0 = (y0 + y1) / 2, x1, y0, x1, y1);\n}\n\nfunction curveRadial(context, x0, y0, x1, y1) {\n var p0 = pointRadial(x0, y0),\n p1 = pointRadial(x0, y0 = (y0 + y1) / 2),\n p2 = pointRadial(x1, y0),\n p3 = pointRadial(x1, y1);\n context.moveTo(p0[0], p0[1]);\n context.bezierCurveTo(p1[0], p1[1], p2[0], p2[1], p3[0], p3[1]);\n}\n\nexport function linkHorizontal() {\n return link(curveHorizontal);\n}\n\nexport function linkVertical() {\n return link(curveVertical);\n}\n\nexport function linkRadial() {\n var l = link(curveRadial);\n l.angle = l.x, delete l.x;\n l.radius = l.y, delete l.y;\n return l;\n}\n","export var abs = Math.abs;\nexport var atan2 = Math.atan2;\nexport var cos = Math.cos;\nexport var max = Math.max;\nexport var min = Math.min;\nexport var sin = Math.sin;\nexport var sqrt = Math.sqrt;\n\nexport var epsilon = 1e-12;\nexport var pi = Math.PI;\nexport var halfPi = pi / 2;\nexport var tau = 2 * pi;\n\nexport function acos(x) {\n return x > 1 ? 0 : x < -1 ? pi : Math.acos(x);\n}\n\nexport function asin(x) {\n return x >= 1 ? halfPi : x <= -1 ? -halfPi : Math.asin(x);\n}\n","export default function() {}\n","export default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, j = 0, d, dy, yp, yn, n, m = series[order[0]].length; j < m; ++j) {\n for (yp = yn = 0, i = 0; i < n; ++i) {\n if ((dy = (d = series[order[i]][j])[1] - d[0]) > 0) {\n d[0] = yp, d[1] = yp += dy;\n } else if (dy < 0) {\n d[1] = yn, d[0] = yn += dy;\n } else {\n d[0] = 0, d[1] = dy;\n }\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var i, n, j = 0, m = series[0].length, y; j < m; ++j) {\n for (y = i = 0; i < n; ++i) y += series[i][j][1] || 0;\n if (y) for (i = 0; i < n; ++i) series[i][j][1] /= y;\n }\n none(series, order);\n}\n","export default function(series, order) {\n if (!((n = series.length) > 1)) return;\n for (var i = 1, j, s0, s1 = series[order[0]], n, m = s1.length; i < n; ++i) {\n s0 = s1, s1 = series[order[i]];\n for (j = 0; j < m; ++j) {\n s1[j][1] += s1[j][0] = isNaN(s0[j][1]) ? s0[j][0] : s0[j][1];\n }\n }\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0)) return;\n for (var j = 0, s0 = series[order[0]], n, m = s0.length; j < m; ++j) {\n for (var i = 0, y = 0; i < n; ++i) y += series[i][j][1] || 0;\n s0[j][1] += s0[j][0] = -y / 2;\n }\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series, order) {\n if (!((n = series.length) > 0) || !((m = (s0 = series[order[0]]).length) > 0)) return;\n for (var y = 0, j = 1, s0, m, n; j < m; ++j) {\n for (var i = 0, s1 = 0, s2 = 0; i < n; ++i) {\n var si = series[order[i]],\n sij0 = si[j][1] || 0,\n sij1 = si[j - 1][1] || 0,\n s3 = (sij0 - sij1) / 2;\n for (var k = 0; k < i; ++k) {\n var sk = series[order[k]],\n skj0 = sk[j][1] || 0,\n skj1 = sk[j - 1][1] || 0;\n s3 += skj0 - skj1;\n }\n s1 += sij0, s2 += s3 * sij0;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n if (s1) y -= s2 / s1;\n }\n s0[j - 1][1] += s0[j - 1][0] = y;\n none(series, order);\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var peaks = series.map(peak);\n return none(series).sort(function(a, b) { return peaks[a] - peaks[b]; });\n}\n\nfunction peak(series) {\n var i = -1, j = 0, n = series.length, vi, vj = -Infinity;\n while (++i < n) if ((vi = +series[i][1]) > vj) vj = vi, j = i;\n return j;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n var sums = series.map(sum);\n return none(series).sort(function(a, b) { return sums[a] - sums[b]; });\n}\n\nexport function sum(series) {\n var s = 0, i = -1, n = series.length, v;\n while (++i < n) if (v = +series[i][1]) s += v;\n return s;\n}\n","import ascending from \"./ascending.js\";\n\nexport default function(series) {\n return ascending(series).reverse();\n}\n","import appearance from \"./appearance.js\";\nimport {sum} from \"./ascending.js\";\n\nexport default function(series) {\n var n = series.length,\n i,\n j,\n sums = series.map(sum),\n order = appearance(series),\n top = 0,\n bottom = 0,\n tops = [],\n bottoms = [];\n\n for (i = 0; i < n; ++i) {\n j = order[i];\n if (top < bottom) {\n top += sums[j];\n tops.push(j);\n } else {\n bottom += sums[j];\n bottoms.push(j);\n }\n }\n\n return bottoms.reverse().concat(tops);\n}\n","export default function(series) {\n var n = series.length, o = new Array(n);\n while (--n >= 0) o[n] = n;\n return o;\n}\n","import none from \"./none.js\";\n\nexport default function(series) {\n return none(series).reverse();\n}\n","import constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = data.length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","export function x(p) {\n return p[0];\n}\n\nexport function y(p) {\n return p[1];\n}\n","export default function(x, y) {\n return [(y = +y) * Math.cos(x -= Math.PI / 2), y * Math.sin(x)];\n}\n","import {slice} from \"./array.js\";\nimport constant from \"./constant.js\";\nimport offsetNone from \"./offset/none.js\";\nimport orderNone from \"./order/none.js\";\n\nfunction stackValue(d, key) {\n return d[key];\n}\n\nexport default function() {\n var keys = constant([]),\n order = orderNone,\n offset = offsetNone,\n value = stackValue;\n\n function stack(data) {\n var kz = keys.apply(this, arguments),\n i,\n m = data.length,\n n = kz.length,\n sz = new Array(n),\n oz;\n\n for (i = 0; i < n; ++i) {\n for (var ki = kz[i], si = sz[i] = new Array(m), j = 0, sij; j < m; ++j) {\n si[j] = sij = [0, +value(data[j], ki, j, data)];\n sij.data = data[j];\n }\n si.key = ki;\n }\n\n for (i = 0, oz = order(sz); i < n; ++i) {\n sz[oz[i]].index = i;\n }\n\n offset(sz, oz);\n return sz;\n }\n\n stack.keys = function(_) {\n return arguments.length ? (keys = typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : keys;\n };\n\n stack.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), stack) : value;\n };\n\n stack.order = function(_) {\n return arguments.length ? (order = _ == null ? orderNone : typeof _ === \"function\" ? _ : constant(slice.call(_)), stack) : order;\n };\n\n stack.offset = function(_) {\n return arguments.length ? (offset = _ == null ? offsetNone : _, stack) : offset;\n };\n\n return stack;\n}\n","import {path} from \"d3-path\";\nimport circle from \"./symbol/circle.js\";\nimport cross from \"./symbol/cross.js\";\nimport diamond from \"./symbol/diamond.js\";\nimport star from \"./symbol/star.js\";\nimport square from \"./symbol/square.js\";\nimport triangle from \"./symbol/triangle.js\";\nimport wye from \"./symbol/wye.js\";\nimport constant from \"./constant.js\";\n\nexport var symbols = [\n circle,\n cross,\n diamond,\n square,\n star,\n triangle,\n wye\n];\n\nexport default function() {\n var type = constant(circle),\n size = constant(64),\n context = null;\n\n function symbol() {\n var buffer;\n if (!context) context = buffer = path();\n type.apply(this, arguments).draw(context, +size.apply(this, arguments));\n if (buffer) return context = null, buffer + \"\" || null;\n }\n\n symbol.type = function(_) {\n return arguments.length ? (type = typeof _ === \"function\" ? _ : constant(_), symbol) : type;\n };\n\n symbol.size = function(_) {\n return arguments.length ? (size = typeof _ === \"function\" ? _ : constant(+_), symbol) : size;\n };\n\n symbol.context = function(_) {\n return arguments.length ? (context = _ == null ? null : _, symbol) : context;\n };\n\n return symbol;\n}\n","import {pi, tau} from \"../math.js\";\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / pi);\n context.moveTo(r, 0);\n context.arc(0, 0, r, 0, tau);\n }\n};\n","export default {\n draw: function(context, size) {\n var r = Math.sqrt(size / 5) / 2;\n context.moveTo(-3 * r, -r);\n context.lineTo(-r, -r);\n context.lineTo(-r, -3 * r);\n context.lineTo(r, -3 * r);\n context.lineTo(r, -r);\n context.lineTo(3 * r, -r);\n context.lineTo(3 * r, r);\n context.lineTo(r, r);\n context.lineTo(r, 3 * r);\n context.lineTo(-r, 3 * r);\n context.lineTo(-r, r);\n context.lineTo(-3 * r, r);\n context.closePath();\n }\n};\n","var tan30 = Math.sqrt(1 / 3),\n tan30_2 = tan30 * 2;\n\nexport default {\n draw: function(context, size) {\n var y = Math.sqrt(size / tan30_2),\n x = y * tan30;\n context.moveTo(0, -y);\n context.lineTo(x, 0);\n context.lineTo(0, y);\n context.lineTo(-x, 0);\n context.closePath();\n }\n};\n","export default {\n draw: function(context, size) {\n var w = Math.sqrt(size),\n x = -w / 2;\n context.rect(x, x, w, w);\n }\n};\n","import {pi, tau} from \"../math.js\";\n\nvar ka = 0.89081309152928522810,\n kr = Math.sin(pi / 10) / Math.sin(7 * pi / 10),\n kx = Math.sin(tau / 10) * kr,\n ky = -Math.cos(tau / 10) * kr;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size * ka),\n x = kx * r,\n y = ky * r;\n context.moveTo(0, -r);\n context.lineTo(x, y);\n for (var i = 1; i < 5; ++i) {\n var a = tau * i / 5,\n c = Math.cos(a),\n s = Math.sin(a);\n context.lineTo(s * r, -c * r);\n context.lineTo(c * x - s * y, s * x + c * y);\n }\n context.closePath();\n }\n};\n","var sqrt3 = Math.sqrt(3);\n\nexport default {\n draw: function(context, size) {\n var y = -Math.sqrt(size / (sqrt3 * 3));\n context.moveTo(0, y * 2);\n context.lineTo(-sqrt3 * y, -y);\n context.lineTo(sqrt3 * y, -y);\n context.closePath();\n }\n};\n","var c = -0.5,\n s = Math.sqrt(3) / 2,\n k = 1 / Math.sqrt(12),\n a = (k / 2 + 1) * 3;\n\nexport default {\n draw: function(context, size) {\n var r = Math.sqrt(size / a),\n x0 = r / 2,\n y0 = r * k,\n x1 = x0,\n y1 = r * k + r,\n x2 = -x1,\n y2 = y1;\n context.moveTo(x0, y0);\n context.lineTo(x1, y1);\n context.lineTo(x2, y2);\n context.lineTo(c * x0 - s * y0, s * x0 + c * y0);\n context.lineTo(c * x1 - s * y1, s * x1 + c * y1);\n context.lineTo(c * x2 - s * y2, s * x2 + c * y2);\n context.lineTo(c * x0 + s * y0, c * y0 - s * x0);\n context.lineTo(c * x1 + s * y1, c * y1 - s * x1);\n context.lineTo(c * x2 + s * y2, c * y2 - s * x2);\n context.closePath();\n }\n};\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __createBinding(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (p !== \"default\" && !exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n};\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","// @ts-nocheck\nimport React from 'react';\nimport { Icon } from '@grafana/ui';\n\nexport const ErrorMessage = ({ message }) => ( \n

\n

\n \n
{message}
\n
\n

\n)\n\nconst panelStyles = {\n height: '100%',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n}\n\nconst containerStyles = {\n padding: '15px 20px',\n marginBottom: '4px',\n position: 'relative',\n color: 'rgb(255, 255, 255)',\n textShadow: 'rgb(0 0 0 / 20%) 0px 1px 0px',\n borderRadius: '3px',\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n background: 'linear-gradient(90deg, rgb(224, 47, 68), rgb(224, 47, 68))'\n}\n\nconst messageStyles = {\n marginLeft: 10\n}\n","import * as d3 from 'd3';\nimport * as d3Sankey from 'd3-sankey';\n\nconst DISPLAY_VALUES = { total: 'total', percentage: 'percentage', both: 'both', none: 'none' };\nconst EDGE_COLORS = { none: 'none', path: 'path', input: 'input', output: 'output'};\n\nexport class Sankey {\n constructor(svg, container) {\n this._svg = svg;\n this._container = container || svg;\n this._gBound = null;\n\n this._data = null;\n this._nodes = null;\n this._links = null;\n\n this._width = 0;\n this._height = 0;\n this._boundedWidth = 0;\n this._boundedHeight = 0;\n\n this._marginTop = 20;\n this._marginRight = 20;\n this._marginBottom = 20;\n this._marginLeft = 20;\n\n this._background = 'rgba(0, 0, 0, 0)';\n this._edgeColor = 'path';\n this._colorScheme = 'Tableau10';\n this._colorScale = null;\n this._colorArray = '';\n\n this._sankeyAlignType = 'Justify';\n this._sankeyAlign = null;\n this._sankeyGenerator = null;\n this._sankeyNodeWith = 85;\n this._sankeyNodePadding = 20;\n\n this._svgNode = null;\n this._svgLink = null;\n\n this._displayValues = 'none';\n this._highlightOnHover = false;\n\n }\n \n _init() {\n this._setBoundDimensions();\n this._setColorScale();\n this._configureSankey();\n this._calculateSankey();\n }\n\n // ---------------------------- DIMENSIONS ----------------------------\n\n _setBoundDimensions() {\n this._boundedWidth = this._width - this._marginLeft - this._marginRight;\n this._boundedHeight = this._height - this._marginTop - this._marginBottom;\n }\n\n // ------------------------------ COLOR -------------------------------\n\n _setColorScale() {\n this._colorScale = d3.scaleOrdinal(d3[`scheme${this._colorScheme}`]);\n }\n\n _color(node) {\n return this._colorScale(node.name);\n }\n\n // ------------------------------ SANKEY -------------------------------\n\n _configureSankey() {\n this._sankeyAlign = d3Sankey[`sankey${this._sankeyAlignType}`];\n\n this._sankeyGenerator = d3Sankey\n .sankey()\n .nodeId(d => d.name)\n .nodeAlign(this._sankeyAlign)\n .nodeWidth(this._sankeyNodeWith)\n .nodePadding(this._sankeyNodePadding)\n .extent([\n [0, 0],\n [this._boundedWidth, this._boundedHeight],\n ]);\n }\n\n _calculateSankey() {\n const sankeyData = this._sankeyGenerator({\n nodes: this._data.nodes.map(d => Object.assign({}, d)),\n links: this._data.links.map(d => Object.assign({}, d))\n });\n\n this._nodes = sankeyData.nodes;\n this._links = sankeyData.links;\n }\n\n // ---------------------------- VALIDATIONS -----------------------------\n\n _validate() {\n return this._data &&\n this._data.nodes &&\n this._data.links &&\n this._data.nodes.length > 0 &&\n this._data.links.length > 0\n }\n\n // ------------------------------ HELPERS -------------------------------\n\n _setLinkGradient() {\n const gradient = this._svgLink\n .append('linearGradient')\n .attr('id', d => (d.uid = `link-${d.index}-${Math.random()}`))\n .attr('gradientUnits', 'userSpaceOnUse')\n .attr('x1', d => d.source.x1)\n .attr('x2', d => d.target.x0);\n\n gradient\n .append('stop')\n .attr('offset', '0%')\n .attr('stop-color', d => this._color(d.source));\n\n gradient\n .append('stop')\n .attr('offset', '100%')\n .attr('stop-color', d => this._color(d.target));\n }\n\n _setLinkStroke(d) {\n switch (this._edgeColor) {\n case EDGE_COLORS.none:\n return '#aaa';\n case EDGE_COLORS.path:\n return `url(#${d.uid})`;\n case EDGE_COLORS.input:\n return this._color(d.source)\n case EDGE_COLORS.output:\n return this._color(d.target)\n default:\n return\n }\n }\n\n // NODE HOVER\n _showLinks(currentNode) {\n const linkedNodes = [];\n\n let traverse = [\n {\n linkType: 'sourceLinks',\n nodeType: 'target',\n },\n {\n linkType: 'targetLinks',\n nodeType: 'source',\n },\n ];\n\n traverse.forEach(step => {\n currentNode[step.linkType].forEach(l => {\n linkedNodes.push(l[step.nodeType]);\n });\n });\n\n // highlight linked nodes\n this._gBound\n .selectAll('.sankey-node')\n .style('opacity', node =>\n currentNode.name === node.name ||\n linkedNodes.find(linkedNode => linkedNode.name === node.name) ? \n '1' : '0.2'\n );\n\n // highlight links\n this._gBound\n .selectAll('.sankey-link')\n .style('opacity', link =>\n link && (\n link.source.name === currentNode.name || \n link.target.name === currentNode.name\n ) ? \n '1' : '0.2'\n );\n };\n\n _showAll() {\n this._gBound.selectAll('.sankey-node').style('opacity', '1');\n this._gBound.selectAll('.sankey-link').style('opacity', '1');\n };\n\n // NODE LABELING\n _formatValue(value) { return d3.format('.2~f')(value); }\n _formatPercent(percent) { return d3.format('.2~%')(percent); }\n _formatThousand(value) { return d3.format('.3~s')(value); }\n\n _labelNode(currentNode) {\n const nodesAtDepth = this._nodes.filter(node => node.depth === currentNode.depth);\n const totalAtDepth = d3.sum(nodesAtDepth, node => node.value);\n const nodeValue = this._formatThousand(currentNode.value);\n const nodePercent = this._formatPercent(currentNode.value / totalAtDepth);\n\n let label = currentNode.name;\n switch (this._displayValues) {\n case DISPLAY_VALUES.total:\n label = `${label}\n ${nodeValue}`;\n break;\n case DISPLAY_VALUES.percentage:\n label = `${label}\n ${nodePercent}`;\n break;\n case DISPLAY_VALUES.both:\n label = `${label}\n ${nodePercent} - ${nodeValue}`;\n break;\n default:\n break;\n }\n return label;\n };\n\n // ------------------------------ DRAWING -------------------------------\n\n _renderSVG() {\n // BACKGROUND\n this._container.style('background-color', this._background)\n\n // BOUNDS\n this._gBound = this._container.append('g')\n .attr('transform', `translate(${this._marginLeft}, ${this._marginTop})`);\n\n // NODES\n this._svgNode = this._gBound\n .append('g')\n .attr('stroke', '#000')\n .selectAll('.sankey-node')\n .data(this._nodes, node => node.name)\n .join('rect')\n .attr('class', 'sankey-node')\n .attr('id', d => d.name)\n .attr('x', d => d.x0)\n .attr('y', d => d.y0)\n .attr('rx', 2)\n .attr('ry', 2)\n .attr('height', d => d.y1 - d.y0)\n .attr('width', d => d.x1 - d.x0)\n .attr('stroke', d => {\n const colorArray = JSON.parse(this._colorArray);\n if (Object.keys(colorArray).includes(d.name)) {\n return colorArray[d.name];\n }\n return \"rgba(148, 153, 168, 1)\";\n })\n .attr('fill', d => {\n const colorArray = JSON.parse(this._colorArray);\n if (Object.keys(colorArray).includes(d.name)) {\n return colorArray[d.name];\n }\n return \"rgba(148, 153, 168, 1)\";\n })\n .on('mouseover', d => this._highlightOnHover && this._showLinks(d))\n .on('mouseout', _ => this._highlightOnHover && this._showAll());\n\n // LINKS\n this._svgLink = this._gBound\n .append('g')\n .attr('fill', 'none')\n .attr('stroke-opacity', 0.3)\n .selectAll('g')\n .data(this._links, link => `${link.source.name}-${link.target.name}`)\n .join('g')\n .style('mix-blend-mode', 'multiply');\n\n if (this._edgeColor === 'path') this._setLinkGradient()\n\n this._svgLink\n .append('path')\n .attr('class', 'sankey-link')\n .attr('d', d3Sankey.sankeyLinkHorizontal())\n .attr('stroke', \"rgba(182, 185, 196, 1)\")\n .attr('stroke-width', d => Math.max(1, d.width)); \n\n // LABELS\n this._gBound\n .append('g')\n .attr('font-family', 'sans-serif')\n .attr('font-size', 10)\n .selectAll('text')\n .data(this._nodes)\n .join('text')\n .attr('x', d => d.x0 + 8)\n .attr('y', d => (d.y1 + d.y0) / 2)\n .attr('dy', '0.35em')\n //.attr('text-anchor', d => (d.x0 < this._width / 2 ? 'start' : 'end'))\n .text(d => this._labelNode(d));\n\n this._gBound\n .append('g')\n .attr('font-family', 'sans-serif')\n .attr('font-size', 10)\n .selectAll('text')\n .data(this._nodes)\n .join('text')\n .attr('x', d => d.x0 + 8)\n .attr('font-size', 14)\n .attr('font-weight', '700')\n .attr('y', d => ((d.y1 + d.y0) / 2) + 16)\n .attr('dy', '0.35em')\n //.attr('text-anchor', d => (d.x0 < this._width / 2 ? 'start' : 'end'))\n .text(d => this._formatValue(d.value));\n\n this._svgNode\n .append('title')\n .text(d => `${d.name}\\n${this._formatValue(d.value)}`);\n\n this._svgLink\n .append('title')\n .text(d => `${d.source.name} → ${d.target.name}\\n${this._formatValue(d.value)}`);\n }\n\n\n // ----------------------------------------------------------------------- \n // ------------------------------ API ------------------------------\n // ----------------------------------------------------------------------- \n\n data(_) {\n return arguments.length ? (this._data = _, this) : this._data;\n };\n\n width(_) {\n return arguments.length ? (this._width = +_, this) : this._width;\n };\n\n height(_) {\n return arguments.length ? (this._height = +_, this) : this._height;\n };\n\n align(_) {\n return arguments.length ? (this._sankeyAlignType = _, this) : this._sankeyAlignType;\n }\n\n colorScheme(_) {\n return arguments.length ? (this._colorScheme = _, this) : this._colorScheme;\n }\n\n colorArray(_) {\n return arguments.length ? (this._colorArray = _, this) : this._colorArray;\n }\n\n edgeColor(_) {\n return arguments.length ? (this._edgeColor = _, this) : this._edgeColor;\n }\n\n displayValues(_) {\n return arguments.length ? (this._displayValues = _, this) : this._displayValues;\n }\n\n highlightOnHover(_) {\n return arguments.length ? (this._highlightOnHover = _, this) : this._highlightOnHover;\n }\n\n render() {\n if (!this._validate()) {\n // no graph data\n }\n else {\n this._init();\n this._renderSVG()\n }\n return this;\n }\n}\n","// @ts-nocheck\nimport React, { useState, useEffect } from 'react';\nimport * as d3 from 'd3';\nimport { PanelProps } from '@grafana/data';\nimport { SankeyOptions } from 'types';\nimport { Sankey } from 'Sankey'\nimport { ErrorMessage } from 'Error'\n\ninterface Props extends PanelProps {}\n\nexport const SankeyPanel: React.FC = ({ options, data, width, height }) => {\n // ------------------------ CHART CONSTANTS -----------------------\n const CHART_REQUIRED_FIELDS = { source: 'source', target: 'target', value: 'value' };\n\n // ------------------------ ERROR MESSAGES ------------------------\n const requiredFieldsMsg = `Required fields not present: ${Object.keys(CHART_REQUIRED_FIELDS).join(', ')}`;\n const fieldTypeMsg = `Fields should have the following types: source (string), target (string), value (numeric)`;\n\n // ------------------------- REACT HOOKS --------------------------\n const [ error, setError ] = useState({ isError: false, message: '' })\n const [ graph, setGraph ] = useState({ nodes: [], links: [] })\n\n useEffect(() => {\n data.error\n ?\n setError({isError: true, message: data.error.message})\n :\n setGraph(buildGraph())\n }, [data])\n\n // ------------------------- DATA ACQUISITION -------------------------\n const validate = (sources, targets, values) => {\n let isValid = true;\n\n // REQUIRED FIELDS\n if (!(sources && targets && values)) {\n setError({ isError: true, message: requiredFieldsMsg })\n return isValid = false;\n }\n\n // FIELD TYPES\n const sourcesString = sources.every(d => typeof d === 'string')\n const targetsString = targets.every(d => typeof d === 'string')\n const valuesNumeric = values.every(d => typeof d === 'number')\n\n if (!(sourcesString && targetsString && valuesNumeric)) {\n setError({ isError: true, message: fieldTypeMsg })\n return isValid = false;\n }\n\n setError({});\n\n return isValid;\n }\n\n const buildGraph = () => {\n const frame = data.series[0];\n\n const sourceAccesor = frame.fields.find(field => field.name === CHART_REQUIRED_FIELDS.source);\n const targetAccesor = frame.fields.find(field => field.name === CHART_REQUIRED_FIELDS.target);\n const valueAccesor = frame.fields.find(field => field.name === CHART_REQUIRED_FIELDS.value);\n\n const sources = sourceAccesor?.values.toArray();\n const targets = targetAccesor?.values.toArray();\n const values = valueAccesor?.values.toArray();\n\n const isValid = validate(sources, targets, values);\n if (!isValid) {return}\n \n const zip = d3.zip(sources, targets, values);\n \n const nodes = Array.from(new Set(sources.concat(targets))).map(node => ({ name: node }));\n const links = zip.map(d => ({ source: d[0], target: d[1], value: +d[2].toFixed(2) }));\n const graph = { nodes, links };\n\n return graph\n }\n\n // ------------------------------- CHART ------------------------------\n const chart = svg => {\n const sankey = new Sankey(svg)\n .width(width)\n .height(height)\n .align(options.align)\n .edgeColor(options.edgeColor)\n .colorScheme(options.colorScheme)\n .displayValues(options.displayValues)\n .highlightOnHover(options.highlightOnHover)\n .data(graph)\n\n try {\n sankey.render();\n } catch (renderError) {\n setError({isError: true, message: renderError.message})\n }\n };\n\n return (error.isError ?\n \n :\n {\n d3.select(node)\n .selectAll('*')\n .remove();\n d3.select(node).call(chart);\n }}\n />\n );\n};\n","import React, { useMemo, FC } from 'react';\nimport { PanelProps } from '@grafana/data';\nimport { SankeyPanel } from 'SankeyPanel';\nimport { SankeyOptionsFn } from 'types-fn';\nimport { transformFnData } from 'transform-fn-data';\n\nexport interface SankeyPanelFnProps extends PanelProps {}\n\nexport const SankeyPanelFn: FC = ({ data, ...props }) => {\n const transformFn = useMemo(transformFnData, []);\n\n const transformedData = useMemo(() => transformFn(data), [transformFn, data]);\n\n return ;\n};\n","import { PanelPlugin } from '@grafana/data';\nimport { SankeyOptionsFn } from 'types-fn';\nimport { SankeyPanelFn as SankeyPanel } from './SankeyPanelFn';\n\nexport const plugin = new PanelPlugin(SankeyPanel).setPanelOptions((builder) => {\n return builder\n .addSelect({\n path: 'align',\n name: 'Align',\n defaultValue: 'Justify',\n settings: {\n options: [\n {\n value: 'Justify',\n label: 'Justify',\n },\n {\n value: 'Left',\n label: 'Left',\n },\n {\n value: 'Right',\n label: 'Right',\n },\n {\n value: 'Center',\n label: 'Center',\n },\n ],\n },\n })\n .addTextInput({\n path: 'colorArray',\n name: 'Color Object',\n defaultValue: '',\n })\n .addSelect({\n path: 'colorScheme',\n name: 'Color',\n defaultValue: 'Tableau10',\n settings: {\n options: [\n {\n value: 'Tableau10',\n label: 'Tableau10',\n },\n {\n value: 'Category10',\n label: 'Category10',\n },\n {\n value: 'Accent',\n label: 'Accent',\n },\n {\n value: 'Dark2',\n label: 'Dark2',\n },\n {\n value: 'Paired',\n label: 'Paired',\n },\n {\n value: 'Pastel1',\n label: 'Pastel1',\n },\n {\n value: 'Pastel2',\n label: 'Pastel2',\n },\n {\n value: 'Set1',\n label: 'Set1',\n },\n {\n value: 'Set2',\n label: 'Set2',\n },\n {\n value: 'Set3',\n label: 'Set3',\n },\n ],\n },\n })\n .addSelect({\n path: 'edgeColor',\n name: 'Edge Color',\n defaultValue: 'path',\n settings: {\n options: [\n {\n value: 'path',\n label: 'input-output',\n },\n {\n value: 'input',\n label: 'input',\n },\n {\n value: 'output',\n label: 'output',\n },\n {\n value: 'none',\n label: 'none',\n },\n ],\n },\n })\n .addSelect({\n path: 'displayValues',\n name: 'Display Values',\n defaultValue: 'none',\n settings: {\n options: [\n {\n value: 'total',\n label: 'Totals',\n },\n {\n value: 'percentage',\n label: 'Percentages',\n },\n {\n value: 'both',\n label: 'Both',\n },\n {\n value: 'none',\n label: 'None',\n },\n ],\n },\n })\n .addBooleanSwitch({\n path: 'highlightOnHover',\n name: 'Highlight connections on node hover',\n defaultValue: false,\n });\n});\n","// NOTE: implementation of toDataFrame: https://github.com/grafana/grafana/blob/main/packages/grafana-data/src/dataframe/processDataFrame.ts\nimport { toDataFrame, FieldType, ArrayVector, Field } from '@grafana/data';\n\nimport { SankeyOptionsFn } from 'types-fn';\n\nexport function transformFnData(): Required['transformFn'] {\n return ({ series, ...other }) => {\n const transformedSeries = series.map((data) => {\n return toDataFrame({ ...data, fields: data.fields.map(mapField()) });\n });\n\n return {\n series: transformedSeries,\n ...other,\n };\n };\n}\n\nconst SANKEY_FIELD_NAMES = ['source', 'target', 'value'];\n\n// @ts-ignore\nfunction mapField

() {\n return (field: Field

, _: number, __: Array>) => {\n const isSankeyField = SANKEY_FIELD_NAMES.includes(field.name);\n\n const isArrayVector = field.values instanceof ArrayVector || typeof field.values?.toArray === 'function';\n const isArray = Array.isArray(field.values);\n\n if (!isSankeyField || !field.values || (!isArray && !isArrayVector)) {\n return field;\n }\n\n const values = isArrayVector ? field.values.toArray() : isArray ? field.values : null;\n\n if (values === null) {\n return field;\n }\n\n const parsedValues = isSankeyField ? ((values as P[]).map(splitValue())[0] as unknown[]).map(mapToNumber()) : null;\n\n return {\n ...field,\n type: parsedValues?.every(isNumber()) ? FieldType.number : field.type,\n values: parsedValues ? new ArrayVector(parsedValues) : values,\n };\n };\n}\n\n// @ts-ignore\nfunction mapToNumber() {\n return (value: V, _: number, __: V[]) => (Number.isNaN(Number(value)) ? value : Number(value));\n}\n\n// @ts-ignore\nfunction splitValue() {\n return (value: V) => (typeof value === 'string' ? value.split('|') : value);\n}\n\n// @ts-ignore\nfunction isNumber() {\n return (value: V) => typeof value === 'number';\n}\n","module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_data__;","module.exports = __WEBPACK_EXTERNAL_MODULE__grafana_ui__;","module.exports = __WEBPACK_EXTERNAL_MODULE_d3__;","module.exports = __WEBPACK_EXTERNAL_MODULE_react__;"],"sourceRoot":""} \ No newline at end of file diff --git a/public/app/plugins/panel/sankey-panel-0.5.0/plugin.json b/public/app/plugins/panel/sankey-panel-0.5.0/plugin.json index 7b7b120500b3..14d4eb20e89b 100644 --- a/public/app/plugins/panel/sankey-panel-0.5.0/plugin.json +++ b/public/app/plugins/panel/sankey-panel-0.5.0/plugin.json @@ -8,7 +8,12 @@ "name": "Ismael", "url": "" }, - "keywords": ["sankey", "d3", "grafana", "panel"], + "keywords": [ + "sankey", + "d3", + "grafana", + "panel" + ], "logos": { "small": "img/logo.svg", "large": "img/logo.svg" @@ -25,10 +30,10 @@ ], "screenshots": [], "version": "1.0.0", - "updated": "2022-12-16" + "updated": "2022-12-22" }, "dependencies": { "grafanaVersion": "7.0.x", "plugins": [] } -} +} \ No newline at end of file