genesys-spark-chart-components 4.117.0 → 4.117.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (26) hide show
  1. package/dist/cjs/{color-palette-499ac97a.js → color-palette-bd94968f.js} +12 -12
  2. package/dist/cjs/gux-chart-column-beta.cjs.entry.js +1 -1
  3. package/dist/cjs/gux-chart-donut-beta.cjs.entry.js +1 -1
  4. package/dist/cjs/gux-chart-line-beta.cjs.entry.js +1 -1
  5. package/dist/cjs/gux-chart-pie-beta.cjs.entry.js +1 -1
  6. package/dist/cjs/gux-chart-scatter-plot-beta.cjs.entry.js +1 -1
  7. package/dist/cjs/gux-visualization-beta.cjs.entry.js +1273 -520
  8. package/dist/esm/{color-palette-9e6cbce4.js → color-palette-2c4363f3.js} +12 -12
  9. package/dist/esm/gux-chart-column-beta.entry.js +1 -1
  10. package/dist/esm/gux-chart-donut-beta.entry.js +1 -1
  11. package/dist/esm/gux-chart-line-beta.entry.js +1 -1
  12. package/dist/esm/gux-chart-pie-beta.entry.js +1 -1
  13. package/dist/esm/gux-chart-scatter-plot-beta.entry.js +1 -1
  14. package/dist/esm/gux-visualization-beta.entry.js +1273 -520
  15. package/dist/genesys-chart-webcomponents/genesys-chart-webcomponents.esm.js +1 -1
  16. package/dist/genesys-chart-webcomponents/{p-91a5097d.entry.js → p-124a46e1.entry.js} +1 -1
  17. package/dist/genesys-chart-webcomponents/{p-420ec809.entry.js → p-52ae245e.entry.js} +1 -1
  18. package/dist/genesys-chart-webcomponents/{p-349a8e07.entry.js → p-585ea609.entry.js} +1 -1
  19. package/dist/genesys-chart-webcomponents/{p-a24bfe34.entry.js → p-9737d797.entry.js} +1 -1
  20. package/dist/genesys-chart-webcomponents/p-b73c68d1.entry.js +11 -0
  21. package/dist/genesys-chart-webcomponents/{p-1d10f377.entry.js → p-de4b7d31.entry.js} +1 -1
  22. package/dist/genesys-chart-webcomponents/{p-a2d91663.js → p-eb2043dc.js} +1 -1
  23. package/dist/stencil-wrapper.js +1 -1
  24. package/dist/types/stencil-wrapper.d.ts +1 -1
  25. package/package.json +12 -12
  26. package/dist/genesys-chart-webcomponents/p-8395ae64.entry.js +0 -11
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const index$2 = require('./index-bb73bd35.js');
6
- const colorPalette = require('./color-palette-499ac97a.js');
6
+ const colorPalette = require('./color-palette-bd94968f.js');
7
7
 
8
8
  // Note: This regex matches even invalid JSON strings, but since we’re
9
9
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -210,7 +210,6 @@ function log$1$1(method, level, input) {
210
210
  const args = [level].concat([].slice.call(input));
211
211
  console[method].apply(console, args); // eslint-disable-line no-console
212
212
  }
213
-
214
213
  const None$2 = 0;
215
214
  const Error$1 = 1;
216
215
  const Warn = 2;
@@ -319,7 +318,7 @@ function toNumber (_) {
319
318
  }
320
319
 
321
320
  const exp$2 = sign => x => sign * Math.exp(x);
322
- const log$4 = sign => x => Math.log(sign * x);
321
+ const log$5 = sign => x => Math.log(sign * x);
323
322
  const symlog$1 = c => x => Math.sign(x) * Math.log1p(Math.abs(x / c));
324
323
  const symexp = c => x => Math.sign(x) * Math.expm1(Math.abs(x)) * c;
325
324
  const pow$4 = exponent => x => x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
@@ -334,7 +333,7 @@ function panLinear(domain, delta) {
334
333
  }
335
334
  function panLog(domain, delta) {
336
335
  var sign = Math.sign(domain[0]);
337
- return pan(domain, delta, log$4(sign), exp$2(sign));
336
+ return pan(domain, delta, log$5(sign), exp$2(sign));
338
337
  }
339
338
  function panPow(domain, delta, exponent) {
340
339
  return pan(domain, delta, pow$4(exponent), pow$4(1 / exponent));
@@ -353,7 +352,7 @@ function zoomLinear(domain, anchor, scale) {
353
352
  }
354
353
  function zoomLog(domain, anchor, scale) {
355
354
  const sign = Math.sign(domain[0]);
356
- return zoom$2(domain, anchor, scale, log$4(sign), exp$2(sign));
355
+ return zoom$2(domain, anchor, scale, log$5(sign), exp$2(sign));
357
356
  }
358
357
  function zoomPow(domain, anchor, scale, exponent) {
359
358
  return zoom$2(domain, anchor, scale, pow$4(exponent), pow$4(1 / exponent));
@@ -369,7 +368,7 @@ function utcquarter(date) {
369
368
  return 1 + ~~(new Date(date).getUTCMonth() / 3);
370
369
  }
371
370
 
372
- function array$5 (_) {
371
+ function array$6 (_) {
373
372
  return _ != null ? isArray(_) ? _ : [_] : [];
374
373
  }
375
374
 
@@ -400,12 +399,12 @@ function isFunction (_) {
400
399
  const DESCENDING = 'descending';
401
400
  function compare$2 (fields, orders, opt) {
402
401
  opt = opt || {};
403
- orders = array$5(orders) || [];
402
+ orders = array$6(orders) || [];
404
403
  const ord = [],
405
404
  get = [],
406
405
  fmap = {},
407
406
  gen = opt.comparator || comparator$1;
408
- array$5(fields).forEach((f, i) => {
407
+ array$6(fields).forEach((f, i) => {
409
408
  if (f == null) return;
410
409
  ord.push(orders[i] === DESCENDING ? -1 : 1);
411
410
  get.push(f = isFunction(f) ? f : field$1(f, null, opt));
@@ -556,9 +555,8 @@ function extentIndex (array, f) {
556
555
  return [u, v];
557
556
  }
558
557
 
559
- const hop = Object.prototype.hasOwnProperty;
560
558
  function has$1 (object, property) {
561
- return hop.call(object, property);
559
+ return Object.hasOwn(object, property);
562
560
  }
563
561
 
564
562
  const NULL = {};
@@ -703,7 +701,7 @@ function isString (_) {
703
701
 
704
702
  function key (fields, flat, opt) {
705
703
  if (fields) {
706
- fields = flat ? array$5(fields).map(f => f.replace(/\\(.)/g, '$1')) : array$5(fields);
704
+ fields = flat ? array$6(fields).map(f => f.replace(/\\(.)/g, '$1')) : array$6(fields);
707
705
  }
708
706
  const len = fields && fields.length,
709
707
  gen = opt && opt.get || getter$1,
@@ -765,7 +763,7 @@ function lruCache (maxsize) {
765
763
  };
766
764
  }
767
765
 
768
- function merge$3 (compare, array0, array1, output) {
766
+ function merge$4 (compare, array0, array1, output) {
769
767
  const n0 = array0.length,
770
768
  n1 = array1.length;
771
769
  if (!n1) return array0;
@@ -1044,7 +1042,7 @@ function transform$3(transform) {
1044
1042
  };
1045
1043
  }
1046
1044
 
1047
- function reverse$2(array, n) {
1045
+ function reverse$3(array, n) {
1048
1046
  var t, j = array.length, i = j - n;
1049
1047
  while (i < --j) t = array[i], array[i++] = array[j], array[j] = t;
1050
1048
  }
@@ -1075,7 +1073,7 @@ function object$1(topology, o) {
1075
1073
  for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {
1076
1074
  points.push(transformPoint(a[k], k));
1077
1075
  }
1078
- if (i < 0) reverse$2(points, n);
1076
+ if (i < 0) reverse$3(points, n);
1079
1077
  }
1080
1078
 
1081
1079
  function point(p) {
@@ -1693,11 +1691,11 @@ function* flatten(arrays) {
1693
1691
  }
1694
1692
  }
1695
1693
 
1696
- function merge$2(arrays) {
1694
+ function merge$3(arrays) {
1697
1695
  return Array.from(flatten(arrays));
1698
1696
  }
1699
1697
 
1700
- function range$5(start, stop, step) {
1698
+ function range$6(start, stop, step) {
1701
1699
  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
1702
1700
 
1703
1701
  var i = -1,
@@ -2056,7 +2054,7 @@ function formatLocale$3(locale) {
2056
2054
  }
2057
2055
 
2058
2056
  var locale$4;
2059
- var format$4;
2057
+ var format$5;
2060
2058
  var formatPrefix$1;
2061
2059
 
2062
2060
  defaultLocale$4({
@@ -2067,7 +2065,7 @@ defaultLocale$4({
2067
2065
 
2068
2066
  function defaultLocale$4(definition) {
2069
2067
  locale$4 = formatLocale$3(definition);
2070
- format$4 = locale$4.format;
2068
+ format$5 = locale$4.format;
2071
2069
  formatPrefix$1 = locale$4.formatPrefix;
2072
2070
  return locale$4;
2073
2071
  }
@@ -2378,7 +2376,7 @@ const MILLISECONDS = 'milliseconds';
2378
2376
  const TIME_UNITS = [YEAR, QUARTER, MONTH, WEEK, DATE, DAY, DAYOFYEAR, HOURS, MINUTES, SECONDS, MILLISECONDS];
2379
2377
  const UNITS = TIME_UNITS.reduce((o, u, i) => (o[u] = 1 + i, o), {});
2380
2378
  function timeUnits(units) {
2381
- const u = array$5(units).slice(),
2379
+ const u = array$6(units).slice(),
2382
2380
  m = {};
2383
2381
 
2384
2382
  // check validity
@@ -2616,14 +2614,14 @@ function timeOffset(unit, date, step) {
2616
2614
  function utcOffset(unit, date, step) {
2617
2615
  return offset$3(utcInterval(unit), date, step);
2618
2616
  }
2619
- function sequence$1(ival, start, stop, step) {
2617
+ function sequence$2(ival, start, stop, step) {
2620
2618
  return ival ? ival.range(start, stop, step) : undefined;
2621
2619
  }
2622
2620
  function timeSequence(unit, start, stop, step) {
2623
- return sequence$1(timeInterval$1(unit), start, stop, step);
2621
+ return sequence$2(timeInterval$1(unit), start, stop, step);
2624
2622
  }
2625
2623
  function utcSequence(unit, start, stop, step) {
2626
- return sequence$1(utcInterval(unit), start, stop, step);
2624
+ return sequence$2(utcInterval(unit), start, stop, step);
2627
2625
  }
2628
2626
 
2629
2627
  const durationSecond$1 = 1000,
@@ -3536,10 +3534,10 @@ function formatUnixTimestampSeconds$1(d) {
3536
3534
  }
3537
3535
 
3538
3536
  var locale$3;
3539
- var timeFormat$3;
3540
- var timeParse$1;
3541
- var utcFormat$2;
3542
- var utcParse$1;
3537
+ var timeFormat$4;
3538
+ var timeParse$2;
3539
+ var utcFormat$3;
3540
+ var utcParse$2;
3543
3541
 
3544
3542
  defaultLocale$3({
3545
3543
  dateTime: "%x, %X",
@@ -3554,10 +3552,10 @@ defaultLocale$3({
3554
3552
 
3555
3553
  function defaultLocale$3(definition) {
3556
3554
  locale$3 = formatLocale$2(definition);
3557
- timeFormat$3 = locale$3.format;
3558
- timeParse$1 = locale$3.parse;
3559
- utcFormat$2 = locale$3.utcFormat;
3560
- utcParse$1 = locale$3.utcParse;
3555
+ timeFormat$4 = locale$3.format;
3556
+ timeParse$2 = locale$3.parse;
3557
+ utcFormat$3 = locale$3.utcFormat;
3558
+ utcParse$2 = locale$3.utcParse;
3561
3559
  return locale$3;
3562
3560
  }
3563
3561
 
@@ -3658,7 +3656,7 @@ let defaultNumberLocale;
3658
3656
  resetNumberFormatDefaultLocale();
3659
3657
  function resetNumberFormatDefaultLocale() {
3660
3658
  return defaultNumberLocale = numberLocale({
3661
- format: format$4,
3659
+ format: format$5,
3662
3660
  formatPrefix: formatPrefix$1
3663
3661
  });
3664
3662
  }
@@ -3707,10 +3705,10 @@ let defaultTimeLocale;
3707
3705
  resetTimeFormatDefaultLocale();
3708
3706
  function resetTimeFormatDefaultLocale() {
3709
3707
  return defaultTimeLocale = timeLocale({
3710
- format: timeFormat$3,
3711
- parse: timeParse$1,
3712
- utcFormat: utcFormat$2,
3713
- utcParse: utcParse$1
3708
+ format: timeFormat$4,
3709
+ parse: timeParse$2,
3710
+ utcFormat: utcFormat$3,
3711
+ utcParse: utcParse$2
3714
3712
  });
3715
3713
  }
3716
3714
  function timeFormatLocale(definition) {
@@ -3766,7 +3764,7 @@ function loaderFactory (fetch, fs) {
3766
3764
  options: options || {},
3767
3765
  sanitize: sanitize,
3768
3766
  load: load$1,
3769
- fileAccess: !!fs,
3767
+ fileAccess: false,
3770
3768
  file: fileLoader(fs),
3771
3769
  http: httpLoader(fetch)
3772
3770
  });
@@ -4005,7 +4003,7 @@ function topojson(data, format) {
4005
4003
  }
4006
4004
  topojson.responseType = 'json';
4007
4005
 
4008
- const format$3 = {
4006
+ const format$4 = {
4009
4007
  dsv: dsv,
4010
4008
  csv: delimitedFormat(','),
4011
4009
  tsv: delimitedFormat('\t'),
@@ -4014,10 +4012,10 @@ const format$3 = {
4014
4012
  };
4015
4013
  function formats$1(name, reader) {
4016
4014
  if (arguments.length > 1) {
4017
- format$3[name] = reader;
4015
+ format$4[name] = reader;
4018
4016
  return this;
4019
4017
  } else {
4020
- return has$1(format$3, name) ? format$3[name] : null;
4018
+ return has$1(format$4, name) ? format$4[name] : null;
4021
4019
  }
4022
4020
  }
4023
4021
  function responseType(type) {
@@ -4194,7 +4192,7 @@ function rederive(t, d) {
4194
4192
  * @param {object} d - The new tuple that replaces the old.
4195
4193
  * @return {object} The new tuple.
4196
4194
  */
4197
- function replace$1(t, d) {
4195
+ function replace$2(t, d) {
4198
4196
  return setid(d, tupleid(t));
4199
4197
  }
4200
4198
 
@@ -4227,14 +4225,14 @@ function changeset() {
4227
4225
  return {
4228
4226
  constructor: changeset,
4229
4227
  insert(t) {
4230
- const d = array$5(t),
4228
+ const d = array$6(t),
4231
4229
  n = d.length;
4232
4230
  for (let i = 0; i < n; ++i) add.push(d[i]);
4233
4231
  return this;
4234
4232
  },
4235
4233
  remove(t) {
4236
4234
  const a = isFunction(t) ? remp : rem,
4237
- d = array$5(t),
4235
+ d = array$6(t),
4238
4236
  n = d.length;
4239
4237
  for (let i = 0; i < n; ++i) a.push(d[i]);
4240
4238
  return this;
@@ -4566,7 +4564,7 @@ Operator.prototype = {
4566
4564
  for (name in params) {
4567
4565
  value = params[name];
4568
4566
  if (name === PULSE) {
4569
- array$5(value).forEach(op => {
4567
+ array$6(value).forEach(op => {
4570
4568
  if (!(op instanceof Operator)) {
4571
4569
  error$1('Pulse parameters must be operator instances.');
4572
4570
  } else if (op !== this) {
@@ -4877,7 +4875,7 @@ function events$1 (source, type, filter, apply) {
4877
4875
  if (typeof source === 'string' && typeof document !== 'undefined') {
4878
4876
  sources = document.querySelectorAll(source);
4879
4877
  } else {
4880
- sources = array$5(source);
4878
+ sources = array$6(source);
4881
4879
  }
4882
4880
  const n = sources.length;
4883
4881
  for (let i = 0; i < n; ++i) {
@@ -5130,7 +5128,7 @@ function materialize(data, filter) {
5130
5128
  visitArray(data, filter, _ => out.push(_));
5131
5129
  return out;
5132
5130
  }
5133
- function filter$1(pulse, flags) {
5131
+ function filter$2(pulse, flags) {
5134
5132
  const map = {};
5135
5133
  pulse.visit(flags, t => {
5136
5134
  map[tupleid(t)] = 1;
@@ -5323,7 +5321,7 @@ Pulse.prototype = {
5323
5321
  src = this.source && this.source.length;
5324
5322
  if (src && src !== len) {
5325
5323
  this.mod = this.source;
5326
- if (len) this.filter(MOD$1, filter$1(this, ADD));
5324
+ if (len) this.filter(MOD$1, filter$2(this, ADD));
5327
5325
  }
5328
5326
  return this;
5329
5327
  },
@@ -5440,7 +5438,7 @@ Pulse.prototype = {
5440
5438
  if (flags & REFLOW && src) {
5441
5439
  const sum = p.add.length + p.mod.length;
5442
5440
  if (sum === src.length) ; else if (sum) {
5443
- visitArray(src, filter$1(p, ADD_MOD), v);
5441
+ visitArray(src, filter$2(p, ADD_MOD), v);
5444
5442
  } else {
5445
5443
  // if no add/rem/mod tuples, visit source
5446
5444
  visitArray(src, p.srcF, v);
@@ -6909,7 +6907,7 @@ function linear$2 (data, x, y) {
6909
6907
 
6910
6908
  // Adapted from d3-regression by Harry Stevens
6911
6909
  // License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE
6912
- function log$3 (data, x, y) {
6910
+ function log$4 (data, x, y) {
6913
6911
  let X = 0,
6914
6912
  Y = 0,
6915
6913
  XY = 0,
@@ -7836,7 +7834,7 @@ inherits(Aggregate$1, Transform, {
7836
7834
  outputs = this._outputs = [],
7837
7835
  inputMap = {};
7838
7836
  function inputVisit(get) {
7839
- const fields = array$5(accessorFields(get)),
7837
+ const fields = array$6(accessorFields(get)),
7840
7838
  n = fields.length;
7841
7839
  let i = 0,
7842
7840
  f;
@@ -7849,7 +7847,7 @@ inherits(Aggregate$1, Transform, {
7849
7847
  }
7850
7848
 
7851
7849
  // initialize group-by dimensions
7852
- this._dims = array$5(_.groupby);
7850
+ this._dims = array$6(_.groupby);
7853
7851
  this._dnames = this._dims.map(d => {
7854
7852
  const dname = accessorName(d);
7855
7853
  inputVisit(d);
@@ -7946,7 +7944,7 @@ inherits(Aggregate$1, Transform, {
7946
7944
  for (let i = 0; i < n; ++i) {
7947
7945
  x[names[i]] = dims[i](t);
7948
7946
  }
7949
- return p ? replace$1(p.tuple, x) : ingest$1(x);
7947
+ return p ? replace$2(p.tuple, x) : ingest$1(x);
7950
7948
  },
7951
7949
  clean() {
7952
7950
  const cells = this.value;
@@ -8181,7 +8179,7 @@ function SortedList (idFunc, source, input) {
8181
8179
  data.sort(compare);
8182
8180
  }
8183
8181
  if (add.length) {
8184
- data = compare ? merge$3(compare, data, add.sort(compare)) : data.concat(add);
8182
+ data = compare ? merge$4(compare, data, add.sort(compare)) : data.concat(add);
8185
8183
  add = [];
8186
8184
  }
8187
8185
  return data;
@@ -9044,7 +9042,7 @@ function Field$1(params) {
9044
9042
  }
9045
9043
  inherits(Field$1, Operator);
9046
9044
  function update$3(_) {
9047
- return this.value && !_.modified() ? this.value : isArray(_.name) ? array$5(_.name).map(f => field$1(f)) : field$1(_.name, _.as);
9045
+ return this.value && !_.modified() ? this.value : isArray(_.name) ? array$6(_.name).map(f => field$1(f)) : field$1(_.name, _.as);
9048
9046
  }
9049
9047
 
9050
9048
  /**
@@ -9729,7 +9727,7 @@ inherits(Load$1, Transform, {
9729
9727
  } else if (_.async) {
9730
9728
  // return promise for non-blocking async loading
9731
9729
  const p = df.request(_.url, _.format).then(res => {
9732
- this._pending = array$5(res.data);
9730
+ this._pending = array$6(res.data);
9733
9731
  return df => df.touch(this);
9734
9732
  });
9735
9733
  return {
@@ -9737,7 +9735,7 @@ inherits(Load$1, Transform, {
9737
9735
  };
9738
9736
  } else {
9739
9737
  // return promise for synchronous loading
9740
- return df.request(_.url, _.format).then(res => output(this, pulse, array$5(res.data)));
9738
+ return df.request(_.url, _.format).then(res => output(this, pulse, array$6(res.data)));
9741
9739
  }
9742
9740
  }
9743
9741
  });
@@ -10207,7 +10205,7 @@ inherits(Quantile$1, Transform, {
10207
10205
  names = (_.groupby || []).map(accessorName),
10208
10206
  values = [],
10209
10207
  step = _.step || 0.01,
10210
- p = _.probs || range$5(step / 2, 1 - EPSILON$2, step),
10208
+ p = _.probs || range$6(step / 2, 1 - EPSILON$2, step),
10211
10209
  n = p.length;
10212
10210
  groups.forEach(g => {
10213
10211
  const q = quantiles(g, p);
@@ -10413,7 +10411,7 @@ inherits(Sequence, Transform, {
10413
10411
  const out = pulse.materialize().fork(pulse.MOD),
10414
10412
  as = _.as || 'data';
10415
10413
  out.rem = this.value ? pulse.rem.concat(this.value) : pulse.rem;
10416
- this.value = range$5(_.start, _.stop, _.step || 1).map(v => {
10414
+ this.value = range$6(_.start, _.stop, _.step || 1).map(v => {
10417
10415
  const t = {};
10418
10416
  t[as] = v;
10419
10417
  return ingest$1(t);
@@ -10753,11 +10751,11 @@ function find$2(field, data, index) {
10753
10751
  const ValidWindowOps = Object.keys(WindowOps);
10754
10752
 
10755
10753
  function WindowState(_) {
10756
- const ops = array$5(_.ops),
10757
- fields = array$5(_.fields),
10758
- params = array$5(_.params),
10759
- aggregate_params = array$5(_.aggregate_params),
10760
- as = array$5(_.as),
10754
+ const ops = array$6(_.ops),
10755
+ fields = array$6(_.fields),
10756
+ params = array$6(_.params),
10757
+ aggregate_params = array$6(_.aggregate_params),
10758
+ as = array$6(_.as),
10761
10759
  outputs = this.outputs = [],
10762
10760
  windows = this.windows = [],
10763
10761
  inputs = {},
@@ -10766,7 +10764,7 @@ function WindowState(_) {
10766
10764
  measures = [];
10767
10765
  let countOnly = true;
10768
10766
  function visitInputs(f) {
10769
- array$5(accessorFields(f)).forEach(_ => inputs[_] = 1);
10767
+ array$6(accessorFields(f)).forEach(_ => inputs[_] = 1);
10770
10768
  }
10771
10769
  visitInputs(_.sort);
10772
10770
  ops.forEach((op, i) => {
@@ -11299,7 +11297,7 @@ function arcPadAngle(d) {
11299
11297
  return d && d.padAngle; // Note: optional!
11300
11298
  }
11301
11299
 
11302
- function intersect$3(x0, y0, x1, y1, x2, y2, x3, y3) {
11300
+ function intersect$4(x0, y0, x1, y1, x2, y2, x3, y3) {
11303
11301
  var x10 = x1 - x0, y10 = y1 - y0,
11304
11302
  x32 = x3 - x2, y32 = y3 - y2,
11305
11303
  t = y32 * x10 - x32 * y10;
@@ -11433,7 +11431,7 @@ function arc$2$1() {
11433
11431
  // intersection fails, it’s probably because the arc is too small, so
11434
11432
  // disable the corner radius entirely.
11435
11433
  if (da < pi$3) {
11436
- if (oc = intersect$3(x01, y01, x00, y00, x11, y11, x10, y10)) {
11434
+ if (oc = intersect$4(x01, y01, x00, y00, x11, y11, x10, y10)) {
11437
11435
  var ax = x01 - oc[0],
11438
11436
  ay = y01 - oc[1],
11439
11437
  bx = x11 - oc[0],
@@ -11544,7 +11542,7 @@ function arc$2$1() {
11544
11542
  return arc;
11545
11543
  }
11546
11544
 
11547
- function array$4(x) {
11545
+ function array$5(x) {
11548
11546
  return typeof x === "object" && "length" in x
11549
11547
  ? x // Array, TypedArray, NodeList, array-like
11550
11548
  : Array.from(x); // Map, Set, iterable, string, or anything else
@@ -11602,7 +11600,7 @@ function line$2$1(x, y) {
11602
11600
 
11603
11601
  function line(data) {
11604
11602
  var i,
11605
- n = (data = array$4(data)).length,
11603
+ n = (data = array$5(data)).length,
11606
11604
  d,
11607
11605
  defined0 = false,
11608
11606
  buffer;
@@ -11659,7 +11657,7 @@ function area$2$1(x0, y0, y1) {
11659
11657
  var i,
11660
11658
  j,
11661
11659
  k,
11662
- n = (data = array$4(data)).length,
11660
+ n = (data = array$5(data)).length,
11663
11661
  d,
11664
11662
  defined0 = false,
11665
11663
  buffer,
@@ -13409,7 +13407,7 @@ function isNumberArray(x) {
13409
13407
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
13410
13408
  }
13411
13409
 
13412
- function array$3(a, b) {
13410
+ function array$4(a, b) {
13413
13411
  return (isNumberArray(b) ? numberArray : genericArray)(a, b);
13414
13412
  }
13415
13413
 
@@ -13836,7 +13834,7 @@ function quantize$2(interpolator, n) {
13836
13834
  const $$1 = /*#__PURE__*/Object.freeze({
13837
13835
  __proto__: null,
13838
13836
  interpolate: interpolate$1$1,
13839
- interpolateArray: array$3,
13837
+ interpolateArray: array$4,
13840
13838
  interpolateBasis: basis$1,
13841
13839
  interpolateBasisClosed: basisClosed,
13842
13840
  interpolateDate: date$1,
@@ -13924,7 +13922,7 @@ function polymap(domain, range, interpolate) {
13924
13922
  };
13925
13923
  }
13926
13924
 
13927
- function copy$2(source, target) {
13925
+ function copy$3(source, target) {
13928
13926
  return target
13929
13927
  .domain(source.domain())
13930
13928
  .range(source.range())
@@ -14293,7 +14291,7 @@ function formatLocale$1(locale) {
14293
14291
  }
14294
14292
 
14295
14293
  var locale$1;
14296
- var format$2;
14294
+ var format$3;
14297
14295
  var formatPrefix;
14298
14296
 
14299
14297
  defaultLocale$1({
@@ -14306,7 +14304,7 @@ defaultLocale$1({
14306
14304
 
14307
14305
  function defaultLocale$1(definition) {
14308
14306
  locale$1 = formatLocale$1(definition);
14309
- format$2 = locale$1.format;
14307
+ format$3 = locale$1.format;
14310
14308
  formatPrefix = locale$1.formatPrefix;
14311
14309
  return locale$1;
14312
14310
  }
@@ -14348,7 +14346,7 @@ function tickFormat$1(start, stop, count, specifier) {
14348
14346
  break;
14349
14347
  }
14350
14348
  }
14351
- return format$2(specifier);
14349
+ return format$3(specifier);
14352
14350
  }
14353
14351
 
14354
14352
  function linearish(scale) {
@@ -14409,7 +14407,7 @@ function linear() {
14409
14407
  var scale = continuous$1();
14410
14408
 
14411
14409
  scale.copy = function() {
14412
- return copy$2(scale, linear());
14410
+ return copy$3(scale, linear());
14413
14411
  };
14414
14412
 
14415
14413
  initRange.apply(scale, arguments);
@@ -14569,7 +14567,7 @@ function loggish(transform) {
14569
14567
  if (specifier == null) specifier = base === 10 ? "s" : ",";
14570
14568
  if (typeof specifier !== "function") {
14571
14569
  if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
14572
- specifier = format$2(specifier);
14570
+ specifier = format$3(specifier);
14573
14571
  }
14574
14572
  if (count === Infinity) return specifier;
14575
14573
  const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
@@ -14590,9 +14588,9 @@ function loggish(transform) {
14590
14588
  return scale;
14591
14589
  }
14592
14590
 
14593
- function log$2() {
14591
+ function log$3() {
14594
14592
  const scale = loggish(transformer$3()).domain([1, 10]);
14595
- scale.copy = () => copy$2(scale, log$2()).base(scale.base());
14593
+ scale.copy = () => copy$3(scale, log$3()).base(scale.base());
14596
14594
  initRange.apply(scale, arguments);
14597
14595
  return scale;
14598
14596
  }
@@ -14623,7 +14621,7 @@ function symlog() {
14623
14621
  var scale = symlogish(transformer$3());
14624
14622
 
14625
14623
  scale.copy = function() {
14626
- return copy$2(scale, symlog()).constant(scale.constant());
14624
+ return copy$3(scale, symlog()).constant(scale.constant());
14627
14625
  };
14628
14626
 
14629
14627
  return initRange.apply(scale, arguments);
@@ -14664,7 +14662,7 @@ function pow$2() {
14664
14662
  var scale = powish(transformer$3());
14665
14663
 
14666
14664
  scale.copy = function() {
14667
- return copy$2(scale, pow$2()).exponent(scale.exponent());
14665
+ return copy$3(scale, pow$2()).exponent(scale.exponent());
14668
14666
  };
14669
14667
 
14670
14668
  initRange.apply(scale, arguments);
@@ -15836,8 +15834,8 @@ function formatUnixTimestampSeconds(d) {
15836
15834
  }
15837
15835
 
15838
15836
  var locale;
15839
- var timeFormat$2;
15840
- var utcFormat$1;
15837
+ var timeFormat$3;
15838
+ var utcFormat$2;
15841
15839
 
15842
15840
  defaultLocale({
15843
15841
  dateTime: "%x, %X",
@@ -15852,8 +15850,8 @@ defaultLocale({
15852
15850
 
15853
15851
  function defaultLocale(definition) {
15854
15852
  locale = formatLocale(definition);
15855
- timeFormat$2 = locale.format;
15856
- utcFormat$1 = locale.utcFormat;
15853
+ timeFormat$3 = locale.format;
15854
+ utcFormat$2 = locale.utcFormat;
15857
15855
  return locale;
15858
15856
  }
15859
15857
 
@@ -15913,18 +15911,18 @@ function calendar(ticks, tickInterval, year, month, week, day, hour, minute, sec
15913
15911
  };
15914
15912
 
15915
15913
  scale.copy = function() {
15916
- return copy$2(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));
15914
+ return copy$3(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));
15917
15915
  };
15918
15916
 
15919
15917
  return scale;
15920
15918
  }
15921
15919
 
15922
- function time$1() {
15923
- return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute, second, timeFormat$2).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);
15920
+ function time$2() {
15921
+ return initRange.apply(calendar(timeTicks, timeTickInterval, timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute, second, timeFormat$3).domain([new Date(2000, 0, 1), new Date(2000, 0, 2)]), arguments);
15924
15922
  }
15925
15923
 
15926
15924
  function utcTime() {
15927
- return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcSunday, utcDay, utcHour, utcMinute, second, utcFormat$1).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);
15925
+ return initRange.apply(calendar(utcTicks, utcTickInterval, utcYear, utcMonth, utcSunday, utcDay, utcHour, utcMinute, second, utcFormat$2).domain([Date.UTC(2000, 0, 1), Date.UTC(2000, 0, 2)]), arguments);
15928
15926
  }
15929
15927
 
15930
15928
  function transformer$2() {
@@ -15975,7 +15973,7 @@ function transformer$2() {
15975
15973
  };
15976
15974
  }
15977
15975
 
15978
- function copy$1(source, target) {
15976
+ function copy$2(source, target) {
15979
15977
  return target
15980
15978
  .domain(source.domain())
15981
15979
  .interpolator(source.interpolator())
@@ -15987,7 +15985,7 @@ function sequential() {
15987
15985
  var scale = linearish(transformer$2()(identity$3));
15988
15986
 
15989
15987
  scale.copy = function() {
15990
- return copy$1(scale, sequential());
15988
+ return copy$2(scale, sequential());
15991
15989
  };
15992
15990
 
15993
15991
  return initInterpolator.apply(scale, arguments);
@@ -15997,7 +15995,7 @@ function sequentialLog() {
15997
15995
  var scale = loggish(transformer$2()).domain([1, 10]);
15998
15996
 
15999
15997
  scale.copy = function() {
16000
- return copy$1(scale, sequentialLog()).base(scale.base());
15998
+ return copy$2(scale, sequentialLog()).base(scale.base());
16001
15999
  };
16002
16000
 
16003
16001
  return initInterpolator.apply(scale, arguments);
@@ -16007,7 +16005,7 @@ function sequentialSymlog() {
16007
16005
  var scale = symlogish(transformer$2());
16008
16006
 
16009
16007
  scale.copy = function() {
16010
- return copy$1(scale, sequentialSymlog()).constant(scale.constant());
16008
+ return copy$2(scale, sequentialSymlog()).constant(scale.constant());
16011
16009
  };
16012
16010
 
16013
16011
  return initInterpolator.apply(scale, arguments);
@@ -16017,7 +16015,7 @@ function sequentialPow() {
16017
16015
  var scale = powish(transformer$2());
16018
16016
 
16019
16017
  scale.copy = function() {
16020
- return copy$1(scale, sequentialPow()).exponent(scale.exponent());
16018
+ return copy$2(scale, sequentialPow()).exponent(scale.exponent());
16021
16019
  };
16022
16020
 
16023
16021
  return initInterpolator.apply(scale, arguments);
@@ -16083,7 +16081,7 @@ function diverging() {
16083
16081
  var scale = linearish(transformer$1()(identity$3));
16084
16082
 
16085
16083
  scale.copy = function() {
16086
- return copy$1(scale, diverging());
16084
+ return copy$2(scale, diverging());
16087
16085
  };
16088
16086
 
16089
16087
  return initInterpolator.apply(scale, arguments);
@@ -16093,7 +16091,7 @@ function divergingLog() {
16093
16091
  var scale = loggish(transformer$1()).domain([0.1, 1, 10]);
16094
16092
 
16095
16093
  scale.copy = function() {
16096
- return copy$1(scale, divergingLog()).base(scale.base());
16094
+ return copy$2(scale, divergingLog()).base(scale.base());
16097
16095
  };
16098
16096
 
16099
16097
  return initInterpolator.apply(scale, arguments);
@@ -16103,7 +16101,7 @@ function divergingSymlog() {
16103
16101
  var scale = symlogish(transformer$1());
16104
16102
 
16105
16103
  scale.copy = function() {
16106
- return copy$1(scale, divergingSymlog()).constant(scale.constant());
16104
+ return copy$2(scale, divergingSymlog()).constant(scale.constant());
16107
16105
  };
16108
16106
 
16109
16107
  return initInterpolator.apply(scale, arguments);
@@ -16113,7 +16111,7 @@ function divergingPow() {
16113
16111
  var scale = powish(transformer$1());
16114
16112
 
16115
16113
  scale.copy = function() {
16116
- return copy$1(scale, divergingPow()).exponent(scale.exponent());
16114
+ return copy$2(scale, divergingPow()).exponent(scale.exponent());
16117
16115
  };
16118
16116
 
16119
16117
  return initInterpolator.apply(scale, arguments);
@@ -16249,7 +16247,7 @@ function band() {
16249
16247
  start = Math.round(start);
16250
16248
  bandwidth = Math.round(bandwidth);
16251
16249
  }
16252
- const values = range$5(n).map(i => start + step * i);
16250
+ const values = range$6(n).map(i => start + step * i);
16253
16251
  return ordinalRange(reverse ? values.reverse() : values);
16254
16252
  }
16255
16253
  scale.domain = function (_) {
@@ -16384,7 +16382,7 @@ function numbers(_) {
16384
16382
  return map.call(_, toNumber);
16385
16383
  }
16386
16384
 
16387
- const slice$2 = Array.prototype.slice;
16385
+ const slice$3 = Array.prototype.slice;
16388
16386
 
16389
16387
  function scaleBinOrdinal() {
16390
16388
  let domain = [],
@@ -16402,7 +16400,7 @@ function scaleBinOrdinal() {
16402
16400
  };
16403
16401
  scale.range = function (_) {
16404
16402
  if (arguments.length) {
16405
- range = slice$2.call(_);
16403
+ range = slice$3.call(_);
16406
16404
  return scale;
16407
16405
  } else {
16408
16406
  return range.slice();
@@ -16444,7 +16442,7 @@ function create$2(type, constructor, metadata) {
16444
16442
  s.type = type;
16445
16443
  return registerScale(s);
16446
16444
  };
16447
- ctr.metadata = toSet(array$5(metadata));
16445
+ ctr.metadata = toSet(array$6(metadata));
16448
16446
  return ctr;
16449
16447
  }
16450
16448
 
@@ -16464,7 +16462,7 @@ function create$2(type, constructor, metadata) {
16464
16462
  * - `"log"` - the scale performs a logarithmic transform of the continuous domain.
16465
16463
  * - `"temporal"` - the scale domain is defined over date-time values.
16466
16464
  */
16467
- function scale$4(type, scale, metadata) {
16465
+ function scale$5(type, scale, metadata) {
16468
16466
  if (arguments.length > 1) {
16469
16467
  scales.set(type, create$2(type, scale, metadata));
16470
16468
  return this;
@@ -16474,42 +16472,42 @@ function scale$4(type, scale, metadata) {
16474
16472
  }
16475
16473
 
16476
16474
  // identity scale
16477
- scale$4(Identity, identity$1);
16475
+ scale$5(Identity, identity$1);
16478
16476
 
16479
16477
  // continuous scales
16480
- scale$4(Linear, linear, Continuous);
16481
- scale$4(Log, log$2, [Continuous, Log]);
16482
- scale$4(Pow, pow$2, Continuous);
16483
- scale$4(Sqrt, sqrt$2, Continuous);
16484
- scale$4(Symlog, symlog, Continuous);
16485
- scale$4(Time, time$1, [Continuous, Temporal]);
16486
- scale$4(UTC, utcTime, [Continuous, Temporal]);
16478
+ scale$5(Linear, linear, Continuous);
16479
+ scale$5(Log, log$3, [Continuous, Log]);
16480
+ scale$5(Pow, pow$2, Continuous);
16481
+ scale$5(Sqrt, sqrt$2, Continuous);
16482
+ scale$5(Symlog, symlog, Continuous);
16483
+ scale$5(Time, time$2, [Continuous, Temporal]);
16484
+ scale$5(UTC, utcTime, [Continuous, Temporal]);
16487
16485
 
16488
16486
  // sequential scales
16489
- scale$4(Sequential, sequential, [Continuous, Interpolating]); // backwards compat
16490
- scale$4(`${Sequential}-${Linear}`, sequential, [Continuous, Interpolating]);
16491
- scale$4(`${Sequential}-${Log}`, sequentialLog, [Continuous, Interpolating, Log]);
16492
- scale$4(`${Sequential}-${Pow}`, sequentialPow, [Continuous, Interpolating]);
16493
- scale$4(`${Sequential}-${Sqrt}`, sequentialSqrt, [Continuous, Interpolating]);
16494
- scale$4(`${Sequential}-${Symlog}`, sequentialSymlog, [Continuous, Interpolating]);
16487
+ scale$5(Sequential, sequential, [Continuous, Interpolating]); // backwards compat
16488
+ scale$5(`${Sequential}-${Linear}`, sequential, [Continuous, Interpolating]);
16489
+ scale$5(`${Sequential}-${Log}`, sequentialLog, [Continuous, Interpolating, Log]);
16490
+ scale$5(`${Sequential}-${Pow}`, sequentialPow, [Continuous, Interpolating]);
16491
+ scale$5(`${Sequential}-${Sqrt}`, sequentialSqrt, [Continuous, Interpolating]);
16492
+ scale$5(`${Sequential}-${Symlog}`, sequentialSymlog, [Continuous, Interpolating]);
16495
16493
 
16496
16494
  // diverging scales
16497
- scale$4(`${Diverging}-${Linear}`, diverging, [Continuous, Interpolating]);
16498
- scale$4(`${Diverging}-${Log}`, divergingLog, [Continuous, Interpolating, Log]);
16499
- scale$4(`${Diverging}-${Pow}`, divergingPow, [Continuous, Interpolating]);
16500
- scale$4(`${Diverging}-${Sqrt}`, divergingSqrt, [Continuous, Interpolating]);
16501
- scale$4(`${Diverging}-${Symlog}`, divergingSymlog, [Continuous, Interpolating]);
16495
+ scale$5(`${Diverging}-${Linear}`, diverging, [Continuous, Interpolating]);
16496
+ scale$5(`${Diverging}-${Log}`, divergingLog, [Continuous, Interpolating, Log]);
16497
+ scale$5(`${Diverging}-${Pow}`, divergingPow, [Continuous, Interpolating]);
16498
+ scale$5(`${Diverging}-${Sqrt}`, divergingSqrt, [Continuous, Interpolating]);
16499
+ scale$5(`${Diverging}-${Symlog}`, divergingSymlog, [Continuous, Interpolating]);
16502
16500
 
16503
16501
  // discretizing scales
16504
- scale$4(Quantile, quantile, [Discretizing, Quantile]);
16505
- scale$4(Quantize, quantize$1, Discretizing);
16506
- scale$4(Threshold, threshold, Discretizing);
16502
+ scale$5(Quantile, quantile, [Discretizing, Quantile]);
16503
+ scale$5(Quantize, quantize$1, Discretizing);
16504
+ scale$5(Threshold, threshold, Discretizing);
16507
16505
 
16508
16506
  // discrete scales
16509
- scale$4(BinOrdinal, scaleBinOrdinal, [Discrete$1, Discretizing]);
16510
- scale$4(Ordinal, ordinal, Discrete$1);
16511
- scale$4(Band, band, Discrete$1);
16512
- scale$4(Point, point$3, Discrete$1);
16507
+ scale$5(BinOrdinal, scaleBinOrdinal, [Discrete$1, Discretizing]);
16508
+ scale$5(Ordinal, ordinal, Discrete$1);
16509
+ scale$5(Band, band, Discrete$1);
16510
+ scale$5(Point, point$3, Discrete$1);
16513
16511
  function isValidScaleType(type) {
16514
16512
  return scales.has(type);
16515
16513
  }
@@ -16564,7 +16562,7 @@ function scaleFraction(scale$1, min, max) {
16564
16562
  } else {
16565
16563
  i = (t = scale$1.type).indexOf('-');
16566
16564
  t = i < 0 ? t : t.slice(i + 1);
16567
- s = scale$4(t)().domain([min, max]).range([0, 1]);
16565
+ s = scale$5(t)().domain([min, max]).range([0, 1]);
16568
16566
  scaleProps.forEach(m => scale$1[m] ? s[m](scale$1[m]()) : 0);
16569
16567
  return s;
16570
16568
  }
@@ -16879,7 +16877,7 @@ function labelFraction(scale) {
16879
16877
  return value => (value - lo) / span;
16880
16878
  }
16881
16879
 
16882
- function format$1(locale, scale, specifier, formatType) {
16880
+ function format$2(locale, scale, specifier, formatType) {
16883
16881
  const type = formatType || scale.type;
16884
16882
 
16885
16883
  // replace abbreviated time specifiers to improve screen reader experience
@@ -16891,7 +16889,7 @@ function format$1(locale, scale, specifier, formatType) {
16891
16889
  function domainCaption(locale, scale, opt) {
16892
16890
  opt = opt || {};
16893
16891
  const max = Math.max(3, opt.maxlen || 7),
16894
- fmt = format$1(locale, scale, opt.format, opt.formatType);
16892
+ fmt = format$2(locale, scale, opt.format, opt.formatType);
16895
16893
 
16896
16894
  // if scale breaks domain into bins, describe boundaries
16897
16895
  if (isDiscretizing$1(scale.type)) {
@@ -17137,11 +17135,11 @@ const HalfSqrt3 = Math.sqrt(3) / 2;
17137
17135
 
17138
17136
  var segmentCache = {};
17139
17137
  var bezierCache = {};
17140
- var join$1 = [].join;
17138
+ var join$2 = [].join;
17141
17139
 
17142
17140
  // Copied from Inkscape svgtopdf, thanks!
17143
17141
  function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
17144
- const key = join$1.call(arguments);
17142
+ const key = join$2.call(arguments);
17145
17143
  if (segmentCache[key]) {
17146
17144
  return segmentCache[key];
17147
17145
  }
@@ -17191,7 +17189,7 @@ function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
17191
17189
  return segmentCache[key] = result;
17192
17190
  }
17193
17191
  function bezier(params) {
17194
- const key = join$1.call(params);
17192
+ const key = join$2.call(params);
17195
17193
  if (bezierCache[key]) {
17196
17194
  return bezierCache[key];
17197
17195
  }
@@ -18596,7 +18594,7 @@ function translate$2(x, y) {
18596
18594
  function rotate(a) {
18597
18595
  return 'rotate(' + a + ')';
18598
18596
  }
18599
- function scale$3(scaleX, scaleY) {
18597
+ function scale$4(scaleX, scaleY) {
18600
18598
  return 'scale(' + scaleX + ',' + scaleY + ')';
18601
18599
  }
18602
18600
  function translateItem(item) {
@@ -18606,7 +18604,7 @@ function rotateItem(item) {
18606
18604
  return translate$2(item.x || 0, item.y || 0) + (item.angle ? ' ' + rotate(item.angle) : '');
18607
18605
  }
18608
18606
  function transformItem(item) {
18609
- return translate$2(item.x || 0, item.y || 0) + (item.angle ? ' ' + rotate(item.angle) : '') + (item.scaleX || item.scaleY ? ' ' + scale$3(item.scaleX || 1, item.scaleY || 1) : '');
18607
+ return translate$2(item.x || 0, item.y || 0) + (item.angle ? ' ' + rotate(item.angle) : '') + (item.scaleX || item.scaleY ? ' ' + scale$4(item.scaleX || 1, item.scaleY || 1) : '');
18610
18608
  }
18611
18609
 
18612
18610
  function markItemPath (type, shape, isect) {
@@ -19714,12 +19712,12 @@ class Handler$1 {
19714
19712
  /**
19715
19713
  * Add an event handler. Subclasses should override this method.
19716
19714
  */
19717
- on( /*type, handler*/) {}
19715
+ on(/*type, handler*/) {}
19718
19716
 
19719
19717
  /**
19720
19718
  * Remove an event handler. Subclasses should override this method.
19721
19719
  */
19722
- off( /*type, handler*/) {}
19720
+ off(/*type, handler*/) {}
19723
19721
 
19724
19722
  /**
19725
19723
  * Utility method for finding the array index of an event handler.
@@ -19926,7 +19924,7 @@ class Renderer {
19926
19924
  * incremental should implement this method.
19927
19925
  * @param {Item} item - The dirty item whose bounds should be redrawn.
19928
19926
  */
19929
- dirty( /*item*/) {}
19927
+ dirty(/*item*/) {}
19930
19928
 
19931
19929
  /**
19932
19930
  * Render an input scenegraph, potentially with a set of dirty items.
@@ -19965,7 +19963,7 @@ class Renderer {
19965
19963
  * @param {Array} markTypes - Array of the mark types to render.
19966
19964
  * If undefined, render all mark types
19967
19965
  */
19968
- _render( /*scene, markTypes*/
19966
+ _render(/*scene, markTypes*/
19969
19967
  ) {
19970
19968
  // subclasses to override
19971
19969
  }
@@ -20513,7 +20511,7 @@ function ariaGuide(mark, opt) {
20513
20511
  }
20514
20512
  }
20515
20513
  function titleCaption(item) {
20516
- return array$5(item.text).join(' ');
20514
+ return array$6(item.text).join(' ');
20517
20515
  }
20518
20516
  function axisCaption(item) {
20519
20517
  const datum = item.datum,
@@ -20539,7 +20537,7 @@ function legendCaption(item) {
20539
20537
  }
20540
20538
  function extractTitle(item) {
20541
20539
  try {
20542
- return array$5(peek$1(item.items).items[0].text).join(' ');
20540
+ return array$6(peek$1(item.items).items[0].text).join(' ');
20543
20541
  } catch (err) {
20544
20542
  return null;
20545
20543
  }
@@ -21772,7 +21770,7 @@ function renderModule(name, _) {
21772
21770
  }
21773
21771
  }
21774
21772
 
21775
- function intersect$2(scene, bounds, filter) {
21773
+ function intersect$3(scene, bounds, filter) {
21776
21774
  const hits = [],
21777
21775
  // intersection results
21778
21776
  box = new Bounds().union(bounds),
@@ -22097,16 +22095,16 @@ const methods = {
22097
22095
  parity: items => items.filter((item, i) => i % 2 ? item.opacity = 0 : 1),
22098
22096
  greedy: (items, sep) => {
22099
22097
  let a;
22100
- return items.filter((b, i) => !i || !intersect$1(a.bounds, b.bounds, sep) ? (a = b, 1) : b.opacity = 0);
22098
+ return items.filter((b, i) => !i || !intersect$2(a.bounds, b.bounds, sep) ? (a = b, 1) : b.opacity = 0);
22101
22099
  }
22102
22100
  };
22103
22101
 
22104
22102
  // compute bounding box intersection
22105
22103
  // including padding pixels of separation
22106
- const intersect$1 = (a, b, sep) => sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
22104
+ const intersect$2 = (a, b, sep) => sep > Math.max(b.x1 - a.x2, a.x1 - b.x2, b.y1 - a.y2, a.y1 - b.y2);
22107
22105
  const hasOverlap = (items, pad) => {
22108
22106
  for (var i = 1, n = items.length, a = items[0].bounds, b; i < n; a = b, ++i) {
22109
- if (intersect$1(a, b = items[i].bounds, pad)) return true;
22107
+ if (intersect$2(a, b = items[i].bounds, pad)) return true;
22110
22108
  }
22111
22109
  };
22112
22110
  const hasBounds = item => {
@@ -23694,7 +23692,7 @@ inherits(Pie, Transform, {
23694
23692
  n = values.length,
23695
23693
  a = start,
23696
23694
  k = (stop - start) / sum$1(values),
23697
- index = range$5(n),
23695
+ index = range$6(n),
23698
23696
  i,
23699
23697
  t,
23700
23698
  v;
@@ -23737,7 +23735,7 @@ inherits(Scale$1, Transform, {
23737
23735
  scale$1 = this.value,
23738
23736
  key = scaleKey(_);
23739
23737
  if (!scale$1 || key !== scale$1.type) {
23740
- this.value = scale$1 = scale$4(key)();
23738
+ this.value = scale$1 = scale$5(key)();
23741
23739
  }
23742
23740
  for (key in _) if (!SKIP$1[key]) {
23743
23741
  // padding is a scale property for band/point but not others
@@ -23857,7 +23855,7 @@ function configureBins(scale, _, count) {
23857
23855
  if (!step) error$1('Scale bins parameter missing step property.');
23858
23856
  if (start < lo) start = step * Math.ceil(lo / step);
23859
23857
  if (stop > hi) stop = step * Math.floor(hi / step);
23860
- bins = range$5(start, stop + step / 2, step);
23858
+ bins = range$6(start, stop + step / 2, step);
23861
23859
  }
23862
23860
  if (bins) {
23863
23861
  // assign bin boundaries to scale instance
@@ -24127,7 +24125,7 @@ function partition$3(data, groupby, sort, field) {
24127
24125
  return groups;
24128
24126
  }
24129
24127
 
24130
- const encode$1 = /*#__PURE__*/Object.freeze({
24128
+ const encode$2 = /*#__PURE__*/Object.freeze({
24131
24129
  __proto__: null,
24132
24130
  axisticks: AxisTicks$1,
24133
24131
  datajoin: DataJoin$1,
@@ -24157,7 +24155,7 @@ var cos$1 = Math.cos;
24157
24155
  var ceil = Math.ceil;
24158
24156
  var exp = Math.exp;
24159
24157
  var hypot = Math.hypot;
24160
- var log$1 = Math.log;
24158
+ var log$2 = Math.log;
24161
24159
  var pow$1 = Math.pow;
24162
24160
  var sin$1 = Math.sin;
24163
24161
  var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };
@@ -24310,7 +24308,7 @@ function areaPoint$1(lambda, phi) {
24310
24308
  lambda0$1 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;
24311
24309
  }
24312
24310
 
24313
- function geoArea$1(object) {
24311
+ function geoArea$1$1(object) {
24314
24312
  areaSum$1 = new Adder();
24315
24313
  geoStream(object, areaStream$1);
24316
24314
  return areaSum$1 * 2;
@@ -24354,7 +24352,7 @@ var lambda0, phi0, lambda1, phi1, // bounds
24354
24352
  p0, // previous 3D point
24355
24353
  deltaSum,
24356
24354
  ranges,
24357
- range$4;
24355
+ range$5;
24358
24356
 
24359
24357
  var boundsStream$2 = {
24360
24358
  point: boundsPoint$1,
@@ -24375,7 +24373,7 @@ var boundsStream$2 = {
24375
24373
  if (areaRingSum$1 < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
24376
24374
  else if (deltaSum > epsilon$3) phi1 = 90;
24377
24375
  else if (deltaSum < -epsilon$3) phi0 = -90;
24378
- range$4[0] = lambda0, range$4[1] = lambda1;
24376
+ range$5[0] = lambda0, range$5[1] = lambda1;
24379
24377
  },
24380
24378
  sphere: function() {
24381
24379
  lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
@@ -24383,7 +24381,7 @@ var boundsStream$2 = {
24383
24381
  };
24384
24382
 
24385
24383
  function boundsPoint$1(lambda, phi) {
24386
- ranges.push(range$4 = [lambda0 = lambda, lambda1 = lambda]);
24384
+ ranges.push(range$5 = [lambda0 = lambda, lambda1 = lambda]);
24387
24385
  if (phi < phi0) phi0 = phi;
24388
24386
  if (phi > phi1) phi1 = phi;
24389
24387
  }
@@ -24430,7 +24428,7 @@ function linePoint(lambda, phi) {
24430
24428
  }
24431
24429
  }
24432
24430
  } else {
24433
- ranges.push(range$4 = [lambda0 = lambda, lambda1 = lambda]);
24431
+ ranges.push(range$5 = [lambda0 = lambda, lambda1 = lambda]);
24434
24432
  }
24435
24433
  if (phi < phi0) phi0 = phi;
24436
24434
  if (phi > phi1) phi1 = phi;
@@ -24442,7 +24440,7 @@ function boundsLineStart() {
24442
24440
  }
24443
24441
 
24444
24442
  function boundsLineEnd() {
24445
- range$4[0] = lambda0, range$4[1] = lambda1;
24443
+ range$5[0] = lambda0, range$5[1] = lambda1;
24446
24444
  boundsStream$2.point = boundsPoint$1;
24447
24445
  p0 = null;
24448
24446
  }
@@ -24466,7 +24464,7 @@ function boundsRingEnd() {
24466
24464
  boundsRingPoint(lambda00$1, phi00$1);
24467
24465
  areaStream$1.lineEnd();
24468
24466
  if (abs$1(deltaSum) > epsilon$3) lambda0 = -(lambda1 = 180);
24469
- range$4[0] = lambda0, range$4[1] = lambda1;
24467
+ range$5[0] = lambda0, range$5[1] = lambda1;
24470
24468
  p0 = null;
24471
24469
  }
24472
24470
 
@@ -24485,7 +24483,7 @@ function rangeContains(range, x) {
24485
24483
  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
24486
24484
  }
24487
24485
 
24488
- function geoBounds$1(feature) {
24486
+ function geoBounds$1$1(feature) {
24489
24487
  var i, n, a, b, merged, deltaMax, delta;
24490
24488
 
24491
24489
  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);
@@ -24515,7 +24513,7 @@ function geoBounds$1(feature) {
24515
24513
  }
24516
24514
  }
24517
24515
 
24518
- ranges = range$4 = null;
24516
+ ranges = range$5 = null;
24519
24517
 
24520
24518
  return lambda0 === Infinity || phi0 === Infinity
24521
24519
  ? [[NaN, NaN], [NaN, NaN]]
@@ -24634,7 +24632,7 @@ function centroidRingPoint(lambda, phi) {
24634
24632
  centroidPointCartesian(x0$4, y0$4, z0);
24635
24633
  }
24636
24634
 
24637
- function geoCentroid$1(object) {
24635
+ function geoCentroid$1$1(object) {
24638
24636
  W0 = W1 =
24639
24637
  X0$1 = Y0$1 = Z0$1 =
24640
24638
  X1$1 = Y1$1 = Z1$1 = 0;
@@ -25003,7 +25001,7 @@ function clip$1(pointVisible, clipLine, interpolate, start) {
25003
25001
  clip.point = point;
25004
25002
  clip.lineStart = lineStart;
25005
25003
  clip.lineEnd = lineEnd;
25006
- segments = merge$2(segments);
25004
+ segments = merge$3(segments);
25007
25005
  var startInside = polygonContains(polygon, start);
25008
25006
  if (segments.length) {
25009
25007
  if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
@@ -25515,7 +25513,7 @@ function clipRectangle(x0, y0, x1, y1) {
25515
25513
  function polygonEnd() {
25516
25514
  var startInside = polygonInside(),
25517
25515
  cleanInside = clean && startInside,
25518
- visible = (segments = merge$2(segments)).length;
25516
+ visible = (segments = merge$3(segments)).length;
25519
25517
  if (cleanInside || visible) {
25520
25518
  stream.polygonStart();
25521
25519
  if (cleanInside) {
@@ -25590,12 +25588,12 @@ function clipRectangle(x0, y0, x1, y1) {
25590
25588
  }
25591
25589
 
25592
25590
  function graticuleX(y0, y1, dy) {
25593
- var y = range$5(y0, y1 - epsilon$3, dy).concat(y1);
25591
+ var y = range$6(y0, y1 - epsilon$3, dy).concat(y1);
25594
25592
  return function(x) { return y.map(function(y) { return [x, y]; }); };
25595
25593
  }
25596
25594
 
25597
25595
  function graticuleY(x0, x1, dx) {
25598
- var x = range$5(x0, x1 - epsilon$3, dx).concat(x1);
25596
+ var x = range$6(x0, x1 - epsilon$3, dx).concat(x1);
25599
25597
  return function(y) { return x.map(function(x) { return [x, y]; }); };
25600
25598
  }
25601
25599
 
@@ -25611,10 +25609,10 @@ function graticule() {
25611
25609
  }
25612
25610
 
25613
25611
  function lines() {
25614
- return range$5(ceil(X0 / DX) * DX, X1, DX).map(X)
25615
- .concat(range$5(ceil(Y0 / DY) * DY, Y1, DY).map(Y))
25616
- .concat(range$5(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs$1(x % DX) > epsilon$3; }).map(x))
25617
- .concat(range$5(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs$1(y % DY) > epsilon$3; }).map(y));
25612
+ return range$6(ceil(X0 / DX) * DX, X1, DX).map(X)
25613
+ .concat(range$6(ceil(Y0 / DY) * DY, Y1, DY).map(Y))
25614
+ .concat(range$6(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs$1(x % DX) > epsilon$3; }).map(x))
25615
+ .concat(range$6(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs$1(y % DY) > epsilon$3; }).map(y));
25618
25616
  }
25619
25617
 
25620
25618
  graticule.lines = function() {
@@ -26663,7 +26661,7 @@ function geoAzimuthalEquidistant() {
26663
26661
  }
26664
26662
 
26665
26663
  function mercatorRaw(lambda, phi) {
26666
- return [lambda, log$1(tan((halfPi$1 + phi) / 2))];
26664
+ return [lambda, log$2(tan((halfPi$1 + phi) / 2))];
26667
26665
  }
26668
26666
 
26669
26667
  mercatorRaw.invert = function(x, y) {
@@ -26717,7 +26715,7 @@ function tany(y) {
26717
26715
 
26718
26716
  function conicConformalRaw(y0, y1) {
26719
26717
  var cy0 = cos$1(y0),
26720
- n = y0 === y1 ? sin$1(y0) : log$1(cy0 / cos$1(y1)) / log$1(tany(y1) / tany(y0)),
26718
+ n = y0 === y1 ? sin$1(y0) : log$2(cy0 / cos$1(y1)) / log$2(tany(y1) / tany(y0)),
26721
26719
  f = cy0 * pow$1(tany(y0), n) / n;
26722
26720
 
26723
26721
  if (!n) return mercatorRaw;
@@ -26967,7 +26965,7 @@ function geoStereographic() {
26967
26965
  }
26968
26966
 
26969
26967
  function transverseMercatorRaw(lambda, phi) {
26970
- return [log$1(tan((halfPi$1 + phi) / 2)), -lambda];
26968
+ return [log$2(tan((halfPi$1 + phi) / 2)), -lambda];
26971
26969
  }
26972
26970
 
26973
26971
  transverseMercatorRaw.invert = function(x, y) {
@@ -27317,7 +27315,7 @@ function quantize (k, nice, zero) {
27317
27315
  stop = ex[1],
27318
27316
  span = stop - start,
27319
27317
  step = nice ? tickStep(start, stop, k) : span / (k + 1);
27320
- return range$5(start + step, stop, step);
27318
+ return range$6(start + step, stop, step);
27321
27319
  };
27322
27320
  }
27323
27321
 
@@ -27569,7 +27567,7 @@ function density2D () {
27569
27567
  };
27570
27568
  density.bandwidth = function (_) {
27571
27569
  if (!arguments.length) return bandwidth;
27572
- _ = array$5(_);
27570
+ _ = array$6(_);
27573
27571
  if (_.length === 1) _ = [+_[0], +_[0]];
27574
27572
  if (_.length !== 2) error$1('invalid bandwidth');
27575
27573
  return bandwidth = _, density;
@@ -28199,7 +28197,7 @@ inherits(Graticule, Transform, {
28199
28197
  }
28200
28198
  t = gen();
28201
28199
  if (src.length) {
28202
- pulse.mod.push(replace$1(src[0], t));
28200
+ pulse.mod.push(replace$2(src[0], t));
28203
28201
  } else {
28204
28202
  pulse.add.push(ingest$1(t));
28205
28203
  }
@@ -28396,14 +28394,14 @@ function set$2(proj, key, value) {
28396
28394
  if (isFunction(proj[key])) proj[key](value);
28397
28395
  }
28398
28396
  function collectGeoJSON(data) {
28399
- data = array$5(data);
28397
+ data = array$6(data);
28400
28398
  return data.length === 1 ? data[0] : {
28401
28399
  type: FeatureCollection,
28402
28400
  features: data.reduce((a, f) => a.concat(featurize(f)), [])
28403
28401
  };
28404
28402
  }
28405
28403
  function featurize(f) {
28406
- return f.type === FeatureCollection ? f.features : array$5(f).filter(d => d != null).map(d => d.type === Feature ? d : {
28404
+ return f.type === FeatureCollection ? f.features : array$6(f).filter(d => d != null).map(d => d.type === Feature ? d : {
28407
28405
  type: Feature,
28408
28406
  geometry: d
28409
28407
  });
@@ -29898,7 +29896,7 @@ function simulation(nodes, _) {
29898
29896
  return setup(sim, _, true).on('end', () => stopped = true);
29899
29897
  }
29900
29898
  function setup(sim, _, init, pulse) {
29901
- var f = array$5(_.forces),
29899
+ var f = array$6(_.forces),
29902
29900
  i,
29903
29901
  n,
29904
29902
  p,
@@ -30292,7 +30290,7 @@ function lcg() {
30292
30290
  return () => (s = (a * s + c) % m) / m;
30293
30291
  }
30294
30292
 
30295
- function array$2(x) {
30293
+ function array$3(x) {
30296
30294
  return typeof x === "object" && "length" in x
30297
30295
  ? x // Array, TypedArray, NodeList, array-like
30298
30296
  : Array.from(x); // Map, Set, iterable, string, or anything else
@@ -30475,7 +30473,7 @@ function Node(circle) {
30475
30473
  }
30476
30474
 
30477
30475
  function packSiblingsRandom(circles, random) {
30478
- if (!(n = (circles = array$2(circles)).length)) return 0;
30476
+ if (!(n = (circles = array$3(circles)).length)) return 0;
30479
30477
 
30480
30478
  var a, b, c, n, aa, ca, i, j, k, sj, sk;
30481
30479
 
@@ -31380,7 +31378,7 @@ inherits(Nest, Transform, {
31380
31378
 
31381
31379
  // generate new tree structure
31382
31380
  this.value = tree = hierarchy({
31383
- values: array$5(_.keys).reduce((n, k) => {
31381
+ values: array$6(_.keys).reduce((n, k) => {
31384
31382
  n.key(k);
31385
31383
  return n;
31386
31384
  }, nest()).entries(out.source)
@@ -32740,7 +32738,7 @@ inherits(Label$1, Transform, {
32740
32738
  const as = _.as || Output$1;
32741
32739
 
32742
32740
  // run label layout
32743
- labelLayout(pulse.materialize(pulse.SOURCE).source || [], _.size, _.sort, array$5(_.offset == null ? 1 : _.offset), array$5(_.anchor || Anchors), _.avoidMarks || [], _.avoidBaseMark !== false, _.lineAnchor || 'end', _.markIndex || 0, _.padding === undefined ? 0 : _.padding, _.method || 'naive').forEach(l => {
32741
+ labelLayout(pulse.materialize(pulse.SOURCE).source || [], _.size, _.sort, array$6(_.offset == null ? 1 : _.offset), array$6(_.anchor || Anchors), _.avoidMarks || [], _.avoidBaseMark !== false, _.lineAnchor || 'end', _.markIndex || 0, _.padding === undefined ? 0 : _.padding, _.method || 'naive').forEach(l => {
32744
32742
  // write layout results to data stream
32745
32743
  const t = l.datum;
32746
32744
  t[as[0]] = l.x;
@@ -32859,7 +32857,7 @@ inherits(Loess, Transform, {
32859
32857
  const Methods = {
32860
32858
  constant: constant$4,
32861
32859
  linear: linear$2,
32862
- log: log$3,
32860
+ log: log$4,
32863
32861
  exp: exp$1,
32864
32862
  pow: pow$3,
32865
32863
  quad: quad,
@@ -34945,7 +34943,7 @@ inherits(Wordcloud, Transform, {
34945
34943
  // create font size scaling function as needed
34946
34944
  if (range) {
34947
34945
  const fsize = fontSize,
34948
- sizeScale = scale$4('sqrt')().domain(extent(data, fsize)).range(range);
34946
+ sizeScale = scale$5('sqrt')().domain(extent(data, fsize)).range(range);
34949
34947
  fontSize = x => sizeScale(fsize(x));
34950
34948
  }
34951
34949
  data.forEach(t => {
@@ -34991,8 +34989,8 @@ function Bitmaps() {
34991
34989
  let width = 8,
34992
34990
  data = [],
34993
34991
  seen = array32(0),
34994
- curr = array$1(0, width),
34995
- prev = array$1(0, width);
34992
+ curr = array$2(0, width),
34993
+ prev = array$2(0, width);
34996
34994
  return {
34997
34995
  data: () => data,
34998
34996
  seen: () => seen = lengthen(seen, data.length),
@@ -35048,8 +35046,8 @@ function Bitmaps() {
35048
35046
  const k = curr.length;
35049
35047
  if (n > k || m > width) {
35050
35048
  width = Math.max(m, width);
35051
- curr = array$1(n, width, curr);
35052
- prev = array$1(n, width);
35049
+ curr = array$2(n, width, curr);
35050
+ prev = array$2(n, width);
35053
35051
  }
35054
35052
  }
35055
35053
  };
@@ -35060,7 +35058,7 @@ function lengthen(array, length, copy) {
35060
35058
  copy.set(array);
35061
35059
  return copy;
35062
35060
  }
35063
- function array$1(n, m, array) {
35061
+ function array$2(n, m, array) {
35064
35062
  const copy = (m < 0x101 ? array8 : m < 0x10001 ? array16 : array32)(n);
35065
35063
  if (array) copy.set(array);
35066
35064
  return copy;
@@ -35110,13 +35108,13 @@ function SortedIndex() {
35110
35108
  addv[i] = key(data[i]);
35111
35109
  addi[i] = i;
35112
35110
  }
35113
- addv = sort(addv, addi);
35111
+ addv = sort$1(addv, addi);
35114
35112
  if (n0) {
35115
35113
  oldv = value;
35116
35114
  oldi = index;
35117
35115
  value = Array(n0 + n1);
35118
35116
  index = array32(n0 + n1);
35119
- merge$1(base, oldv, oldi, n0, addv, addi, n1, value, index);
35117
+ merge$2(base, oldv, oldi, n0, addv, addi, n1, value, index);
35120
35118
  } else {
35121
35119
  if (base > 0) for (i = 0; i < n1; ++i) {
35122
35120
  addi[i] += base;
@@ -35172,7 +35170,7 @@ function SortedIndex() {
35172
35170
  size: () => size
35173
35171
  };
35174
35172
  }
35175
- function sort(values, index) {
35173
+ function sort$1(values, index) {
35176
35174
  values.sort.call(index, (a, b) => {
35177
35175
  const x = values[a],
35178
35176
  y = values[b];
@@ -35180,7 +35178,7 @@ function sort(values, index) {
35180
35178
  });
35181
35179
  return permute(values, index);
35182
35180
  }
35183
- function merge$1(base, value0, index0, n0, value1, index1, n1, value, index) {
35181
+ function merge$2(base, value0, index0, n0, value1, index1, n1, value, index) {
35184
35182
  let i0 = 0,
35185
35183
  i1 = 0,
35186
35184
  i;
@@ -37249,6 +37247,12 @@ const TYPE_ENUM = 'E',
37249
37247
  TYPE_RANGE_EXC = 'R-E',
37250
37248
  TYPE_RANGE_LE = 'R-LE',
37251
37249
  TYPE_RANGE_RE = 'R-RE',
37250
+ TYPE_PRED_LT = 'E-LT',
37251
+ TYPE_PRED_LTE = 'E-LTE',
37252
+ TYPE_PRED_GT = 'E-GT',
37253
+ TYPE_PRED_GTE = 'E-GTE',
37254
+ TYPE_PRED_VALID = 'E-VALID',
37255
+ TYPE_PRED_ONE_OF = 'E-ONE',
37252
37256
  UNIT_INDEX = 'index:unit';
37253
37257
 
37254
37258
  // TODO: revisit date coercion?
@@ -37268,7 +37272,7 @@ function testPoint(datum, entry) {
37268
37272
  if (f.type === TYPE_ENUM) {
37269
37273
  // Enumerated fields can either specify individual values (single/multi selections)
37270
37274
  // or an array of values (interval selections).
37271
- if (isArray(values[i]) ? values[i].indexOf(dval) < 0 : dval !== values[i]) {
37275
+ if (isArray(values[i]) ? !values[i].includes(dval) : dval !== values[i]) {
37272
37276
  return false;
37273
37277
  }
37274
37278
  } else {
@@ -37282,6 +37286,18 @@ function testPoint(datum, entry) {
37282
37286
  if (!inrange(dval, values[i], false, false)) return false;
37283
37287
  } else if (f.type === TYPE_RANGE_LE) {
37284
37288
  if (!inrange(dval, values[i], false, true)) return false;
37289
+ } else if (f.type === TYPE_PRED_LT) {
37290
+ if (dval >= values[i]) return false;
37291
+ } else if (f.type === TYPE_PRED_LTE) {
37292
+ if (dval > values[i]) return false;
37293
+ } else if (f.type === TYPE_PRED_GT) {
37294
+ if (dval <= values[i]) return false;
37295
+ } else if (f.type === TYPE_PRED_GTE) {
37296
+ if (dval < values[i]) return false;
37297
+ } else if (f.type === TYPE_PRED_VALID) {
37298
+ if (dval === null || isNaN(dval)) return false;
37299
+ } else if (f.type === TYPE_PRED_ONE_OF) {
37300
+ if (values[i].indexOf(dval) === -1) return false;
37285
37301
  }
37286
37302
  }
37287
37303
  }
@@ -37426,7 +37442,7 @@ function selectionResolve(name, op, isMulti, vl5) {
37426
37442
  resUnit = res[unit] || (res[unit] = []);
37427
37443
  types[field.field] = type = field.type.charAt(0);
37428
37444
  union = ops[`${type}_union`];
37429
- res[unit] = union(resUnit, array$5(values[j]));
37445
+ res[unit] = union(resUnit, array$6(values[j]));
37430
37446
  }
37431
37447
 
37432
37448
  // If the same multi-selection is repeated over views and projected over
@@ -37437,7 +37453,7 @@ function selectionResolve(name, op, isMulti, vl5) {
37437
37453
  // a more human-friendly one.
37438
37454
  if (isMulti) {
37439
37455
  resUnit = multiRes[unit] || (multiRes[unit] = []);
37440
- resUnit.push(array$5(values).reduce((obj, curr, j) => (obj[fields[j].field] = curr, obj), {}));
37456
+ resUnit.push(array$6(values).reduce((obj, curr, j) => (obj[fields[j].field] = curr, obj), {}));
37441
37457
  }
37442
37458
  } else {
37443
37459
  // Short circuit extensional selectionId stores which hold sorted IDs unique to each unit.
@@ -37484,11 +37500,11 @@ var ops = {
37484
37500
  if (!base.length) return value;
37485
37501
  var i = 0,
37486
37502
  n = value.length;
37487
- for (; i < n; ++i) if (base.indexOf(value[i]) < 0) base.push(value[i]);
37503
+ for (; i < n; ++i) if (!base.includes(value[i])) base.push(value[i]);
37488
37504
  return base;
37489
37505
  },
37490
37506
  E_intersect: function (base, value) {
37491
- return !base.length ? value : base.filter(v => value.indexOf(v) >= 0);
37507
+ return !base.length ? value : base.filter(v => value.includes(v));
37492
37508
  },
37493
37509
  R_union: function (base, value) {
37494
37510
  var lo = toNumber(value[0]),
@@ -37520,15 +37536,15 @@ var ops = {
37520
37536
  }
37521
37537
  };
37522
37538
 
37523
- const DataPrefix$1 = ':',
37524
- IndexPrefix$1 = '@';
37539
+ const DataPrefix$2 = ':',
37540
+ IndexPrefix$2 = '@';
37525
37541
  function selectionVisitor(name, args, scope, params) {
37526
37542
  if (args[0].type !== Literal) error$1('First argument to selection functions must be a string literal.');
37527
37543
  const data = args[0].value,
37528
37544
  op = args.length >= 2 && peek$1(args).value,
37529
37545
  field = 'unit',
37530
- indexName = IndexPrefix$1 + field,
37531
- dataName = DataPrefix$1 + data;
37546
+ indexName = IndexPrefix$2 + field,
37547
+ dataName = DataPrefix$2 + data;
37532
37548
 
37533
37549
  // eslint-disable-next-line no-prototype-builtins
37534
37550
  if (op === Intersect && !has$1(params, indexName)) {
@@ -37541,16 +37557,16 @@ function selectionVisitor(name, args, scope, params) {
37541
37557
  }
37542
37558
  }
37543
37559
 
37544
- function data$1(name) {
37560
+ function data$2(name) {
37545
37561
  const data = this.context.data[name];
37546
37562
  return data ? data.values.value : [];
37547
37563
  }
37548
- function indata(name, field, value) {
37564
+ function indata$1(name, field, value) {
37549
37565
  const index = this.context.data[name]['index:' + field],
37550
37566
  entry = index ? index.value.get(value) : undefined;
37551
37567
  return entry ? entry.count : entry;
37552
37568
  }
37553
- function setdata(name, tuples) {
37569
+ function setdata$1(name, tuples) {
37554
37570
  const df = this.context.dataflow,
37555
37571
  data = this.context.data[name],
37556
37572
  input = data.input;
@@ -37558,7 +37574,7 @@ function setdata(name, tuples) {
37558
37574
  return 1;
37559
37575
  }
37560
37576
 
37561
- function encode (item, name, retval) {
37577
+ function encode$1 (item, name, retval) {
37562
37578
  if (item) {
37563
37579
  const df = this.context.dataflow,
37564
37580
  target = item.mark.source;
@@ -37567,47 +37583,47 @@ function encode (item, name, retval) {
37567
37583
  return retval !== undefined ? retval : item;
37568
37584
  }
37569
37585
 
37570
- const wrap = method => function (value, spec) {
37586
+ const wrap$1 = method => function (value, spec) {
37571
37587
  const locale = this.context.dataflow.locale();
37572
37588
  return value === null ? 'null' : locale[method](spec)(value);
37573
37589
  };
37574
- const format = wrap('format');
37575
- const timeFormat$1 = wrap('timeFormat');
37576
- const utcFormat = wrap('utcFormat');
37577
- const timeParse = wrap('timeParse');
37578
- const utcParse = wrap('utcParse');
37579
- const dateObj = new Date(2000, 0, 1);
37580
- function time(month, day, specifier) {
37590
+ const format$1 = wrap$1('format');
37591
+ const timeFormat$2 = wrap$1('timeFormat');
37592
+ const utcFormat$1 = wrap$1('utcFormat');
37593
+ const timeParse$1 = wrap$1('timeParse');
37594
+ const utcParse$1 = wrap$1('utcParse');
37595
+ const dateObj$1 = new Date(2000, 0, 1);
37596
+ function time$1(month, day, specifier) {
37581
37597
  if (!Number.isInteger(month) || !Number.isInteger(day)) return '';
37582
- dateObj.setYear(2000);
37583
- dateObj.setMonth(month);
37584
- dateObj.setDate(day);
37585
- return timeFormat$1.call(this, dateObj, specifier);
37598
+ dateObj$1.setYear(2000);
37599
+ dateObj$1.setMonth(month);
37600
+ dateObj$1.setDate(day);
37601
+ return timeFormat$2.call(this, dateObj$1, specifier);
37586
37602
  }
37587
- function monthFormat(month) {
37588
- return time.call(this, month, 1, '%B');
37603
+ function monthFormat$1(month) {
37604
+ return time$1.call(this, month, 1, '%B');
37589
37605
  }
37590
- function monthAbbrevFormat(month) {
37591
- return time.call(this, month, 1, '%b');
37606
+ function monthAbbrevFormat$1(month) {
37607
+ return time$1.call(this, month, 1, '%b');
37592
37608
  }
37593
- function dayFormat(day) {
37594
- return time.call(this, 0, 2 + day, '%A');
37609
+ function dayFormat$1(day) {
37610
+ return time$1.call(this, 0, 2 + day, '%A');
37595
37611
  }
37596
- function dayAbbrevFormat(day) {
37597
- return time.call(this, 0, 2 + day, '%a');
37612
+ function dayAbbrevFormat$1(day) {
37613
+ return time$1.call(this, 0, 2 + day, '%a');
37598
37614
  }
37599
37615
 
37600
- const DataPrefix = ':';
37601
- const IndexPrefix = '@';
37602
- const ScalePrefix = '%';
37603
- const SignalPrefix = '$';
37616
+ const DataPrefix$1 = ':';
37617
+ const IndexPrefix$1 = '@';
37618
+ const ScalePrefix$1 = '%';
37619
+ const SignalPrefix$1 = '$';
37604
37620
 
37605
- function dataVisitor(name, args, scope, params) {
37621
+ function dataVisitor$1(name, args, scope, params) {
37606
37622
  if (args[0].type !== Literal) {
37607
37623
  error$1('First argument to data functions must be a string literal.');
37608
37624
  }
37609
37625
  const data = args[0].value,
37610
- dataName = DataPrefix + data;
37626
+ dataName = DataPrefix$1 + data;
37611
37627
  if (!has$1(dataName, params)) {
37612
37628
  try {
37613
37629
  params[dataName] = scope.getData(data).tuplesRef();
@@ -37616,29 +37632,29 @@ function dataVisitor(name, args, scope, params) {
37616
37632
  }
37617
37633
  }
37618
37634
  }
37619
- function indataVisitor(name, args, scope, params) {
37635
+ function indataVisitor$1(name, args, scope, params) {
37620
37636
  if (args[0].type !== Literal) error$1('First argument to indata must be a string literal.');
37621
37637
  if (args[1].type !== Literal) error$1('Second argument to indata must be a string literal.');
37622
37638
  const data = args[0].value,
37623
37639
  field = args[1].value,
37624
- indexName = IndexPrefix + field;
37640
+ indexName = IndexPrefix$1 + field;
37625
37641
  if (!has$1(indexName, params)) {
37626
37642
  params[indexName] = scope.getData(data).indataRef(scope, field);
37627
37643
  }
37628
37644
  }
37629
- function scaleVisitor(name, args, scope, params) {
37645
+ function scaleVisitor$1(name, args, scope, params) {
37630
37646
  if (args[0].type === Literal) {
37631
37647
  // add scale dependency
37632
- addScaleDependency(scope, params, args[0].value);
37648
+ addScaleDependency$1(scope, params, args[0].value);
37633
37649
  } else {
37634
37650
  // indirect scale lookup; add all scales as parameters
37635
37651
  for (name in scope.scales) {
37636
- addScaleDependency(scope, params, name);
37652
+ addScaleDependency$1(scope, params, name);
37637
37653
  }
37638
37654
  }
37639
37655
  }
37640
- function addScaleDependency(scope, params, name) {
37641
- const scaleName = ScalePrefix + name;
37656
+ function addScaleDependency$1(scope, params, name) {
37657
+ const scaleName = ScalePrefix$1 + name;
37642
37658
  if (!has$1(params, scaleName)) {
37643
37659
  try {
37644
37660
  params[scaleName] = scope.scaleRef(name);
@@ -37648,7 +37664,7 @@ function addScaleDependency(scope, params, name) {
37648
37664
  }
37649
37665
  }
37650
37666
 
37651
- function getScale(nameOrFunction, ctx) {
37667
+ function getScale$1(nameOrFunction, ctx) {
37652
37668
  if (isFunction(nameOrFunction)) {
37653
37669
  return nameOrFunction;
37654
37670
  }
@@ -37658,17 +37674,17 @@ function getScale(nameOrFunction, ctx) {
37658
37674
  }
37659
37675
  return undefined;
37660
37676
  }
37661
- function internalScaleFunctions(codegen, fnctx, visitors) {
37677
+ function internalScaleFunctions$1(codegen, fnctx, visitors) {
37662
37678
  // add helper method to the 'this' expression function context
37663
37679
  fnctx.__bandwidth = s => s && s.bandwidth ? s.bandwidth() : 0;
37664
37680
 
37665
37681
  // register AST visitors for internal scale functions
37666
- visitors._bandwidth = scaleVisitor;
37667
- visitors._range = scaleVisitor;
37668
- visitors._scale = scaleVisitor;
37682
+ visitors._bandwidth = scaleVisitor$1;
37683
+ visitors._range = scaleVisitor$1;
37684
+ visitors._scale = scaleVisitor$1;
37669
37685
 
37670
37686
  // resolve scale reference directly to the signal hash argument
37671
- const ref = arg => '_[' + (arg.type === Literal ? $(ScalePrefix + arg.value) : $(ScalePrefix) + '+' + codegen(arg)) + ']';
37687
+ const ref = arg => '_[' + (arg.type === Literal ? $(ScalePrefix$1 + arg.value) : $(ScalePrefix$1) + '+' + codegen(arg)) + ']';
37672
37688
 
37673
37689
  // define and return internal scale function code generators
37674
37690
  // these internal functions are called by mark encoders
@@ -37679,11 +37695,11 @@ function internalScaleFunctions(codegen, fnctx, visitors) {
37679
37695
  };
37680
37696
  }
37681
37697
 
37682
- function geoMethod(methodName, globalMethod) {
37698
+ function geoMethod$1(methodName, globalMethod) {
37683
37699
  return function (projection, geojson, group) {
37684
37700
  if (projection) {
37685
37701
  // projection defined, use it
37686
- const p = getScale(projection, (group || this).context);
37702
+ const p = getScale$1(projection, (group || this).context);
37687
37703
  return p && p.path[methodName](geojson);
37688
37704
  } else {
37689
37705
  // projection undefined, use global method
@@ -37691,15 +37707,15 @@ function geoMethod(methodName, globalMethod) {
37691
37707
  }
37692
37708
  };
37693
37709
  }
37694
- const geoArea = geoMethod('area', geoArea$1);
37695
- const geoBounds = geoMethod('bounds', geoBounds$1);
37696
- const geoCentroid = geoMethod('centroid', geoCentroid$1);
37697
- function geoScale(projection, group) {
37698
- const p = getScale(projection, (group || this).context);
37710
+ const geoArea$1 = geoMethod$1('area', geoArea$1$1);
37711
+ const geoBounds$1 = geoMethod$1('bounds', geoBounds$1$1);
37712
+ const geoCentroid$1 = geoMethod$1('centroid', geoCentroid$1$1);
37713
+ function geoScale$1(projection, group) {
37714
+ const p = getScale$1(projection, (group || this).context);
37699
37715
  return p && p.scale();
37700
37716
  }
37701
37717
 
37702
- function inScope (item) {
37718
+ function inScope$1 (item) {
37703
37719
  const group = this.context.group;
37704
37720
  let value = false;
37705
37721
  if (group) while (item) {
@@ -37712,7 +37728,7 @@ function inScope (item) {
37712
37728
  return value;
37713
37729
  }
37714
37730
 
37715
- function log(df, method, args) {
37731
+ function log$1(df, method, args) {
37716
37732
  try {
37717
37733
  df[method].apply(df, ['EXPRESSION'].concat([].slice.call(args)));
37718
37734
  } catch (err) {
@@ -37720,66 +37736,66 @@ function log(df, method, args) {
37720
37736
  }
37721
37737
  return args[args.length - 1];
37722
37738
  }
37723
- function warn$1() {
37724
- return log(this.context.dataflow, 'warn', arguments);
37739
+ function warn$2() {
37740
+ return log$1(this.context.dataflow, 'warn', arguments);
37725
37741
  }
37726
- function info() {
37727
- return log(this.context.dataflow, 'info', arguments);
37742
+ function info$1() {
37743
+ return log$1(this.context.dataflow, 'info', arguments);
37728
37744
  }
37729
- function debug$1() {
37730
- return log(this.context.dataflow, 'debug', arguments);
37745
+ function debug$2() {
37746
+ return log$1(this.context.dataflow, 'debug', arguments);
37731
37747
  }
37732
37748
 
37733
37749
  // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
37734
- function channel_luminance_value(channelValue) {
37750
+ function channel_luminance_value$1(channelValue) {
37735
37751
  const val = channelValue / 255;
37736
37752
  if (val <= 0.03928) {
37737
37753
  return val / 12.92;
37738
37754
  }
37739
37755
  return Math.pow((val + 0.055) / 1.055, 2.4);
37740
37756
  }
37741
- function luminance(color) {
37757
+ function luminance$1(color) {
37742
37758
  const c = rgb$1(color),
37743
- r = channel_luminance_value(c.r),
37744
- g = channel_luminance_value(c.g),
37745
- b = channel_luminance_value(c.b);
37759
+ r = channel_luminance_value$1(c.r),
37760
+ g = channel_luminance_value$1(c.g),
37761
+ b = channel_luminance_value$1(c.b);
37746
37762
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
37747
37763
  }
37748
37764
 
37749
37765
  // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
37750
- function contrast(color1, color2) {
37751
- const lum1 = luminance(color1),
37752
- lum2 = luminance(color2),
37766
+ function contrast$1(color1, color2) {
37767
+ const lum1 = luminance$1(color1),
37768
+ lum2 = luminance$1(color2),
37753
37769
  lumL = Math.max(lum1, lum2),
37754
37770
  lumD = Math.min(lum1, lum2);
37755
37771
  return (lumL + 0.05) / (lumD + 0.05);
37756
37772
  }
37757
37773
 
37758
- function merge () {
37774
+ function merge$1 () {
37759
37775
  const args = [].slice.call(arguments);
37760
37776
  args.unshift({});
37761
37777
  return extend$1(...args);
37762
37778
  }
37763
37779
 
37764
- function equal(a, b) {
37765
- return a === b || a !== a && b !== b ? true : isArray(a) ? isArray(b) && a.length === b.length ? equalArray(a, b) : false : isObject(a) && isObject(b) ? equalObject(a, b) : false;
37780
+ function equal$1(a, b) {
37781
+ return a === b || a !== a && b !== b ? true : isArray(a) ? isArray(b) && a.length === b.length ? equalArray$1(a, b) : false : isObject(a) && isObject(b) ? equalObject$1(a, b) : false;
37766
37782
  }
37767
- function equalArray(a, b) {
37783
+ function equalArray$1(a, b) {
37768
37784
  for (let i = 0, n = a.length; i < n; ++i) {
37769
- if (!equal(a[i], b[i])) return false;
37785
+ if (!equal$1(a[i], b[i])) return false;
37770
37786
  }
37771
37787
  return true;
37772
37788
  }
37773
- function equalObject(a, b) {
37789
+ function equalObject$1(a, b) {
37774
37790
  for (const key in a) {
37775
- if (!equal(a[key], b[key])) return false;
37791
+ if (!equal$1(a[key], b[key])) return false;
37776
37792
  }
37777
37793
  return true;
37778
37794
  }
37779
- function removePredicate(props) {
37780
- return _ => equalObject(props, _);
37795
+ function removePredicate$1(props) {
37796
+ return _ => equalObject$1(props, _);
37781
37797
  }
37782
- function modify (name, insert, remove, toggle, modify, values) {
37798
+ function modify$1 (name, insert, remove, toggle, modify, values) {
37783
37799
  const df = this.context.dataflow,
37784
37800
  data = this.context.data[name],
37785
37801
  input = data.input,
@@ -37800,14 +37816,14 @@ function modify (name, insert, remove, toggle, modify, values) {
37800
37816
  }, true, 1);
37801
37817
  }
37802
37818
  if (remove) {
37803
- predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate(remove);
37819
+ predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate$1(remove);
37804
37820
  changes.remove(predicate);
37805
37821
  }
37806
37822
  if (insert) {
37807
37823
  changes.insert(insert);
37808
37824
  }
37809
37825
  if (toggle) {
37810
- predicate = removePredicate(toggle);
37826
+ predicate = removePredicate$1(toggle);
37811
37827
  if (input.value.some(predicate)) {
37812
37828
  changes.remove(predicate);
37813
37829
  } else {
@@ -37822,92 +37838,92 @@ function modify (name, insert, remove, toggle, modify, values) {
37822
37838
  return 1;
37823
37839
  }
37824
37840
 
37825
- function pinchDistance(event) {
37841
+ function pinchDistance$1(event) {
37826
37842
  const t = event.touches,
37827
37843
  dx = t[0].clientX - t[1].clientX,
37828
37844
  dy = t[0].clientY - t[1].clientY;
37829
37845
  return Math.hypot(dx, dy);
37830
37846
  }
37831
- function pinchAngle(event) {
37847
+ function pinchAngle$1(event) {
37832
37848
  const t = event.touches;
37833
37849
  return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);
37834
37850
  }
37835
37851
 
37836
37852
  // memoize accessor functions
37837
- const accessors = {};
37838
- function pluck (data, name) {
37839
- const accessor = accessors[name] || (accessors[name] = field$1(name));
37853
+ const accessors$1 = {};
37854
+ function pluck$1 (data, name) {
37855
+ const accessor = accessors$1[name] || (accessors$1[name] = field$1(name));
37840
37856
  return isArray(data) ? data.map(accessor) : accessor(data);
37841
37857
  }
37842
37858
 
37843
- function array(seq) {
37859
+ function array$1(seq) {
37844
37860
  return isArray(seq) || ArrayBuffer.isView(seq) ? seq : null;
37845
37861
  }
37846
- function sequence(seq) {
37847
- return array(seq) || (isString(seq) ? seq : null);
37862
+ function sequence$1(seq) {
37863
+ return array$1(seq) || (isString(seq) ? seq : null);
37848
37864
  }
37849
- function join(seq) {
37865
+ function join$1(seq) {
37850
37866
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
37851
37867
  args[_key - 1] = arguments[_key];
37852
37868
  }
37853
- return array(seq).join(...args);
37869
+ return array$1(seq).join(...args);
37854
37870
  }
37855
- function indexof(seq) {
37871
+ function indexof$1(seq) {
37856
37872
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
37857
37873
  args[_key2 - 1] = arguments[_key2];
37858
37874
  }
37859
- return sequence(seq).indexOf(...args);
37875
+ return sequence$1(seq).indexOf(...args);
37860
37876
  }
37861
- function lastindexof(seq) {
37877
+ function lastindexof$1(seq) {
37862
37878
  for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
37863
37879
  args[_key3 - 1] = arguments[_key3];
37864
37880
  }
37865
- return sequence(seq).lastIndexOf(...args);
37881
+ return sequence$1(seq).lastIndexOf(...args);
37866
37882
  }
37867
- function slice$1(seq) {
37883
+ function slice$2(seq) {
37868
37884
  for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
37869
37885
  args[_key4 - 1] = arguments[_key4];
37870
37886
  }
37871
- return sequence(seq).slice(...args);
37887
+ return sequence$1(seq).slice(...args);
37872
37888
  }
37873
- function replace(str, pattern, repl) {
37889
+ function replace$1(str, pattern, repl) {
37874
37890
  if (isFunction(repl)) error$1('Function argument passed to replace.');
37875
37891
  return String(str).replace(pattern, repl);
37876
37892
  }
37877
- function reverse$1(seq) {
37878
- return array(seq).slice().reverse();
37893
+ function reverse$2(seq) {
37894
+ return array$1(seq).slice().reverse();
37879
37895
  }
37880
37896
 
37881
- function bandspace(count, paddingInner, paddingOuter) {
37897
+ function bandspace$1(count, paddingInner, paddingOuter) {
37882
37898
  return bandSpace(count || 0, paddingInner || 0, paddingOuter || 0);
37883
37899
  }
37884
- function bandwidth(name, group) {
37885
- const s = getScale(name, (group || this).context);
37900
+ function bandwidth$1(name, group) {
37901
+ const s = getScale$1(name, (group || this).context);
37886
37902
  return s && s.bandwidth ? s.bandwidth() : 0;
37887
37903
  }
37888
- function copy(name, group) {
37889
- const s = getScale(name, (group || this).context);
37904
+ function copy$1(name, group) {
37905
+ const s = getScale$1(name, (group || this).context);
37890
37906
  return s ? s.copy() : undefined;
37891
37907
  }
37892
- function domain$2(name, group) {
37893
- const s = getScale(name, (group || this).context);
37908
+ function domain$3(name, group) {
37909
+ const s = getScale$1(name, (group || this).context);
37894
37910
  return s ? s.domain() : [];
37895
37911
  }
37896
- function invert(name, range, group) {
37897
- const s = getScale(name, (group || this).context);
37912
+ function invert$1(name, range, group) {
37913
+ const s = getScale$1(name, (group || this).context);
37898
37914
  return !s ? undefined : isArray(range) ? (s.invertRange || s.invert)(range) : (s.invert || s.invertExtent)(range);
37899
37915
  }
37900
- function range$3(name, group) {
37901
- const s = getScale(name, (group || this).context);
37916
+ function range$4(name, group) {
37917
+ const s = getScale$1(name, (group || this).context);
37902
37918
  return s && s.range ? s.range() : [];
37903
37919
  }
37904
- function scale$2(name, value, group) {
37905
- const s = getScale(name, (group || this).context);
37920
+ function scale$3(name, value, group) {
37921
+ const s = getScale$1(name, (group || this).context);
37906
37922
  return s ? s(value) : undefined;
37907
37923
  }
37908
37924
 
37909
- function scaleGradient (scale, p0, p1, count, group) {
37910
- scale = getScale(scale, (group || this).context);
37925
+ function scaleGradient$1 (scale, p0, p1, count, group) {
37926
+ scale = getScale$1(scale, (group || this).context);
37911
37927
  const gradient = Gradient$1(p0, p1);
37912
37928
  let stops = scale.domain(),
37913
37929
  min = stops[0],
@@ -37915,7 +37931,7 @@ function scaleGradient (scale, p0, p1, count, group) {
37915
37931
  fraction = identity$7;
37916
37932
  if (!(max - min)) {
37917
37933
  // expand scale if domain has zero span, fix #1479
37918
- scale = (scale.interpolator ? scale$4('sequential')().interpolator(scale.interpolator()) : scale$4('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);
37934
+ scale = (scale.interpolator ? scale$5('sequential')().interpolator(scale.interpolator()) : scale$5('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);
37919
37935
  } else {
37920
37936
  fraction = scaleFraction(scale, min, max);
37921
37937
  }
@@ -37928,62 +37944,62 @@ function scaleGradient (scale, p0, p1, count, group) {
37928
37944
  return gradient;
37929
37945
  }
37930
37946
 
37931
- function geoShape(projection, geojson, group) {
37932
- const p = getScale(projection, (group || this).context);
37947
+ function geoShape$1(projection, geojson, group) {
37948
+ const p = getScale$1(projection, (group || this).context);
37933
37949
  return function (context) {
37934
37950
  return p ? p.path.context(context)(geojson) : '';
37935
37951
  };
37936
37952
  }
37937
- function pathShape(path) {
37953
+ function pathShape$1(path) {
37938
37954
  let p = null;
37939
37955
  return function (context) {
37940
37956
  return context ? pathRender(context, p = p || parse$3(path)) : path;
37941
37957
  };
37942
37958
  }
37943
37959
 
37944
- const datum = d => d.data;
37945
- function treeNodes(name, context) {
37946
- const tree = data$1.call(context, name);
37960
+ const datum$1 = d => d.data;
37961
+ function treeNodes$1(name, context) {
37962
+ const tree = data$2.call(context, name);
37947
37963
  return tree.root && tree.root.lookup || {};
37948
37964
  }
37949
- function treePath(name, source, target) {
37950
- const nodes = treeNodes(name, this),
37965
+ function treePath$1(name, source, target) {
37966
+ const nodes = treeNodes$1(name, this),
37951
37967
  s = nodes[source],
37952
37968
  t = nodes[target];
37953
- return s && t ? s.path(t).map(datum) : undefined;
37969
+ return s && t ? s.path(t).map(datum$1) : undefined;
37954
37970
  }
37955
- function treeAncestors(name, node) {
37956
- const n = treeNodes(name, this)[node];
37957
- return n ? n.ancestors().map(datum) : undefined;
37971
+ function treeAncestors$1(name, node) {
37972
+ const n = treeNodes$1(name, this)[node];
37973
+ return n ? n.ancestors().map(datum$1) : undefined;
37958
37974
  }
37959
37975
 
37960
- const _window = () => typeof window !== 'undefined' && window || null;
37961
- function screen() {
37962
- const w = _window();
37976
+ const _window$1 = () => typeof window !== 'undefined' && window || null;
37977
+ function screen$1() {
37978
+ const w = _window$1();
37963
37979
  return w ? w.screen : {};
37964
37980
  }
37965
- function windowSize() {
37966
- const w = _window();
37981
+ function windowSize$1() {
37982
+ const w = _window$1();
37967
37983
  return w ? [w.innerWidth, w.innerHeight] : [undefined, undefined];
37968
37984
  }
37969
- function containerSize() {
37985
+ function containerSize$1() {
37970
37986
  const view = this.context.dataflow,
37971
37987
  el = view.container && view.container();
37972
37988
  return el ? [el.clientWidth, el.clientHeight] : [undefined, undefined];
37973
37989
  }
37974
37990
 
37975
- function intersect (b, opt, group) {
37991
+ function intersect$1 (b, opt, group) {
37976
37992
  if (!b) return [];
37977
37993
  const [u, v] = b,
37978
37994
  box = new Bounds().set(u[0], u[1], v[0], v[1]),
37979
37995
  scene = group || this.context.dataflow.scenegraph().root;
37980
- return intersect$2(scene, box, filter(opt));
37996
+ return intersect$3(scene, box, filter$1(opt));
37981
37997
  }
37982
- function filter(opt) {
37998
+ function filter$1(opt) {
37983
37999
  let p = null;
37984
38000
  if (opt) {
37985
- const types = array$5(opt.marktype),
37986
- names = array$5(opt.markname);
38001
+ const types = array$6(opt.marktype),
38002
+ names = array$6(opt.markname);
37987
38003
  p = _ => (!types.length || types.some(t => _.marktype === t)) && (!names.length || names.some(s => _.name === s));
37988
38004
  }
37989
38005
  return p;
@@ -37998,9 +38014,9 @@ function filter(opt) {
37998
38014
  * @param {*} minDist the minimum distance, in pixels, that thenew point needs to be apart from the last point
37999
38015
  * @returns a new array containing the lasso with the new point
38000
38016
  */
38001
- function lassoAppend(lasso, x, y) {
38017
+ function lassoAppend$1(lasso, x, y) {
38002
38018
  let minDist = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 5;
38003
- lasso = array$5(lasso);
38019
+ lasso = array$6(lasso);
38004
38020
  const last = lasso[lasso.length - 1];
38005
38021
 
38006
38022
  // Add point to lasso if its the first point or distance to last point exceed minDist
@@ -38013,8 +38029,8 @@ function lassoAppend(lasso, x, y) {
38013
38029
  * @param {*} lasso the lasso in pixel space in the form [[x,y], [x,y], ...]
38014
38030
  * @returns the svg path command that draws the lasso
38015
38031
  */
38016
- function lassoPath(lasso) {
38017
- return array$5(lasso).reduce((svg, _ref, i) => {
38032
+ function lassoPath$1(lasso) {
38033
+ return array$6(lasso).reduce((svg, _ref, i) => {
38018
38034
  let [x, y] = _ref;
38019
38035
  return svg += i == 0 ? `M ${x},${y} ` : i === lasso.length - 1 ? ' Z' : `L ${x},${y} `;
38020
38036
  }, '');
@@ -38029,7 +38045,7 @@ function lassoPath(lasso) {
38029
38045
  *
38030
38046
  * @returns an array of vega scenegraph tuples
38031
38047
  */
38032
- function intersectLasso(markname, pixelLasso, unit) {
38048
+ function intersectLasso$1(markname, pixelLasso, unit) {
38033
38049
  const {
38034
38050
  x,
38035
38051
  y,
@@ -38047,10 +38063,10 @@ function intersectLasso(markname, pixelLasso, unit) {
38047
38063
 
38048
38064
  // Translate bb against unit coordinates
38049
38065
  bb.translate(x, y);
38050
- const intersection = intersect([[bb.x1, bb.y1], [bb.x2, bb.y2]], markname, mark);
38066
+ const intersection = intersect$1([[bb.x1, bb.y1], [bb.x2, bb.y2]], markname, mark);
38051
38067
 
38052
38068
  // Check every point against the lasso
38053
- return intersection.filter(tuple => pointInPolygon(tuple.x, tuple.y, pixelLasso));
38069
+ return intersection.filter(tuple => pointInPolygon$1(tuple.x, tuple.y, pixelLasso));
38054
38070
  }
38055
38071
 
38056
38072
  /**
@@ -38063,7 +38079,7 @@ function intersectLasso(markname, pixelLasso, unit) {
38063
38079
  * @param {*} polygon a polygon in the form [[x,y], [x,y], ...]
38064
38080
  * @returns true if the point lies inside the polygon, false otherwise
38065
38081
  */
38066
- function pointInPolygon(testx, testy, polygon) {
38082
+ function pointInPolygon$1(testx, testy, polygon) {
38067
38083
  let intersections = 0;
38068
38084
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
38069
38085
  const [prevX, prevY] = polygon[j];
@@ -38080,7 +38096,7 @@ function pointInPolygon(testx, testy, polygon) {
38080
38096
  }
38081
38097
 
38082
38098
  // Expression function context object
38083
- const functionContext = {
38099
+ const functionContext$1 = {
38084
38100
  random() {
38085
38101
  return random();
38086
38102
  },
@@ -38118,18 +38134,18 @@ const functionContext = {
38118
38134
  // suppress extra arguments
38119
38135
  toNumber,
38120
38136
  toString,
38121
- indexof,
38122
- join,
38123
- lastindexof,
38124
- replace,
38125
- reverse: reverse$1,
38126
- slice: slice$1,
38137
+ indexof: indexof$1,
38138
+ join: join$1,
38139
+ lastindexof: lastindexof$1,
38140
+ replace: replace$1,
38141
+ reverse: reverse$2,
38142
+ slice: slice$2,
38127
38143
  flush,
38128
38144
  lerp,
38129
- merge,
38145
+ merge: merge$1,
38130
38146
  pad: pad$3,
38131
38147
  peek: peek$1,
38132
- pluck,
38148
+ pluck: pluck$1,
38133
38149
  span,
38134
38150
  inrange,
38135
38151
  truncate: truncate$1,
@@ -38137,47 +38153,47 @@ const functionContext = {
38137
38153
  lab: lab$1,
38138
38154
  hcl: hcl$2,
38139
38155
  hsl: hsl$2,
38140
- luminance,
38141
- contrast,
38142
- sequence: range$5,
38143
- format,
38144
- utcFormat,
38145
- utcParse,
38156
+ luminance: luminance$1,
38157
+ contrast: contrast$1,
38158
+ sequence: range$6,
38159
+ format: format$1,
38160
+ utcFormat: utcFormat$1,
38161
+ utcParse: utcParse$1,
38146
38162
  utcOffset,
38147
38163
  utcSequence,
38148
- timeFormat: timeFormat$1,
38149
- timeParse,
38164
+ timeFormat: timeFormat$2,
38165
+ timeParse: timeParse$1,
38150
38166
  timeOffset,
38151
38167
  timeSequence,
38152
38168
  timeUnitSpecifier,
38153
- monthFormat,
38154
- monthAbbrevFormat,
38155
- dayFormat,
38156
- dayAbbrevFormat,
38169
+ monthFormat: monthFormat$1,
38170
+ monthAbbrevFormat: monthAbbrevFormat$1,
38171
+ dayFormat: dayFormat$1,
38172
+ dayAbbrevFormat: dayAbbrevFormat$1,
38157
38173
  quarter,
38158
38174
  utcquarter,
38159
38175
  week,
38160
38176
  utcweek,
38161
38177
  dayofyear,
38162
38178
  utcdayofyear,
38163
- warn: warn$1,
38164
- info,
38165
- debug: debug$1,
38179
+ warn: warn$2,
38180
+ info: info$1,
38181
+ debug: debug$2,
38166
38182
  extent(_) {
38167
38183
  return extent(_);
38168
38184
  },
38169
38185
  // suppress extra arguments
38170
- inScope,
38171
- intersect,
38186
+ inScope: inScope$1,
38187
+ intersect: intersect$1,
38172
38188
  clampRange,
38173
- pinchDistance,
38174
- pinchAngle,
38175
- screen,
38176
- containerSize,
38177
- windowSize,
38178
- bandspace,
38179
- setdata,
38180
- pathShape,
38189
+ pinchDistance: pinchDistance$1,
38190
+ pinchAngle: pinchAngle$1,
38191
+ screen: screen$1,
38192
+ containerSize: containerSize$1,
38193
+ windowSize: windowSize$1,
38194
+ bandspace: bandspace$1,
38195
+ setdata: setdata$1,
38196
+ pathShape: pathShape$1,
38181
38197
  panLinear,
38182
38198
  panLog,
38183
38199
  panPow,
@@ -38186,129 +38202,86 @@ const functionContext = {
38186
38202
  zoomLog,
38187
38203
  zoomPow,
38188
38204
  zoomSymlog,
38189
- encode,
38190
- modify,
38191
- lassoAppend,
38192
- lassoPath,
38193
- intersectLasso
38205
+ encode: encode$1,
38206
+ modify: modify$1,
38207
+ lassoAppend: lassoAppend$1,
38208
+ lassoPath: lassoPath$1,
38209
+ intersectLasso: intersectLasso$1
38194
38210
  };
38195
- const eventFunctions = ['view', 'item', 'group', 'xy', 'x', 'y'],
38211
+ const eventFunctions$1 = ['view', 'item', 'group', 'xy', 'x', 'y'],
38196
38212
  // event functions
38197
- eventPrefix = 'event.vega.',
38213
+ eventPrefix$1 = 'event.vega.',
38198
38214
  // event function prefix
38199
- thisPrefix = 'this.',
38215
+ thisPrefix$1 = 'this.',
38200
38216
  // function context prefix
38201
- astVisitors = {}; // AST visitors for dependency analysis
38217
+ astVisitors$1 = {}; // AST visitors for dependency analysis
38202
38218
 
38203
38219
  // export code generator parameters
38204
- const codegenParams = {
38220
+ const codegenParams$1 = {
38205
38221
  forbidden: ['_'],
38206
38222
  allowed: ['datum', 'event', 'item'],
38207
38223
  fieldvar: 'datum',
38208
- globalvar: id => `_[${$(SignalPrefix + id)}]`,
38209
- functions: buildFunctions,
38224
+ globalvar: id => `_[${$(SignalPrefix$1 + id)}]`,
38225
+ functions: buildFunctions$1,
38210
38226
  constants: Constants$1,
38211
- visitors: astVisitors
38227
+ visitors: astVisitors$1
38212
38228
  };
38213
38229
 
38214
38230
  // export code generator
38215
- const codeGenerator = codegen(codegenParams);
38231
+ const codeGenerator$1 = codegen(codegenParams$1);
38216
38232
 
38217
38233
  // Build expression function registry
38218
- function buildFunctions(codegen) {
38234
+ function buildFunctions$1(codegen) {
38219
38235
  const fn = Functions$1(codegen);
38220
- eventFunctions.forEach(name => fn[name] = eventPrefix + name);
38221
- for (const name in functionContext) {
38222
- fn[name] = thisPrefix + name;
38236
+ eventFunctions$1.forEach(name => fn[name] = eventPrefix$1 + name);
38237
+ for (const name in functionContext$1) {
38238
+ fn[name] = thisPrefix$1 + name;
38223
38239
  }
38224
- extend$1(fn, internalScaleFunctions(codegen, functionContext, astVisitors));
38240
+ extend$1(fn, internalScaleFunctions$1(codegen, functionContext$1, astVisitors$1));
38225
38241
  return fn;
38226
38242
  }
38227
38243
 
38228
38244
  // Register an expression function
38229
- function expressionFunction(name, fn, visitor) {
38245
+ function expressionFunction$1(name, fn, visitor) {
38230
38246
  if (arguments.length === 1) {
38231
- return functionContext[name];
38247
+ return functionContext$1[name];
38232
38248
  }
38233
38249
 
38234
38250
  // register with the functionContext
38235
- functionContext[name] = fn;
38251
+ functionContext$1[name] = fn;
38236
38252
 
38237
38253
  // if there is an astVisitor register that, too
38238
- if (visitor) astVisitors[name] = visitor;
38254
+ if (visitor) astVisitors$1[name] = visitor;
38239
38255
 
38240
38256
  // if the code generator has already been initialized,
38241
38257
  // we need to also register the function with it
38242
- if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;
38258
+ if (codeGenerator$1) codeGenerator$1.functions[name] = thisPrefix$1 + name;
38243
38259
  return this;
38244
38260
  }
38245
38261
 
38246
38262
  // register expression functions with ast visitors
38247
- expressionFunction('bandwidth', bandwidth, scaleVisitor);
38248
- expressionFunction('copy', copy, scaleVisitor);
38249
- expressionFunction('domain', domain$2, scaleVisitor);
38250
- expressionFunction('range', range$3, scaleVisitor);
38251
- expressionFunction('invert', invert, scaleVisitor);
38252
- expressionFunction('scale', scale$2, scaleVisitor);
38253
- expressionFunction('gradient', scaleGradient, scaleVisitor);
38254
- expressionFunction('geoArea', geoArea, scaleVisitor);
38255
- expressionFunction('geoBounds', geoBounds, scaleVisitor);
38256
- expressionFunction('geoCentroid', geoCentroid, scaleVisitor);
38257
- expressionFunction('geoShape', geoShape, scaleVisitor);
38258
- expressionFunction('geoScale', geoScale, scaleVisitor);
38259
- expressionFunction('indata', indata, indataVisitor);
38260
- expressionFunction('data', data$1, dataVisitor);
38261
- expressionFunction('treePath', treePath, dataVisitor);
38262
- expressionFunction('treeAncestors', treeAncestors, dataVisitor);
38263
+ expressionFunction$1('bandwidth', bandwidth$1, scaleVisitor$1);
38264
+ expressionFunction$1('copy', copy$1, scaleVisitor$1);
38265
+ expressionFunction$1('domain', domain$3, scaleVisitor$1);
38266
+ expressionFunction$1('range', range$4, scaleVisitor$1);
38267
+ expressionFunction$1('invert', invert$1, scaleVisitor$1);
38268
+ expressionFunction$1('scale', scale$3, scaleVisitor$1);
38269
+ expressionFunction$1('gradient', scaleGradient$1, scaleVisitor$1);
38270
+ expressionFunction$1('geoArea', geoArea$1, scaleVisitor$1);
38271
+ expressionFunction$1('geoBounds', geoBounds$1, scaleVisitor$1);
38272
+ expressionFunction$1('geoCentroid', geoCentroid$1, scaleVisitor$1);
38273
+ expressionFunction$1('geoShape', geoShape$1, scaleVisitor$1);
38274
+ expressionFunction$1('geoScale', geoScale$1, scaleVisitor$1);
38275
+ expressionFunction$1('indata', indata$1, indataVisitor$1);
38276
+ expressionFunction$1('data', data$2, dataVisitor$1);
38277
+ expressionFunction$1('treePath', treePath$1, dataVisitor$1);
38278
+ expressionFunction$1('treeAncestors', treeAncestors$1, dataVisitor$1);
38263
38279
 
38264
38280
  // register Vega-Lite selection functions
38265
- expressionFunction('vlSelectionTest', selectionTest, selectionVisitor);
38266
- expressionFunction('vlSelectionIdTest', selectionIdTest, selectionVisitor);
38267
- expressionFunction('vlSelectionResolve', selectionResolve, selectionVisitor);
38268
- expressionFunction('vlSelectionTuples', selectionTuples);
38269
-
38270
- function parser (expr, scope) {
38271
- const params = {};
38272
-
38273
- // parse the expression to an abstract syntax tree (ast)
38274
- let ast;
38275
- try {
38276
- expr = isString(expr) ? expr : $(expr) + '';
38277
- ast = parser$1(expr);
38278
- } catch (err) {
38279
- error$1('Expression parse error: ' + expr);
38280
- }
38281
-
38282
- // analyze ast function calls for dependencies
38283
- ast.visit(node => {
38284
- if (node.type !== CallExpression) return;
38285
- const name = node.callee.name,
38286
- visit = codegenParams.visitors[name];
38287
- if (visit) visit(name, node.arguments, scope, params);
38288
- });
38289
-
38290
- // perform code generation
38291
- const gen = codeGenerator(ast);
38292
-
38293
- // collect signal dependencies
38294
- gen.globals.forEach(name => {
38295
- const signalName = SignalPrefix + name;
38296
- if (!has$1(params, signalName) && scope.getSignal(name)) {
38297
- params[signalName] = scope.signalRef(name);
38298
- }
38299
- });
38300
-
38301
- // return generated expression code and dependencies
38302
- return {
38303
- $expr: extend$1({
38304
- code: gen.code
38305
- }, scope.options.ast ? {
38306
- ast
38307
- } : null),
38308
- $fields: gen.fields,
38309
- $params: params
38310
- };
38311
- }
38281
+ expressionFunction$1('vlSelectionTest', selectionTest, selectionVisitor);
38282
+ expressionFunction$1('vlSelectionIdTest', selectionIdTest, selectionVisitor);
38283
+ expressionFunction$1('vlSelectionResolve', selectionResolve, selectionVisitor);
38284
+ expressionFunction$1('vlSelectionTuples', selectionTuples);
38312
38285
 
38313
38286
  /**
38314
38287
  * Parse a serialized dataflow specification.
@@ -38597,7 +38570,7 @@ function getCompare(_, ctx) {
38597
38570
  // As of Vega 5.5.3, $tupleid sort is no longer used.
38598
38571
  // Keep here for now for backwards compatibility.
38599
38572
  const k = 'c:' + _.$compare + '_' + _.$order,
38600
- c = array$5(_.$compare).map(_ => _ && _.$tupleid ? tupleid : _);
38573
+ c = array$6(_.$compare).map(_ => _ && _.$tupleid ? tupleid : _);
38601
38574
  return ctx.fn[k] || (ctx.fn[k] = compare$2(c, _.$order, ctx.expr.codegen));
38602
38575
  }
38603
38576
 
@@ -38965,7 +38938,7 @@ function dataref(view, name) {
38965
38938
  }
38966
38939
  return data[name];
38967
38940
  }
38968
- function data(name, values) {
38941
+ function data$1(name, values) {
38969
38942
  return arguments.length < 2 ? dataref(this, name).values.value : change.call(this, name, changeset().remove(truthy).insert(values));
38970
38943
  }
38971
38944
  function change(name, changes) {
@@ -39118,7 +39091,7 @@ function initializeEventConfig(config) {
39118
39091
  function trackEventListener(view, sources, type, handler) {
39119
39092
  view._eventListeners.push({
39120
39093
  type: type,
39121
- sources: array$5(sources),
39094
+ sources: array$6(sources),
39122
39095
  handler: handler
39123
39096
  });
39124
39097
  }
@@ -39363,7 +39336,7 @@ function generate$1(bind, el, param, view) {
39363
39336
  input = radio;
39364
39337
  break;
39365
39338
  case 'range':
39366
- input = range$2;
39339
+ input = range$3;
39367
39340
  break;
39368
39341
  }
39369
39342
  input(bind, wrapper, param, value);
@@ -39469,7 +39442,7 @@ function radio(bind, el, param, value) {
39469
39442
  /**
39470
39443
  * Generates a slider input element.
39471
39444
  */
39472
- function range$2(bind, el, param, value) {
39445
+ function range$3(bind, el, param, value) {
39473
39446
  value = value !== undefined ? value : (+param.max + +param.min) / 2;
39474
39447
  const max = param.max != null ? param.max : Math.max(100, +value) || 100,
39475
39448
  min = param.min || Math.min(0, max, +value) || 0,
@@ -39666,10 +39639,10 @@ async function renderToSVG (scaleFactor) {
39666
39639
  }
39667
39640
 
39668
39641
  function runtime (view, spec, expr) {
39669
- return context(view, transforms, functionContext, expr).parse(spec);
39642
+ return context(view, transforms, functionContext$1, expr).parse(spec);
39670
39643
  }
39671
39644
 
39672
- function scale$1(name) {
39645
+ function scale$2(name) {
39673
39646
  var scales = this._runtime.scales;
39674
39647
  if (!has$1(scales, name)) {
39675
39648
  error$1('Unrecognized scale or projection: ' + name);
@@ -40167,12 +40140,12 @@ inherits(View$1, Dataflow, {
40167
40140
  finalize,
40168
40141
  hover,
40169
40142
  // -- DATA ----
40170
- data,
40143
+ data: data$1,
40171
40144
  change,
40172
40145
  insert,
40173
40146
  remove,
40174
40147
  // -- SCALES --
40175
- scale: scale$1,
40148
+ scale: scale$2,
40176
40149
  // -- INITIALIZATION ----
40177
40150
  initialize,
40178
40151
  // -- HEADLESS RENDERING ----
@@ -40186,6 +40159,783 @@ inherits(View$1, Dataflow, {
40186
40159
  _watchPixelRatio: watchPixelRatio
40187
40160
  });
40188
40161
 
40162
+ function data(name) {
40163
+ const data = this.context.data[name];
40164
+ return data ? data.values.value : [];
40165
+ }
40166
+ function indata(name, field, value) {
40167
+ const index = this.context.data[name]['index:' + field],
40168
+ entry = index ? index.value.get(value) : undefined;
40169
+ return entry ? entry.count : entry;
40170
+ }
40171
+ function setdata(name, tuples) {
40172
+ const df = this.context.dataflow,
40173
+ data = this.context.data[name],
40174
+ input = data.input;
40175
+ df.pulse(input, df.changeset().remove(truthy).insert(tuples));
40176
+ return 1;
40177
+ }
40178
+
40179
+ function encode (item, name, retval) {
40180
+ if (item) {
40181
+ const df = this.context.dataflow,
40182
+ target = item.mark.source;
40183
+ df.pulse(target, df.changeset().encode(item, name));
40184
+ }
40185
+ return retval !== undefined ? retval : item;
40186
+ }
40187
+
40188
+ const wrap = method => function (value, spec) {
40189
+ const locale = this.context.dataflow.locale();
40190
+ return value === null ? 'null' : locale[method](spec)(value);
40191
+ };
40192
+ const format = wrap('format');
40193
+ const timeFormat$1 = wrap('timeFormat');
40194
+ const utcFormat = wrap('utcFormat');
40195
+ const timeParse = wrap('timeParse');
40196
+ const utcParse = wrap('utcParse');
40197
+ const dateObj = new Date(2000, 0, 1);
40198
+ function time(month, day, specifier) {
40199
+ if (!Number.isInteger(month) || !Number.isInteger(day)) return '';
40200
+ dateObj.setYear(2000);
40201
+ dateObj.setMonth(month);
40202
+ dateObj.setDate(day);
40203
+ return timeFormat$1.call(this, dateObj, specifier);
40204
+ }
40205
+ function monthFormat(month) {
40206
+ return time.call(this, month, 1, '%B');
40207
+ }
40208
+ function monthAbbrevFormat(month) {
40209
+ return time.call(this, month, 1, '%b');
40210
+ }
40211
+ function dayFormat(day) {
40212
+ return time.call(this, 0, 2 + day, '%A');
40213
+ }
40214
+ function dayAbbrevFormat(day) {
40215
+ return time.call(this, 0, 2 + day, '%a');
40216
+ }
40217
+
40218
+ const DataPrefix = ':';
40219
+ const IndexPrefix = '@';
40220
+ const ScalePrefix = '%';
40221
+ const SignalPrefix = '$';
40222
+
40223
+ function dataVisitor(name, args, scope, params) {
40224
+ if (args[0].type !== Literal) {
40225
+ error$1('First argument to data functions must be a string literal.');
40226
+ }
40227
+ const data = args[0].value,
40228
+ dataName = DataPrefix + data;
40229
+ if (!has$1(dataName, params)) {
40230
+ try {
40231
+ params[dataName] = scope.getData(data).tuplesRef();
40232
+ } catch (err) {
40233
+ // if data set does not exist, there's nothing to track
40234
+ }
40235
+ }
40236
+ }
40237
+ function indataVisitor(name, args, scope, params) {
40238
+ if (args[0].type !== Literal) error$1('First argument to indata must be a string literal.');
40239
+ if (args[1].type !== Literal) error$1('Second argument to indata must be a string literal.');
40240
+ const data = args[0].value,
40241
+ field = args[1].value,
40242
+ indexName = IndexPrefix + field;
40243
+ if (!has$1(indexName, params)) {
40244
+ params[indexName] = scope.getData(data).indataRef(scope, field);
40245
+ }
40246
+ }
40247
+ function scaleVisitor(name, args, scope, params) {
40248
+ if (args[0].type === Literal) {
40249
+ // add scale dependency
40250
+ addScaleDependency(scope, params, args[0].value);
40251
+ } else {
40252
+ // indirect scale lookup; add all scales as parameters
40253
+ for (name in scope.scales) {
40254
+ addScaleDependency(scope, params, name);
40255
+ }
40256
+ }
40257
+ }
40258
+ function addScaleDependency(scope, params, name) {
40259
+ const scaleName = ScalePrefix + name;
40260
+ if (!has$1(params, scaleName)) {
40261
+ try {
40262
+ params[scaleName] = scope.scaleRef(name);
40263
+ } catch (err) {
40264
+ // TODO: error handling? warning?
40265
+ }
40266
+ }
40267
+ }
40268
+
40269
+ /**
40270
+ * Name must be a string. Return undefined if the scale is not registered.
40271
+ */
40272
+ function getScale(name, ctx) {
40273
+ if (isString(name)) {
40274
+ const maybeScale = ctx.scales[name];
40275
+ return maybeScale && isRegisteredScale(maybeScale.value) ? maybeScale.value : undefined;
40276
+ }
40277
+ return undefined;
40278
+ }
40279
+ function internalScaleFunctions(codegen, fnctx, visitors) {
40280
+ // add helper method to the 'this' expression function context
40281
+ fnctx.__bandwidth = s => s && s.bandwidth ? s.bandwidth() : 0;
40282
+
40283
+ // register AST visitors for internal scale functions
40284
+ visitors._bandwidth = scaleVisitor;
40285
+ visitors._range = scaleVisitor;
40286
+ visitors._scale = scaleVisitor;
40287
+
40288
+ // resolve scale reference directly to the signal hash argument
40289
+ const ref = arg => '_[' + (arg.type === Literal ? $(ScalePrefix + arg.value) : $(ScalePrefix) + '+' + codegen(arg)) + ']';
40290
+
40291
+ // define and return internal scale function code generators
40292
+ // these internal functions are called by mark encoders
40293
+ return {
40294
+ _bandwidth: args => `this.__bandwidth(${ref(args[0])})`,
40295
+ _range: args => `${ref(args[0])}.range()`,
40296
+ _scale: args => `${ref(args[0])}(${codegen(args[1])})`
40297
+ };
40298
+ }
40299
+
40300
+ function geoMethod(methodName, globalMethod) {
40301
+ return function (projection, geojson, group) {
40302
+ if (projection) {
40303
+ // projection defined, use it
40304
+ const p = getScale(projection, (group || this).context);
40305
+ return p && p.path[methodName](geojson);
40306
+ } else {
40307
+ // projection undefined, use global method
40308
+ return globalMethod(geojson);
40309
+ }
40310
+ };
40311
+ }
40312
+ const geoArea = geoMethod('area', geoArea$1$1);
40313
+ const geoBounds = geoMethod('bounds', geoBounds$1$1);
40314
+ const geoCentroid = geoMethod('centroid', geoCentroid$1$1);
40315
+ function geoScale(projection, group) {
40316
+ const p = getScale(projection, (group || this).context);
40317
+ return p && p.scale();
40318
+ }
40319
+
40320
+ function inScope (item) {
40321
+ const group = this.context.group;
40322
+ let value = false;
40323
+ if (group) while (item) {
40324
+ if (item === group) {
40325
+ value = true;
40326
+ break;
40327
+ }
40328
+ item = item.mark.group;
40329
+ }
40330
+ return value;
40331
+ }
40332
+
40333
+ function log(df, method, args) {
40334
+ try {
40335
+ df[method].apply(df, ['EXPRESSION'].concat([].slice.call(args)));
40336
+ } catch (err) {
40337
+ df.warn(err);
40338
+ }
40339
+ return args[args.length - 1];
40340
+ }
40341
+ function warn$1() {
40342
+ return log(this.context.dataflow, 'warn', arguments);
40343
+ }
40344
+ function info() {
40345
+ return log(this.context.dataflow, 'info', arguments);
40346
+ }
40347
+ function debug$1() {
40348
+ return log(this.context.dataflow, 'debug', arguments);
40349
+ }
40350
+
40351
+ // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
40352
+ function channel_luminance_value(channelValue) {
40353
+ const val = channelValue / 255;
40354
+ if (val <= 0.03928) {
40355
+ return val / 12.92;
40356
+ }
40357
+ return Math.pow((val + 0.055) / 1.055, 2.4);
40358
+ }
40359
+ function luminance(color) {
40360
+ const c = rgb$1(color),
40361
+ r = channel_luminance_value(c.r),
40362
+ g = channel_luminance_value(c.g),
40363
+ b = channel_luminance_value(c.b);
40364
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
40365
+ }
40366
+
40367
+ // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
40368
+ function contrast(color1, color2) {
40369
+ const lum1 = luminance(color1),
40370
+ lum2 = luminance(color2),
40371
+ lumL = Math.max(lum1, lum2),
40372
+ lumD = Math.min(lum1, lum2);
40373
+ return (lumL + 0.05) / (lumD + 0.05);
40374
+ }
40375
+
40376
+ function merge () {
40377
+ const args = [].slice.call(arguments);
40378
+ args.unshift({});
40379
+ return extend$1(...args);
40380
+ }
40381
+
40382
+ function equal(a, b) {
40383
+ return a === b || a !== a && b !== b ? true : isArray(a) ? isArray(b) && a.length === b.length ? equalArray(a, b) : false : isObject(a) && isObject(b) ? equalObject(a, b) : false;
40384
+ }
40385
+ function equalArray(a, b) {
40386
+ for (let i = 0, n = a.length; i < n; ++i) {
40387
+ if (!equal(a[i], b[i])) return false;
40388
+ }
40389
+ return true;
40390
+ }
40391
+ function equalObject(a, b) {
40392
+ for (const key in a) {
40393
+ if (!equal(a[key], b[key])) return false;
40394
+ }
40395
+ return true;
40396
+ }
40397
+ function removePredicate(props) {
40398
+ return _ => equalObject(props, _);
40399
+ }
40400
+ function modify (name, insert, remove, toggle, modify, values) {
40401
+ const df = this.context.dataflow,
40402
+ data = this.context.data[name],
40403
+ input = data.input,
40404
+ stamp = df.stamp();
40405
+ let changes = data.changes,
40406
+ predicate,
40407
+ key;
40408
+ if (df._trigger === false || !(input.value.length || insert || toggle)) {
40409
+ // nothing to do!
40410
+ return 0;
40411
+ }
40412
+ if (!changes || changes.stamp < stamp) {
40413
+ data.changes = changes = df.changeset();
40414
+ changes.stamp = stamp;
40415
+ df.runAfter(() => {
40416
+ data.modified = true;
40417
+ df.pulse(input, changes).run();
40418
+ }, true, 1);
40419
+ }
40420
+ if (remove) {
40421
+ predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate(remove);
40422
+ changes.remove(predicate);
40423
+ }
40424
+ if (insert) {
40425
+ changes.insert(insert);
40426
+ }
40427
+ if (toggle) {
40428
+ predicate = removePredicate(toggle);
40429
+ if (input.value.some(predicate)) {
40430
+ changes.remove(predicate);
40431
+ } else {
40432
+ changes.insert(toggle);
40433
+ }
40434
+ }
40435
+ if (modify) {
40436
+ for (key in values) {
40437
+ changes.modify(modify, key, values[key]);
40438
+ }
40439
+ }
40440
+ return 1;
40441
+ }
40442
+
40443
+ function pinchDistance(event) {
40444
+ const t = event.touches,
40445
+ dx = t[0].clientX - t[1].clientX,
40446
+ dy = t[0].clientY - t[1].clientY;
40447
+ return Math.hypot(dx, dy);
40448
+ }
40449
+ function pinchAngle(event) {
40450
+ const t = event.touches;
40451
+ return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);
40452
+ }
40453
+
40454
+ // memoize accessor functions
40455
+ const accessors = {};
40456
+ function pluck (data, name) {
40457
+ const accessor = accessors[name] || (accessors[name] = field$1(name));
40458
+ return isArray(data) ? data.map(accessor) : accessor(data);
40459
+ }
40460
+
40461
+ function array(seq) {
40462
+ return isArray(seq) || ArrayBuffer.isView(seq) ? seq : null;
40463
+ }
40464
+ function sequence(seq) {
40465
+ return array(seq) || (isString(seq) ? seq : null);
40466
+ }
40467
+ function join(seq) {
40468
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
40469
+ args[_key - 1] = arguments[_key];
40470
+ }
40471
+ return array(seq).join(...args);
40472
+ }
40473
+ function indexof(seq) {
40474
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
40475
+ args[_key2 - 1] = arguments[_key2];
40476
+ }
40477
+ return sequence(seq).indexOf(...args);
40478
+ }
40479
+ function lastindexof(seq) {
40480
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
40481
+ args[_key3 - 1] = arguments[_key3];
40482
+ }
40483
+ return sequence(seq).lastIndexOf(...args);
40484
+ }
40485
+ function slice$1(seq) {
40486
+ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
40487
+ args[_key4 - 1] = arguments[_key4];
40488
+ }
40489
+ return sequence(seq).slice(...args);
40490
+ }
40491
+ function replace(str, pattern, repl) {
40492
+ if (isFunction(repl)) error$1('Function argument passed to replace.');
40493
+ return String(str).replace(pattern, repl);
40494
+ }
40495
+ function reverse$1(seq) {
40496
+ return array(seq).slice().reverse();
40497
+ }
40498
+ function sort(seq) {
40499
+ return array(seq).slice().sort(ascending$2);
40500
+ }
40501
+
40502
+ function bandspace(count, paddingInner, paddingOuter) {
40503
+ return bandSpace(count || 0, paddingInner || 0, paddingOuter || 0);
40504
+ }
40505
+ function bandwidth(name, group) {
40506
+ const s = getScale(name, (group || this).context);
40507
+ return s && s.bandwidth ? s.bandwidth() : 0;
40508
+ }
40509
+ function copy(name, group) {
40510
+ const s = getScale(name, (group || this).context);
40511
+ return s ? s.copy() : undefined;
40512
+ }
40513
+ function domain$2(name, group) {
40514
+ const s = getScale(name, (group || this).context);
40515
+ return s ? s.domain() : [];
40516
+ }
40517
+ function invert(name, range, group) {
40518
+ const s = getScale(name, (group || this).context);
40519
+ return !s ? undefined : isArray(range) ? (s.invertRange || s.invert)(range) : (s.invert || s.invertExtent)(range);
40520
+ }
40521
+ function range$2(name, group) {
40522
+ const s = getScale(name, (group || this).context);
40523
+ return s && s.range ? s.range() : [];
40524
+ }
40525
+ function scale$1(name, value, group) {
40526
+ const s = getScale(name, (group || this).context);
40527
+ return s ? s(value) : undefined;
40528
+ }
40529
+
40530
+ /**
40531
+ * Passing a function is only used for for testing.
40532
+ * Outside of tests, the first argument should be a string.
40533
+ */
40534
+ function scaleGradient (scaleOrFunction, p0, p1, count, group) {
40535
+ let scale = typeof scaleOrFunction === 'string' ? getScale(scaleOrFunction, (group || this).context) : scaleOrFunction;
40536
+ const gradient = Gradient$1(p0, p1);
40537
+ let stops = scale.domain(),
40538
+ min = stops[0],
40539
+ max = peek$1(stops),
40540
+ fraction = identity$7;
40541
+ if (!(max - min)) {
40542
+ // expand scale if domain has zero span, fix #1479
40543
+ scale = (scale.interpolator ? scale$5('sequential')().interpolator(scale.interpolator()) : scale$5('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);
40544
+ } else {
40545
+ fraction = scaleFraction(scale, min, max);
40546
+ }
40547
+ if (scale.ticks) {
40548
+ stops = scale.ticks(+count || 15);
40549
+ if (min !== stops[0]) stops.unshift(min);
40550
+ if (max !== peek$1(stops)) stops.push(max);
40551
+ }
40552
+ stops.forEach(_ => gradient.stop(fraction(_), scale(_)));
40553
+ return gradient;
40554
+ }
40555
+
40556
+ function geoShape(projection, geojson, group) {
40557
+ const p = getScale(projection, (group || this).context);
40558
+ return function (context) {
40559
+ return p ? p.path.context(context)(geojson) : '';
40560
+ };
40561
+ }
40562
+ function pathShape(path) {
40563
+ let p = null;
40564
+ return function (context) {
40565
+ return context ? pathRender(context, p = p || parse$3(path)) : path;
40566
+ };
40567
+ }
40568
+
40569
+ const datum = d => d.data;
40570
+ function treeNodes(name, context) {
40571
+ const tree = data.call(context, name);
40572
+ return tree.root && tree.root.lookup || {};
40573
+ }
40574
+ function treePath(name, source, target) {
40575
+ const nodes = treeNodes(name, this),
40576
+ s = nodes[source],
40577
+ t = nodes[target];
40578
+ return s && t ? s.path(t).map(datum) : undefined;
40579
+ }
40580
+ function treeAncestors(name, node) {
40581
+ const n = treeNodes(name, this)[node];
40582
+ return n ? n.ancestors().map(datum) : undefined;
40583
+ }
40584
+
40585
+ const _window = () => typeof window !== 'undefined' && window || null;
40586
+ function screen() {
40587
+ const w = _window();
40588
+ return w ? w.screen : {};
40589
+ }
40590
+ function windowSize() {
40591
+ const w = _window();
40592
+ return w ? [w.innerWidth, w.innerHeight] : [undefined, undefined];
40593
+ }
40594
+ function containerSize() {
40595
+ const view = this.context.dataflow,
40596
+ el = view.container && view.container();
40597
+ return el ? [el.clientWidth, el.clientHeight] : [undefined, undefined];
40598
+ }
40599
+
40600
+ function intersect (b, opt, group) {
40601
+ if (!b) return [];
40602
+ const [u, v] = b,
40603
+ box = new Bounds().set(u[0], u[1], v[0], v[1]),
40604
+ scene = group || this.context.dataflow.scenegraph().root;
40605
+ return intersect$3(scene, box, filter(opt));
40606
+ }
40607
+ function filter(opt) {
40608
+ let p = null;
40609
+ if (opt) {
40610
+ const types = array$6(opt.marktype),
40611
+ names = array$6(opt.markname);
40612
+ p = _ => (!types.length || types.some(t => _.marktype === t)) && (!names.length || names.some(s => _.name === s));
40613
+ }
40614
+ return p;
40615
+ }
40616
+
40617
+ /**
40618
+ * Appends a new point to the lasso
40619
+ *
40620
+ * @param {*} lasso the lasso in pixel space
40621
+ * @param {*} x the x coordinate in pixel space
40622
+ * @param {*} y the y coordinate in pixel space
40623
+ * @param {*} minDist the minimum distance, in pixels, that thenew point needs to be apart from the last point
40624
+ * @returns a new array containing the lasso with the new point
40625
+ */
40626
+ function lassoAppend(lasso, x, y) {
40627
+ let minDist = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 5;
40628
+ lasso = array$6(lasso);
40629
+ const last = lasso[lasso.length - 1];
40630
+
40631
+ // Add point to lasso if its the first point or distance to last point exceed minDist
40632
+ return last === undefined || Math.hypot(last[0] - x, last[1] - y) > minDist ? [...lasso, [x, y]] : lasso;
40633
+ }
40634
+
40635
+ /**
40636
+ * Generates a svg path command which draws a lasso
40637
+ *
40638
+ * @param {*} lasso the lasso in pixel space in the form [[x,y], [x,y], ...]
40639
+ * @returns the svg path command that draws the lasso
40640
+ */
40641
+ function lassoPath(lasso) {
40642
+ return array$6(lasso).reduce((svg, _ref, i) => {
40643
+ let [x, y] = _ref;
40644
+ return svg += i == 0 ? `M ${x},${y} ` : i === lasso.length - 1 ? ' Z' : `L ${x},${y} `;
40645
+ }, '');
40646
+ }
40647
+
40648
+ /**
40649
+ * Inverts the lasso from pixel space to an array of vega scenegraph tuples
40650
+ *
40651
+ * @param {*} data the dataset
40652
+ * @param {*} pixelLasso the lasso in pixel space, [[x,y], [x,y], ...]
40653
+ * @param {*} unit the unit where the lasso is defined
40654
+ *
40655
+ * @returns an array of vega scenegraph tuples
40656
+ */
40657
+ function intersectLasso(markname, pixelLasso, unit) {
40658
+ const {
40659
+ x,
40660
+ y,
40661
+ mark
40662
+ } = unit;
40663
+ const bb = new Bounds().set(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER);
40664
+
40665
+ // Get bounding box around lasso
40666
+ for (const [px, py] of pixelLasso) {
40667
+ if (px < bb.x1) bb.x1 = px;
40668
+ if (px > bb.x2) bb.x2 = px;
40669
+ if (py < bb.y1) bb.y1 = py;
40670
+ if (py > bb.y2) bb.y2 = py;
40671
+ }
40672
+
40673
+ // Translate bb against unit coordinates
40674
+ bb.translate(x, y);
40675
+ const intersection = intersect([[bb.x1, bb.y1], [bb.x2, bb.y2]], markname, mark);
40676
+
40677
+ // Check every point against the lasso
40678
+ return intersection.filter(tuple => pointInPolygon(tuple.x, tuple.y, pixelLasso));
40679
+ }
40680
+
40681
+ /**
40682
+ * Performs a test if a point is inside a polygon based on the idea from
40683
+ * https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
40684
+ *
40685
+ * This method will not need the same start/end point since it wraps around the edges of the array
40686
+ *
40687
+ * @param {*} test a point to test against
40688
+ * @param {*} polygon a polygon in the form [[x,y], [x,y], ...]
40689
+ * @returns true if the point lies inside the polygon, false otherwise
40690
+ */
40691
+ function pointInPolygon(testx, testy, polygon) {
40692
+ let intersections = 0;
40693
+ for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
40694
+ const [prevX, prevY] = polygon[j];
40695
+ const [x, y] = polygon[i];
40696
+
40697
+ // count intersections
40698
+ if (y > testy != prevY > testy && testx < (prevX - x) * (testy - y) / (prevY - y) + x) {
40699
+ intersections++;
40700
+ }
40701
+ }
40702
+
40703
+ // point is in polygon if intersection count is odd
40704
+ return intersections & 1;
40705
+ }
40706
+
40707
+ // Expression function context object
40708
+ const functionContext = {
40709
+ random() {
40710
+ return random();
40711
+ },
40712
+ // override default
40713
+ cumulativeNormal,
40714
+ cumulativeLogNormal,
40715
+ cumulativeUniform,
40716
+ densityNormal,
40717
+ densityLogNormal,
40718
+ densityUniform,
40719
+ quantileNormal,
40720
+ quantileLogNormal,
40721
+ quantileUniform,
40722
+ sampleNormal,
40723
+ sampleLogNormal,
40724
+ sampleUniform,
40725
+ isArray,
40726
+ isBoolean: isBoolean$2,
40727
+ isDate: isDate$1,
40728
+ isDefined(_) {
40729
+ return _ !== undefined;
40730
+ },
40731
+ isNumber: isNumber$1,
40732
+ isObject,
40733
+ isRegExp,
40734
+ isString,
40735
+ isTuple,
40736
+ isValid(_) {
40737
+ return _ != null && _ === _;
40738
+ },
40739
+ toBoolean,
40740
+ toDate(_) {
40741
+ return toDate(_);
40742
+ },
40743
+ // suppress extra arguments
40744
+ toNumber,
40745
+ toString,
40746
+ indexof,
40747
+ join,
40748
+ lastindexof,
40749
+ replace,
40750
+ reverse: reverse$1,
40751
+ sort,
40752
+ slice: slice$1,
40753
+ flush,
40754
+ lerp,
40755
+ merge,
40756
+ pad: pad$3,
40757
+ peek: peek$1,
40758
+ pluck,
40759
+ span,
40760
+ inrange,
40761
+ truncate: truncate$1,
40762
+ rgb: rgb$1,
40763
+ lab: lab$1,
40764
+ hcl: hcl$2,
40765
+ hsl: hsl$2,
40766
+ luminance,
40767
+ contrast,
40768
+ sequence: range$6,
40769
+ format,
40770
+ utcFormat,
40771
+ utcParse,
40772
+ utcOffset,
40773
+ utcSequence,
40774
+ timeFormat: timeFormat$1,
40775
+ timeParse,
40776
+ timeOffset,
40777
+ timeSequence,
40778
+ timeUnitSpecifier,
40779
+ monthFormat,
40780
+ monthAbbrevFormat,
40781
+ dayFormat,
40782
+ dayAbbrevFormat,
40783
+ quarter,
40784
+ utcquarter,
40785
+ week,
40786
+ utcweek,
40787
+ dayofyear,
40788
+ utcdayofyear,
40789
+ warn: warn$1,
40790
+ info,
40791
+ debug: debug$1,
40792
+ extent(_) {
40793
+ return extent(_);
40794
+ },
40795
+ // suppress extra arguments
40796
+ inScope,
40797
+ intersect,
40798
+ clampRange,
40799
+ pinchDistance,
40800
+ pinchAngle,
40801
+ screen,
40802
+ containerSize,
40803
+ windowSize,
40804
+ bandspace,
40805
+ setdata,
40806
+ pathShape,
40807
+ panLinear,
40808
+ panLog,
40809
+ panPow,
40810
+ panSymlog,
40811
+ zoomLinear,
40812
+ zoomLog,
40813
+ zoomPow,
40814
+ zoomSymlog,
40815
+ encode,
40816
+ modify,
40817
+ lassoAppend,
40818
+ lassoPath,
40819
+ intersectLasso
40820
+ };
40821
+ const eventFunctions = ['view', 'item', 'group', 'xy', 'x', 'y'],
40822
+ // event functions
40823
+ eventPrefix = 'event.vega.',
40824
+ // event function prefix
40825
+ thisPrefix = 'this.',
40826
+ // function context prefix
40827
+ astVisitors = {}; // AST visitors for dependency analysis
40828
+
40829
+ // export code generator parameters
40830
+ const codegenParams = {
40831
+ forbidden: ['_'],
40832
+ allowed: ['datum', 'event', 'item'],
40833
+ fieldvar: 'datum',
40834
+ globalvar: id => `_[${$(SignalPrefix + id)}]`,
40835
+ functions: buildFunctions,
40836
+ constants: Constants$1,
40837
+ visitors: astVisitors
40838
+ };
40839
+
40840
+ // export code generator
40841
+ const codeGenerator = codegen(codegenParams);
40842
+
40843
+ // Build expression function registry
40844
+ function buildFunctions(codegen) {
40845
+ const fn = Functions$1(codegen);
40846
+ eventFunctions.forEach(name => fn[name] = eventPrefix + name);
40847
+ for (const name in functionContext) {
40848
+ fn[name] = thisPrefix + name;
40849
+ }
40850
+ extend$1(fn, internalScaleFunctions(codegen, functionContext, astVisitors));
40851
+ return fn;
40852
+ }
40853
+
40854
+ // Register an expression function
40855
+ function expressionFunction(name, fn, visitor) {
40856
+ if (arguments.length === 1) {
40857
+ return functionContext[name];
40858
+ }
40859
+
40860
+ // register with the functionContext
40861
+ functionContext[name] = fn;
40862
+
40863
+ // if there is an astVisitor register that, too
40864
+ if (visitor) astVisitors[name] = visitor;
40865
+
40866
+ // if the code generator has already been initialized,
40867
+ // we need to also register the function with it
40868
+ if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;
40869
+ return this;
40870
+ }
40871
+
40872
+ // register expression functions with ast visitors
40873
+ expressionFunction('bandwidth', bandwidth, scaleVisitor);
40874
+ expressionFunction('copy', copy, scaleVisitor);
40875
+ expressionFunction('domain', domain$2, scaleVisitor);
40876
+ expressionFunction('range', range$2, scaleVisitor);
40877
+ expressionFunction('invert', invert, scaleVisitor);
40878
+ expressionFunction('scale', scale$1, scaleVisitor);
40879
+ expressionFunction('gradient', scaleGradient, scaleVisitor);
40880
+ expressionFunction('geoArea', geoArea, scaleVisitor);
40881
+ expressionFunction('geoBounds', geoBounds, scaleVisitor);
40882
+ expressionFunction('geoCentroid', geoCentroid, scaleVisitor);
40883
+ expressionFunction('geoShape', geoShape, scaleVisitor);
40884
+ expressionFunction('geoScale', geoScale, scaleVisitor);
40885
+ expressionFunction('indata', indata, indataVisitor);
40886
+ expressionFunction('data', data, dataVisitor);
40887
+ expressionFunction('treePath', treePath, dataVisitor);
40888
+ expressionFunction('treeAncestors', treeAncestors, dataVisitor);
40889
+
40890
+ // register Vega-Lite selection functions
40891
+ expressionFunction('vlSelectionTest', selectionTest, selectionVisitor);
40892
+ expressionFunction('vlSelectionIdTest', selectionIdTest, selectionVisitor);
40893
+ expressionFunction('vlSelectionResolve', selectionResolve, selectionVisitor);
40894
+ expressionFunction('vlSelectionTuples', selectionTuples);
40895
+
40896
+ function parser (expr, scope) {
40897
+ const params = {};
40898
+
40899
+ // parse the expression to an abstract syntax tree (ast)
40900
+ let ast;
40901
+ try {
40902
+ expr = isString(expr) ? expr : $(expr) + '';
40903
+ ast = parser$1(expr);
40904
+ } catch (err) {
40905
+ error$1('Expression parse error: ' + expr);
40906
+ }
40907
+
40908
+ // analyze ast function calls for dependencies
40909
+ ast.visit(node => {
40910
+ if (node.type !== CallExpression) return;
40911
+ const name = node.callee.name,
40912
+ visit = codegenParams.visitors[name];
40913
+ if (visit) visit(name, node.arguments, scope, params);
40914
+ });
40915
+
40916
+ // perform code generation
40917
+ const gen = codeGenerator(ast);
40918
+
40919
+ // collect signal dependencies
40920
+ gen.globals.forEach(name => {
40921
+ const signalName = SignalPrefix + name;
40922
+ if (!has$1(params, signalName) && scope.getSignal(name)) {
40923
+ params[signalName] = scope.signalRef(name);
40924
+ }
40925
+ });
40926
+
40927
+ // return generated expression code and dependencies
40928
+ return {
40929
+ $expr: extend$1({
40930
+ code: gen.code
40931
+ }, scope.options.ast ? {
40932
+ ast
40933
+ } : null),
40934
+ $fields: gen.fields,
40935
+ $params: params
40936
+ };
40937
+ }
40938
+
40189
40939
  const VIEW = 'view',
40190
40940
  LBRACK = '[',
40191
40941
  RBRACK = ']',
@@ -40481,7 +41231,7 @@ function applyDefaults (encode, type, role, style, config) {
40481
41231
  }
40482
41232
 
40483
41233
  // resolve styles, apply with increasing precedence
40484
- array$5(style).forEach(name => {
41234
+ array$6(style).forEach(name => {
40485
41235
  const props = config.style && config.style[name];
40486
41236
  for (const key in props) {
40487
41237
  if (!has(key, encode)) {
@@ -40863,7 +41613,7 @@ function parseUpdate (spec, scope, target) {
40863
41613
  }
40864
41614
 
40865
41615
  // separate event streams from signal updates
40866
- events = array$5(events).filter(s => s.signal || s.scale ? (sources.push(s), 0) : 1);
41616
+ events = array$6(events).filter(s => s.signal || s.scale ? (sources.push(s), 0) : 1);
40867
41617
 
40868
41618
  // merge internal operator listeners
40869
41619
  if (sources.length > 1) {
@@ -41238,6 +41988,8 @@ const GuideLabelStyle = 'guide-label';
41238
41988
  const GuideTitleStyle = 'guide-title';
41239
41989
  const GroupTitleStyle = 'group-title';
41240
41990
  const GroupSubtitleStyle = 'group-subtitle';
41991
+
41992
+ /** All values of LegendType */
41241
41993
  const Symbols = 'symbol';
41242
41994
  const Gradient = 'gradient';
41243
41995
  const Discrete = 'discrete';
@@ -41985,7 +42737,7 @@ function parseData$1 (from, group, scope) {
41985
42737
  if (!from.data) {
41986
42738
  op = parseTransform(extend$1({
41987
42739
  type: 'aggregate',
41988
- groupby: array$5(facet.groupby)
42740
+ groupby: array$6(facet.groupby)
41989
42741
  }, facet.aggregate), scope);
41990
42742
  op.params.key = scope.keyRef(facet.groupby);
41991
42743
  op.params.pulse = getDataRef(facet, scope);
@@ -42755,7 +43507,7 @@ function analyze(data, scope, ops) {
42755
43507
  }
42756
43508
  } else if (data.source) {
42757
43509
  // derives from one or more other data sets
42758
- source = upstream = array$5(data.source).map(d => ref(scope.getData(d).output));
43510
+ source = upstream = array$6(data.source).map(d => ref(scope.getData(d).output));
42759
43511
  output.push(null); // populate later
42760
43512
  }
42761
43513
 
@@ -43390,20 +44142,20 @@ function buildAxisEncode(_, spec) {
43390
44142
  }
43391
44143
 
43392
44144
  function parseScope (spec, scope, preprocessed) {
43393
- const signals = array$5(spec.signals),
43394
- scales = array$5(spec.scales);
44145
+ const signals = array$6(spec.signals),
44146
+ scales = array$6(spec.scales);
43395
44147
 
43396
44148
  // parse signal definitions, if not already preprocessed
43397
44149
  if (!preprocessed) signals.forEach(_ => parseSignal(_, scope));
43398
44150
 
43399
44151
  // parse cartographic projection definitions
43400
- array$5(spec.projections).forEach(_ => parseProjection$1(_, scope));
44152
+ array$6(spec.projections).forEach(_ => parseProjection$1(_, scope));
43401
44153
 
43402
44154
  // initialize scale references
43403
44155
  scales.forEach(_ => initScale(_, scope));
43404
44156
 
43405
44157
  // parse data sources
43406
- array$5(spec.data).forEach(_ => parseData$2(_, scope));
44158
+ array$6(spec.data).forEach(_ => parseData$2(_, scope));
43407
44159
 
43408
44160
  // parse scale definitions
43409
44161
  scales.forEach(_ => parseScale(_, scope));
@@ -43412,13 +44164,13 @@ function parseScope (spec, scope, preprocessed) {
43412
44164
  (preprocessed || signals).forEach(_ => parseSignalUpdates(_, scope));
43413
44165
 
43414
44166
  // parse axis definitions
43415
- array$5(spec.axes).forEach(_ => parseAxis$1(_, scope));
44167
+ array$6(spec.axes).forEach(_ => parseAxis$1(_, scope));
43416
44168
 
43417
44169
  // parse mark definitions
43418
- array$5(spec.marks).forEach(_ => parseMark(_, scope));
44170
+ array$6(spec.marks).forEach(_ => parseMark(_, scope));
43419
44171
 
43420
44172
  // parse legend definitions
43421
- array$5(spec.legends).forEach(_ => parseLegend$1(_, scope));
44173
+ array$6(spec.legends).forEach(_ => parseLegend$1(_, scope));
43422
44174
 
43423
44175
  // parse title, if defined
43424
44176
  if (spec.title) parseTitle(spec.title, scope);
@@ -43532,7 +44284,7 @@ function collectSignals(spec, config) {
43532
44284
  map = {};
43533
44285
 
43534
44286
  // add spec signal array
43535
- array$5(spec.signals).forEach(s => {
44287
+ array$6(spec.signals).forEach(s => {
43536
44288
  if (has$1(pre, s.name)) {
43537
44289
  // merge if built-in signal
43538
44290
  s = extend$1(pre[s.name], s);
@@ -43544,7 +44296,7 @@ function collectSignals(spec, config) {
43544
44296
  });
43545
44297
 
43546
44298
  // add config signal array
43547
- array$5(config.signals).forEach(s => {
44299
+ array$6(config.signals).forEach(s => {
43548
44300
  if (!has$1(map, s.name) && !has$1(pre, s.name)) {
43549
44301
  // add to signal list if not already defined
43550
44302
  signals.push(s);
@@ -43736,8 +44488,8 @@ Scope.prototype = Subscope.prototype = {
43736
44488
  compareRef(cmp) {
43737
44489
  let signal = false;
43738
44490
  const check = _ => isSignal(_) ? (signal = true, this.signalRef(_.signal)) : isExpr$1(_) ? (signal = true, this.exprRef(_.expr)) : _;
43739
- const fields = array$5(cmp.field).map(check),
43740
- orders = array$5(cmp.order).map(check);
44491
+ const fields = array$6(cmp.field).map(check),
44492
+ orders = array$6(cmp.order).map(check);
43741
44493
  return signal ? ref(this.add(Compare({
43742
44494
  fields: fields,
43743
44495
  orders: orders
@@ -43747,7 +44499,7 @@ Scope.prototype = Subscope.prototype = {
43747
44499
  let signal = false;
43748
44500
  const check = _ => isSignal(_) ? (signal = true, ref(sig[_.signal])) : _;
43749
44501
  const sig = this.signals;
43750
- fields = array$5(fields).map(check);
44502
+ fields = array$6(fields).map(check);
43751
44503
  return signal ? ref(this.add(Key({
43752
44504
  fields: fields,
43753
44505
  flat: flat
@@ -44153,7 +44905,7 @@ var version$4 = "5.30.0";
44153
44905
 
44154
44906
  // -- Transforms -----
44155
44907
 
44156
- extend$1(transforms, tx, vtx, encode$1, geo, force, label, tree, reg, voronoi, wordcloud, xf);
44908
+ extend$1(transforms, tx, vtx, encode$2, geo, force, label, tree, reg, voronoi, wordcloud, xf);
44157
44909
 
44158
44910
  const vegaImport = /*#__PURE__*/Object.freeze({
44159
44911
  __proto__: null,
@@ -44176,7 +44928,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44176
44928
  interpolateColors: interpolateColors,
44177
44929
  interpolateRange: interpolateRange$1,
44178
44930
  quantizeInterpolator: quantizeInterpolator,
44179
- scale: scale$4,
44931
+ scale: scale$5,
44180
44932
  scheme: scheme$1,
44181
44933
  projection: projection,
44182
44934
  View: View$1,
@@ -44185,7 +44937,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44185
44937
  locale: locale$2,
44186
44938
  resetDefaultLocale: resetDefaultLocale,
44187
44939
  timeFormatLocale: timeFormatDefaultLocale,
44188
- expressionFunction: expressionFunction,
44940
+ expressionFunction: expressionFunction$1,
44189
44941
  parse: parse,
44190
44942
  runtimeContext: context,
44191
44943
  codegenExpression: codegen,
@@ -44199,7 +44951,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44199
44951
  accessor: accessor,
44200
44952
  accessorFields: accessorFields,
44201
44953
  accessorName: accessorName,
44202
- array: array$5,
44954
+ array: array$6,
44203
44955
  ascending: ascending$2,
44204
44956
  clampRange: clampRange,
44205
44957
  compare: compare$2,
@@ -44231,7 +44983,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44231
44983
  lerp: lerp,
44232
44984
  logger: logger,
44233
44985
  lruCache: lruCache,
44234
- merge: merge$3,
44986
+ merge: merge$4,
44235
44987
  mergeConfig: mergeConfig,
44236
44988
  one: one$2,
44237
44989
  pad: pad$3,
@@ -44287,7 +45039,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44287
45039
  regressionExp: exp$1,
44288
45040
  regressionLinear: linear$2,
44289
45041
  regressionLoess: loess,
44290
- regressionLog: log$3,
45042
+ regressionLog: log$4,
44291
45043
  regressionPoly: poly,
44292
45044
  regressionPow: pow$3,
44293
45045
  regressionQuad: quad,
@@ -44323,7 +45075,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44323
45075
  utcdayofyear: utcdayofyear,
44324
45076
  utcweek: utcweek,
44325
45077
  week: week,
44326
- format: format$3,
45078
+ format: format$4,
44327
45079
  formats: formats$1,
44328
45080
  inferType: inferType,
44329
45081
  inferTypes: inferTypes,
@@ -44361,7 +45113,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44361
45113
  font: font$1,
44362
45114
  fontFamily: fontFamily,
44363
45115
  fontSize: fontSize,
44364
- intersect: intersect$2,
45116
+ intersect: intersect$3,
44365
45117
  intersectBoxLine: intersectBoxLine,
44366
45118
  intersectPath: intersectPath,
44367
45119
  intersectPoint: intersectPoint,
@@ -44534,6 +45286,7 @@ var Functions = {
44534
45286
  return apply('slice', arguments);
44535
45287
  },
44536
45288
  reverse: x => x.slice().reverse(),
45289
+ sort: x => x.slice().sort(ascending$2),
44537
45290
  // string functions
44538
45291
  parseFloat: parseFloat,
44539
45292
  parseInt: parseInt,
@@ -46279,7 +47032,7 @@ function getMarkStyleConfig(prop, mark, styleConfigIndex) {
46279
47032
  return getStyleConfig(prop, getStyles(mark), styleConfigIndex);
46280
47033
  }
46281
47034
  function getStyleConfig(p, styles, styleConfigIndex) {
46282
- styles = array$5(styles);
47035
+ styles = array$6(styles);
46283
47036
  let value;
46284
47037
  for (const style of styles) {
46285
47038
  const styleConfig = styleConfigIndex[style];
@@ -46293,7 +47046,7 @@ function getStyleConfig(p, styles, styleConfigIndex) {
46293
47046
  * Return Vega sort parameters (tuple of field and order).
46294
47047
  */
46295
47048
  function sortParams(orderDef, fieldRefOption) {
46296
- return array$5(orderDef).reduce((s, orderChannelDef) => {
47049
+ return array$6(orderDef).reduce((s, orderChannelDef) => {
46297
47050
  s.field.push(vgField(orderChannelDef, fieldRefOption));
46298
47051
  s.order.push(orderChannelDef.sort ?? 'ascending');
46299
47052
  return s;
@@ -46322,7 +47075,7 @@ function mergeTitle(title1, title2) {
46322
47075
  return title2;
46323
47076
  }
46324
47077
  else {
46325
- return [...array$5(title1), ...array$5(title2)].join(', ');
47078
+ return [...array$6(title1), ...array$6(title2)].join(', ');
46326
47079
  }
46327
47080
  }
46328
47081
  function mergeTitleComponent(v1, v2) {
@@ -49434,7 +50187,7 @@ function initEncoding(encoding, mark, filled, config) {
49434
50187
  }
49435
50188
  }
49436
50189
  // Array of fieldDefs for detail channel (or production rule)
49437
- normalizedEncoding[channel] = array$5(channelDef).reduce((defs, fieldDef) => {
50190
+ normalizedEncoding[channel] = array$6(channelDef).reduce((defs, fieldDef) => {
49438
50191
  if (!isFieldDef(fieldDef)) {
49439
50192
  warn(emptyFieldDef(fieldDef, channel));
49440
50193
  }
@@ -49479,7 +50232,7 @@ function fieldDefs(encoding) {
49479
50232
  for (const channel of keys(encoding)) {
49480
50233
  if (channelHasField(encoding, channel)) {
49481
50234
  const channelDef = encoding[channel];
49482
- const channelDefArray = array$5(channelDef);
50235
+ const channelDefArray = array$6(channelDef);
49483
50236
  for (const def of channelDefArray) {
49484
50237
  if (isFieldDef(def)) {
49485
50238
  arr.push(def);
@@ -49569,7 +50322,7 @@ function pathGroupingFields(mark, encoding) {
49569
50322
  case KEY: {
49570
50323
  const channelDef = encoding[channel];
49571
50324
  if (isArray(channelDef) || isFieldDef(channelDef)) {
49572
- for (const fieldDef of array$5(channelDef)) {
50325
+ for (const fieldDef of array$6(channelDef)) {
49573
50326
  if (!fieldDef.aggregate) {
49574
50327
  details.push(vgField(fieldDef, {}));
49575
50328
  }
@@ -51398,7 +52151,7 @@ function stack(m, encoding) {
51398
52151
  // Ignore tooltip in stackBy (https://github.com/vega/vega-lite/issues/4001)
51399
52152
  if (channel !== 'tooltip' && channelHasField(encoding, channel)) {
51400
52153
  const channelDef = encoding[channel];
51401
- for (const cDef of array$5(channelDef)) {
52154
+ for (const cDef of array$6(channelDef)) {
51402
52155
  const fieldDef = getFieldDef(cDef);
51403
52156
  if (fieldDef.aggregate) {
51404
52157
  continue;
@@ -53168,7 +53921,7 @@ const project = {
53168
53921
  const type = selCmpt.type;
53169
53922
  const cfg = model.config.selection[type];
53170
53923
  const init = selDef.value !== undefined
53171
- ? array$5(selDef.value)
53924
+ ? array$6(selDef.value)
53172
53925
  : null;
53173
53926
  // If no explicit projection (either fields or encodings) is specified, set some defaults.
53174
53927
  // If an initial value is set, try to infer projections.
@@ -53694,7 +54447,7 @@ const interval = {
53694
54447
  warn(`${evt} is not an ordered event stream for interval selections.`);
53695
54448
  continue;
53696
54449
  }
53697
- const filters = array$5(((_a = evt.between[0]).filter ?? (_a.filter = [])));
54450
+ const filters = array$6(((_a = evt.between[0]).filter ?? (_a.filter = [])));
53698
54451
  if (!filters.includes(filterExpr)) {
53699
54452
  filters.push(filterExpr);
53700
54453
  }
@@ -53973,7 +54726,7 @@ function wrapCondition({ model, channelDef, vgChannel, invalidValueRef, mainRefF
53973
54726
  const condition = isConditionalDef(channelDef) && channelDef.condition;
53974
54727
  let valueRefs = [];
53975
54728
  if (condition) {
53976
- const conditions = array$5(condition);
54729
+ const conditions = array$6(condition);
53977
54730
  valueRefs = conditions.map(c => {
53978
54731
  const conditionValueRef = mainRefFn(c);
53979
54732
  if (isConditionalParameter(c)) {
@@ -54091,7 +54844,7 @@ function tooltipData(encoding, stack, config, { reactiveGeom } = {}) {
54091
54844
  type: encoding[mainChannel].type // for secondary field def, copy type from main channel
54092
54845
  };
54093
54846
  const title = fieldDef.title || defaultTitle(fieldDef, formatConfig);
54094
- const key = array$5(title).join(', ').replaceAll(/"/g, '\\"');
54847
+ const key = array$6(title).join(', ').replaceAll(/"/g, '\\"');
54095
54848
  let value;
54096
54849
  if (isXorY(channel)) {
54097
54850
  const channel2 = channel === 'x' ? 'x2' : 'y2';
@@ -55198,14 +55951,14 @@ const legendBindings = {
55198
55951
  if (isObject(selDef.select) && (selDef.select.on || selDef.select.clear)) {
55199
55952
  const legendFilter = 'event.item && indexof(event.item.mark.role, "legend") < 0';
55200
55953
  for (const evt of selCmpt.events) {
55201
- evt.filter = array$5(evt.filter ?? []);
55954
+ evt.filter = array$6(evt.filter ?? []);
55202
55955
  if (!evt.filter.includes(legendFilter)) {
55203
55956
  evt.filter.push(legendFilter);
55204
55957
  }
55205
55958
  }
55206
55959
  }
55207
55960
  const evt = isLegendStreamBinding(selCmpt.bind) ? selCmpt.bind.legend : 'click';
55208
- const stream = isString(evt) ? eventSelector(evt, 'view') : array$5(evt);
55961
+ const stream = isString(evt) ? eventSelector(evt, 'view') : array$6(evt);
55209
55962
  selCmpt.bind = { legend: { merge: stream } };
55210
55963
  },
55211
55964
  topLevelSignals: (model, selCmpt, signals) => {
@@ -55610,7 +56363,7 @@ function parseUnitSelection(model, selDefs) {
55610
56363
  type,
55611
56364
  init: def.value,
55612
56365
  bind: def.bind,
55613
- events: isString(defaults.on) ? eventSelector(defaults.on, 'scope') : array$5(duplicate(defaults.on))
56366
+ events: isString(defaults.on) ? eventSelector(defaults.on, 'scope') : array$6(duplicate(defaults.on))
55614
56367
  });
55615
56368
  if (isTimerSelection(selCmpt)) {
55616
56369
  nTimerSelections++;
@@ -55750,7 +56503,7 @@ function assembleAxis(axisCmpt, kind, config, opt = { header: false }) {
55750
56503
  else if (isConditionalAxisValue(propValue)) {
55751
56504
  // deal with conditional axis value
55752
56505
  const { condition, ...valueOrSignalRef } = propValue;
55753
- const conditions = array$5(condition);
56506
+ const conditions = array$6(condition);
55754
56507
  const propIndex = CONDITIONAL_AXIS_PROP_INDEX[prop];
55755
56508
  if (propIndex) {
55756
56509
  const { vgProp, part } = propIndex;
@@ -55956,7 +56709,7 @@ function getAxisConfigStyle(axisConfigTypes, config) {
55956
56709
  // TODO: add special casing to add conditional value based on orient signal
55957
56710
  let style = config[configType]?.style;
55958
56711
  if (style) {
55959
- style = array$5(style);
56712
+ style = array$6(style);
55960
56713
  for (const s of style) {
55961
56714
  toMerge.push(config.style[s]);
55962
56715
  }
@@ -56795,7 +57548,7 @@ function getFirstConditionValue(channelDef) {
56795
57548
  }
56796
57549
  function getConditionValue(channelDef, reducer) {
56797
57550
  if (hasConditionalValueDef(channelDef)) {
56798
- return array$5(channelDef.condition).reduce(reducer, channelDef.value);
57551
+ return array$6(channelDef.condition).reduce(reducer, channelDef.value);
56799
57552
  }
56800
57553
  else if (isValueDef(channelDef)) {
56801
57554
  return channelDef.value;
@@ -61930,7 +62683,7 @@ class LookupNode extends DataFlowNode {
61930
62683
  return new Set([this.transform.lookup]);
61931
62684
  }
61932
62685
  producedFields() {
61933
- return new Set(this.transform.as ? array$5(this.transform.as) : this.transform.from.fields);
62686
+ return new Set(this.transform.as ? array$6(this.transform.as) : this.transform.from.fields);
61934
62687
  }
61935
62688
  hash() {
61936
62689
  return `Lookup ${hash({ transform: this.transform, secondary: this.secondary })}`;
@@ -61941,7 +62694,7 @@ class LookupNode extends DataFlowNode {
61941
62694
  // lookup a few fields and add create a flat output
61942
62695
  foreign = {
61943
62696
  values: this.transform.from.fields,
61944
- ...(this.transform.as ? { as: array$5(this.transform.as) } : {})
62697
+ ...(this.transform.as ? { as: array$6(this.transform.as) } : {})
61945
62698
  };
61946
62699
  }
61947
62700
  else {
@@ -64627,7 +65380,7 @@ class LayerModel extends Model {
64627
65380
  assembleGroupStyle() {
64628
65381
  const uniqueStyles = new Set();
64629
65382
  for (const child of this.children) {
64630
- for (const style of array$5(child.assembleGroupStyle())) {
65383
+ for (const style of array$6(child.assembleGroupStyle())) {
64631
65384
  uniqueStyles.add(style);
64632
65385
  }
64633
65386
  }