@nebula.js/sn-waterfall 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * @nebula.js/sn-waterfall v1.2.0
2
+ * @nebula.js/sn-waterfall v1.3.0
3
3
  * Copyright (c) 2026 QlikTech International AB
4
4
  * Released under the MIT license.
5
5
  */
@@ -11638,7 +11638,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
11638
11638
  * @default
11639
11639
  */
11640
11640
  // oxlint-disable-next-line no-undef
11641
- version: "1.2.0",
11641
+ version: "1.3.0",
11642
11642
  /**
11643
11643
  * Extends `HyperCubeDef`, see Engine API: `HyperCubeDef`.
11644
11644
  * @extends {HyperCubeDef}
@@ -20258,7 +20258,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
20258
20258
  const hsl$1 = /^hsl\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i;
20259
20259
  const hsla$1 = /^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i;
20260
20260
  const floor = Math.floor;
20261
- const round = Math.round;
20261
+ const round$1 = Math.round;
20262
20262
 
20263
20263
  /**
20264
20264
  * @class
@@ -20366,9 +20366,9 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
20366
20366
  r = rgb_[0] + m;
20367
20367
  g = rgb_[1] + m;
20368
20368
  b = rgb_[2] + m;
20369
- r = round(255 * r);
20370
- g = round(255 * g);
20371
- b = round(255 * b);
20369
+ r = round$1(255 * r);
20370
+ g = round$1(255 * g);
20371
+ b = round$1(255 * b);
20372
20372
  a = 1.0;
20373
20373
  } else if (matches = /^hsla\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*,(\d(\.\d+)?)\)$/i.exec(colorString)) {
20374
20374
  // hsla(1,2,3,0.4)
@@ -20413,9 +20413,9 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
20413
20413
  r = rgb_[0] + m;
20414
20414
  g = rgb_[1] + m;
20415
20415
  b = rgb_[2] + m;
20416
- r = round(255 * r);
20417
- g = round(255 * g);
20418
- b = round(255 * b);
20416
+ r = round$1(255 * r);
20417
+ g = round$1(255 * g);
20418
+ b = round$1(255 * b);
20419
20419
  } else if (matches = /^hsv\(\s*(\d+(\.\d+)?)\s*,\s*(\d+(\.\d+)?%?)\s*,\s*(\d+(\.\d+)?%?)\s*\)$/i.exec(colorString)) {
20420
20420
  // hsv(1, 2, 3) {
20421
20421
  h = parseFloat(matches[1]);
@@ -20458,9 +20458,9 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
20458
20458
  r = rgb_[0] + m;
20459
20459
  g = rgb_[1] + m;
20460
20460
  b = rgb_[2] + m;
20461
- r = round(255 * r);
20462
- g = round(255 * g);
20463
- b = round(255 * b);
20461
+ r = round$1(255 * r);
20462
+ g = round$1(255 * g);
20463
+ b = round$1(255 * b);
20464
20464
  a = 1.0;
20465
20465
  } else if (colorStruct[colorString.toLowerCase()]) {
20466
20466
  lcs = colorString.toLowerCase();
@@ -22630,14 +22630,13 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
22630
22630
  getGeneratedMeasurePath
22631
22631
  };
22632
22632
 
22633
+ // https://d3js.org/d3-array/ v3.2.5 Copyright 2010-2026 Mike Bostock
22633
22634
  function ascending(a, b) {
22634
22635
  return a == null || b == null ? NaN : a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
22635
22636
  }
22636
-
22637
22637
  function descending(a, b) {
22638
22638
  return a == null || b == null ? NaN : b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;
22639
22639
  }
22640
-
22641
22640
  function bisector(f) {
22642
22641
  let compare1, compare2, delta;
22643
22642
 
@@ -22688,15 +22687,12 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
22688
22687
  function zero$1() {
22689
22688
  return 0;
22690
22689
  }
22691
-
22692
- function number$1(x) {
22690
+ function number$2(x) {
22693
22691
  return x === null ? NaN : +x;
22694
22692
  }
22695
-
22696
22693
  const ascendingBisect = bisector(ascending);
22697
22694
  const bisectRight = ascendingBisect.right;
22698
- bisector(number$1).center;
22699
-
22695
+ bisector(number$2).center;
22700
22696
  const e10 = Math.sqrt(50),
22701
22697
  e5 = Math.sqrt(10),
22702
22698
  e2 = Math.sqrt(2);
@@ -22750,21 +22746,8 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
22750
22746
  return (reverse ? -1 : 1) * (inc < 0 ? 1 / -inc : inc);
22751
22747
  }
22752
22748
 
22753
- function initRange(domain, range) {
22754
- switch (arguments.length) {
22755
- case 0:
22756
- break;
22757
- case 1:
22758
- this.range(domain);
22759
- break;
22760
- default:
22761
- this.range(range).domain(domain);
22762
- break;
22763
- }
22764
- return this;
22765
- }
22766
-
22767
- function define$1 (constructor, factory, prototype) {
22749
+ // https://d3js.org/d3-color/ v3.1.1 Copyright 2010-2026 Mike Bostock
22750
+ function define$1(constructor, factory, prototype) {
22768
22751
  constructor.prototype = factory.prototype = prototype;
22769
22752
  prototype.constructor = constructor;
22770
22753
  }
@@ -22773,7 +22756,6 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
22773
22756
  for (var key in definition) prototype[key] = definition[key];
22774
22757
  return prototype;
22775
22758
  }
22776
-
22777
22759
  function Color() {}
22778
22760
  var darker = 0.7;
22779
22761
  var brighter = 1 / darker;
@@ -23124,9 +23106,156 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23124
23106
  function hsl2rgb(h, m1, m2) {
23125
23107
  return (h < 60 ? m1 + (m2 - m1) * h / 60 : h < 180 ? m2 : h < 240 ? m1 + (m2 - m1) * (240 - h) / 60 : m1) * 255;
23126
23108
  }
23109
+ const radians = Math.PI / 180;
23110
+ const degrees = 180 / Math.PI;
23111
+
23112
+ // https://observablehq.com/@mbostock/lab-and-rgb
23113
+ const K = 18,
23114
+ Xn = 0.96422,
23115
+ Yn = 1,
23116
+ Zn = 0.82521,
23117
+ t0 = 4 / 29,
23118
+ t1 = 6 / 29,
23119
+ t2 = 3 * t1 * t1,
23120
+ t3 = t1 * t1 * t1;
23121
+ function labConvert(o) {
23122
+ if (o instanceof Lab) return new Lab(o.l, o.a, o.b, o.opacity);
23123
+ if (o instanceof Hcl) return hcl2lab(o);
23124
+ if (!(o instanceof Rgb)) o = rgbConvert(o);
23125
+ var r = rgb2lrgb(o.r),
23126
+ g = rgb2lrgb(o.g),
23127
+ b = rgb2lrgb(o.b),
23128
+ y = xyz2lab((0.2225045 * r + 0.7168786 * g + 0.0606169 * b) / Yn),
23129
+ x,
23130
+ z;
23131
+ if (r === g && g === b) x = z = y;else {
23132
+ x = xyz2lab((0.4360747 * r + 0.3850649 * g + 0.1430804 * b) / Xn);
23133
+ z = xyz2lab((0.0139322 * r + 0.0971045 * g + 0.7141733 * b) / Zn);
23134
+ }
23135
+ return new Lab(116 * y - 16, 500 * (x - y), 200 * (y - z), o.opacity);
23136
+ }
23137
+ function lab(l, a, b, opacity) {
23138
+ return arguments.length === 1 ? labConvert(l) : new Lab(l, a, b, opacity == null ? 1 : opacity);
23139
+ }
23140
+ function Lab(l, a, b, opacity) {
23141
+ this.l = +l;
23142
+ this.a = +a;
23143
+ this.b = +b;
23144
+ this.opacity = +opacity;
23145
+ }
23146
+ define$1(Lab, lab, extend(Color, {
23147
+ brighter(k) {
23148
+ return new Lab(this.l + K * (k == null ? 1 : k), this.a, this.b, this.opacity);
23149
+ },
23150
+ darker(k) {
23151
+ return new Lab(this.l - K * (k == null ? 1 : k), this.a, this.b, this.opacity);
23152
+ },
23153
+ rgb() {
23154
+ var y = (this.l + 16) / 116,
23155
+ x = isNaN(this.a) ? y : y + this.a / 500,
23156
+ z = isNaN(this.b) ? y : y - this.b / 200;
23157
+ x = Xn * lab2xyz(x);
23158
+ y = Yn * lab2xyz(y);
23159
+ z = Zn * lab2xyz(z);
23160
+ return new Rgb(lrgb2rgb(3.1338561 * x - 1.6168667 * y - 0.4906146 * z), lrgb2rgb(-0.9787684 * x + 1.9161415 * y + 0.0334540 * z), lrgb2rgb(0.0719453 * x - 0.2289914 * y + 1.4052427 * z), this.opacity);
23161
+ }
23162
+ }));
23163
+ function xyz2lab(t) {
23164
+ return t > t3 ? Math.pow(t, 1 / 3) : t / t2 + t0;
23165
+ }
23166
+ function lab2xyz(t) {
23167
+ return t > t1 ? t * t * t : t2 * (t - t0);
23168
+ }
23169
+ function lrgb2rgb(x) {
23170
+ return 255 * (x <= 0.0031308 ? 12.92 * x : 1.055 * Math.pow(x, 1 / 2.4) - 0.055);
23171
+ }
23172
+ function rgb2lrgb(x) {
23173
+ return (x /= 255) <= 0.04045 ? x / 12.92 : Math.pow((x + 0.055) / 1.055, 2.4);
23174
+ }
23175
+ function hclConvert(o) {
23176
+ if (o instanceof Hcl) return new Hcl(o.h, o.c, o.l, o.opacity);
23177
+ if (!(o instanceof Lab)) o = labConvert(o);
23178
+ if (o.a === 0 && o.b === 0) return new Hcl(NaN, 0 < o.l && o.l < 100 ? 0 : NaN, o.l, o.opacity);
23179
+ var h = Math.atan2(o.b, o.a) * degrees;
23180
+ return new Hcl(h < 0 ? h + 360 : h, Math.sqrt(o.a * o.a + o.b * o.b), o.l, o.opacity);
23181
+ }
23182
+ function hcl(h, c, l, opacity) {
23183
+ return arguments.length === 1 ? hclConvert(h) : new Hcl(h, c, l, opacity == null ? 1 : opacity);
23184
+ }
23185
+ function Hcl(h, c, l, opacity) {
23186
+ this.h = +h;
23187
+ this.c = +c;
23188
+ this.l = +l;
23189
+ this.opacity = +opacity;
23190
+ }
23191
+ function hcl2lab(o) {
23192
+ if (isNaN(o.h)) return new Lab(o.l, 0, 0, o.opacity);
23193
+ var h = o.h * radians;
23194
+ return new Lab(o.l, Math.cos(h) * o.c, Math.sin(h) * o.c, o.opacity);
23195
+ }
23196
+ define$1(Hcl, hcl, extend(Color, {
23197
+ brighter(k) {
23198
+ return new Hcl(this.h, this.c, this.l + K * (k == null ? 1 : k), this.opacity);
23199
+ },
23200
+ darker(k) {
23201
+ return new Hcl(this.h, this.c, this.l - K * (k == null ? 1 : k), this.opacity);
23202
+ },
23203
+ rgb() {
23204
+ return hcl2lab(this).rgb();
23205
+ }
23206
+ }));
23207
+ var A = -0.14861,
23208
+ B = 1.78277,
23209
+ C = -0.29227,
23210
+ D = -0.90649,
23211
+ E = 1.97294,
23212
+ ED = E * D,
23213
+ EB = E * B,
23214
+ BC_DA = B * C - D * A;
23215
+ function cubehelixConvert(o) {
23216
+ if (o instanceof Cubehelix) return new Cubehelix(o.h, o.s, o.l, o.opacity);
23217
+ if (!(o instanceof Rgb)) o = rgbConvert(o);
23218
+ var r = o.r / 255,
23219
+ g = o.g / 255,
23220
+ b = o.b / 255,
23221
+ l = (BC_DA * b + ED * r - EB * g) / (BC_DA + ED - EB),
23222
+ bl = b - l,
23223
+ k = (E * (g - l) - C * bl) / D,
23224
+ s = Math.sqrt(k * k + bl * bl) / (E * l * (1 - l)),
23225
+ // NaN if l=0 or l=1
23226
+ h = s ? Math.atan2(k, bl) * degrees - 120 : NaN;
23227
+ return new Cubehelix(h < 0 ? h + 360 : h, s, l, o.opacity);
23228
+ }
23229
+ function cubehelix$1(h, s, l, opacity) {
23230
+ return arguments.length === 1 ? cubehelixConvert(h) : new Cubehelix(h, s, l, opacity == null ? 1 : opacity);
23231
+ }
23232
+ function Cubehelix(h, s, l, opacity) {
23233
+ this.h = +h;
23234
+ this.s = +s;
23235
+ this.l = +l;
23236
+ this.opacity = +opacity;
23237
+ }
23238
+ define$1(Cubehelix, cubehelix$1, extend(Color, {
23239
+ brighter(k) {
23240
+ k = k == null ? brighter : Math.pow(brighter, k);
23241
+ return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
23242
+ },
23243
+ darker(k) {
23244
+ k = k == null ? darker : Math.pow(darker, k);
23245
+ return new Cubehelix(this.h, this.s, this.l * k, this.opacity);
23246
+ },
23247
+ rgb() {
23248
+ var h = isNaN(this.h) ? 0 : (this.h + 120) * radians,
23249
+ l = +this.l,
23250
+ a = isNaN(this.s) ? 0 : this.s * l * (1 - l),
23251
+ cosh = Math.cos(h),
23252
+ sinh = Math.sin(h);
23253
+ return new Rgb(255 * (l + a * (A * cosh + B * sinh)), 255 * (l + a * (C * cosh + D * sinh)), 255 * (l + a * (E * cosh)), this.opacity);
23254
+ }
23255
+ }));
23127
23256
 
23257
+ // https://d3js.org/d3-interpolate/ v3.0.2 Copyright 2010-2026 Mike Bostock
23128
23258
  var constant = x => () => x;
23129
-
23130
23259
  function linear$1(a, d) {
23131
23260
  return function (t) {
23132
23261
  return a + t * d;
@@ -23137,6 +23266,10 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23137
23266
  return Math.pow(a + t * b, y);
23138
23267
  };
23139
23268
  }
23269
+ function hue$1(a, b) {
23270
+ var d = b - a;
23271
+ return d ? linear$1(a, d > 180 || d < -180 ? d - 360 * Math.round(d / 360) : d) : constant(isNaN(a) ? b : a);
23272
+ }
23140
23273
  function gamma(y) {
23141
23274
  return (y = +y) === 1 ? nogamma : function (a, b) {
23142
23275
  return b - a ? exponential(a, b, y) : constant(isNaN(a) ? b : a);
@@ -23146,8 +23279,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23146
23279
  var d = b - a;
23147
23280
  return d ? linear$1(a, d) : constant(isNaN(a) ? b : a);
23148
23281
  }
23149
-
23150
- var rgb = (function rgbGamma(y) {
23282
+ var rgb = function rgbGamma(y) {
23151
23283
  var color = gamma(y);
23152
23284
  function rgb(start, end) {
23153
23285
  var r = color((start = rgb$1(start)).r, (end = rgb$1(end)).r),
@@ -23164,9 +23296,8 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23164
23296
  }
23165
23297
  rgb.gamma = rgbGamma;
23166
23298
  return rgb;
23167
- })(1);
23168
-
23169
- function numberArray (a, b) {
23299
+ }(1);
23300
+ function numberArray(a, b) {
23170
23301
  if (!b) b = [];
23171
23302
  var n = a ? Math.min(b.length, a.length) : 0,
23172
23303
  c = b.slice(),
@@ -23179,35 +23310,31 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23179
23310
  function isNumberArray(x) {
23180
23311
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
23181
23312
  }
23182
-
23183
23313
  function genericArray(a, b) {
23184
23314
  var nb = b ? b.length : 0,
23185
23315
  na = a ? Math.min(nb, a.length) : 0,
23186
23316
  x = new Array(na),
23187
23317
  c = new Array(nb),
23188
23318
  i;
23189
- for (i = 0; i < na; ++i) x[i] = interpolate(a[i], b[i]);
23319
+ for (i = 0; i < na; ++i) x[i] = value(a[i], b[i]);
23190
23320
  for (; i < nb; ++i) c[i] = b[i];
23191
23321
  return function (t) {
23192
23322
  for (i = 0; i < na; ++i) c[i] = x[i](t);
23193
23323
  return c;
23194
23324
  };
23195
23325
  }
23196
-
23197
- function date (a, b) {
23326
+ function date(a, b) {
23198
23327
  var d = new Date();
23199
23328
  return a = +a, b = +b, function (t) {
23200
23329
  return d.setTime(a * (1 - t) + b * t), d;
23201
23330
  };
23202
23331
  }
23203
-
23204
- function interpolateNumber (a, b) {
23332
+ function number(a, b) {
23205
23333
  return a = +a, b = +b, function (t) {
23206
23334
  return a * (1 - t) + b * t;
23207
23335
  };
23208
23336
  }
23209
-
23210
- function object (a, b) {
23337
+ function object(a, b) {
23211
23338
  var i = {},
23212
23339
  c = {},
23213
23340
  k;
@@ -23215,7 +23342,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23215
23342
  if (b === null || typeof b !== "object") b = {};
23216
23343
  for (k in b) {
23217
23344
  if (k in a) {
23218
- i[k] = interpolate(a[k], b[k]);
23345
+ i[k] = value(a[k], b[k]);
23219
23346
  } else {
23220
23347
  c[k] = b[k];
23221
23348
  }
@@ -23225,7 +23352,6 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23225
23352
  return c;
23226
23353
  };
23227
23354
  }
23228
-
23229
23355
  var reA = /[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,
23230
23356
  reB = new RegExp(reA.source, "g");
23231
23357
  function zero(b) {
@@ -23238,7 +23364,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23238
23364
  return b(t) + "";
23239
23365
  };
23240
23366
  }
23241
- function string (a, b) {
23367
+ function string(a, b) {
23242
23368
  var bi = reA.lastIndex = reB.lastIndex = 0,
23243
23369
  // scan index for next number in b
23244
23370
  am,
@@ -23273,7 +23399,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23273
23399
  s[++i] = null;
23274
23400
  q.push({
23275
23401
  i: i,
23276
- x: interpolateNumber(am, bm)
23402
+ x: number(am, bm)
23277
23403
  });
23278
23404
  }
23279
23405
  bi = reB.lastIndex;
@@ -23293,133 +23419,101 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23293
23419
  return s.join("");
23294
23420
  });
23295
23421
  }
23296
-
23297
- function interpolate (a, b) {
23422
+ function value(a, b) {
23298
23423
  var t = typeof b,
23299
23424
  c;
23300
- return b == null || t === "boolean" ? constant(b) : (t === "number" ? interpolateNumber : t === "string" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : interpolateNumber)(a, b);
23425
+ return b == null || t === "boolean" ? constant(b) : (t === "number" ? number : t === "string" ? (c = color(b)) ? (b = c, rgb) : string : b instanceof color ? rgb : b instanceof Date ? date : isNumberArray(b) ? numberArray : Array.isArray(b) ? genericArray : typeof b.valueOf !== "function" && typeof b.toString !== "function" || isNaN(b) ? object : number)(a, b);
23301
23426
  }
23302
-
23303
- function interpolateRound (a, b) {
23427
+ function round(a, b) {
23304
23428
  return a = +a, b = +b, function (t) {
23305
23429
  return Math.round(a * (1 - t) + b * t);
23306
23430
  };
23307
23431
  }
23432
+ var epsilon2 = 1e-12;
23433
+ function cosh(x) {
23434
+ return ((x = Math.exp(x)) + 1 / x) / 2;
23435
+ }
23436
+ function sinh(x) {
23437
+ return ((x = Math.exp(x)) - 1 / x) / 2;
23438
+ }
23439
+ function tanh(x) {
23440
+ return ((x = Math.exp(2 * x)) - 1) / (x + 1);
23441
+ }
23442
+ (function zoomRho(rho, rho2, rho4) {
23443
+ // p0 = [ux0, uy0, w0]
23444
+ // p1 = [ux1, uy1, w1]
23445
+ function zoom(p0, p1) {
23446
+ var ux0 = p0[0],
23447
+ uy0 = p0[1],
23448
+ w0 = p0[2],
23449
+ ux1 = p1[0],
23450
+ uy1 = p1[1],
23451
+ w1 = p1[2],
23452
+ dx = ux1 - ux0,
23453
+ dy = uy1 - uy0,
23454
+ d2 = dx * dx + dy * dy,
23455
+ i,
23456
+ S;
23308
23457
 
23309
- function constants(x) {
23310
- return function () {
23311
- return x;
23312
- };
23313
- }
23314
-
23315
- function number(x) {
23316
- return +x;
23317
- }
23318
-
23319
- var unit = [0, 1];
23320
- function identity$1(x) {
23321
- return x;
23322
- }
23323
- function normalize(a, b) {
23324
- return (b -= a = +a) ? function (x) {
23325
- return (x - a) / b;
23326
- } : constants(isNaN(b) ? NaN : 0.5);
23327
- }
23328
- function clamper(a, b) {
23329
- var t;
23330
- if (a > b) t = a, a = b, b = t;
23331
- return function (x) {
23332
- return Math.max(a, Math.min(b, x));
23333
- };
23334
- }
23335
-
23336
- // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
23337
- // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
23338
- function bimap(domain, range, interpolate) {
23339
- var d0 = domain[0],
23340
- d1 = domain[1],
23341
- r0 = range[0],
23342
- r1 = range[1];
23343
- if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
23344
- return function (x) {
23345
- return r0(d0(x));
23346
- };
23347
- }
23348
- function polymap(domain, range, interpolate) {
23349
- var j = Math.min(domain.length, range.length) - 1,
23350
- d = new Array(j),
23351
- r = new Array(j),
23352
- i = -1;
23458
+ // Special case for u0 ≅ u1.
23459
+ if (d2 < epsilon2) {
23460
+ S = Math.log(w1 / w0) / rho;
23461
+ i = function (t) {
23462
+ return [ux0 + t * dx, uy0 + t * dy, w0 * Math.exp(rho * t * S)];
23463
+ };
23464
+ }
23353
23465
 
23354
- // Reverse descending domains.
23355
- if (domain[j] < domain[0]) {
23356
- domain = domain.slice().reverse();
23357
- range = range.slice().reverse();
23358
- }
23359
- while (++i < j) {
23360
- d[i] = normalize(domain[i], domain[i + 1]);
23361
- r[i] = interpolate(range[i], range[i + 1]);
23362
- }
23363
- return function (x) {
23364
- var i = bisectRight(domain, x, 1, j) - 1;
23365
- return r[i](d[i](x));
23366
- };
23367
- }
23368
- function copy(source, target) {
23369
- return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
23370
- }
23371
- function transformer() {
23372
- var domain = unit,
23373
- range = unit,
23374
- interpolate$1 = interpolate,
23375
- transform,
23376
- untransform,
23377
- unknown,
23378
- clamp = identity$1,
23379
- piecewise,
23380
- output,
23381
- input;
23382
- function rescale() {
23383
- var n = Math.min(domain.length, range.length);
23384
- if (clamp !== identity$1) clamp = clamper(domain[0], domain[n - 1]);
23385
- piecewise = n > 2 ? polymap : bimap;
23386
- output = input = null;
23387
- return scale;
23388
- }
23389
- function scale(x) {
23390
- return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));
23466
+ // General case.
23467
+ else {
23468
+ var d1 = Math.sqrt(d2),
23469
+ b0 = (w1 * w1 - w0 * w0 + rho4 * d2) / (2 * w0 * rho2 * d1),
23470
+ b1 = (w1 * w1 - w0 * w0 - rho4 * d2) / (2 * w1 * rho2 * d1),
23471
+ r0 = Math.log(Math.sqrt(b0 * b0 + 1) - b0),
23472
+ r1 = Math.log(Math.sqrt(b1 * b1 + 1) - b1);
23473
+ S = (r1 - r0) / rho;
23474
+ i = function (t) {
23475
+ var s = t * S,
23476
+ coshr0 = cosh(r0),
23477
+ u = w0 / (rho2 * d1) * (coshr0 * tanh(rho * s + r0) - sinh(r0));
23478
+ return [ux0 + u * dx, uy0 + u * dy, w0 * coshr0 / cosh(rho * s + r0)];
23479
+ };
23480
+ }
23481
+ i.duration = Math.abs(S) * 1000 * rho / Math.SQRT2;
23482
+ return i;
23391
23483
  }
23392
- scale.invert = function (y) {
23393
- return clamp(untransform((input || (input = piecewise(range, domain.map(transform), interpolateNumber)))(y)));
23394
- };
23395
- scale.domain = function (_) {
23396
- return arguments.length ? (domain = Array.from(_, number), rescale()) : domain.slice();
23397
- };
23398
- scale.range = function (_) {
23399
- return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
23400
- };
23401
- scale.rangeRound = function (_) {
23402
- return range = Array.from(_), interpolate$1 = interpolateRound, rescale();
23403
- };
23404
- scale.clamp = function (_) {
23405
- return arguments.length ? (clamp = _ ? true : identity$1, rescale()) : clamp !== identity$1;
23406
- };
23407
- scale.interpolate = function (_) {
23408
- return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;
23409
- };
23410
- scale.unknown = function (_) {
23411
- return arguments.length ? (unknown = _, scale) : unknown;
23412
- };
23413
- return function (t, u) {
23414
- transform = t, untransform = u;
23415
- return rescale();
23484
+ zoom.rho = function (_) {
23485
+ var _1 = Math.max(1e-3, +_),
23486
+ _2 = _1 * _1,
23487
+ _4 = _2 * _2;
23488
+ return zoomRho(_1, _2, _4);
23416
23489
  };
23490
+ return zoom;
23491
+ })(Math.SQRT2, 2, 4);
23492
+ function cubehelix(hue) {
23493
+ return function cubehelixGamma(y) {
23494
+ y = +y;
23495
+ function cubehelix(start, end) {
23496
+ var h = hue((start = cubehelix$1(start)).h, (end = cubehelix$1(end)).h),
23497
+ s = nogamma(start.s, end.s),
23498
+ l = nogamma(start.l, end.l),
23499
+ opacity = nogamma(start.opacity, end.opacity);
23500
+ return function (t) {
23501
+ start.h = h(t);
23502
+ start.s = s(t);
23503
+ start.l = l(Math.pow(t, y));
23504
+ start.opacity = opacity(t);
23505
+ return start + "";
23506
+ };
23507
+ }
23508
+ cubehelix.gamma = cubehelixGamma;
23509
+ return cubehelix;
23510
+ }(1);
23417
23511
  }
23418
- function continuous() {
23419
- return transformer()(identity$1, identity$1);
23420
- }
23512
+ cubehelix(hue$1);
23513
+ cubehelix(nogamma);
23421
23514
 
23422
- function formatDecimal (x) {
23515
+ // https://d3js.org/d3-format/ v3.1.3 Copyright 2010-2026 Mike Bostock
23516
+ function formatDecimal(x) {
23423
23517
  return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
23424
23518
  }
23425
23519
 
@@ -23435,12 +23529,10 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23435
23529
  // (e.g., 1.2e+3) or the form \de[-+]\d+ (e.g., 1e+3).
23436
23530
  return [coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient, +x.slice(i + 1)];
23437
23531
  }
23438
-
23439
- function exponent (x) {
23532
+ function exponent(x) {
23440
23533
  return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
23441
23534
  }
23442
-
23443
- function formatGroup (grouping, thousands) {
23535
+ function formatGroup(grouping, thousands) {
23444
23536
  return function (value, width) {
23445
23537
  var i = value.length,
23446
23538
  t = [],
@@ -23456,8 +23548,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23456
23548
  return t.reverse().join(thousands);
23457
23549
  };
23458
23550
  }
23459
-
23460
- function formatNumerals (numerals) {
23551
+ function formatNumerals(numerals) {
23461
23552
  return function (value) {
23462
23553
  return value.replace(/[0-9]/g, function (i) {
23463
23554
  return numerals[+i];
@@ -23502,7 +23593,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23502
23593
  };
23503
23594
 
23504
23595
  // Trims insignificant zeros, e.g., replaces 1.2000k with 1.2k.
23505
- function formatTrim (s) {
23596
+ function formatTrim(s) {
23506
23597
  out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i) {
23507
23598
  switch (s[i]) {
23508
23599
  case ".":
@@ -23520,9 +23611,8 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23520
23611
  }
23521
23612
  return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
23522
23613
  }
23523
-
23524
23614
  var prefixExponent;
23525
- function formatPrefixAuto (x, p) {
23615
+ function formatPrefixAuto(x, p) {
23526
23616
  var d = formatDecimalParts(x, p);
23527
23617
  if (!d) return prefixExponent = undefined, x.toPrecision(p);
23528
23618
  var coefficient = d[0],
@@ -23531,15 +23621,13 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23531
23621
  n = coefficient.length;
23532
23622
  return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0]; // less than 1y!
23533
23623
  }
23534
-
23535
- function formatRounded (x, p) {
23624
+ function formatRounded(x, p) {
23536
23625
  var d = formatDecimalParts(x, p);
23537
23626
  if (!d) return x + "";
23538
23627
  var coefficient = d[0],
23539
23628
  exponent = d[1];
23540
23629
  return exponent < 0 ? "0." + new Array(-exponent).join("0") + coefficient : coefficient.length > exponent + 1 ? coefficient.slice(0, exponent + 1) + "." + coefficient.slice(exponent + 1) : coefficient + new Array(exponent - coefficient.length + 2).join("0");
23541
23630
  }
23542
-
23543
23631
  var formatTypes = {
23544
23632
  "%": (x, p) => (x * 100).toFixed(p),
23545
23633
  "b": x => Math.round(x).toString(2),
@@ -23555,14 +23643,12 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23555
23643
  "X": x => Math.round(x).toString(16).toUpperCase(),
23556
23644
  "x": x => Math.round(x).toString(16)
23557
23645
  };
23558
-
23559
- function identity (x) {
23646
+ function identity(x) {
23560
23647
  return x;
23561
23648
  }
23562
-
23563
23649
  var map = Array.prototype.map,
23564
23650
  prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
23565
- function formatLocale (locale) {
23651
+ function formatLocale(locale) {
23566
23652
  var group = locale.grouping === undefined || locale.thousands === undefined ? identity : formatGroup(map.call(locale.grouping, Number), locale.thousands + ""),
23567
23653
  currencyPrefix = locale.currency === undefined ? "" : locale.currency[0] + "",
23568
23654
  currencySuffix = locale.currency === undefined ? "" : locale.currency[1] + "",
@@ -23698,7 +23784,6 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23698
23784
  formatPrefix: formatPrefix
23699
23785
  };
23700
23786
  }
23701
-
23702
23787
  var locale;
23703
23788
  var format;
23704
23789
  var formatPrefix;
@@ -23713,20 +23798,141 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23713
23798
  formatPrefix = locale.formatPrefix;
23714
23799
  return locale;
23715
23800
  }
23716
-
23717
- function precisionFixed (step) {
23801
+ function precisionFixed(step) {
23718
23802
  return Math.max(0, -exponent(Math.abs(step)));
23719
23803
  }
23720
-
23721
- function precisionPrefix (step, value) {
23804
+ function precisionPrefix(step, value) {
23722
23805
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3 - exponent(Math.abs(step)));
23723
23806
  }
23724
-
23725
- function precisionRound (step, max) {
23807
+ function precisionRound(step, max) {
23726
23808
  step = Math.abs(step), max = Math.abs(max) - step;
23727
23809
  return Math.max(0, exponent(max) - exponent(step)) + 1;
23728
23810
  }
23729
23811
 
23812
+ // https://d3js.org/d3-scale/ v4.0.3 Copyright 2010-2026 Mike Bostock
23813
+ function initRange(domain, range) {
23814
+ switch (arguments.length) {
23815
+ case 0:
23816
+ break;
23817
+ case 1:
23818
+ this.range(domain);
23819
+ break;
23820
+ default:
23821
+ this.range(range).domain(domain);
23822
+ break;
23823
+ }
23824
+ return this;
23825
+ }
23826
+ function constants(x) {
23827
+ return function () {
23828
+ return x;
23829
+ };
23830
+ }
23831
+ function number$1(x) {
23832
+ return +x;
23833
+ }
23834
+ var unit = [0, 1];
23835
+ function identity$1(x) {
23836
+ return x;
23837
+ }
23838
+ function normalize(a, b) {
23839
+ return (b -= a = +a) ? function (x) {
23840
+ return (x - a) / b;
23841
+ } : constants(isNaN(b) ? NaN : 0.5);
23842
+ }
23843
+ function clamper(a, b) {
23844
+ var t;
23845
+ if (a > b) t = a, a = b, b = t;
23846
+ return function (x) {
23847
+ return Math.max(a, Math.min(b, x));
23848
+ };
23849
+ }
23850
+
23851
+ // normalize(a, b)(x) takes a domain value x in [a,b] and returns the corresponding parameter t in [0,1].
23852
+ // interpolate(a, b)(t) takes a parameter t in [0,1] and returns the corresponding range value x in [a,b].
23853
+ function bimap(domain, range, interpolate) {
23854
+ var d0 = domain[0],
23855
+ d1 = domain[1],
23856
+ r0 = range[0],
23857
+ r1 = range[1];
23858
+ if (d1 < d0) d0 = normalize(d1, d0), r0 = interpolate(r1, r0);else d0 = normalize(d0, d1), r0 = interpolate(r0, r1);
23859
+ return function (x) {
23860
+ return r0(d0(x));
23861
+ };
23862
+ }
23863
+ function polymap(domain, range, interpolate) {
23864
+ var j = Math.min(domain.length, range.length) - 1,
23865
+ d = new Array(j),
23866
+ r = new Array(j),
23867
+ i = -1;
23868
+
23869
+ // Reverse descending domains.
23870
+ if (domain[j] < domain[0]) {
23871
+ domain = domain.slice().reverse();
23872
+ range = range.slice().reverse();
23873
+ }
23874
+ while (++i < j) {
23875
+ d[i] = normalize(domain[i], domain[i + 1]);
23876
+ r[i] = interpolate(range[i], range[i + 1]);
23877
+ }
23878
+ return function (x) {
23879
+ var i = bisectRight(domain, x, 1, j) - 1;
23880
+ return r[i](d[i](x));
23881
+ };
23882
+ }
23883
+ function copy$1(source, target) {
23884
+ return target.domain(source.domain()).range(source.range()).interpolate(source.interpolate()).clamp(source.clamp()).unknown(source.unknown());
23885
+ }
23886
+ function transformer$2() {
23887
+ var domain = unit,
23888
+ range = unit,
23889
+ interpolate$1 = value,
23890
+ transform,
23891
+ untransform,
23892
+ unknown,
23893
+ clamp = identity$1,
23894
+ piecewise,
23895
+ output,
23896
+ input;
23897
+ function rescale() {
23898
+ var n = Math.min(domain.length, range.length);
23899
+ if (clamp !== identity$1) clamp = clamper(domain[0], domain[n - 1]);
23900
+ piecewise = n > 2 ? polymap : bimap;
23901
+ output = input = null;
23902
+ return scale;
23903
+ }
23904
+ function scale(x) {
23905
+ return x == null || isNaN(x = +x) ? unknown : (output || (output = piecewise(domain.map(transform), range, interpolate$1)))(transform(clamp(x)));
23906
+ }
23907
+ scale.invert = function (y) {
23908
+ return clamp(untransform((input || (input = piecewise(range, domain.map(transform), number)))(y)));
23909
+ };
23910
+ scale.domain = function (_) {
23911
+ return arguments.length ? (domain = Array.from(_, number$1), rescale()) : domain.slice();
23912
+ };
23913
+ scale.range = function (_) {
23914
+ return arguments.length ? (range = Array.from(_), rescale()) : range.slice();
23915
+ };
23916
+ scale.rangeRound = function (_) {
23917
+ return range = Array.from(_), interpolate$1 = round, rescale();
23918
+ };
23919
+ scale.clamp = function (_) {
23920
+ return arguments.length ? (clamp = _ ? true : identity$1, rescale()) : clamp !== identity$1;
23921
+ };
23922
+ scale.interpolate = function (_) {
23923
+ return arguments.length ? (interpolate$1 = _, rescale()) : interpolate$1;
23924
+ };
23925
+ scale.unknown = function (_) {
23926
+ return arguments.length ? (unknown = _, scale) : unknown;
23927
+ };
23928
+ return function (t, u) {
23929
+ transform = t, untransform = u;
23930
+ return rescale();
23931
+ };
23932
+ }
23933
+ function continuous() {
23934
+ return transformer$2()(identity$1, identity$1);
23935
+ }
23730
23936
  function tickFormat(start, stop, count, specifier) {
23731
23937
  var step = tickStep(start, stop, count),
23732
23938
  precision;
@@ -23756,7 +23962,6 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23756
23962
  }
23757
23963
  return format(specifier);
23758
23964
  }
23759
-
23760
23965
  function linearish(scale) {
23761
23966
  var domain = scale.domain;
23762
23967
  scale.ticks = function (count) {
@@ -23805,7 +24010,7 @@ System.register(['@nebula.js/stardust', 'picasso.js', 'picasso-plugin-q'], (func
23805
24010
  function linear() {
23806
24011
  var scale = continuous();
23807
24012
  scale.copy = function () {
23808
- return copy(scale, linear());
24013
+ return copy$1(scale, linear());
23809
24014
  };
23810
24015
  initRange.apply(scale, arguments);
23811
24016
  return linearish(scale);