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
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, c as createEvent, h as h$1, g as getElement } from './index-d8134161.js';
2
- import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, t as trackComponent } from './color-palette-9e6cbce4.js';
2
+ import { D as DEFAULT_LABEL_COLOR, a as DEFAULT_DOMAIN_COLOR, t as trackComponent } from './color-palette-2c4363f3.js';
3
3
 
4
4
  // Note: This regex matches even invalid JSON strings, but since we’re
5
5
  // working on the output of `JSON.stringify` we know that only valid strings
@@ -206,7 +206,6 @@ function log$1$1(method, level, input) {
206
206
  const args = [level].concat([].slice.call(input));
207
207
  console[method].apply(console, args); // eslint-disable-line no-console
208
208
  }
209
-
210
209
  const None$2 = 0;
211
210
  const Error$1 = 1;
212
211
  const Warn = 2;
@@ -315,7 +314,7 @@ function toNumber (_) {
315
314
  }
316
315
 
317
316
  const exp$2 = sign => x => sign * Math.exp(x);
318
- const log$4 = sign => x => Math.log(sign * x);
317
+ const log$5 = sign => x => Math.log(sign * x);
319
318
  const symlog$1 = c => x => Math.sign(x) * Math.log1p(Math.abs(x / c));
320
319
  const symexp = c => x => Math.sign(x) * Math.expm1(Math.abs(x)) * c;
321
320
  const pow$4 = exponent => x => x < 0 ? -Math.pow(-x, exponent) : Math.pow(x, exponent);
@@ -330,7 +329,7 @@ function panLinear(domain, delta) {
330
329
  }
331
330
  function panLog(domain, delta) {
332
331
  var sign = Math.sign(domain[0]);
333
- return pan(domain, delta, log$4(sign), exp$2(sign));
332
+ return pan(domain, delta, log$5(sign), exp$2(sign));
334
333
  }
335
334
  function panPow(domain, delta, exponent) {
336
335
  return pan(domain, delta, pow$4(exponent), pow$4(1 / exponent));
@@ -349,7 +348,7 @@ function zoomLinear(domain, anchor, scale) {
349
348
  }
350
349
  function zoomLog(domain, anchor, scale) {
351
350
  const sign = Math.sign(domain[0]);
352
- return zoom$2(domain, anchor, scale, log$4(sign), exp$2(sign));
351
+ return zoom$2(domain, anchor, scale, log$5(sign), exp$2(sign));
353
352
  }
354
353
  function zoomPow(domain, anchor, scale, exponent) {
355
354
  return zoom$2(domain, anchor, scale, pow$4(exponent), pow$4(1 / exponent));
@@ -365,7 +364,7 @@ function utcquarter(date) {
365
364
  return 1 + ~~(new Date(date).getUTCMonth() / 3);
366
365
  }
367
366
 
368
- function array$5 (_) {
367
+ function array$6 (_) {
369
368
  return _ != null ? isArray(_) ? _ : [_] : [];
370
369
  }
371
370
 
@@ -396,12 +395,12 @@ function isFunction (_) {
396
395
  const DESCENDING = 'descending';
397
396
  function compare$2 (fields, orders, opt) {
398
397
  opt = opt || {};
399
- orders = array$5(orders) || [];
398
+ orders = array$6(orders) || [];
400
399
  const ord = [],
401
400
  get = [],
402
401
  fmap = {},
403
402
  gen = opt.comparator || comparator$1;
404
- array$5(fields).forEach((f, i) => {
403
+ array$6(fields).forEach((f, i) => {
405
404
  if (f == null) return;
406
405
  ord.push(orders[i] === DESCENDING ? -1 : 1);
407
406
  get.push(f = isFunction(f) ? f : field$1(f, null, opt));
@@ -552,9 +551,8 @@ function extentIndex (array, f) {
552
551
  return [u, v];
553
552
  }
554
553
 
555
- const hop = Object.prototype.hasOwnProperty;
556
554
  function has$1 (object, property) {
557
- return hop.call(object, property);
555
+ return Object.hasOwn(object, property);
558
556
  }
559
557
 
560
558
  const NULL = {};
@@ -699,7 +697,7 @@ function isString (_) {
699
697
 
700
698
  function key (fields, flat, opt) {
701
699
  if (fields) {
702
- fields = flat ? array$5(fields).map(f => f.replace(/\\(.)/g, '$1')) : array$5(fields);
700
+ fields = flat ? array$6(fields).map(f => f.replace(/\\(.)/g, '$1')) : array$6(fields);
703
701
  }
704
702
  const len = fields && fields.length,
705
703
  gen = opt && opt.get || getter$1,
@@ -761,7 +759,7 @@ function lruCache (maxsize) {
761
759
  };
762
760
  }
763
761
 
764
- function merge$3 (compare, array0, array1, output) {
762
+ function merge$4 (compare, array0, array1, output) {
765
763
  const n0 = array0.length,
766
764
  n1 = array1.length;
767
765
  if (!n1) return array0;
@@ -1040,7 +1038,7 @@ function transform$3(transform) {
1040
1038
  };
1041
1039
  }
1042
1040
 
1043
- function reverse$2(array, n) {
1041
+ function reverse$3(array, n) {
1044
1042
  var t, j = array.length, i = j - n;
1045
1043
  while (i < --j) t = array[i], array[i++] = array[j], array[j] = t;
1046
1044
  }
@@ -1071,7 +1069,7 @@ function object$1(topology, o) {
1071
1069
  for (var a = arcs[i < 0 ? ~i : i], k = 0, n = a.length; k < n; ++k) {
1072
1070
  points.push(transformPoint(a[k], k));
1073
1071
  }
1074
- if (i < 0) reverse$2(points, n);
1072
+ if (i < 0) reverse$3(points, n);
1075
1073
  }
1076
1074
 
1077
1075
  function point(p) {
@@ -1689,11 +1687,11 @@ function* flatten(arrays) {
1689
1687
  }
1690
1688
  }
1691
1689
 
1692
- function merge$2(arrays) {
1690
+ function merge$3(arrays) {
1693
1691
  return Array.from(flatten(arrays));
1694
1692
  }
1695
1693
 
1696
- function range$5(start, stop, step) {
1694
+ function range$6(start, stop, step) {
1697
1695
  start = +start, stop = +stop, step = (n = arguments.length) < 2 ? (stop = start, start = 0, 1) : n < 3 ? 1 : +step;
1698
1696
 
1699
1697
  var i = -1,
@@ -2052,7 +2050,7 @@ function formatLocale$3(locale) {
2052
2050
  }
2053
2051
 
2054
2052
  var locale$4;
2055
- var format$4;
2053
+ var format$5;
2056
2054
  var formatPrefix$1;
2057
2055
 
2058
2056
  defaultLocale$4({
@@ -2063,7 +2061,7 @@ defaultLocale$4({
2063
2061
 
2064
2062
  function defaultLocale$4(definition) {
2065
2063
  locale$4 = formatLocale$3(definition);
2066
- format$4 = locale$4.format;
2064
+ format$5 = locale$4.format;
2067
2065
  formatPrefix$1 = locale$4.formatPrefix;
2068
2066
  return locale$4;
2069
2067
  }
@@ -2374,7 +2372,7 @@ const MILLISECONDS = 'milliseconds';
2374
2372
  const TIME_UNITS = [YEAR, QUARTER, MONTH, WEEK, DATE, DAY, DAYOFYEAR, HOURS, MINUTES, SECONDS, MILLISECONDS];
2375
2373
  const UNITS = TIME_UNITS.reduce((o, u, i) => (o[u] = 1 + i, o), {});
2376
2374
  function timeUnits(units) {
2377
- const u = array$5(units).slice(),
2375
+ const u = array$6(units).slice(),
2378
2376
  m = {};
2379
2377
 
2380
2378
  // check validity
@@ -2612,14 +2610,14 @@ function timeOffset(unit, date, step) {
2612
2610
  function utcOffset(unit, date, step) {
2613
2611
  return offset$3(utcInterval(unit), date, step);
2614
2612
  }
2615
- function sequence$1(ival, start, stop, step) {
2613
+ function sequence$2(ival, start, stop, step) {
2616
2614
  return ival ? ival.range(start, stop, step) : undefined;
2617
2615
  }
2618
2616
  function timeSequence(unit, start, stop, step) {
2619
- return sequence$1(timeInterval$1(unit), start, stop, step);
2617
+ return sequence$2(timeInterval$1(unit), start, stop, step);
2620
2618
  }
2621
2619
  function utcSequence(unit, start, stop, step) {
2622
- return sequence$1(utcInterval(unit), start, stop, step);
2620
+ return sequence$2(utcInterval(unit), start, stop, step);
2623
2621
  }
2624
2622
 
2625
2623
  const durationSecond$1 = 1000,
@@ -3532,10 +3530,10 @@ function formatUnixTimestampSeconds$1(d) {
3532
3530
  }
3533
3531
 
3534
3532
  var locale$3;
3535
- var timeFormat$3;
3536
- var timeParse$1;
3537
- var utcFormat$2;
3538
- var utcParse$1;
3533
+ var timeFormat$4;
3534
+ var timeParse$2;
3535
+ var utcFormat$3;
3536
+ var utcParse$2;
3539
3537
 
3540
3538
  defaultLocale$3({
3541
3539
  dateTime: "%x, %X",
@@ -3550,10 +3548,10 @@ defaultLocale$3({
3550
3548
 
3551
3549
  function defaultLocale$3(definition) {
3552
3550
  locale$3 = formatLocale$2(definition);
3553
- timeFormat$3 = locale$3.format;
3554
- timeParse$1 = locale$3.parse;
3555
- utcFormat$2 = locale$3.utcFormat;
3556
- utcParse$1 = locale$3.utcParse;
3551
+ timeFormat$4 = locale$3.format;
3552
+ timeParse$2 = locale$3.parse;
3553
+ utcFormat$3 = locale$3.utcFormat;
3554
+ utcParse$2 = locale$3.utcParse;
3557
3555
  return locale$3;
3558
3556
  }
3559
3557
 
@@ -3654,7 +3652,7 @@ let defaultNumberLocale;
3654
3652
  resetNumberFormatDefaultLocale();
3655
3653
  function resetNumberFormatDefaultLocale() {
3656
3654
  return defaultNumberLocale = numberLocale({
3657
- format: format$4,
3655
+ format: format$5,
3658
3656
  formatPrefix: formatPrefix$1
3659
3657
  });
3660
3658
  }
@@ -3703,10 +3701,10 @@ let defaultTimeLocale;
3703
3701
  resetTimeFormatDefaultLocale();
3704
3702
  function resetTimeFormatDefaultLocale() {
3705
3703
  return defaultTimeLocale = timeLocale({
3706
- format: timeFormat$3,
3707
- parse: timeParse$1,
3708
- utcFormat: utcFormat$2,
3709
- utcParse: utcParse$1
3704
+ format: timeFormat$4,
3705
+ parse: timeParse$2,
3706
+ utcFormat: utcFormat$3,
3707
+ utcParse: utcParse$2
3710
3708
  });
3711
3709
  }
3712
3710
  function timeFormatLocale(definition) {
@@ -3762,7 +3760,7 @@ function loaderFactory (fetch, fs) {
3762
3760
  options: options || {},
3763
3761
  sanitize: sanitize,
3764
3762
  load: load$1,
3765
- fileAccess: !!fs,
3763
+ fileAccess: false,
3766
3764
  file: fileLoader(fs),
3767
3765
  http: httpLoader(fetch)
3768
3766
  });
@@ -4001,7 +3999,7 @@ function topojson(data, format) {
4001
3999
  }
4002
4000
  topojson.responseType = 'json';
4003
4001
 
4004
- const format$3 = {
4002
+ const format$4 = {
4005
4003
  dsv: dsv,
4006
4004
  csv: delimitedFormat(','),
4007
4005
  tsv: delimitedFormat('\t'),
@@ -4010,10 +4008,10 @@ const format$3 = {
4010
4008
  };
4011
4009
  function formats$1(name, reader) {
4012
4010
  if (arguments.length > 1) {
4013
- format$3[name] = reader;
4011
+ format$4[name] = reader;
4014
4012
  return this;
4015
4013
  } else {
4016
- return has$1(format$3, name) ? format$3[name] : null;
4014
+ return has$1(format$4, name) ? format$4[name] : null;
4017
4015
  }
4018
4016
  }
4019
4017
  function responseType(type) {
@@ -4190,7 +4188,7 @@ function rederive(t, d) {
4190
4188
  * @param {object} d - The new tuple that replaces the old.
4191
4189
  * @return {object} The new tuple.
4192
4190
  */
4193
- function replace$1(t, d) {
4191
+ function replace$2(t, d) {
4194
4192
  return setid(d, tupleid(t));
4195
4193
  }
4196
4194
 
@@ -4223,14 +4221,14 @@ function changeset() {
4223
4221
  return {
4224
4222
  constructor: changeset,
4225
4223
  insert(t) {
4226
- const d = array$5(t),
4224
+ const d = array$6(t),
4227
4225
  n = d.length;
4228
4226
  for (let i = 0; i < n; ++i) add.push(d[i]);
4229
4227
  return this;
4230
4228
  },
4231
4229
  remove(t) {
4232
4230
  const a = isFunction(t) ? remp : rem,
4233
- d = array$5(t),
4231
+ d = array$6(t),
4234
4232
  n = d.length;
4235
4233
  for (let i = 0; i < n; ++i) a.push(d[i]);
4236
4234
  return this;
@@ -4562,7 +4560,7 @@ Operator.prototype = {
4562
4560
  for (name in params) {
4563
4561
  value = params[name];
4564
4562
  if (name === PULSE) {
4565
- array$5(value).forEach(op => {
4563
+ array$6(value).forEach(op => {
4566
4564
  if (!(op instanceof Operator)) {
4567
4565
  error$1('Pulse parameters must be operator instances.');
4568
4566
  } else if (op !== this) {
@@ -4873,7 +4871,7 @@ function events$1 (source, type, filter, apply) {
4873
4871
  if (typeof source === 'string' && typeof document !== 'undefined') {
4874
4872
  sources = document.querySelectorAll(source);
4875
4873
  } else {
4876
- sources = array$5(source);
4874
+ sources = array$6(source);
4877
4875
  }
4878
4876
  const n = sources.length;
4879
4877
  for (let i = 0; i < n; ++i) {
@@ -5126,7 +5124,7 @@ function materialize(data, filter) {
5126
5124
  visitArray(data, filter, _ => out.push(_));
5127
5125
  return out;
5128
5126
  }
5129
- function filter$1(pulse, flags) {
5127
+ function filter$2(pulse, flags) {
5130
5128
  const map = {};
5131
5129
  pulse.visit(flags, t => {
5132
5130
  map[tupleid(t)] = 1;
@@ -5319,7 +5317,7 @@ Pulse.prototype = {
5319
5317
  src = this.source && this.source.length;
5320
5318
  if (src && src !== len) {
5321
5319
  this.mod = this.source;
5322
- if (len) this.filter(MOD$1, filter$1(this, ADD));
5320
+ if (len) this.filter(MOD$1, filter$2(this, ADD));
5323
5321
  }
5324
5322
  return this;
5325
5323
  },
@@ -5436,7 +5434,7 @@ Pulse.prototype = {
5436
5434
  if (flags & REFLOW && src) {
5437
5435
  const sum = p.add.length + p.mod.length;
5438
5436
  if (sum === src.length) ; else if (sum) {
5439
- visitArray(src, filter$1(p, ADD_MOD), v);
5437
+ visitArray(src, filter$2(p, ADD_MOD), v);
5440
5438
  } else {
5441
5439
  // if no add/rem/mod tuples, visit source
5442
5440
  visitArray(src, p.srcF, v);
@@ -6905,7 +6903,7 @@ function linear$2 (data, x, y) {
6905
6903
 
6906
6904
  // Adapted from d3-regression by Harry Stevens
6907
6905
  // License: https://github.com/HarryStevens/d3-regression/blob/master/LICENSE
6908
- function log$3 (data, x, y) {
6906
+ function log$4 (data, x, y) {
6909
6907
  let X = 0,
6910
6908
  Y = 0,
6911
6909
  XY = 0,
@@ -7832,7 +7830,7 @@ inherits(Aggregate$1, Transform, {
7832
7830
  outputs = this._outputs = [],
7833
7831
  inputMap = {};
7834
7832
  function inputVisit(get) {
7835
- const fields = array$5(accessorFields(get)),
7833
+ const fields = array$6(accessorFields(get)),
7836
7834
  n = fields.length;
7837
7835
  let i = 0,
7838
7836
  f;
@@ -7845,7 +7843,7 @@ inherits(Aggregate$1, Transform, {
7845
7843
  }
7846
7844
 
7847
7845
  // initialize group-by dimensions
7848
- this._dims = array$5(_.groupby);
7846
+ this._dims = array$6(_.groupby);
7849
7847
  this._dnames = this._dims.map(d => {
7850
7848
  const dname = accessorName(d);
7851
7849
  inputVisit(d);
@@ -7942,7 +7940,7 @@ inherits(Aggregate$1, Transform, {
7942
7940
  for (let i = 0; i < n; ++i) {
7943
7941
  x[names[i]] = dims[i](t);
7944
7942
  }
7945
- return p ? replace$1(p.tuple, x) : ingest$1(x);
7943
+ return p ? replace$2(p.tuple, x) : ingest$1(x);
7946
7944
  },
7947
7945
  clean() {
7948
7946
  const cells = this.value;
@@ -8177,7 +8175,7 @@ function SortedList (idFunc, source, input) {
8177
8175
  data.sort(compare);
8178
8176
  }
8179
8177
  if (add.length) {
8180
- data = compare ? merge$3(compare, data, add.sort(compare)) : data.concat(add);
8178
+ data = compare ? merge$4(compare, data, add.sort(compare)) : data.concat(add);
8181
8179
  add = [];
8182
8180
  }
8183
8181
  return data;
@@ -9040,7 +9038,7 @@ function Field$1(params) {
9040
9038
  }
9041
9039
  inherits(Field$1, Operator);
9042
9040
  function update$3(_) {
9043
- return this.value && !_.modified() ? this.value : isArray(_.name) ? array$5(_.name).map(f => field$1(f)) : field$1(_.name, _.as);
9041
+ return this.value && !_.modified() ? this.value : isArray(_.name) ? array$6(_.name).map(f => field$1(f)) : field$1(_.name, _.as);
9044
9042
  }
9045
9043
 
9046
9044
  /**
@@ -9725,7 +9723,7 @@ inherits(Load$1, Transform, {
9725
9723
  } else if (_.async) {
9726
9724
  // return promise for non-blocking async loading
9727
9725
  const p = df.request(_.url, _.format).then(res => {
9728
- this._pending = array$5(res.data);
9726
+ this._pending = array$6(res.data);
9729
9727
  return df => df.touch(this);
9730
9728
  });
9731
9729
  return {
@@ -9733,7 +9731,7 @@ inherits(Load$1, Transform, {
9733
9731
  };
9734
9732
  } else {
9735
9733
  // return promise for synchronous loading
9736
- return df.request(_.url, _.format).then(res => output(this, pulse, array$5(res.data)));
9734
+ return df.request(_.url, _.format).then(res => output(this, pulse, array$6(res.data)));
9737
9735
  }
9738
9736
  }
9739
9737
  });
@@ -10203,7 +10201,7 @@ inherits(Quantile$1, Transform, {
10203
10201
  names = (_.groupby || []).map(accessorName),
10204
10202
  values = [],
10205
10203
  step = _.step || 0.01,
10206
- p = _.probs || range$5(step / 2, 1 - EPSILON$2, step),
10204
+ p = _.probs || range$6(step / 2, 1 - EPSILON$2, step),
10207
10205
  n = p.length;
10208
10206
  groups.forEach(g => {
10209
10207
  const q = quantiles(g, p);
@@ -10409,7 +10407,7 @@ inherits(Sequence, Transform, {
10409
10407
  const out = pulse.materialize().fork(pulse.MOD),
10410
10408
  as = _.as || 'data';
10411
10409
  out.rem = this.value ? pulse.rem.concat(this.value) : pulse.rem;
10412
- this.value = range$5(_.start, _.stop, _.step || 1).map(v => {
10410
+ this.value = range$6(_.start, _.stop, _.step || 1).map(v => {
10413
10411
  const t = {};
10414
10412
  t[as] = v;
10415
10413
  return ingest$1(t);
@@ -10749,11 +10747,11 @@ function find$2(field, data, index) {
10749
10747
  const ValidWindowOps = Object.keys(WindowOps);
10750
10748
 
10751
10749
  function WindowState(_) {
10752
- const ops = array$5(_.ops),
10753
- fields = array$5(_.fields),
10754
- params = array$5(_.params),
10755
- aggregate_params = array$5(_.aggregate_params),
10756
- as = array$5(_.as),
10750
+ const ops = array$6(_.ops),
10751
+ fields = array$6(_.fields),
10752
+ params = array$6(_.params),
10753
+ aggregate_params = array$6(_.aggregate_params),
10754
+ as = array$6(_.as),
10757
10755
  outputs = this.outputs = [],
10758
10756
  windows = this.windows = [],
10759
10757
  inputs = {},
@@ -10762,7 +10760,7 @@ function WindowState(_) {
10762
10760
  measures = [];
10763
10761
  let countOnly = true;
10764
10762
  function visitInputs(f) {
10765
- array$5(accessorFields(f)).forEach(_ => inputs[_] = 1);
10763
+ array$6(accessorFields(f)).forEach(_ => inputs[_] = 1);
10766
10764
  }
10767
10765
  visitInputs(_.sort);
10768
10766
  ops.forEach((op, i) => {
@@ -11295,7 +11293,7 @@ function arcPadAngle(d) {
11295
11293
  return d && d.padAngle; // Note: optional!
11296
11294
  }
11297
11295
 
11298
- function intersect$3(x0, y0, x1, y1, x2, y2, x3, y3) {
11296
+ function intersect$4(x0, y0, x1, y1, x2, y2, x3, y3) {
11299
11297
  var x10 = x1 - x0, y10 = y1 - y0,
11300
11298
  x32 = x3 - x2, y32 = y3 - y2,
11301
11299
  t = y32 * x10 - x32 * y10;
@@ -11429,7 +11427,7 @@ function arc$2$1() {
11429
11427
  // intersection fails, it’s probably because the arc is too small, so
11430
11428
  // disable the corner radius entirely.
11431
11429
  if (da < pi$3) {
11432
- if (oc = intersect$3(x01, y01, x00, y00, x11, y11, x10, y10)) {
11430
+ if (oc = intersect$4(x01, y01, x00, y00, x11, y11, x10, y10)) {
11433
11431
  var ax = x01 - oc[0],
11434
11432
  ay = y01 - oc[1],
11435
11433
  bx = x11 - oc[0],
@@ -11540,7 +11538,7 @@ function arc$2$1() {
11540
11538
  return arc;
11541
11539
  }
11542
11540
 
11543
- function array$4(x) {
11541
+ function array$5(x) {
11544
11542
  return typeof x === "object" && "length" in x
11545
11543
  ? x // Array, TypedArray, NodeList, array-like
11546
11544
  : Array.from(x); // Map, Set, iterable, string, or anything else
@@ -11598,7 +11596,7 @@ function line$2$1(x, y) {
11598
11596
 
11599
11597
  function line(data) {
11600
11598
  var i,
11601
- n = (data = array$4(data)).length,
11599
+ n = (data = array$5(data)).length,
11602
11600
  d,
11603
11601
  defined0 = false,
11604
11602
  buffer;
@@ -11655,7 +11653,7 @@ function area$2$1(x0, y0, y1) {
11655
11653
  var i,
11656
11654
  j,
11657
11655
  k,
11658
- n = (data = array$4(data)).length,
11656
+ n = (data = array$5(data)).length,
11659
11657
  d,
11660
11658
  defined0 = false,
11661
11659
  buffer,
@@ -13405,7 +13403,7 @@ function isNumberArray(x) {
13405
13403
  return ArrayBuffer.isView(x) && !(x instanceof DataView);
13406
13404
  }
13407
13405
 
13408
- function array$3(a, b) {
13406
+ function array$4(a, b) {
13409
13407
  return (isNumberArray(b) ? numberArray : genericArray)(a, b);
13410
13408
  }
13411
13409
 
@@ -13832,7 +13830,7 @@ function quantize$2(interpolator, n) {
13832
13830
  const $$1 = /*#__PURE__*/Object.freeze({
13833
13831
  __proto__: null,
13834
13832
  interpolate: interpolate$1$1,
13835
- interpolateArray: array$3,
13833
+ interpolateArray: array$4,
13836
13834
  interpolateBasis: basis$1,
13837
13835
  interpolateBasisClosed: basisClosed,
13838
13836
  interpolateDate: date$1,
@@ -13920,7 +13918,7 @@ function polymap(domain, range, interpolate) {
13920
13918
  };
13921
13919
  }
13922
13920
 
13923
- function copy$2(source, target) {
13921
+ function copy$3(source, target) {
13924
13922
  return target
13925
13923
  .domain(source.domain())
13926
13924
  .range(source.range())
@@ -14289,7 +14287,7 @@ function formatLocale$1(locale) {
14289
14287
  }
14290
14288
 
14291
14289
  var locale$1;
14292
- var format$2;
14290
+ var format$3;
14293
14291
  var formatPrefix;
14294
14292
 
14295
14293
  defaultLocale$1({
@@ -14302,7 +14300,7 @@ defaultLocale$1({
14302
14300
 
14303
14301
  function defaultLocale$1(definition) {
14304
14302
  locale$1 = formatLocale$1(definition);
14305
- format$2 = locale$1.format;
14303
+ format$3 = locale$1.format;
14306
14304
  formatPrefix = locale$1.formatPrefix;
14307
14305
  return locale$1;
14308
14306
  }
@@ -14344,7 +14342,7 @@ function tickFormat$1(start, stop, count, specifier) {
14344
14342
  break;
14345
14343
  }
14346
14344
  }
14347
- return format$2(specifier);
14345
+ return format$3(specifier);
14348
14346
  }
14349
14347
 
14350
14348
  function linearish(scale) {
@@ -14405,7 +14403,7 @@ function linear() {
14405
14403
  var scale = continuous$1();
14406
14404
 
14407
14405
  scale.copy = function() {
14408
- return copy$2(scale, linear());
14406
+ return copy$3(scale, linear());
14409
14407
  };
14410
14408
 
14411
14409
  initRange.apply(scale, arguments);
@@ -14565,7 +14563,7 @@ function loggish(transform) {
14565
14563
  if (specifier == null) specifier = base === 10 ? "s" : ",";
14566
14564
  if (typeof specifier !== "function") {
14567
14565
  if (!(base % 1) && (specifier = formatSpecifier(specifier)).precision == null) specifier.trim = true;
14568
- specifier = format$2(specifier);
14566
+ specifier = format$3(specifier);
14569
14567
  }
14570
14568
  if (count === Infinity) return specifier;
14571
14569
  const k = Math.max(1, base * count / scale.ticks().length); // TODO fast estimate?
@@ -14586,9 +14584,9 @@ function loggish(transform) {
14586
14584
  return scale;
14587
14585
  }
14588
14586
 
14589
- function log$2() {
14587
+ function log$3() {
14590
14588
  const scale = loggish(transformer$3()).domain([1, 10]);
14591
- scale.copy = () => copy$2(scale, log$2()).base(scale.base());
14589
+ scale.copy = () => copy$3(scale, log$3()).base(scale.base());
14592
14590
  initRange.apply(scale, arguments);
14593
14591
  return scale;
14594
14592
  }
@@ -14619,7 +14617,7 @@ function symlog() {
14619
14617
  var scale = symlogish(transformer$3());
14620
14618
 
14621
14619
  scale.copy = function() {
14622
- return copy$2(scale, symlog()).constant(scale.constant());
14620
+ return copy$3(scale, symlog()).constant(scale.constant());
14623
14621
  };
14624
14622
 
14625
14623
  return initRange.apply(scale, arguments);
@@ -14660,7 +14658,7 @@ function pow$2() {
14660
14658
  var scale = powish(transformer$3());
14661
14659
 
14662
14660
  scale.copy = function() {
14663
- return copy$2(scale, pow$2()).exponent(scale.exponent());
14661
+ return copy$3(scale, pow$2()).exponent(scale.exponent());
14664
14662
  };
14665
14663
 
14666
14664
  initRange.apply(scale, arguments);
@@ -15832,8 +15830,8 @@ function formatUnixTimestampSeconds(d) {
15832
15830
  }
15833
15831
 
15834
15832
  var locale;
15835
- var timeFormat$2;
15836
- var utcFormat$1;
15833
+ var timeFormat$3;
15834
+ var utcFormat$2;
15837
15835
 
15838
15836
  defaultLocale({
15839
15837
  dateTime: "%x, %X",
@@ -15848,8 +15846,8 @@ defaultLocale({
15848
15846
 
15849
15847
  function defaultLocale(definition) {
15850
15848
  locale = formatLocale(definition);
15851
- timeFormat$2 = locale.format;
15852
- utcFormat$1 = locale.utcFormat;
15849
+ timeFormat$3 = locale.format;
15850
+ utcFormat$2 = locale.utcFormat;
15853
15851
  return locale;
15854
15852
  }
15855
15853
 
@@ -15909,18 +15907,18 @@ function calendar(ticks, tickInterval, year, month, week, day, hour, minute, sec
15909
15907
  };
15910
15908
 
15911
15909
  scale.copy = function() {
15912
- return copy$2(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));
15910
+ return copy$3(scale, calendar(ticks, tickInterval, year, month, week, day, hour, minute, second, format));
15913
15911
  };
15914
15912
 
15915
15913
  return scale;
15916
15914
  }
15917
15915
 
15918
- function time$1() {
15919
- 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);
15916
+ function time$2() {
15917
+ 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);
15920
15918
  }
15921
15919
 
15922
15920
  function utcTime() {
15923
- 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);
15921
+ 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);
15924
15922
  }
15925
15923
 
15926
15924
  function transformer$2() {
@@ -15971,7 +15969,7 @@ function transformer$2() {
15971
15969
  };
15972
15970
  }
15973
15971
 
15974
- function copy$1(source, target) {
15972
+ function copy$2(source, target) {
15975
15973
  return target
15976
15974
  .domain(source.domain())
15977
15975
  .interpolator(source.interpolator())
@@ -15983,7 +15981,7 @@ function sequential() {
15983
15981
  var scale = linearish(transformer$2()(identity$3));
15984
15982
 
15985
15983
  scale.copy = function() {
15986
- return copy$1(scale, sequential());
15984
+ return copy$2(scale, sequential());
15987
15985
  };
15988
15986
 
15989
15987
  return initInterpolator.apply(scale, arguments);
@@ -15993,7 +15991,7 @@ function sequentialLog() {
15993
15991
  var scale = loggish(transformer$2()).domain([1, 10]);
15994
15992
 
15995
15993
  scale.copy = function() {
15996
- return copy$1(scale, sequentialLog()).base(scale.base());
15994
+ return copy$2(scale, sequentialLog()).base(scale.base());
15997
15995
  };
15998
15996
 
15999
15997
  return initInterpolator.apply(scale, arguments);
@@ -16003,7 +16001,7 @@ function sequentialSymlog() {
16003
16001
  var scale = symlogish(transformer$2());
16004
16002
 
16005
16003
  scale.copy = function() {
16006
- return copy$1(scale, sequentialSymlog()).constant(scale.constant());
16004
+ return copy$2(scale, sequentialSymlog()).constant(scale.constant());
16007
16005
  };
16008
16006
 
16009
16007
  return initInterpolator.apply(scale, arguments);
@@ -16013,7 +16011,7 @@ function sequentialPow() {
16013
16011
  var scale = powish(transformer$2());
16014
16012
 
16015
16013
  scale.copy = function() {
16016
- return copy$1(scale, sequentialPow()).exponent(scale.exponent());
16014
+ return copy$2(scale, sequentialPow()).exponent(scale.exponent());
16017
16015
  };
16018
16016
 
16019
16017
  return initInterpolator.apply(scale, arguments);
@@ -16079,7 +16077,7 @@ function diverging() {
16079
16077
  var scale = linearish(transformer$1()(identity$3));
16080
16078
 
16081
16079
  scale.copy = function() {
16082
- return copy$1(scale, diverging());
16080
+ return copy$2(scale, diverging());
16083
16081
  };
16084
16082
 
16085
16083
  return initInterpolator.apply(scale, arguments);
@@ -16089,7 +16087,7 @@ function divergingLog() {
16089
16087
  var scale = loggish(transformer$1()).domain([0.1, 1, 10]);
16090
16088
 
16091
16089
  scale.copy = function() {
16092
- return copy$1(scale, divergingLog()).base(scale.base());
16090
+ return copy$2(scale, divergingLog()).base(scale.base());
16093
16091
  };
16094
16092
 
16095
16093
  return initInterpolator.apply(scale, arguments);
@@ -16099,7 +16097,7 @@ function divergingSymlog() {
16099
16097
  var scale = symlogish(transformer$1());
16100
16098
 
16101
16099
  scale.copy = function() {
16102
- return copy$1(scale, divergingSymlog()).constant(scale.constant());
16100
+ return copy$2(scale, divergingSymlog()).constant(scale.constant());
16103
16101
  };
16104
16102
 
16105
16103
  return initInterpolator.apply(scale, arguments);
@@ -16109,7 +16107,7 @@ function divergingPow() {
16109
16107
  var scale = powish(transformer$1());
16110
16108
 
16111
16109
  scale.copy = function() {
16112
- return copy$1(scale, divergingPow()).exponent(scale.exponent());
16110
+ return copy$2(scale, divergingPow()).exponent(scale.exponent());
16113
16111
  };
16114
16112
 
16115
16113
  return initInterpolator.apply(scale, arguments);
@@ -16245,7 +16243,7 @@ function band() {
16245
16243
  start = Math.round(start);
16246
16244
  bandwidth = Math.round(bandwidth);
16247
16245
  }
16248
- const values = range$5(n).map(i => start + step * i);
16246
+ const values = range$6(n).map(i => start + step * i);
16249
16247
  return ordinalRange(reverse ? values.reverse() : values);
16250
16248
  }
16251
16249
  scale.domain = function (_) {
@@ -16380,7 +16378,7 @@ function numbers(_) {
16380
16378
  return map.call(_, toNumber);
16381
16379
  }
16382
16380
 
16383
- const slice$2 = Array.prototype.slice;
16381
+ const slice$3 = Array.prototype.slice;
16384
16382
 
16385
16383
  function scaleBinOrdinal() {
16386
16384
  let domain = [],
@@ -16398,7 +16396,7 @@ function scaleBinOrdinal() {
16398
16396
  };
16399
16397
  scale.range = function (_) {
16400
16398
  if (arguments.length) {
16401
- range = slice$2.call(_);
16399
+ range = slice$3.call(_);
16402
16400
  return scale;
16403
16401
  } else {
16404
16402
  return range.slice();
@@ -16440,7 +16438,7 @@ function create$2(type, constructor, metadata) {
16440
16438
  s.type = type;
16441
16439
  return registerScale(s);
16442
16440
  };
16443
- ctr.metadata = toSet(array$5(metadata));
16441
+ ctr.metadata = toSet(array$6(metadata));
16444
16442
  return ctr;
16445
16443
  }
16446
16444
 
@@ -16460,7 +16458,7 @@ function create$2(type, constructor, metadata) {
16460
16458
  * - `"log"` - the scale performs a logarithmic transform of the continuous domain.
16461
16459
  * - `"temporal"` - the scale domain is defined over date-time values.
16462
16460
  */
16463
- function scale$4(type, scale, metadata) {
16461
+ function scale$5(type, scale, metadata) {
16464
16462
  if (arguments.length > 1) {
16465
16463
  scales.set(type, create$2(type, scale, metadata));
16466
16464
  return this;
@@ -16470,42 +16468,42 @@ function scale$4(type, scale, metadata) {
16470
16468
  }
16471
16469
 
16472
16470
  // identity scale
16473
- scale$4(Identity, identity$1);
16471
+ scale$5(Identity, identity$1);
16474
16472
 
16475
16473
  // continuous scales
16476
- scale$4(Linear, linear, Continuous);
16477
- scale$4(Log, log$2, [Continuous, Log]);
16478
- scale$4(Pow, pow$2, Continuous);
16479
- scale$4(Sqrt, sqrt$2, Continuous);
16480
- scale$4(Symlog, symlog, Continuous);
16481
- scale$4(Time, time$1, [Continuous, Temporal]);
16482
- scale$4(UTC, utcTime, [Continuous, Temporal]);
16474
+ scale$5(Linear, linear, Continuous);
16475
+ scale$5(Log, log$3, [Continuous, Log]);
16476
+ scale$5(Pow, pow$2, Continuous);
16477
+ scale$5(Sqrt, sqrt$2, Continuous);
16478
+ scale$5(Symlog, symlog, Continuous);
16479
+ scale$5(Time, time$2, [Continuous, Temporal]);
16480
+ scale$5(UTC, utcTime, [Continuous, Temporal]);
16483
16481
 
16484
16482
  // sequential scales
16485
- scale$4(Sequential, sequential, [Continuous, Interpolating]); // backwards compat
16486
- scale$4(`${Sequential}-${Linear}`, sequential, [Continuous, Interpolating]);
16487
- scale$4(`${Sequential}-${Log}`, sequentialLog, [Continuous, Interpolating, Log]);
16488
- scale$4(`${Sequential}-${Pow}`, sequentialPow, [Continuous, Interpolating]);
16489
- scale$4(`${Sequential}-${Sqrt}`, sequentialSqrt, [Continuous, Interpolating]);
16490
- scale$4(`${Sequential}-${Symlog}`, sequentialSymlog, [Continuous, Interpolating]);
16483
+ scale$5(Sequential, sequential, [Continuous, Interpolating]); // backwards compat
16484
+ scale$5(`${Sequential}-${Linear}`, sequential, [Continuous, Interpolating]);
16485
+ scale$5(`${Sequential}-${Log}`, sequentialLog, [Continuous, Interpolating, Log]);
16486
+ scale$5(`${Sequential}-${Pow}`, sequentialPow, [Continuous, Interpolating]);
16487
+ scale$5(`${Sequential}-${Sqrt}`, sequentialSqrt, [Continuous, Interpolating]);
16488
+ scale$5(`${Sequential}-${Symlog}`, sequentialSymlog, [Continuous, Interpolating]);
16491
16489
 
16492
16490
  // diverging scales
16493
- scale$4(`${Diverging}-${Linear}`, diverging, [Continuous, Interpolating]);
16494
- scale$4(`${Diverging}-${Log}`, divergingLog, [Continuous, Interpolating, Log]);
16495
- scale$4(`${Diverging}-${Pow}`, divergingPow, [Continuous, Interpolating]);
16496
- scale$4(`${Diverging}-${Sqrt}`, divergingSqrt, [Continuous, Interpolating]);
16497
- scale$4(`${Diverging}-${Symlog}`, divergingSymlog, [Continuous, Interpolating]);
16491
+ scale$5(`${Diverging}-${Linear}`, diverging, [Continuous, Interpolating]);
16492
+ scale$5(`${Diverging}-${Log}`, divergingLog, [Continuous, Interpolating, Log]);
16493
+ scale$5(`${Diverging}-${Pow}`, divergingPow, [Continuous, Interpolating]);
16494
+ scale$5(`${Diverging}-${Sqrt}`, divergingSqrt, [Continuous, Interpolating]);
16495
+ scale$5(`${Diverging}-${Symlog}`, divergingSymlog, [Continuous, Interpolating]);
16498
16496
 
16499
16497
  // discretizing scales
16500
- scale$4(Quantile, quantile, [Discretizing, Quantile]);
16501
- scale$4(Quantize, quantize$1, Discretizing);
16502
- scale$4(Threshold, threshold, Discretizing);
16498
+ scale$5(Quantile, quantile, [Discretizing, Quantile]);
16499
+ scale$5(Quantize, quantize$1, Discretizing);
16500
+ scale$5(Threshold, threshold, Discretizing);
16503
16501
 
16504
16502
  // discrete scales
16505
- scale$4(BinOrdinal, scaleBinOrdinal, [Discrete$1, Discretizing]);
16506
- scale$4(Ordinal, ordinal, Discrete$1);
16507
- scale$4(Band, band, Discrete$1);
16508
- scale$4(Point, point$3, Discrete$1);
16503
+ scale$5(BinOrdinal, scaleBinOrdinal, [Discrete$1, Discretizing]);
16504
+ scale$5(Ordinal, ordinal, Discrete$1);
16505
+ scale$5(Band, band, Discrete$1);
16506
+ scale$5(Point, point$3, Discrete$1);
16509
16507
  function isValidScaleType(type) {
16510
16508
  return scales.has(type);
16511
16509
  }
@@ -16560,7 +16558,7 @@ function scaleFraction(scale$1, min, max) {
16560
16558
  } else {
16561
16559
  i = (t = scale$1.type).indexOf('-');
16562
16560
  t = i < 0 ? t : t.slice(i + 1);
16563
- s = scale$4(t)().domain([min, max]).range([0, 1]);
16561
+ s = scale$5(t)().domain([min, max]).range([0, 1]);
16564
16562
  scaleProps.forEach(m => scale$1[m] ? s[m](scale$1[m]()) : 0);
16565
16563
  return s;
16566
16564
  }
@@ -16875,7 +16873,7 @@ function labelFraction(scale) {
16875
16873
  return value => (value - lo) / span;
16876
16874
  }
16877
16875
 
16878
- function format$1(locale, scale, specifier, formatType) {
16876
+ function format$2(locale, scale, specifier, formatType) {
16879
16877
  const type = formatType || scale.type;
16880
16878
 
16881
16879
  // replace abbreviated time specifiers to improve screen reader experience
@@ -16887,7 +16885,7 @@ function format$1(locale, scale, specifier, formatType) {
16887
16885
  function domainCaption(locale, scale, opt) {
16888
16886
  opt = opt || {};
16889
16887
  const max = Math.max(3, opt.maxlen || 7),
16890
- fmt = format$1(locale, scale, opt.format, opt.formatType);
16888
+ fmt = format$2(locale, scale, opt.format, opt.formatType);
16891
16889
 
16892
16890
  // if scale breaks domain into bins, describe boundaries
16893
16891
  if (isDiscretizing$1(scale.type)) {
@@ -17133,11 +17131,11 @@ const HalfSqrt3 = Math.sqrt(3) / 2;
17133
17131
 
17134
17132
  var segmentCache = {};
17135
17133
  var bezierCache = {};
17136
- var join$1 = [].join;
17134
+ var join$2 = [].join;
17137
17135
 
17138
17136
  // Copied from Inkscape svgtopdf, thanks!
17139
17137
  function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
17140
- const key = join$1.call(arguments);
17138
+ const key = join$2.call(arguments);
17141
17139
  if (segmentCache[key]) {
17142
17140
  return segmentCache[key];
17143
17141
  }
@@ -17187,7 +17185,7 @@ function segments(x, y, rx, ry, large, sweep, rotateX, ox, oy) {
17187
17185
  return segmentCache[key] = result;
17188
17186
  }
17189
17187
  function bezier(params) {
17190
- const key = join$1.call(params);
17188
+ const key = join$2.call(params);
17191
17189
  if (bezierCache[key]) {
17192
17190
  return bezierCache[key];
17193
17191
  }
@@ -18592,7 +18590,7 @@ function translate$2(x, y) {
18592
18590
  function rotate(a) {
18593
18591
  return 'rotate(' + a + ')';
18594
18592
  }
18595
- function scale$3(scaleX, scaleY) {
18593
+ function scale$4(scaleX, scaleY) {
18596
18594
  return 'scale(' + scaleX + ',' + scaleY + ')';
18597
18595
  }
18598
18596
  function translateItem(item) {
@@ -18602,7 +18600,7 @@ function rotateItem(item) {
18602
18600
  return translate$2(item.x || 0, item.y || 0) + (item.angle ? ' ' + rotate(item.angle) : '');
18603
18601
  }
18604
18602
  function transformItem(item) {
18605
- 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) : '');
18603
+ 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) : '');
18606
18604
  }
18607
18605
 
18608
18606
  function markItemPath (type, shape, isect) {
@@ -19710,12 +19708,12 @@ class Handler$1 {
19710
19708
  /**
19711
19709
  * Add an event handler. Subclasses should override this method.
19712
19710
  */
19713
- on( /*type, handler*/) {}
19711
+ on(/*type, handler*/) {}
19714
19712
 
19715
19713
  /**
19716
19714
  * Remove an event handler. Subclasses should override this method.
19717
19715
  */
19718
- off( /*type, handler*/) {}
19716
+ off(/*type, handler*/) {}
19719
19717
 
19720
19718
  /**
19721
19719
  * Utility method for finding the array index of an event handler.
@@ -19922,7 +19920,7 @@ class Renderer {
19922
19920
  * incremental should implement this method.
19923
19921
  * @param {Item} item - The dirty item whose bounds should be redrawn.
19924
19922
  */
19925
- dirty( /*item*/) {}
19923
+ dirty(/*item*/) {}
19926
19924
 
19927
19925
  /**
19928
19926
  * Render an input scenegraph, potentially with a set of dirty items.
@@ -19961,7 +19959,7 @@ class Renderer {
19961
19959
  * @param {Array} markTypes - Array of the mark types to render.
19962
19960
  * If undefined, render all mark types
19963
19961
  */
19964
- _render( /*scene, markTypes*/
19962
+ _render(/*scene, markTypes*/
19965
19963
  ) {
19966
19964
  // subclasses to override
19967
19965
  }
@@ -20509,7 +20507,7 @@ function ariaGuide(mark, opt) {
20509
20507
  }
20510
20508
  }
20511
20509
  function titleCaption(item) {
20512
- return array$5(item.text).join(' ');
20510
+ return array$6(item.text).join(' ');
20513
20511
  }
20514
20512
  function axisCaption(item) {
20515
20513
  const datum = item.datum,
@@ -20535,7 +20533,7 @@ function legendCaption(item) {
20535
20533
  }
20536
20534
  function extractTitle(item) {
20537
20535
  try {
20538
- return array$5(peek$1(item.items).items[0].text).join(' ');
20536
+ return array$6(peek$1(item.items).items[0].text).join(' ');
20539
20537
  } catch (err) {
20540
20538
  return null;
20541
20539
  }
@@ -21768,7 +21766,7 @@ function renderModule(name, _) {
21768
21766
  }
21769
21767
  }
21770
21768
 
21771
- function intersect$2(scene, bounds, filter) {
21769
+ function intersect$3(scene, bounds, filter) {
21772
21770
  const hits = [],
21773
21771
  // intersection results
21774
21772
  box = new Bounds().union(bounds),
@@ -22093,16 +22091,16 @@ const methods = {
22093
22091
  parity: items => items.filter((item, i) => i % 2 ? item.opacity = 0 : 1),
22094
22092
  greedy: (items, sep) => {
22095
22093
  let a;
22096
- return items.filter((b, i) => !i || !intersect$1(a.bounds, b.bounds, sep) ? (a = b, 1) : b.opacity = 0);
22094
+ return items.filter((b, i) => !i || !intersect$2(a.bounds, b.bounds, sep) ? (a = b, 1) : b.opacity = 0);
22097
22095
  }
22098
22096
  };
22099
22097
 
22100
22098
  // compute bounding box intersection
22101
22099
  // including padding pixels of separation
22102
- 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);
22100
+ 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);
22103
22101
  const hasOverlap = (items, pad) => {
22104
22102
  for (var i = 1, n = items.length, a = items[0].bounds, b; i < n; a = b, ++i) {
22105
- if (intersect$1(a, b = items[i].bounds, pad)) return true;
22103
+ if (intersect$2(a, b = items[i].bounds, pad)) return true;
22106
22104
  }
22107
22105
  };
22108
22106
  const hasBounds = item => {
@@ -23690,7 +23688,7 @@ inherits(Pie, Transform, {
23690
23688
  n = values.length,
23691
23689
  a = start,
23692
23690
  k = (stop - start) / sum$1(values),
23693
- index = range$5(n),
23691
+ index = range$6(n),
23694
23692
  i,
23695
23693
  t,
23696
23694
  v;
@@ -23733,7 +23731,7 @@ inherits(Scale$1, Transform, {
23733
23731
  scale$1 = this.value,
23734
23732
  key = scaleKey(_);
23735
23733
  if (!scale$1 || key !== scale$1.type) {
23736
- this.value = scale$1 = scale$4(key)();
23734
+ this.value = scale$1 = scale$5(key)();
23737
23735
  }
23738
23736
  for (key in _) if (!SKIP$1[key]) {
23739
23737
  // padding is a scale property for band/point but not others
@@ -23853,7 +23851,7 @@ function configureBins(scale, _, count) {
23853
23851
  if (!step) error$1('Scale bins parameter missing step property.');
23854
23852
  if (start < lo) start = step * Math.ceil(lo / step);
23855
23853
  if (stop > hi) stop = step * Math.floor(hi / step);
23856
- bins = range$5(start, stop + step / 2, step);
23854
+ bins = range$6(start, stop + step / 2, step);
23857
23855
  }
23858
23856
  if (bins) {
23859
23857
  // assign bin boundaries to scale instance
@@ -24123,7 +24121,7 @@ function partition$3(data, groupby, sort, field) {
24123
24121
  return groups;
24124
24122
  }
24125
24123
 
24126
- const encode$1 = /*#__PURE__*/Object.freeze({
24124
+ const encode$2 = /*#__PURE__*/Object.freeze({
24127
24125
  __proto__: null,
24128
24126
  axisticks: AxisTicks$1,
24129
24127
  datajoin: DataJoin$1,
@@ -24153,7 +24151,7 @@ var cos$1 = Math.cos;
24153
24151
  var ceil = Math.ceil;
24154
24152
  var exp = Math.exp;
24155
24153
  var hypot = Math.hypot;
24156
- var log$1 = Math.log;
24154
+ var log$2 = Math.log;
24157
24155
  var pow$1 = Math.pow;
24158
24156
  var sin$1 = Math.sin;
24159
24157
  var sign = Math.sign || function(x) { return x > 0 ? 1 : x < 0 ? -1 : 0; };
@@ -24306,7 +24304,7 @@ function areaPoint$1(lambda, phi) {
24306
24304
  lambda0$1 = lambda, cosPhi0 = cosPhi, sinPhi0 = sinPhi;
24307
24305
  }
24308
24306
 
24309
- function geoArea$1(object) {
24307
+ function geoArea$1$1(object) {
24310
24308
  areaSum$1 = new Adder();
24311
24309
  geoStream(object, areaStream$1);
24312
24310
  return areaSum$1 * 2;
@@ -24350,7 +24348,7 @@ var lambda0, phi0, lambda1, phi1, // bounds
24350
24348
  p0, // previous 3D point
24351
24349
  deltaSum,
24352
24350
  ranges,
24353
- range$4;
24351
+ range$5;
24354
24352
 
24355
24353
  var boundsStream$2 = {
24356
24354
  point: boundsPoint$1,
@@ -24371,7 +24369,7 @@ var boundsStream$2 = {
24371
24369
  if (areaRingSum$1 < 0) lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
24372
24370
  else if (deltaSum > epsilon$3) phi1 = 90;
24373
24371
  else if (deltaSum < -epsilon$3) phi0 = -90;
24374
- range$4[0] = lambda0, range$4[1] = lambda1;
24372
+ range$5[0] = lambda0, range$5[1] = lambda1;
24375
24373
  },
24376
24374
  sphere: function() {
24377
24375
  lambda0 = -(lambda1 = 180), phi0 = -(phi1 = 90);
@@ -24379,7 +24377,7 @@ var boundsStream$2 = {
24379
24377
  };
24380
24378
 
24381
24379
  function boundsPoint$1(lambda, phi) {
24382
- ranges.push(range$4 = [lambda0 = lambda, lambda1 = lambda]);
24380
+ ranges.push(range$5 = [lambda0 = lambda, lambda1 = lambda]);
24383
24381
  if (phi < phi0) phi0 = phi;
24384
24382
  if (phi > phi1) phi1 = phi;
24385
24383
  }
@@ -24426,7 +24424,7 @@ function linePoint(lambda, phi) {
24426
24424
  }
24427
24425
  }
24428
24426
  } else {
24429
- ranges.push(range$4 = [lambda0 = lambda, lambda1 = lambda]);
24427
+ ranges.push(range$5 = [lambda0 = lambda, lambda1 = lambda]);
24430
24428
  }
24431
24429
  if (phi < phi0) phi0 = phi;
24432
24430
  if (phi > phi1) phi1 = phi;
@@ -24438,7 +24436,7 @@ function boundsLineStart() {
24438
24436
  }
24439
24437
 
24440
24438
  function boundsLineEnd() {
24441
- range$4[0] = lambda0, range$4[1] = lambda1;
24439
+ range$5[0] = lambda0, range$5[1] = lambda1;
24442
24440
  boundsStream$2.point = boundsPoint$1;
24443
24441
  p0 = null;
24444
24442
  }
@@ -24462,7 +24460,7 @@ function boundsRingEnd() {
24462
24460
  boundsRingPoint(lambda00$1, phi00$1);
24463
24461
  areaStream$1.lineEnd();
24464
24462
  if (abs$1(deltaSum) > epsilon$3) lambda0 = -(lambda1 = 180);
24465
- range$4[0] = lambda0, range$4[1] = lambda1;
24463
+ range$5[0] = lambda0, range$5[1] = lambda1;
24466
24464
  p0 = null;
24467
24465
  }
24468
24466
 
@@ -24481,7 +24479,7 @@ function rangeContains(range, x) {
24481
24479
  return range[0] <= range[1] ? range[0] <= x && x <= range[1] : x < range[0] || range[1] < x;
24482
24480
  }
24483
24481
 
24484
- function geoBounds$1(feature) {
24482
+ function geoBounds$1$1(feature) {
24485
24483
  var i, n, a, b, merged, deltaMax, delta;
24486
24484
 
24487
24485
  phi1 = lambda1 = -(lambda0 = phi0 = Infinity);
@@ -24511,7 +24509,7 @@ function geoBounds$1(feature) {
24511
24509
  }
24512
24510
  }
24513
24511
 
24514
- ranges = range$4 = null;
24512
+ ranges = range$5 = null;
24515
24513
 
24516
24514
  return lambda0 === Infinity || phi0 === Infinity
24517
24515
  ? [[NaN, NaN], [NaN, NaN]]
@@ -24630,7 +24628,7 @@ function centroidRingPoint(lambda, phi) {
24630
24628
  centroidPointCartesian(x0$4, y0$4, z0);
24631
24629
  }
24632
24630
 
24633
- function geoCentroid$1(object) {
24631
+ function geoCentroid$1$1(object) {
24634
24632
  W0 = W1 =
24635
24633
  X0$1 = Y0$1 = Z0$1 =
24636
24634
  X1$1 = Y1$1 = Z1$1 = 0;
@@ -24999,7 +24997,7 @@ function clip$1(pointVisible, clipLine, interpolate, start) {
24999
24997
  clip.point = point;
25000
24998
  clip.lineStart = lineStart;
25001
24999
  clip.lineEnd = lineEnd;
25002
- segments = merge$2(segments);
25000
+ segments = merge$3(segments);
25003
25001
  var startInside = polygonContains(polygon, start);
25004
25002
  if (segments.length) {
25005
25003
  if (!polygonStarted) sink.polygonStart(), polygonStarted = true;
@@ -25511,7 +25509,7 @@ function clipRectangle(x0, y0, x1, y1) {
25511
25509
  function polygonEnd() {
25512
25510
  var startInside = polygonInside(),
25513
25511
  cleanInside = clean && startInside,
25514
- visible = (segments = merge$2(segments)).length;
25512
+ visible = (segments = merge$3(segments)).length;
25515
25513
  if (cleanInside || visible) {
25516
25514
  stream.polygonStart();
25517
25515
  if (cleanInside) {
@@ -25586,12 +25584,12 @@ function clipRectangle(x0, y0, x1, y1) {
25586
25584
  }
25587
25585
 
25588
25586
  function graticuleX(y0, y1, dy) {
25589
- var y = range$5(y0, y1 - epsilon$3, dy).concat(y1);
25587
+ var y = range$6(y0, y1 - epsilon$3, dy).concat(y1);
25590
25588
  return function(x) { return y.map(function(y) { return [x, y]; }); };
25591
25589
  }
25592
25590
 
25593
25591
  function graticuleY(x0, x1, dx) {
25594
- var x = range$5(x0, x1 - epsilon$3, dx).concat(x1);
25592
+ var x = range$6(x0, x1 - epsilon$3, dx).concat(x1);
25595
25593
  return function(y) { return x.map(function(x) { return [x, y]; }); };
25596
25594
  }
25597
25595
 
@@ -25607,10 +25605,10 @@ function graticule() {
25607
25605
  }
25608
25606
 
25609
25607
  function lines() {
25610
- return range$5(ceil(X0 / DX) * DX, X1, DX).map(X)
25611
- .concat(range$5(ceil(Y0 / DY) * DY, Y1, DY).map(Y))
25612
- .concat(range$5(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs$1(x % DX) > epsilon$3; }).map(x))
25613
- .concat(range$5(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs$1(y % DY) > epsilon$3; }).map(y));
25608
+ return range$6(ceil(X0 / DX) * DX, X1, DX).map(X)
25609
+ .concat(range$6(ceil(Y0 / DY) * DY, Y1, DY).map(Y))
25610
+ .concat(range$6(ceil(x0 / dx) * dx, x1, dx).filter(function(x) { return abs$1(x % DX) > epsilon$3; }).map(x))
25611
+ .concat(range$6(ceil(y0 / dy) * dy, y1, dy).filter(function(y) { return abs$1(y % DY) > epsilon$3; }).map(y));
25614
25612
  }
25615
25613
 
25616
25614
  graticule.lines = function() {
@@ -26659,7 +26657,7 @@ function geoAzimuthalEquidistant() {
26659
26657
  }
26660
26658
 
26661
26659
  function mercatorRaw(lambda, phi) {
26662
- return [lambda, log$1(tan((halfPi$1 + phi) / 2))];
26660
+ return [lambda, log$2(tan((halfPi$1 + phi) / 2))];
26663
26661
  }
26664
26662
 
26665
26663
  mercatorRaw.invert = function(x, y) {
@@ -26713,7 +26711,7 @@ function tany(y) {
26713
26711
 
26714
26712
  function conicConformalRaw(y0, y1) {
26715
26713
  var cy0 = cos$1(y0),
26716
- n = y0 === y1 ? sin$1(y0) : log$1(cy0 / cos$1(y1)) / log$1(tany(y1) / tany(y0)),
26714
+ n = y0 === y1 ? sin$1(y0) : log$2(cy0 / cos$1(y1)) / log$2(tany(y1) / tany(y0)),
26717
26715
  f = cy0 * pow$1(tany(y0), n) / n;
26718
26716
 
26719
26717
  if (!n) return mercatorRaw;
@@ -26963,7 +26961,7 @@ function geoStereographic() {
26963
26961
  }
26964
26962
 
26965
26963
  function transverseMercatorRaw(lambda, phi) {
26966
- return [log$1(tan((halfPi$1 + phi) / 2)), -lambda];
26964
+ return [log$2(tan((halfPi$1 + phi) / 2)), -lambda];
26967
26965
  }
26968
26966
 
26969
26967
  transverseMercatorRaw.invert = function(x, y) {
@@ -27313,7 +27311,7 @@ function quantize (k, nice, zero) {
27313
27311
  stop = ex[1],
27314
27312
  span = stop - start,
27315
27313
  step = nice ? tickStep(start, stop, k) : span / (k + 1);
27316
- return range$5(start + step, stop, step);
27314
+ return range$6(start + step, stop, step);
27317
27315
  };
27318
27316
  }
27319
27317
 
@@ -27565,7 +27563,7 @@ function density2D () {
27565
27563
  };
27566
27564
  density.bandwidth = function (_) {
27567
27565
  if (!arguments.length) return bandwidth;
27568
- _ = array$5(_);
27566
+ _ = array$6(_);
27569
27567
  if (_.length === 1) _ = [+_[0], +_[0]];
27570
27568
  if (_.length !== 2) error$1('invalid bandwidth');
27571
27569
  return bandwidth = _, density;
@@ -28195,7 +28193,7 @@ inherits(Graticule, Transform, {
28195
28193
  }
28196
28194
  t = gen();
28197
28195
  if (src.length) {
28198
- pulse.mod.push(replace$1(src[0], t));
28196
+ pulse.mod.push(replace$2(src[0], t));
28199
28197
  } else {
28200
28198
  pulse.add.push(ingest$1(t));
28201
28199
  }
@@ -28392,14 +28390,14 @@ function set$2(proj, key, value) {
28392
28390
  if (isFunction(proj[key])) proj[key](value);
28393
28391
  }
28394
28392
  function collectGeoJSON(data) {
28395
- data = array$5(data);
28393
+ data = array$6(data);
28396
28394
  return data.length === 1 ? data[0] : {
28397
28395
  type: FeatureCollection,
28398
28396
  features: data.reduce((a, f) => a.concat(featurize(f)), [])
28399
28397
  };
28400
28398
  }
28401
28399
  function featurize(f) {
28402
- return f.type === FeatureCollection ? f.features : array$5(f).filter(d => d != null).map(d => d.type === Feature ? d : {
28400
+ return f.type === FeatureCollection ? f.features : array$6(f).filter(d => d != null).map(d => d.type === Feature ? d : {
28403
28401
  type: Feature,
28404
28402
  geometry: d
28405
28403
  });
@@ -29894,7 +29892,7 @@ function simulation(nodes, _) {
29894
29892
  return setup(sim, _, true).on('end', () => stopped = true);
29895
29893
  }
29896
29894
  function setup(sim, _, init, pulse) {
29897
- var f = array$5(_.forces),
29895
+ var f = array$6(_.forces),
29898
29896
  i,
29899
29897
  n,
29900
29898
  p,
@@ -30288,7 +30286,7 @@ function lcg() {
30288
30286
  return () => (s = (a * s + c) % m) / m;
30289
30287
  }
30290
30288
 
30291
- function array$2(x) {
30289
+ function array$3(x) {
30292
30290
  return typeof x === "object" && "length" in x
30293
30291
  ? x // Array, TypedArray, NodeList, array-like
30294
30292
  : Array.from(x); // Map, Set, iterable, string, or anything else
@@ -30471,7 +30469,7 @@ function Node(circle) {
30471
30469
  }
30472
30470
 
30473
30471
  function packSiblingsRandom(circles, random) {
30474
- if (!(n = (circles = array$2(circles)).length)) return 0;
30472
+ if (!(n = (circles = array$3(circles)).length)) return 0;
30475
30473
 
30476
30474
  var a, b, c, n, aa, ca, i, j, k, sj, sk;
30477
30475
 
@@ -31376,7 +31374,7 @@ inherits(Nest, Transform, {
31376
31374
 
31377
31375
  // generate new tree structure
31378
31376
  this.value = tree = hierarchy({
31379
- values: array$5(_.keys).reduce((n, k) => {
31377
+ values: array$6(_.keys).reduce((n, k) => {
31380
31378
  n.key(k);
31381
31379
  return n;
31382
31380
  }, nest()).entries(out.source)
@@ -32736,7 +32734,7 @@ inherits(Label$1, Transform, {
32736
32734
  const as = _.as || Output$1;
32737
32735
 
32738
32736
  // run label layout
32739
- 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 => {
32737
+ 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 => {
32740
32738
  // write layout results to data stream
32741
32739
  const t = l.datum;
32742
32740
  t[as[0]] = l.x;
@@ -32855,7 +32853,7 @@ inherits(Loess, Transform, {
32855
32853
  const Methods = {
32856
32854
  constant: constant$4,
32857
32855
  linear: linear$2,
32858
- log: log$3,
32856
+ log: log$4,
32859
32857
  exp: exp$1,
32860
32858
  pow: pow$3,
32861
32859
  quad: quad,
@@ -34941,7 +34939,7 @@ inherits(Wordcloud, Transform, {
34941
34939
  // create font size scaling function as needed
34942
34940
  if (range) {
34943
34941
  const fsize = fontSize,
34944
- sizeScale = scale$4('sqrt')().domain(extent(data, fsize)).range(range);
34942
+ sizeScale = scale$5('sqrt')().domain(extent(data, fsize)).range(range);
34945
34943
  fontSize = x => sizeScale(fsize(x));
34946
34944
  }
34947
34945
  data.forEach(t => {
@@ -34987,8 +34985,8 @@ function Bitmaps() {
34987
34985
  let width = 8,
34988
34986
  data = [],
34989
34987
  seen = array32(0),
34990
- curr = array$1(0, width),
34991
- prev = array$1(0, width);
34988
+ curr = array$2(0, width),
34989
+ prev = array$2(0, width);
34992
34990
  return {
34993
34991
  data: () => data,
34994
34992
  seen: () => seen = lengthen(seen, data.length),
@@ -35044,8 +35042,8 @@ function Bitmaps() {
35044
35042
  const k = curr.length;
35045
35043
  if (n > k || m > width) {
35046
35044
  width = Math.max(m, width);
35047
- curr = array$1(n, width, curr);
35048
- prev = array$1(n, width);
35045
+ curr = array$2(n, width, curr);
35046
+ prev = array$2(n, width);
35049
35047
  }
35050
35048
  }
35051
35049
  };
@@ -35056,7 +35054,7 @@ function lengthen(array, length, copy) {
35056
35054
  copy.set(array);
35057
35055
  return copy;
35058
35056
  }
35059
- function array$1(n, m, array) {
35057
+ function array$2(n, m, array) {
35060
35058
  const copy = (m < 0x101 ? array8 : m < 0x10001 ? array16 : array32)(n);
35061
35059
  if (array) copy.set(array);
35062
35060
  return copy;
@@ -35106,13 +35104,13 @@ function SortedIndex() {
35106
35104
  addv[i] = key(data[i]);
35107
35105
  addi[i] = i;
35108
35106
  }
35109
- addv = sort(addv, addi);
35107
+ addv = sort$1(addv, addi);
35110
35108
  if (n0) {
35111
35109
  oldv = value;
35112
35110
  oldi = index;
35113
35111
  value = Array(n0 + n1);
35114
35112
  index = array32(n0 + n1);
35115
- merge$1(base, oldv, oldi, n0, addv, addi, n1, value, index);
35113
+ merge$2(base, oldv, oldi, n0, addv, addi, n1, value, index);
35116
35114
  } else {
35117
35115
  if (base > 0) for (i = 0; i < n1; ++i) {
35118
35116
  addi[i] += base;
@@ -35168,7 +35166,7 @@ function SortedIndex() {
35168
35166
  size: () => size
35169
35167
  };
35170
35168
  }
35171
- function sort(values, index) {
35169
+ function sort$1(values, index) {
35172
35170
  values.sort.call(index, (a, b) => {
35173
35171
  const x = values[a],
35174
35172
  y = values[b];
@@ -35176,7 +35174,7 @@ function sort(values, index) {
35176
35174
  });
35177
35175
  return permute(values, index);
35178
35176
  }
35179
- function merge$1(base, value0, index0, n0, value1, index1, n1, value, index) {
35177
+ function merge$2(base, value0, index0, n0, value1, index1, n1, value, index) {
35180
35178
  let i0 = 0,
35181
35179
  i1 = 0,
35182
35180
  i;
@@ -37245,6 +37243,12 @@ const TYPE_ENUM = 'E',
37245
37243
  TYPE_RANGE_EXC = 'R-E',
37246
37244
  TYPE_RANGE_LE = 'R-LE',
37247
37245
  TYPE_RANGE_RE = 'R-RE',
37246
+ TYPE_PRED_LT = 'E-LT',
37247
+ TYPE_PRED_LTE = 'E-LTE',
37248
+ TYPE_PRED_GT = 'E-GT',
37249
+ TYPE_PRED_GTE = 'E-GTE',
37250
+ TYPE_PRED_VALID = 'E-VALID',
37251
+ TYPE_PRED_ONE_OF = 'E-ONE',
37248
37252
  UNIT_INDEX = 'index:unit';
37249
37253
 
37250
37254
  // TODO: revisit date coercion?
@@ -37264,7 +37268,7 @@ function testPoint(datum, entry) {
37264
37268
  if (f.type === TYPE_ENUM) {
37265
37269
  // Enumerated fields can either specify individual values (single/multi selections)
37266
37270
  // or an array of values (interval selections).
37267
- if (isArray(values[i]) ? values[i].indexOf(dval) < 0 : dval !== values[i]) {
37271
+ if (isArray(values[i]) ? !values[i].includes(dval) : dval !== values[i]) {
37268
37272
  return false;
37269
37273
  }
37270
37274
  } else {
@@ -37278,6 +37282,18 @@ function testPoint(datum, entry) {
37278
37282
  if (!inrange(dval, values[i], false, false)) return false;
37279
37283
  } else if (f.type === TYPE_RANGE_LE) {
37280
37284
  if (!inrange(dval, values[i], false, true)) return false;
37285
+ } else if (f.type === TYPE_PRED_LT) {
37286
+ if (dval >= values[i]) return false;
37287
+ } else if (f.type === TYPE_PRED_LTE) {
37288
+ if (dval > values[i]) return false;
37289
+ } else if (f.type === TYPE_PRED_GT) {
37290
+ if (dval <= values[i]) return false;
37291
+ } else if (f.type === TYPE_PRED_GTE) {
37292
+ if (dval < values[i]) return false;
37293
+ } else if (f.type === TYPE_PRED_VALID) {
37294
+ if (dval === null || isNaN(dval)) return false;
37295
+ } else if (f.type === TYPE_PRED_ONE_OF) {
37296
+ if (values[i].indexOf(dval) === -1) return false;
37281
37297
  }
37282
37298
  }
37283
37299
  }
@@ -37422,7 +37438,7 @@ function selectionResolve(name, op, isMulti, vl5) {
37422
37438
  resUnit = res[unit] || (res[unit] = []);
37423
37439
  types[field.field] = type = field.type.charAt(0);
37424
37440
  union = ops[`${type}_union`];
37425
- res[unit] = union(resUnit, array$5(values[j]));
37441
+ res[unit] = union(resUnit, array$6(values[j]));
37426
37442
  }
37427
37443
 
37428
37444
  // If the same multi-selection is repeated over views and projected over
@@ -37433,7 +37449,7 @@ function selectionResolve(name, op, isMulti, vl5) {
37433
37449
  // a more human-friendly one.
37434
37450
  if (isMulti) {
37435
37451
  resUnit = multiRes[unit] || (multiRes[unit] = []);
37436
- resUnit.push(array$5(values).reduce((obj, curr, j) => (obj[fields[j].field] = curr, obj), {}));
37452
+ resUnit.push(array$6(values).reduce((obj, curr, j) => (obj[fields[j].field] = curr, obj), {}));
37437
37453
  }
37438
37454
  } else {
37439
37455
  // Short circuit extensional selectionId stores which hold sorted IDs unique to each unit.
@@ -37480,11 +37496,11 @@ var ops = {
37480
37496
  if (!base.length) return value;
37481
37497
  var i = 0,
37482
37498
  n = value.length;
37483
- for (; i < n; ++i) if (base.indexOf(value[i]) < 0) base.push(value[i]);
37499
+ for (; i < n; ++i) if (!base.includes(value[i])) base.push(value[i]);
37484
37500
  return base;
37485
37501
  },
37486
37502
  E_intersect: function (base, value) {
37487
- return !base.length ? value : base.filter(v => value.indexOf(v) >= 0);
37503
+ return !base.length ? value : base.filter(v => value.includes(v));
37488
37504
  },
37489
37505
  R_union: function (base, value) {
37490
37506
  var lo = toNumber(value[0]),
@@ -37516,15 +37532,15 @@ var ops = {
37516
37532
  }
37517
37533
  };
37518
37534
 
37519
- const DataPrefix$1 = ':',
37520
- IndexPrefix$1 = '@';
37535
+ const DataPrefix$2 = ':',
37536
+ IndexPrefix$2 = '@';
37521
37537
  function selectionVisitor(name, args, scope, params) {
37522
37538
  if (args[0].type !== Literal) error$1('First argument to selection functions must be a string literal.');
37523
37539
  const data = args[0].value,
37524
37540
  op = args.length >= 2 && peek$1(args).value,
37525
37541
  field = 'unit',
37526
- indexName = IndexPrefix$1 + field,
37527
- dataName = DataPrefix$1 + data;
37542
+ indexName = IndexPrefix$2 + field,
37543
+ dataName = DataPrefix$2 + data;
37528
37544
 
37529
37545
  // eslint-disable-next-line no-prototype-builtins
37530
37546
  if (op === Intersect && !has$1(params, indexName)) {
@@ -37537,16 +37553,16 @@ function selectionVisitor(name, args, scope, params) {
37537
37553
  }
37538
37554
  }
37539
37555
 
37540
- function data$1(name) {
37556
+ function data$2(name) {
37541
37557
  const data = this.context.data[name];
37542
37558
  return data ? data.values.value : [];
37543
37559
  }
37544
- function indata(name, field, value) {
37560
+ function indata$1(name, field, value) {
37545
37561
  const index = this.context.data[name]['index:' + field],
37546
37562
  entry = index ? index.value.get(value) : undefined;
37547
37563
  return entry ? entry.count : entry;
37548
37564
  }
37549
- function setdata(name, tuples) {
37565
+ function setdata$1(name, tuples) {
37550
37566
  const df = this.context.dataflow,
37551
37567
  data = this.context.data[name],
37552
37568
  input = data.input;
@@ -37554,7 +37570,7 @@ function setdata(name, tuples) {
37554
37570
  return 1;
37555
37571
  }
37556
37572
 
37557
- function encode (item, name, retval) {
37573
+ function encode$1 (item, name, retval) {
37558
37574
  if (item) {
37559
37575
  const df = this.context.dataflow,
37560
37576
  target = item.mark.source;
@@ -37563,47 +37579,47 @@ function encode (item, name, retval) {
37563
37579
  return retval !== undefined ? retval : item;
37564
37580
  }
37565
37581
 
37566
- const wrap = method => function (value, spec) {
37582
+ const wrap$1 = method => function (value, spec) {
37567
37583
  const locale = this.context.dataflow.locale();
37568
37584
  return value === null ? 'null' : locale[method](spec)(value);
37569
37585
  };
37570
- const format = wrap('format');
37571
- const timeFormat$1 = wrap('timeFormat');
37572
- const utcFormat = wrap('utcFormat');
37573
- const timeParse = wrap('timeParse');
37574
- const utcParse = wrap('utcParse');
37575
- const dateObj = new Date(2000, 0, 1);
37576
- function time(month, day, specifier) {
37586
+ const format$1 = wrap$1('format');
37587
+ const timeFormat$2 = wrap$1('timeFormat');
37588
+ const utcFormat$1 = wrap$1('utcFormat');
37589
+ const timeParse$1 = wrap$1('timeParse');
37590
+ const utcParse$1 = wrap$1('utcParse');
37591
+ const dateObj$1 = new Date(2000, 0, 1);
37592
+ function time$1(month, day, specifier) {
37577
37593
  if (!Number.isInteger(month) || !Number.isInteger(day)) return '';
37578
- dateObj.setYear(2000);
37579
- dateObj.setMonth(month);
37580
- dateObj.setDate(day);
37581
- return timeFormat$1.call(this, dateObj, specifier);
37594
+ dateObj$1.setYear(2000);
37595
+ dateObj$1.setMonth(month);
37596
+ dateObj$1.setDate(day);
37597
+ return timeFormat$2.call(this, dateObj$1, specifier);
37582
37598
  }
37583
- function monthFormat(month) {
37584
- return time.call(this, month, 1, '%B');
37599
+ function monthFormat$1(month) {
37600
+ return time$1.call(this, month, 1, '%B');
37585
37601
  }
37586
- function monthAbbrevFormat(month) {
37587
- return time.call(this, month, 1, '%b');
37602
+ function monthAbbrevFormat$1(month) {
37603
+ return time$1.call(this, month, 1, '%b');
37588
37604
  }
37589
- function dayFormat(day) {
37590
- return time.call(this, 0, 2 + day, '%A');
37605
+ function dayFormat$1(day) {
37606
+ return time$1.call(this, 0, 2 + day, '%A');
37591
37607
  }
37592
- function dayAbbrevFormat(day) {
37593
- return time.call(this, 0, 2 + day, '%a');
37608
+ function dayAbbrevFormat$1(day) {
37609
+ return time$1.call(this, 0, 2 + day, '%a');
37594
37610
  }
37595
37611
 
37596
- const DataPrefix = ':';
37597
- const IndexPrefix = '@';
37598
- const ScalePrefix = '%';
37599
- const SignalPrefix = '$';
37612
+ const DataPrefix$1 = ':';
37613
+ const IndexPrefix$1 = '@';
37614
+ const ScalePrefix$1 = '%';
37615
+ const SignalPrefix$1 = '$';
37600
37616
 
37601
- function dataVisitor(name, args, scope, params) {
37617
+ function dataVisitor$1(name, args, scope, params) {
37602
37618
  if (args[0].type !== Literal) {
37603
37619
  error$1('First argument to data functions must be a string literal.');
37604
37620
  }
37605
37621
  const data = args[0].value,
37606
- dataName = DataPrefix + data;
37622
+ dataName = DataPrefix$1 + data;
37607
37623
  if (!has$1(dataName, params)) {
37608
37624
  try {
37609
37625
  params[dataName] = scope.getData(data).tuplesRef();
@@ -37612,29 +37628,29 @@ function dataVisitor(name, args, scope, params) {
37612
37628
  }
37613
37629
  }
37614
37630
  }
37615
- function indataVisitor(name, args, scope, params) {
37631
+ function indataVisitor$1(name, args, scope, params) {
37616
37632
  if (args[0].type !== Literal) error$1('First argument to indata must be a string literal.');
37617
37633
  if (args[1].type !== Literal) error$1('Second argument to indata must be a string literal.');
37618
37634
  const data = args[0].value,
37619
37635
  field = args[1].value,
37620
- indexName = IndexPrefix + field;
37636
+ indexName = IndexPrefix$1 + field;
37621
37637
  if (!has$1(indexName, params)) {
37622
37638
  params[indexName] = scope.getData(data).indataRef(scope, field);
37623
37639
  }
37624
37640
  }
37625
- function scaleVisitor(name, args, scope, params) {
37641
+ function scaleVisitor$1(name, args, scope, params) {
37626
37642
  if (args[0].type === Literal) {
37627
37643
  // add scale dependency
37628
- addScaleDependency(scope, params, args[0].value);
37644
+ addScaleDependency$1(scope, params, args[0].value);
37629
37645
  } else {
37630
37646
  // indirect scale lookup; add all scales as parameters
37631
37647
  for (name in scope.scales) {
37632
- addScaleDependency(scope, params, name);
37648
+ addScaleDependency$1(scope, params, name);
37633
37649
  }
37634
37650
  }
37635
37651
  }
37636
- function addScaleDependency(scope, params, name) {
37637
- const scaleName = ScalePrefix + name;
37652
+ function addScaleDependency$1(scope, params, name) {
37653
+ const scaleName = ScalePrefix$1 + name;
37638
37654
  if (!has$1(params, scaleName)) {
37639
37655
  try {
37640
37656
  params[scaleName] = scope.scaleRef(name);
@@ -37644,7 +37660,7 @@ function addScaleDependency(scope, params, name) {
37644
37660
  }
37645
37661
  }
37646
37662
 
37647
- function getScale(nameOrFunction, ctx) {
37663
+ function getScale$1(nameOrFunction, ctx) {
37648
37664
  if (isFunction(nameOrFunction)) {
37649
37665
  return nameOrFunction;
37650
37666
  }
@@ -37654,17 +37670,17 @@ function getScale(nameOrFunction, ctx) {
37654
37670
  }
37655
37671
  return undefined;
37656
37672
  }
37657
- function internalScaleFunctions(codegen, fnctx, visitors) {
37673
+ function internalScaleFunctions$1(codegen, fnctx, visitors) {
37658
37674
  // add helper method to the 'this' expression function context
37659
37675
  fnctx.__bandwidth = s => s && s.bandwidth ? s.bandwidth() : 0;
37660
37676
 
37661
37677
  // register AST visitors for internal scale functions
37662
- visitors._bandwidth = scaleVisitor;
37663
- visitors._range = scaleVisitor;
37664
- visitors._scale = scaleVisitor;
37678
+ visitors._bandwidth = scaleVisitor$1;
37679
+ visitors._range = scaleVisitor$1;
37680
+ visitors._scale = scaleVisitor$1;
37665
37681
 
37666
37682
  // resolve scale reference directly to the signal hash argument
37667
- const ref = arg => '_[' + (arg.type === Literal ? $(ScalePrefix + arg.value) : $(ScalePrefix) + '+' + codegen(arg)) + ']';
37683
+ const ref = arg => '_[' + (arg.type === Literal ? $(ScalePrefix$1 + arg.value) : $(ScalePrefix$1) + '+' + codegen(arg)) + ']';
37668
37684
 
37669
37685
  // define and return internal scale function code generators
37670
37686
  // these internal functions are called by mark encoders
@@ -37675,11 +37691,11 @@ function internalScaleFunctions(codegen, fnctx, visitors) {
37675
37691
  };
37676
37692
  }
37677
37693
 
37678
- function geoMethod(methodName, globalMethod) {
37694
+ function geoMethod$1(methodName, globalMethod) {
37679
37695
  return function (projection, geojson, group) {
37680
37696
  if (projection) {
37681
37697
  // projection defined, use it
37682
- const p = getScale(projection, (group || this).context);
37698
+ const p = getScale$1(projection, (group || this).context);
37683
37699
  return p && p.path[methodName](geojson);
37684
37700
  } else {
37685
37701
  // projection undefined, use global method
@@ -37687,15 +37703,15 @@ function geoMethod(methodName, globalMethod) {
37687
37703
  }
37688
37704
  };
37689
37705
  }
37690
- const geoArea = geoMethod('area', geoArea$1);
37691
- const geoBounds = geoMethod('bounds', geoBounds$1);
37692
- const geoCentroid = geoMethod('centroid', geoCentroid$1);
37693
- function geoScale(projection, group) {
37694
- const p = getScale(projection, (group || this).context);
37706
+ const geoArea$1 = geoMethod$1('area', geoArea$1$1);
37707
+ const geoBounds$1 = geoMethod$1('bounds', geoBounds$1$1);
37708
+ const geoCentroid$1 = geoMethod$1('centroid', geoCentroid$1$1);
37709
+ function geoScale$1(projection, group) {
37710
+ const p = getScale$1(projection, (group || this).context);
37695
37711
  return p && p.scale();
37696
37712
  }
37697
37713
 
37698
- function inScope (item) {
37714
+ function inScope$1 (item) {
37699
37715
  const group = this.context.group;
37700
37716
  let value = false;
37701
37717
  if (group) while (item) {
@@ -37708,7 +37724,7 @@ function inScope (item) {
37708
37724
  return value;
37709
37725
  }
37710
37726
 
37711
- function log(df, method, args) {
37727
+ function log$1(df, method, args) {
37712
37728
  try {
37713
37729
  df[method].apply(df, ['EXPRESSION'].concat([].slice.call(args)));
37714
37730
  } catch (err) {
@@ -37716,66 +37732,66 @@ function log(df, method, args) {
37716
37732
  }
37717
37733
  return args[args.length - 1];
37718
37734
  }
37719
- function warn$1() {
37720
- return log(this.context.dataflow, 'warn', arguments);
37735
+ function warn$2() {
37736
+ return log$1(this.context.dataflow, 'warn', arguments);
37721
37737
  }
37722
- function info() {
37723
- return log(this.context.dataflow, 'info', arguments);
37738
+ function info$1() {
37739
+ return log$1(this.context.dataflow, 'info', arguments);
37724
37740
  }
37725
- function debug$1() {
37726
- return log(this.context.dataflow, 'debug', arguments);
37741
+ function debug$2() {
37742
+ return log$1(this.context.dataflow, 'debug', arguments);
37727
37743
  }
37728
37744
 
37729
37745
  // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
37730
- function channel_luminance_value(channelValue) {
37746
+ function channel_luminance_value$1(channelValue) {
37731
37747
  const val = channelValue / 255;
37732
37748
  if (val <= 0.03928) {
37733
37749
  return val / 12.92;
37734
37750
  }
37735
37751
  return Math.pow((val + 0.055) / 1.055, 2.4);
37736
37752
  }
37737
- function luminance(color) {
37753
+ function luminance$1(color) {
37738
37754
  const c = rgb$1(color),
37739
- r = channel_luminance_value(c.r),
37740
- g = channel_luminance_value(c.g),
37741
- b = channel_luminance_value(c.b);
37755
+ r = channel_luminance_value$1(c.r),
37756
+ g = channel_luminance_value$1(c.g),
37757
+ b = channel_luminance_value$1(c.b);
37742
37758
  return 0.2126 * r + 0.7152 * g + 0.0722 * b;
37743
37759
  }
37744
37760
 
37745
37761
  // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
37746
- function contrast(color1, color2) {
37747
- const lum1 = luminance(color1),
37748
- lum2 = luminance(color2),
37762
+ function contrast$1(color1, color2) {
37763
+ const lum1 = luminance$1(color1),
37764
+ lum2 = luminance$1(color2),
37749
37765
  lumL = Math.max(lum1, lum2),
37750
37766
  lumD = Math.min(lum1, lum2);
37751
37767
  return (lumL + 0.05) / (lumD + 0.05);
37752
37768
  }
37753
37769
 
37754
- function merge () {
37770
+ function merge$1 () {
37755
37771
  const args = [].slice.call(arguments);
37756
37772
  args.unshift({});
37757
37773
  return extend$1(...args);
37758
37774
  }
37759
37775
 
37760
- function equal(a, b) {
37761
- 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;
37776
+ function equal$1(a, b) {
37777
+ 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;
37762
37778
  }
37763
- function equalArray(a, b) {
37779
+ function equalArray$1(a, b) {
37764
37780
  for (let i = 0, n = a.length; i < n; ++i) {
37765
- if (!equal(a[i], b[i])) return false;
37781
+ if (!equal$1(a[i], b[i])) return false;
37766
37782
  }
37767
37783
  return true;
37768
37784
  }
37769
- function equalObject(a, b) {
37785
+ function equalObject$1(a, b) {
37770
37786
  for (const key in a) {
37771
- if (!equal(a[key], b[key])) return false;
37787
+ if (!equal$1(a[key], b[key])) return false;
37772
37788
  }
37773
37789
  return true;
37774
37790
  }
37775
- function removePredicate(props) {
37776
- return _ => equalObject(props, _);
37791
+ function removePredicate$1(props) {
37792
+ return _ => equalObject$1(props, _);
37777
37793
  }
37778
- function modify (name, insert, remove, toggle, modify, values) {
37794
+ function modify$1 (name, insert, remove, toggle, modify, values) {
37779
37795
  const df = this.context.dataflow,
37780
37796
  data = this.context.data[name],
37781
37797
  input = data.input,
@@ -37796,14 +37812,14 @@ function modify (name, insert, remove, toggle, modify, values) {
37796
37812
  }, true, 1);
37797
37813
  }
37798
37814
  if (remove) {
37799
- predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate(remove);
37815
+ predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate$1(remove);
37800
37816
  changes.remove(predicate);
37801
37817
  }
37802
37818
  if (insert) {
37803
37819
  changes.insert(insert);
37804
37820
  }
37805
37821
  if (toggle) {
37806
- predicate = removePredicate(toggle);
37822
+ predicate = removePredicate$1(toggle);
37807
37823
  if (input.value.some(predicate)) {
37808
37824
  changes.remove(predicate);
37809
37825
  } else {
@@ -37818,92 +37834,92 @@ function modify (name, insert, remove, toggle, modify, values) {
37818
37834
  return 1;
37819
37835
  }
37820
37836
 
37821
- function pinchDistance(event) {
37837
+ function pinchDistance$1(event) {
37822
37838
  const t = event.touches,
37823
37839
  dx = t[0].clientX - t[1].clientX,
37824
37840
  dy = t[0].clientY - t[1].clientY;
37825
37841
  return Math.hypot(dx, dy);
37826
37842
  }
37827
- function pinchAngle(event) {
37843
+ function pinchAngle$1(event) {
37828
37844
  const t = event.touches;
37829
37845
  return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);
37830
37846
  }
37831
37847
 
37832
37848
  // memoize accessor functions
37833
- const accessors = {};
37834
- function pluck (data, name) {
37835
- const accessor = accessors[name] || (accessors[name] = field$1(name));
37849
+ const accessors$1 = {};
37850
+ function pluck$1 (data, name) {
37851
+ const accessor = accessors$1[name] || (accessors$1[name] = field$1(name));
37836
37852
  return isArray(data) ? data.map(accessor) : accessor(data);
37837
37853
  }
37838
37854
 
37839
- function array(seq) {
37855
+ function array$1(seq) {
37840
37856
  return isArray(seq) || ArrayBuffer.isView(seq) ? seq : null;
37841
37857
  }
37842
- function sequence(seq) {
37843
- return array(seq) || (isString(seq) ? seq : null);
37858
+ function sequence$1(seq) {
37859
+ return array$1(seq) || (isString(seq) ? seq : null);
37844
37860
  }
37845
- function join(seq) {
37861
+ function join$1(seq) {
37846
37862
  for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
37847
37863
  args[_key - 1] = arguments[_key];
37848
37864
  }
37849
- return array(seq).join(...args);
37865
+ return array$1(seq).join(...args);
37850
37866
  }
37851
- function indexof(seq) {
37867
+ function indexof$1(seq) {
37852
37868
  for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
37853
37869
  args[_key2 - 1] = arguments[_key2];
37854
37870
  }
37855
- return sequence(seq).indexOf(...args);
37871
+ return sequence$1(seq).indexOf(...args);
37856
37872
  }
37857
- function lastindexof(seq) {
37873
+ function lastindexof$1(seq) {
37858
37874
  for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
37859
37875
  args[_key3 - 1] = arguments[_key3];
37860
37876
  }
37861
- return sequence(seq).lastIndexOf(...args);
37877
+ return sequence$1(seq).lastIndexOf(...args);
37862
37878
  }
37863
- function slice$1(seq) {
37879
+ function slice$2(seq) {
37864
37880
  for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
37865
37881
  args[_key4 - 1] = arguments[_key4];
37866
37882
  }
37867
- return sequence(seq).slice(...args);
37883
+ return sequence$1(seq).slice(...args);
37868
37884
  }
37869
- function replace(str, pattern, repl) {
37885
+ function replace$1(str, pattern, repl) {
37870
37886
  if (isFunction(repl)) error$1('Function argument passed to replace.');
37871
37887
  return String(str).replace(pattern, repl);
37872
37888
  }
37873
- function reverse$1(seq) {
37874
- return array(seq).slice().reverse();
37889
+ function reverse$2(seq) {
37890
+ return array$1(seq).slice().reverse();
37875
37891
  }
37876
37892
 
37877
- function bandspace(count, paddingInner, paddingOuter) {
37893
+ function bandspace$1(count, paddingInner, paddingOuter) {
37878
37894
  return bandSpace(count || 0, paddingInner || 0, paddingOuter || 0);
37879
37895
  }
37880
- function bandwidth(name, group) {
37881
- const s = getScale(name, (group || this).context);
37896
+ function bandwidth$1(name, group) {
37897
+ const s = getScale$1(name, (group || this).context);
37882
37898
  return s && s.bandwidth ? s.bandwidth() : 0;
37883
37899
  }
37884
- function copy(name, group) {
37885
- const s = getScale(name, (group || this).context);
37900
+ function copy$1(name, group) {
37901
+ const s = getScale$1(name, (group || this).context);
37886
37902
  return s ? s.copy() : undefined;
37887
37903
  }
37888
- function domain$2(name, group) {
37889
- const s = getScale(name, (group || this).context);
37904
+ function domain$3(name, group) {
37905
+ const s = getScale$1(name, (group || this).context);
37890
37906
  return s ? s.domain() : [];
37891
37907
  }
37892
- function invert(name, range, group) {
37893
- const s = getScale(name, (group || this).context);
37908
+ function invert$1(name, range, group) {
37909
+ const s = getScale$1(name, (group || this).context);
37894
37910
  return !s ? undefined : isArray(range) ? (s.invertRange || s.invert)(range) : (s.invert || s.invertExtent)(range);
37895
37911
  }
37896
- function range$3(name, group) {
37897
- const s = getScale(name, (group || this).context);
37912
+ function range$4(name, group) {
37913
+ const s = getScale$1(name, (group || this).context);
37898
37914
  return s && s.range ? s.range() : [];
37899
37915
  }
37900
- function scale$2(name, value, group) {
37901
- const s = getScale(name, (group || this).context);
37916
+ function scale$3(name, value, group) {
37917
+ const s = getScale$1(name, (group || this).context);
37902
37918
  return s ? s(value) : undefined;
37903
37919
  }
37904
37920
 
37905
- function scaleGradient (scale, p0, p1, count, group) {
37906
- scale = getScale(scale, (group || this).context);
37921
+ function scaleGradient$1 (scale, p0, p1, count, group) {
37922
+ scale = getScale$1(scale, (group || this).context);
37907
37923
  const gradient = Gradient$1(p0, p1);
37908
37924
  let stops = scale.domain(),
37909
37925
  min = stops[0],
@@ -37911,7 +37927,7 @@ function scaleGradient (scale, p0, p1, count, group) {
37911
37927
  fraction = identity$7;
37912
37928
  if (!(max - min)) {
37913
37929
  // expand scale if domain has zero span, fix #1479
37914
- scale = (scale.interpolator ? scale$4('sequential')().interpolator(scale.interpolator()) : scale$4('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);
37930
+ scale = (scale.interpolator ? scale$5('sequential')().interpolator(scale.interpolator()) : scale$5('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);
37915
37931
  } else {
37916
37932
  fraction = scaleFraction(scale, min, max);
37917
37933
  }
@@ -37924,62 +37940,62 @@ function scaleGradient (scale, p0, p1, count, group) {
37924
37940
  return gradient;
37925
37941
  }
37926
37942
 
37927
- function geoShape(projection, geojson, group) {
37928
- const p = getScale(projection, (group || this).context);
37943
+ function geoShape$1(projection, geojson, group) {
37944
+ const p = getScale$1(projection, (group || this).context);
37929
37945
  return function (context) {
37930
37946
  return p ? p.path.context(context)(geojson) : '';
37931
37947
  };
37932
37948
  }
37933
- function pathShape(path) {
37949
+ function pathShape$1(path) {
37934
37950
  let p = null;
37935
37951
  return function (context) {
37936
37952
  return context ? pathRender(context, p = p || parse$3(path)) : path;
37937
37953
  };
37938
37954
  }
37939
37955
 
37940
- const datum = d => d.data;
37941
- function treeNodes(name, context) {
37942
- const tree = data$1.call(context, name);
37956
+ const datum$1 = d => d.data;
37957
+ function treeNodes$1(name, context) {
37958
+ const tree = data$2.call(context, name);
37943
37959
  return tree.root && tree.root.lookup || {};
37944
37960
  }
37945
- function treePath(name, source, target) {
37946
- const nodes = treeNodes(name, this),
37961
+ function treePath$1(name, source, target) {
37962
+ const nodes = treeNodes$1(name, this),
37947
37963
  s = nodes[source],
37948
37964
  t = nodes[target];
37949
- return s && t ? s.path(t).map(datum) : undefined;
37965
+ return s && t ? s.path(t).map(datum$1) : undefined;
37950
37966
  }
37951
- function treeAncestors(name, node) {
37952
- const n = treeNodes(name, this)[node];
37953
- return n ? n.ancestors().map(datum) : undefined;
37967
+ function treeAncestors$1(name, node) {
37968
+ const n = treeNodes$1(name, this)[node];
37969
+ return n ? n.ancestors().map(datum$1) : undefined;
37954
37970
  }
37955
37971
 
37956
- const _window = () => typeof window !== 'undefined' && window || null;
37957
- function screen() {
37958
- const w = _window();
37972
+ const _window$1 = () => typeof window !== 'undefined' && window || null;
37973
+ function screen$1() {
37974
+ const w = _window$1();
37959
37975
  return w ? w.screen : {};
37960
37976
  }
37961
- function windowSize() {
37962
- const w = _window();
37977
+ function windowSize$1() {
37978
+ const w = _window$1();
37963
37979
  return w ? [w.innerWidth, w.innerHeight] : [undefined, undefined];
37964
37980
  }
37965
- function containerSize() {
37981
+ function containerSize$1() {
37966
37982
  const view = this.context.dataflow,
37967
37983
  el = view.container && view.container();
37968
37984
  return el ? [el.clientWidth, el.clientHeight] : [undefined, undefined];
37969
37985
  }
37970
37986
 
37971
- function intersect (b, opt, group) {
37987
+ function intersect$1 (b, opt, group) {
37972
37988
  if (!b) return [];
37973
37989
  const [u, v] = b,
37974
37990
  box = new Bounds().set(u[0], u[1], v[0], v[1]),
37975
37991
  scene = group || this.context.dataflow.scenegraph().root;
37976
- return intersect$2(scene, box, filter(opt));
37992
+ return intersect$3(scene, box, filter$1(opt));
37977
37993
  }
37978
- function filter(opt) {
37994
+ function filter$1(opt) {
37979
37995
  let p = null;
37980
37996
  if (opt) {
37981
- const types = array$5(opt.marktype),
37982
- names = array$5(opt.markname);
37997
+ const types = array$6(opt.marktype),
37998
+ names = array$6(opt.markname);
37983
37999
  p = _ => (!types.length || types.some(t => _.marktype === t)) && (!names.length || names.some(s => _.name === s));
37984
38000
  }
37985
38001
  return p;
@@ -37994,9 +38010,9 @@ function filter(opt) {
37994
38010
  * @param {*} minDist the minimum distance, in pixels, that thenew point needs to be apart from the last point
37995
38011
  * @returns a new array containing the lasso with the new point
37996
38012
  */
37997
- function lassoAppend(lasso, x, y) {
38013
+ function lassoAppend$1(lasso, x, y) {
37998
38014
  let minDist = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 5;
37999
- lasso = array$5(lasso);
38015
+ lasso = array$6(lasso);
38000
38016
  const last = lasso[lasso.length - 1];
38001
38017
 
38002
38018
  // Add point to lasso if its the first point or distance to last point exceed minDist
@@ -38009,8 +38025,8 @@ function lassoAppend(lasso, x, y) {
38009
38025
  * @param {*} lasso the lasso in pixel space in the form [[x,y], [x,y], ...]
38010
38026
  * @returns the svg path command that draws the lasso
38011
38027
  */
38012
- function lassoPath(lasso) {
38013
- return array$5(lasso).reduce((svg, _ref, i) => {
38028
+ function lassoPath$1(lasso) {
38029
+ return array$6(lasso).reduce((svg, _ref, i) => {
38014
38030
  let [x, y] = _ref;
38015
38031
  return svg += i == 0 ? `M ${x},${y} ` : i === lasso.length - 1 ? ' Z' : `L ${x},${y} `;
38016
38032
  }, '');
@@ -38025,7 +38041,7 @@ function lassoPath(lasso) {
38025
38041
  *
38026
38042
  * @returns an array of vega scenegraph tuples
38027
38043
  */
38028
- function intersectLasso(markname, pixelLasso, unit) {
38044
+ function intersectLasso$1(markname, pixelLasso, unit) {
38029
38045
  const {
38030
38046
  x,
38031
38047
  y,
@@ -38043,10 +38059,10 @@ function intersectLasso(markname, pixelLasso, unit) {
38043
38059
 
38044
38060
  // Translate bb against unit coordinates
38045
38061
  bb.translate(x, y);
38046
- const intersection = intersect([[bb.x1, bb.y1], [bb.x2, bb.y2]], markname, mark);
38062
+ const intersection = intersect$1([[bb.x1, bb.y1], [bb.x2, bb.y2]], markname, mark);
38047
38063
 
38048
38064
  // Check every point against the lasso
38049
- return intersection.filter(tuple => pointInPolygon(tuple.x, tuple.y, pixelLasso));
38065
+ return intersection.filter(tuple => pointInPolygon$1(tuple.x, tuple.y, pixelLasso));
38050
38066
  }
38051
38067
 
38052
38068
  /**
@@ -38059,7 +38075,7 @@ function intersectLasso(markname, pixelLasso, unit) {
38059
38075
  * @param {*} polygon a polygon in the form [[x,y], [x,y], ...]
38060
38076
  * @returns true if the point lies inside the polygon, false otherwise
38061
38077
  */
38062
- function pointInPolygon(testx, testy, polygon) {
38078
+ function pointInPolygon$1(testx, testy, polygon) {
38063
38079
  let intersections = 0;
38064
38080
  for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
38065
38081
  const [prevX, prevY] = polygon[j];
@@ -38076,7 +38092,7 @@ function pointInPolygon(testx, testy, polygon) {
38076
38092
  }
38077
38093
 
38078
38094
  // Expression function context object
38079
- const functionContext = {
38095
+ const functionContext$1 = {
38080
38096
  random() {
38081
38097
  return random();
38082
38098
  },
@@ -38114,18 +38130,18 @@ const functionContext = {
38114
38130
  // suppress extra arguments
38115
38131
  toNumber,
38116
38132
  toString,
38117
- indexof,
38118
- join,
38119
- lastindexof,
38120
- replace,
38121
- reverse: reverse$1,
38122
- slice: slice$1,
38133
+ indexof: indexof$1,
38134
+ join: join$1,
38135
+ lastindexof: lastindexof$1,
38136
+ replace: replace$1,
38137
+ reverse: reverse$2,
38138
+ slice: slice$2,
38123
38139
  flush,
38124
38140
  lerp,
38125
- merge,
38141
+ merge: merge$1,
38126
38142
  pad: pad$3,
38127
38143
  peek: peek$1,
38128
- pluck,
38144
+ pluck: pluck$1,
38129
38145
  span,
38130
38146
  inrange,
38131
38147
  truncate: truncate$1,
@@ -38133,47 +38149,47 @@ const functionContext = {
38133
38149
  lab: lab$1,
38134
38150
  hcl: hcl$2,
38135
38151
  hsl: hsl$2,
38136
- luminance,
38137
- contrast,
38138
- sequence: range$5,
38139
- format,
38140
- utcFormat,
38141
- utcParse,
38152
+ luminance: luminance$1,
38153
+ contrast: contrast$1,
38154
+ sequence: range$6,
38155
+ format: format$1,
38156
+ utcFormat: utcFormat$1,
38157
+ utcParse: utcParse$1,
38142
38158
  utcOffset,
38143
38159
  utcSequence,
38144
- timeFormat: timeFormat$1,
38145
- timeParse,
38160
+ timeFormat: timeFormat$2,
38161
+ timeParse: timeParse$1,
38146
38162
  timeOffset,
38147
38163
  timeSequence,
38148
38164
  timeUnitSpecifier,
38149
- monthFormat,
38150
- monthAbbrevFormat,
38151
- dayFormat,
38152
- dayAbbrevFormat,
38165
+ monthFormat: monthFormat$1,
38166
+ monthAbbrevFormat: monthAbbrevFormat$1,
38167
+ dayFormat: dayFormat$1,
38168
+ dayAbbrevFormat: dayAbbrevFormat$1,
38153
38169
  quarter,
38154
38170
  utcquarter,
38155
38171
  week,
38156
38172
  utcweek,
38157
38173
  dayofyear,
38158
38174
  utcdayofyear,
38159
- warn: warn$1,
38160
- info,
38161
- debug: debug$1,
38175
+ warn: warn$2,
38176
+ info: info$1,
38177
+ debug: debug$2,
38162
38178
  extent(_) {
38163
38179
  return extent(_);
38164
38180
  },
38165
38181
  // suppress extra arguments
38166
- inScope,
38167
- intersect,
38182
+ inScope: inScope$1,
38183
+ intersect: intersect$1,
38168
38184
  clampRange,
38169
- pinchDistance,
38170
- pinchAngle,
38171
- screen,
38172
- containerSize,
38173
- windowSize,
38174
- bandspace,
38175
- setdata,
38176
- pathShape,
38185
+ pinchDistance: pinchDistance$1,
38186
+ pinchAngle: pinchAngle$1,
38187
+ screen: screen$1,
38188
+ containerSize: containerSize$1,
38189
+ windowSize: windowSize$1,
38190
+ bandspace: bandspace$1,
38191
+ setdata: setdata$1,
38192
+ pathShape: pathShape$1,
38177
38193
  panLinear,
38178
38194
  panLog,
38179
38195
  panPow,
@@ -38182,129 +38198,86 @@ const functionContext = {
38182
38198
  zoomLog,
38183
38199
  zoomPow,
38184
38200
  zoomSymlog,
38185
- encode,
38186
- modify,
38187
- lassoAppend,
38188
- lassoPath,
38189
- intersectLasso
38201
+ encode: encode$1,
38202
+ modify: modify$1,
38203
+ lassoAppend: lassoAppend$1,
38204
+ lassoPath: lassoPath$1,
38205
+ intersectLasso: intersectLasso$1
38190
38206
  };
38191
- const eventFunctions = ['view', 'item', 'group', 'xy', 'x', 'y'],
38207
+ const eventFunctions$1 = ['view', 'item', 'group', 'xy', 'x', 'y'],
38192
38208
  // event functions
38193
- eventPrefix = 'event.vega.',
38209
+ eventPrefix$1 = 'event.vega.',
38194
38210
  // event function prefix
38195
- thisPrefix = 'this.',
38211
+ thisPrefix$1 = 'this.',
38196
38212
  // function context prefix
38197
- astVisitors = {}; // AST visitors for dependency analysis
38213
+ astVisitors$1 = {}; // AST visitors for dependency analysis
38198
38214
 
38199
38215
  // export code generator parameters
38200
- const codegenParams = {
38216
+ const codegenParams$1 = {
38201
38217
  forbidden: ['_'],
38202
38218
  allowed: ['datum', 'event', 'item'],
38203
38219
  fieldvar: 'datum',
38204
- globalvar: id => `_[${$(SignalPrefix + id)}]`,
38205
- functions: buildFunctions,
38220
+ globalvar: id => `_[${$(SignalPrefix$1 + id)}]`,
38221
+ functions: buildFunctions$1,
38206
38222
  constants: Constants$1,
38207
- visitors: astVisitors
38223
+ visitors: astVisitors$1
38208
38224
  };
38209
38225
 
38210
38226
  // export code generator
38211
- const codeGenerator = codegen(codegenParams);
38227
+ const codeGenerator$1 = codegen(codegenParams$1);
38212
38228
 
38213
38229
  // Build expression function registry
38214
- function buildFunctions(codegen) {
38230
+ function buildFunctions$1(codegen) {
38215
38231
  const fn = Functions$1(codegen);
38216
- eventFunctions.forEach(name => fn[name] = eventPrefix + name);
38217
- for (const name in functionContext) {
38218
- fn[name] = thisPrefix + name;
38232
+ eventFunctions$1.forEach(name => fn[name] = eventPrefix$1 + name);
38233
+ for (const name in functionContext$1) {
38234
+ fn[name] = thisPrefix$1 + name;
38219
38235
  }
38220
- extend$1(fn, internalScaleFunctions(codegen, functionContext, astVisitors));
38236
+ extend$1(fn, internalScaleFunctions$1(codegen, functionContext$1, astVisitors$1));
38221
38237
  return fn;
38222
38238
  }
38223
38239
 
38224
38240
  // Register an expression function
38225
- function expressionFunction(name, fn, visitor) {
38241
+ function expressionFunction$1(name, fn, visitor) {
38226
38242
  if (arguments.length === 1) {
38227
- return functionContext[name];
38243
+ return functionContext$1[name];
38228
38244
  }
38229
38245
 
38230
38246
  // register with the functionContext
38231
- functionContext[name] = fn;
38247
+ functionContext$1[name] = fn;
38232
38248
 
38233
38249
  // if there is an astVisitor register that, too
38234
- if (visitor) astVisitors[name] = visitor;
38250
+ if (visitor) astVisitors$1[name] = visitor;
38235
38251
 
38236
38252
  // if the code generator has already been initialized,
38237
38253
  // we need to also register the function with it
38238
- if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;
38254
+ if (codeGenerator$1) codeGenerator$1.functions[name] = thisPrefix$1 + name;
38239
38255
  return this;
38240
38256
  }
38241
38257
 
38242
38258
  // register expression functions with ast visitors
38243
- expressionFunction('bandwidth', bandwidth, scaleVisitor);
38244
- expressionFunction('copy', copy, scaleVisitor);
38245
- expressionFunction('domain', domain$2, scaleVisitor);
38246
- expressionFunction('range', range$3, scaleVisitor);
38247
- expressionFunction('invert', invert, scaleVisitor);
38248
- expressionFunction('scale', scale$2, scaleVisitor);
38249
- expressionFunction('gradient', scaleGradient, scaleVisitor);
38250
- expressionFunction('geoArea', geoArea, scaleVisitor);
38251
- expressionFunction('geoBounds', geoBounds, scaleVisitor);
38252
- expressionFunction('geoCentroid', geoCentroid, scaleVisitor);
38253
- expressionFunction('geoShape', geoShape, scaleVisitor);
38254
- expressionFunction('geoScale', geoScale, scaleVisitor);
38255
- expressionFunction('indata', indata, indataVisitor);
38256
- expressionFunction('data', data$1, dataVisitor);
38257
- expressionFunction('treePath', treePath, dataVisitor);
38258
- expressionFunction('treeAncestors', treeAncestors, dataVisitor);
38259
+ expressionFunction$1('bandwidth', bandwidth$1, scaleVisitor$1);
38260
+ expressionFunction$1('copy', copy$1, scaleVisitor$1);
38261
+ expressionFunction$1('domain', domain$3, scaleVisitor$1);
38262
+ expressionFunction$1('range', range$4, scaleVisitor$1);
38263
+ expressionFunction$1('invert', invert$1, scaleVisitor$1);
38264
+ expressionFunction$1('scale', scale$3, scaleVisitor$1);
38265
+ expressionFunction$1('gradient', scaleGradient$1, scaleVisitor$1);
38266
+ expressionFunction$1('geoArea', geoArea$1, scaleVisitor$1);
38267
+ expressionFunction$1('geoBounds', geoBounds$1, scaleVisitor$1);
38268
+ expressionFunction$1('geoCentroid', geoCentroid$1, scaleVisitor$1);
38269
+ expressionFunction$1('geoShape', geoShape$1, scaleVisitor$1);
38270
+ expressionFunction$1('geoScale', geoScale$1, scaleVisitor$1);
38271
+ expressionFunction$1('indata', indata$1, indataVisitor$1);
38272
+ expressionFunction$1('data', data$2, dataVisitor$1);
38273
+ expressionFunction$1('treePath', treePath$1, dataVisitor$1);
38274
+ expressionFunction$1('treeAncestors', treeAncestors$1, dataVisitor$1);
38259
38275
 
38260
38276
  // register Vega-Lite selection functions
38261
- expressionFunction('vlSelectionTest', selectionTest, selectionVisitor);
38262
- expressionFunction('vlSelectionIdTest', selectionIdTest, selectionVisitor);
38263
- expressionFunction('vlSelectionResolve', selectionResolve, selectionVisitor);
38264
- expressionFunction('vlSelectionTuples', selectionTuples);
38265
-
38266
- function parser (expr, scope) {
38267
- const params = {};
38268
-
38269
- // parse the expression to an abstract syntax tree (ast)
38270
- let ast;
38271
- try {
38272
- expr = isString(expr) ? expr : $(expr) + '';
38273
- ast = parser$1(expr);
38274
- } catch (err) {
38275
- error$1('Expression parse error: ' + expr);
38276
- }
38277
-
38278
- // analyze ast function calls for dependencies
38279
- ast.visit(node => {
38280
- if (node.type !== CallExpression) return;
38281
- const name = node.callee.name,
38282
- visit = codegenParams.visitors[name];
38283
- if (visit) visit(name, node.arguments, scope, params);
38284
- });
38285
-
38286
- // perform code generation
38287
- const gen = codeGenerator(ast);
38288
-
38289
- // collect signal dependencies
38290
- gen.globals.forEach(name => {
38291
- const signalName = SignalPrefix + name;
38292
- if (!has$1(params, signalName) && scope.getSignal(name)) {
38293
- params[signalName] = scope.signalRef(name);
38294
- }
38295
- });
38296
-
38297
- // return generated expression code and dependencies
38298
- return {
38299
- $expr: extend$1({
38300
- code: gen.code
38301
- }, scope.options.ast ? {
38302
- ast
38303
- } : null),
38304
- $fields: gen.fields,
38305
- $params: params
38306
- };
38307
- }
38277
+ expressionFunction$1('vlSelectionTest', selectionTest, selectionVisitor);
38278
+ expressionFunction$1('vlSelectionIdTest', selectionIdTest, selectionVisitor);
38279
+ expressionFunction$1('vlSelectionResolve', selectionResolve, selectionVisitor);
38280
+ expressionFunction$1('vlSelectionTuples', selectionTuples);
38308
38281
 
38309
38282
  /**
38310
38283
  * Parse a serialized dataflow specification.
@@ -38593,7 +38566,7 @@ function getCompare(_, ctx) {
38593
38566
  // As of Vega 5.5.3, $tupleid sort is no longer used.
38594
38567
  // Keep here for now for backwards compatibility.
38595
38568
  const k = 'c:' + _.$compare + '_' + _.$order,
38596
- c = array$5(_.$compare).map(_ => _ && _.$tupleid ? tupleid : _);
38569
+ c = array$6(_.$compare).map(_ => _ && _.$tupleid ? tupleid : _);
38597
38570
  return ctx.fn[k] || (ctx.fn[k] = compare$2(c, _.$order, ctx.expr.codegen));
38598
38571
  }
38599
38572
 
@@ -38961,7 +38934,7 @@ function dataref(view, name) {
38961
38934
  }
38962
38935
  return data[name];
38963
38936
  }
38964
- function data(name, values) {
38937
+ function data$1(name, values) {
38965
38938
  return arguments.length < 2 ? dataref(this, name).values.value : change.call(this, name, changeset().remove(truthy).insert(values));
38966
38939
  }
38967
38940
  function change(name, changes) {
@@ -39114,7 +39087,7 @@ function initializeEventConfig(config) {
39114
39087
  function trackEventListener(view, sources, type, handler) {
39115
39088
  view._eventListeners.push({
39116
39089
  type: type,
39117
- sources: array$5(sources),
39090
+ sources: array$6(sources),
39118
39091
  handler: handler
39119
39092
  });
39120
39093
  }
@@ -39359,7 +39332,7 @@ function generate$1(bind, el, param, view) {
39359
39332
  input = radio;
39360
39333
  break;
39361
39334
  case 'range':
39362
- input = range$2;
39335
+ input = range$3;
39363
39336
  break;
39364
39337
  }
39365
39338
  input(bind, wrapper, param, value);
@@ -39465,7 +39438,7 @@ function radio(bind, el, param, value) {
39465
39438
  /**
39466
39439
  * Generates a slider input element.
39467
39440
  */
39468
- function range$2(bind, el, param, value) {
39441
+ function range$3(bind, el, param, value) {
39469
39442
  value = value !== undefined ? value : (+param.max + +param.min) / 2;
39470
39443
  const max = param.max != null ? param.max : Math.max(100, +value) || 100,
39471
39444
  min = param.min || Math.min(0, max, +value) || 0,
@@ -39662,10 +39635,10 @@ async function renderToSVG (scaleFactor) {
39662
39635
  }
39663
39636
 
39664
39637
  function runtime (view, spec, expr) {
39665
- return context(view, transforms, functionContext, expr).parse(spec);
39638
+ return context(view, transforms, functionContext$1, expr).parse(spec);
39666
39639
  }
39667
39640
 
39668
- function scale$1(name) {
39641
+ function scale$2(name) {
39669
39642
  var scales = this._runtime.scales;
39670
39643
  if (!has$1(scales, name)) {
39671
39644
  error$1('Unrecognized scale or projection: ' + name);
@@ -40163,12 +40136,12 @@ inherits(View$1, Dataflow, {
40163
40136
  finalize,
40164
40137
  hover,
40165
40138
  // -- DATA ----
40166
- data,
40139
+ data: data$1,
40167
40140
  change,
40168
40141
  insert,
40169
40142
  remove,
40170
40143
  // -- SCALES --
40171
- scale: scale$1,
40144
+ scale: scale$2,
40172
40145
  // -- INITIALIZATION ----
40173
40146
  initialize,
40174
40147
  // -- HEADLESS RENDERING ----
@@ -40182,6 +40155,783 @@ inherits(View$1, Dataflow, {
40182
40155
  _watchPixelRatio: watchPixelRatio
40183
40156
  });
40184
40157
 
40158
+ function data(name) {
40159
+ const data = this.context.data[name];
40160
+ return data ? data.values.value : [];
40161
+ }
40162
+ function indata(name, field, value) {
40163
+ const index = this.context.data[name]['index:' + field],
40164
+ entry = index ? index.value.get(value) : undefined;
40165
+ return entry ? entry.count : entry;
40166
+ }
40167
+ function setdata(name, tuples) {
40168
+ const df = this.context.dataflow,
40169
+ data = this.context.data[name],
40170
+ input = data.input;
40171
+ df.pulse(input, df.changeset().remove(truthy).insert(tuples));
40172
+ return 1;
40173
+ }
40174
+
40175
+ function encode (item, name, retval) {
40176
+ if (item) {
40177
+ const df = this.context.dataflow,
40178
+ target = item.mark.source;
40179
+ df.pulse(target, df.changeset().encode(item, name));
40180
+ }
40181
+ return retval !== undefined ? retval : item;
40182
+ }
40183
+
40184
+ const wrap = method => function (value, spec) {
40185
+ const locale = this.context.dataflow.locale();
40186
+ return value === null ? 'null' : locale[method](spec)(value);
40187
+ };
40188
+ const format = wrap('format');
40189
+ const timeFormat$1 = wrap('timeFormat');
40190
+ const utcFormat = wrap('utcFormat');
40191
+ const timeParse = wrap('timeParse');
40192
+ const utcParse = wrap('utcParse');
40193
+ const dateObj = new Date(2000, 0, 1);
40194
+ function time(month, day, specifier) {
40195
+ if (!Number.isInteger(month) || !Number.isInteger(day)) return '';
40196
+ dateObj.setYear(2000);
40197
+ dateObj.setMonth(month);
40198
+ dateObj.setDate(day);
40199
+ return timeFormat$1.call(this, dateObj, specifier);
40200
+ }
40201
+ function monthFormat(month) {
40202
+ return time.call(this, month, 1, '%B');
40203
+ }
40204
+ function monthAbbrevFormat(month) {
40205
+ return time.call(this, month, 1, '%b');
40206
+ }
40207
+ function dayFormat(day) {
40208
+ return time.call(this, 0, 2 + day, '%A');
40209
+ }
40210
+ function dayAbbrevFormat(day) {
40211
+ return time.call(this, 0, 2 + day, '%a');
40212
+ }
40213
+
40214
+ const DataPrefix = ':';
40215
+ const IndexPrefix = '@';
40216
+ const ScalePrefix = '%';
40217
+ const SignalPrefix = '$';
40218
+
40219
+ function dataVisitor(name, args, scope, params) {
40220
+ if (args[0].type !== Literal) {
40221
+ error$1('First argument to data functions must be a string literal.');
40222
+ }
40223
+ const data = args[0].value,
40224
+ dataName = DataPrefix + data;
40225
+ if (!has$1(dataName, params)) {
40226
+ try {
40227
+ params[dataName] = scope.getData(data).tuplesRef();
40228
+ } catch (err) {
40229
+ // if data set does not exist, there's nothing to track
40230
+ }
40231
+ }
40232
+ }
40233
+ function indataVisitor(name, args, scope, params) {
40234
+ if (args[0].type !== Literal) error$1('First argument to indata must be a string literal.');
40235
+ if (args[1].type !== Literal) error$1('Second argument to indata must be a string literal.');
40236
+ const data = args[0].value,
40237
+ field = args[1].value,
40238
+ indexName = IndexPrefix + field;
40239
+ if (!has$1(indexName, params)) {
40240
+ params[indexName] = scope.getData(data).indataRef(scope, field);
40241
+ }
40242
+ }
40243
+ function scaleVisitor(name, args, scope, params) {
40244
+ if (args[0].type === Literal) {
40245
+ // add scale dependency
40246
+ addScaleDependency(scope, params, args[0].value);
40247
+ } else {
40248
+ // indirect scale lookup; add all scales as parameters
40249
+ for (name in scope.scales) {
40250
+ addScaleDependency(scope, params, name);
40251
+ }
40252
+ }
40253
+ }
40254
+ function addScaleDependency(scope, params, name) {
40255
+ const scaleName = ScalePrefix + name;
40256
+ if (!has$1(params, scaleName)) {
40257
+ try {
40258
+ params[scaleName] = scope.scaleRef(name);
40259
+ } catch (err) {
40260
+ // TODO: error handling? warning?
40261
+ }
40262
+ }
40263
+ }
40264
+
40265
+ /**
40266
+ * Name must be a string. Return undefined if the scale is not registered.
40267
+ */
40268
+ function getScale(name, ctx) {
40269
+ if (isString(name)) {
40270
+ const maybeScale = ctx.scales[name];
40271
+ return maybeScale && isRegisteredScale(maybeScale.value) ? maybeScale.value : undefined;
40272
+ }
40273
+ return undefined;
40274
+ }
40275
+ function internalScaleFunctions(codegen, fnctx, visitors) {
40276
+ // add helper method to the 'this' expression function context
40277
+ fnctx.__bandwidth = s => s && s.bandwidth ? s.bandwidth() : 0;
40278
+
40279
+ // register AST visitors for internal scale functions
40280
+ visitors._bandwidth = scaleVisitor;
40281
+ visitors._range = scaleVisitor;
40282
+ visitors._scale = scaleVisitor;
40283
+
40284
+ // resolve scale reference directly to the signal hash argument
40285
+ const ref = arg => '_[' + (arg.type === Literal ? $(ScalePrefix + arg.value) : $(ScalePrefix) + '+' + codegen(arg)) + ']';
40286
+
40287
+ // define and return internal scale function code generators
40288
+ // these internal functions are called by mark encoders
40289
+ return {
40290
+ _bandwidth: args => `this.__bandwidth(${ref(args[0])})`,
40291
+ _range: args => `${ref(args[0])}.range()`,
40292
+ _scale: args => `${ref(args[0])}(${codegen(args[1])})`
40293
+ };
40294
+ }
40295
+
40296
+ function geoMethod(methodName, globalMethod) {
40297
+ return function (projection, geojson, group) {
40298
+ if (projection) {
40299
+ // projection defined, use it
40300
+ const p = getScale(projection, (group || this).context);
40301
+ return p && p.path[methodName](geojson);
40302
+ } else {
40303
+ // projection undefined, use global method
40304
+ return globalMethod(geojson);
40305
+ }
40306
+ };
40307
+ }
40308
+ const geoArea = geoMethod('area', geoArea$1$1);
40309
+ const geoBounds = geoMethod('bounds', geoBounds$1$1);
40310
+ const geoCentroid = geoMethod('centroid', geoCentroid$1$1);
40311
+ function geoScale(projection, group) {
40312
+ const p = getScale(projection, (group || this).context);
40313
+ return p && p.scale();
40314
+ }
40315
+
40316
+ function inScope (item) {
40317
+ const group = this.context.group;
40318
+ let value = false;
40319
+ if (group) while (item) {
40320
+ if (item === group) {
40321
+ value = true;
40322
+ break;
40323
+ }
40324
+ item = item.mark.group;
40325
+ }
40326
+ return value;
40327
+ }
40328
+
40329
+ function log(df, method, args) {
40330
+ try {
40331
+ df[method].apply(df, ['EXPRESSION'].concat([].slice.call(args)));
40332
+ } catch (err) {
40333
+ df.warn(err);
40334
+ }
40335
+ return args[args.length - 1];
40336
+ }
40337
+ function warn$1() {
40338
+ return log(this.context.dataflow, 'warn', arguments);
40339
+ }
40340
+ function info() {
40341
+ return log(this.context.dataflow, 'info', arguments);
40342
+ }
40343
+ function debug$1() {
40344
+ return log(this.context.dataflow, 'debug', arguments);
40345
+ }
40346
+
40347
+ // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#relativeluminancedef
40348
+ function channel_luminance_value(channelValue) {
40349
+ const val = channelValue / 255;
40350
+ if (val <= 0.03928) {
40351
+ return val / 12.92;
40352
+ }
40353
+ return Math.pow((val + 0.055) / 1.055, 2.4);
40354
+ }
40355
+ function luminance(color) {
40356
+ const c = rgb$1(color),
40357
+ r = channel_luminance_value(c.r),
40358
+ g = channel_luminance_value(c.g),
40359
+ b = channel_luminance_value(c.b);
40360
+ return 0.2126 * r + 0.7152 * g + 0.0722 * b;
40361
+ }
40362
+
40363
+ // https://www.w3.org/TR/2008/REC-WCAG20-20081211/#contrast-ratiodef
40364
+ function contrast(color1, color2) {
40365
+ const lum1 = luminance(color1),
40366
+ lum2 = luminance(color2),
40367
+ lumL = Math.max(lum1, lum2),
40368
+ lumD = Math.min(lum1, lum2);
40369
+ return (lumL + 0.05) / (lumD + 0.05);
40370
+ }
40371
+
40372
+ function merge () {
40373
+ const args = [].slice.call(arguments);
40374
+ args.unshift({});
40375
+ return extend$1(...args);
40376
+ }
40377
+
40378
+ function equal(a, b) {
40379
+ 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;
40380
+ }
40381
+ function equalArray(a, b) {
40382
+ for (let i = 0, n = a.length; i < n; ++i) {
40383
+ if (!equal(a[i], b[i])) return false;
40384
+ }
40385
+ return true;
40386
+ }
40387
+ function equalObject(a, b) {
40388
+ for (const key in a) {
40389
+ if (!equal(a[key], b[key])) return false;
40390
+ }
40391
+ return true;
40392
+ }
40393
+ function removePredicate(props) {
40394
+ return _ => equalObject(props, _);
40395
+ }
40396
+ function modify (name, insert, remove, toggle, modify, values) {
40397
+ const df = this.context.dataflow,
40398
+ data = this.context.data[name],
40399
+ input = data.input,
40400
+ stamp = df.stamp();
40401
+ let changes = data.changes,
40402
+ predicate,
40403
+ key;
40404
+ if (df._trigger === false || !(input.value.length || insert || toggle)) {
40405
+ // nothing to do!
40406
+ return 0;
40407
+ }
40408
+ if (!changes || changes.stamp < stamp) {
40409
+ data.changes = changes = df.changeset();
40410
+ changes.stamp = stamp;
40411
+ df.runAfter(() => {
40412
+ data.modified = true;
40413
+ df.pulse(input, changes).run();
40414
+ }, true, 1);
40415
+ }
40416
+ if (remove) {
40417
+ predicate = remove === true ? truthy : isArray(remove) || isTuple(remove) ? remove : removePredicate(remove);
40418
+ changes.remove(predicate);
40419
+ }
40420
+ if (insert) {
40421
+ changes.insert(insert);
40422
+ }
40423
+ if (toggle) {
40424
+ predicate = removePredicate(toggle);
40425
+ if (input.value.some(predicate)) {
40426
+ changes.remove(predicate);
40427
+ } else {
40428
+ changes.insert(toggle);
40429
+ }
40430
+ }
40431
+ if (modify) {
40432
+ for (key in values) {
40433
+ changes.modify(modify, key, values[key]);
40434
+ }
40435
+ }
40436
+ return 1;
40437
+ }
40438
+
40439
+ function pinchDistance(event) {
40440
+ const t = event.touches,
40441
+ dx = t[0].clientX - t[1].clientX,
40442
+ dy = t[0].clientY - t[1].clientY;
40443
+ return Math.hypot(dx, dy);
40444
+ }
40445
+ function pinchAngle(event) {
40446
+ const t = event.touches;
40447
+ return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);
40448
+ }
40449
+
40450
+ // memoize accessor functions
40451
+ const accessors = {};
40452
+ function pluck (data, name) {
40453
+ const accessor = accessors[name] || (accessors[name] = field$1(name));
40454
+ return isArray(data) ? data.map(accessor) : accessor(data);
40455
+ }
40456
+
40457
+ function array(seq) {
40458
+ return isArray(seq) || ArrayBuffer.isView(seq) ? seq : null;
40459
+ }
40460
+ function sequence(seq) {
40461
+ return array(seq) || (isString(seq) ? seq : null);
40462
+ }
40463
+ function join(seq) {
40464
+ for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
40465
+ args[_key - 1] = arguments[_key];
40466
+ }
40467
+ return array(seq).join(...args);
40468
+ }
40469
+ function indexof(seq) {
40470
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
40471
+ args[_key2 - 1] = arguments[_key2];
40472
+ }
40473
+ return sequence(seq).indexOf(...args);
40474
+ }
40475
+ function lastindexof(seq) {
40476
+ for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
40477
+ args[_key3 - 1] = arguments[_key3];
40478
+ }
40479
+ return sequence(seq).lastIndexOf(...args);
40480
+ }
40481
+ function slice$1(seq) {
40482
+ for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {
40483
+ args[_key4 - 1] = arguments[_key4];
40484
+ }
40485
+ return sequence(seq).slice(...args);
40486
+ }
40487
+ function replace(str, pattern, repl) {
40488
+ if (isFunction(repl)) error$1('Function argument passed to replace.');
40489
+ return String(str).replace(pattern, repl);
40490
+ }
40491
+ function reverse$1(seq) {
40492
+ return array(seq).slice().reverse();
40493
+ }
40494
+ function sort(seq) {
40495
+ return array(seq).slice().sort(ascending$2);
40496
+ }
40497
+
40498
+ function bandspace(count, paddingInner, paddingOuter) {
40499
+ return bandSpace(count || 0, paddingInner || 0, paddingOuter || 0);
40500
+ }
40501
+ function bandwidth(name, group) {
40502
+ const s = getScale(name, (group || this).context);
40503
+ return s && s.bandwidth ? s.bandwidth() : 0;
40504
+ }
40505
+ function copy(name, group) {
40506
+ const s = getScale(name, (group || this).context);
40507
+ return s ? s.copy() : undefined;
40508
+ }
40509
+ function domain$2(name, group) {
40510
+ const s = getScale(name, (group || this).context);
40511
+ return s ? s.domain() : [];
40512
+ }
40513
+ function invert(name, range, group) {
40514
+ const s = getScale(name, (group || this).context);
40515
+ return !s ? undefined : isArray(range) ? (s.invertRange || s.invert)(range) : (s.invert || s.invertExtent)(range);
40516
+ }
40517
+ function range$2(name, group) {
40518
+ const s = getScale(name, (group || this).context);
40519
+ return s && s.range ? s.range() : [];
40520
+ }
40521
+ function scale$1(name, value, group) {
40522
+ const s = getScale(name, (group || this).context);
40523
+ return s ? s(value) : undefined;
40524
+ }
40525
+
40526
+ /**
40527
+ * Passing a function is only used for for testing.
40528
+ * Outside of tests, the first argument should be a string.
40529
+ */
40530
+ function scaleGradient (scaleOrFunction, p0, p1, count, group) {
40531
+ let scale = typeof scaleOrFunction === 'string' ? getScale(scaleOrFunction, (group || this).context) : scaleOrFunction;
40532
+ const gradient = Gradient$1(p0, p1);
40533
+ let stops = scale.domain(),
40534
+ min = stops[0],
40535
+ max = peek$1(stops),
40536
+ fraction = identity$7;
40537
+ if (!(max - min)) {
40538
+ // expand scale if domain has zero span, fix #1479
40539
+ scale = (scale.interpolator ? scale$5('sequential')().interpolator(scale.interpolator()) : scale$5('linear')().interpolate(scale.interpolate()).range(scale.range())).domain([min = 0, max = 1]);
40540
+ } else {
40541
+ fraction = scaleFraction(scale, min, max);
40542
+ }
40543
+ if (scale.ticks) {
40544
+ stops = scale.ticks(+count || 15);
40545
+ if (min !== stops[0]) stops.unshift(min);
40546
+ if (max !== peek$1(stops)) stops.push(max);
40547
+ }
40548
+ stops.forEach(_ => gradient.stop(fraction(_), scale(_)));
40549
+ return gradient;
40550
+ }
40551
+
40552
+ function geoShape(projection, geojson, group) {
40553
+ const p = getScale(projection, (group || this).context);
40554
+ return function (context) {
40555
+ return p ? p.path.context(context)(geojson) : '';
40556
+ };
40557
+ }
40558
+ function pathShape(path) {
40559
+ let p = null;
40560
+ return function (context) {
40561
+ return context ? pathRender(context, p = p || parse$3(path)) : path;
40562
+ };
40563
+ }
40564
+
40565
+ const datum = d => d.data;
40566
+ function treeNodes(name, context) {
40567
+ const tree = data.call(context, name);
40568
+ return tree.root && tree.root.lookup || {};
40569
+ }
40570
+ function treePath(name, source, target) {
40571
+ const nodes = treeNodes(name, this),
40572
+ s = nodes[source],
40573
+ t = nodes[target];
40574
+ return s && t ? s.path(t).map(datum) : undefined;
40575
+ }
40576
+ function treeAncestors(name, node) {
40577
+ const n = treeNodes(name, this)[node];
40578
+ return n ? n.ancestors().map(datum) : undefined;
40579
+ }
40580
+
40581
+ const _window = () => typeof window !== 'undefined' && window || null;
40582
+ function screen() {
40583
+ const w = _window();
40584
+ return w ? w.screen : {};
40585
+ }
40586
+ function windowSize() {
40587
+ const w = _window();
40588
+ return w ? [w.innerWidth, w.innerHeight] : [undefined, undefined];
40589
+ }
40590
+ function containerSize() {
40591
+ const view = this.context.dataflow,
40592
+ el = view.container && view.container();
40593
+ return el ? [el.clientWidth, el.clientHeight] : [undefined, undefined];
40594
+ }
40595
+
40596
+ function intersect (b, opt, group) {
40597
+ if (!b) return [];
40598
+ const [u, v] = b,
40599
+ box = new Bounds().set(u[0], u[1], v[0], v[1]),
40600
+ scene = group || this.context.dataflow.scenegraph().root;
40601
+ return intersect$3(scene, box, filter(opt));
40602
+ }
40603
+ function filter(opt) {
40604
+ let p = null;
40605
+ if (opt) {
40606
+ const types = array$6(opt.marktype),
40607
+ names = array$6(opt.markname);
40608
+ p = _ => (!types.length || types.some(t => _.marktype === t)) && (!names.length || names.some(s => _.name === s));
40609
+ }
40610
+ return p;
40611
+ }
40612
+
40613
+ /**
40614
+ * Appends a new point to the lasso
40615
+ *
40616
+ * @param {*} lasso the lasso in pixel space
40617
+ * @param {*} x the x coordinate in pixel space
40618
+ * @param {*} y the y coordinate in pixel space
40619
+ * @param {*} minDist the minimum distance, in pixels, that thenew point needs to be apart from the last point
40620
+ * @returns a new array containing the lasso with the new point
40621
+ */
40622
+ function lassoAppend(lasso, x, y) {
40623
+ let minDist = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 5;
40624
+ lasso = array$6(lasso);
40625
+ const last = lasso[lasso.length - 1];
40626
+
40627
+ // Add point to lasso if its the first point or distance to last point exceed minDist
40628
+ return last === undefined || Math.hypot(last[0] - x, last[1] - y) > minDist ? [...lasso, [x, y]] : lasso;
40629
+ }
40630
+
40631
+ /**
40632
+ * Generates a svg path command which draws a lasso
40633
+ *
40634
+ * @param {*} lasso the lasso in pixel space in the form [[x,y], [x,y], ...]
40635
+ * @returns the svg path command that draws the lasso
40636
+ */
40637
+ function lassoPath(lasso) {
40638
+ return array$6(lasso).reduce((svg, _ref, i) => {
40639
+ let [x, y] = _ref;
40640
+ return svg += i == 0 ? `M ${x},${y} ` : i === lasso.length - 1 ? ' Z' : `L ${x},${y} `;
40641
+ }, '');
40642
+ }
40643
+
40644
+ /**
40645
+ * Inverts the lasso from pixel space to an array of vega scenegraph tuples
40646
+ *
40647
+ * @param {*} data the dataset
40648
+ * @param {*} pixelLasso the lasso in pixel space, [[x,y], [x,y], ...]
40649
+ * @param {*} unit the unit where the lasso is defined
40650
+ *
40651
+ * @returns an array of vega scenegraph tuples
40652
+ */
40653
+ function intersectLasso(markname, pixelLasso, unit) {
40654
+ const {
40655
+ x,
40656
+ y,
40657
+ mark
40658
+ } = unit;
40659
+ const bb = new Bounds().set(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER);
40660
+
40661
+ // Get bounding box around lasso
40662
+ for (const [px, py] of pixelLasso) {
40663
+ if (px < bb.x1) bb.x1 = px;
40664
+ if (px > bb.x2) bb.x2 = px;
40665
+ if (py < bb.y1) bb.y1 = py;
40666
+ if (py > bb.y2) bb.y2 = py;
40667
+ }
40668
+
40669
+ // Translate bb against unit coordinates
40670
+ bb.translate(x, y);
40671
+ const intersection = intersect([[bb.x1, bb.y1], [bb.x2, bb.y2]], markname, mark);
40672
+
40673
+ // Check every point against the lasso
40674
+ return intersection.filter(tuple => pointInPolygon(tuple.x, tuple.y, pixelLasso));
40675
+ }
40676
+
40677
+ /**
40678
+ * Performs a test if a point is inside a polygon based on the idea from
40679
+ * https://wrf.ecse.rpi.edu/Research/Short_Notes/pnpoly.html
40680
+ *
40681
+ * This method will not need the same start/end point since it wraps around the edges of the array
40682
+ *
40683
+ * @param {*} test a point to test against
40684
+ * @param {*} polygon a polygon in the form [[x,y], [x,y], ...]
40685
+ * @returns true if the point lies inside the polygon, false otherwise
40686
+ */
40687
+ function pointInPolygon(testx, testy, polygon) {
40688
+ let intersections = 0;
40689
+ for (let i = 0, j = polygon.length - 1; i < polygon.length; j = i++) {
40690
+ const [prevX, prevY] = polygon[j];
40691
+ const [x, y] = polygon[i];
40692
+
40693
+ // count intersections
40694
+ if (y > testy != prevY > testy && testx < (prevX - x) * (testy - y) / (prevY - y) + x) {
40695
+ intersections++;
40696
+ }
40697
+ }
40698
+
40699
+ // point is in polygon if intersection count is odd
40700
+ return intersections & 1;
40701
+ }
40702
+
40703
+ // Expression function context object
40704
+ const functionContext = {
40705
+ random() {
40706
+ return random();
40707
+ },
40708
+ // override default
40709
+ cumulativeNormal,
40710
+ cumulativeLogNormal,
40711
+ cumulativeUniform,
40712
+ densityNormal,
40713
+ densityLogNormal,
40714
+ densityUniform,
40715
+ quantileNormal,
40716
+ quantileLogNormal,
40717
+ quantileUniform,
40718
+ sampleNormal,
40719
+ sampleLogNormal,
40720
+ sampleUniform,
40721
+ isArray,
40722
+ isBoolean: isBoolean$2,
40723
+ isDate: isDate$1,
40724
+ isDefined(_) {
40725
+ return _ !== undefined;
40726
+ },
40727
+ isNumber: isNumber$1,
40728
+ isObject,
40729
+ isRegExp,
40730
+ isString,
40731
+ isTuple,
40732
+ isValid(_) {
40733
+ return _ != null && _ === _;
40734
+ },
40735
+ toBoolean,
40736
+ toDate(_) {
40737
+ return toDate(_);
40738
+ },
40739
+ // suppress extra arguments
40740
+ toNumber,
40741
+ toString,
40742
+ indexof,
40743
+ join,
40744
+ lastindexof,
40745
+ replace,
40746
+ reverse: reverse$1,
40747
+ sort,
40748
+ slice: slice$1,
40749
+ flush,
40750
+ lerp,
40751
+ merge,
40752
+ pad: pad$3,
40753
+ peek: peek$1,
40754
+ pluck,
40755
+ span,
40756
+ inrange,
40757
+ truncate: truncate$1,
40758
+ rgb: rgb$1,
40759
+ lab: lab$1,
40760
+ hcl: hcl$2,
40761
+ hsl: hsl$2,
40762
+ luminance,
40763
+ contrast,
40764
+ sequence: range$6,
40765
+ format,
40766
+ utcFormat,
40767
+ utcParse,
40768
+ utcOffset,
40769
+ utcSequence,
40770
+ timeFormat: timeFormat$1,
40771
+ timeParse,
40772
+ timeOffset,
40773
+ timeSequence,
40774
+ timeUnitSpecifier,
40775
+ monthFormat,
40776
+ monthAbbrevFormat,
40777
+ dayFormat,
40778
+ dayAbbrevFormat,
40779
+ quarter,
40780
+ utcquarter,
40781
+ week,
40782
+ utcweek,
40783
+ dayofyear,
40784
+ utcdayofyear,
40785
+ warn: warn$1,
40786
+ info,
40787
+ debug: debug$1,
40788
+ extent(_) {
40789
+ return extent(_);
40790
+ },
40791
+ // suppress extra arguments
40792
+ inScope,
40793
+ intersect,
40794
+ clampRange,
40795
+ pinchDistance,
40796
+ pinchAngle,
40797
+ screen,
40798
+ containerSize,
40799
+ windowSize,
40800
+ bandspace,
40801
+ setdata,
40802
+ pathShape,
40803
+ panLinear,
40804
+ panLog,
40805
+ panPow,
40806
+ panSymlog,
40807
+ zoomLinear,
40808
+ zoomLog,
40809
+ zoomPow,
40810
+ zoomSymlog,
40811
+ encode,
40812
+ modify,
40813
+ lassoAppend,
40814
+ lassoPath,
40815
+ intersectLasso
40816
+ };
40817
+ const eventFunctions = ['view', 'item', 'group', 'xy', 'x', 'y'],
40818
+ // event functions
40819
+ eventPrefix = 'event.vega.',
40820
+ // event function prefix
40821
+ thisPrefix = 'this.',
40822
+ // function context prefix
40823
+ astVisitors = {}; // AST visitors for dependency analysis
40824
+
40825
+ // export code generator parameters
40826
+ const codegenParams = {
40827
+ forbidden: ['_'],
40828
+ allowed: ['datum', 'event', 'item'],
40829
+ fieldvar: 'datum',
40830
+ globalvar: id => `_[${$(SignalPrefix + id)}]`,
40831
+ functions: buildFunctions,
40832
+ constants: Constants$1,
40833
+ visitors: astVisitors
40834
+ };
40835
+
40836
+ // export code generator
40837
+ const codeGenerator = codegen(codegenParams);
40838
+
40839
+ // Build expression function registry
40840
+ function buildFunctions(codegen) {
40841
+ const fn = Functions$1(codegen);
40842
+ eventFunctions.forEach(name => fn[name] = eventPrefix + name);
40843
+ for (const name in functionContext) {
40844
+ fn[name] = thisPrefix + name;
40845
+ }
40846
+ extend$1(fn, internalScaleFunctions(codegen, functionContext, astVisitors));
40847
+ return fn;
40848
+ }
40849
+
40850
+ // Register an expression function
40851
+ function expressionFunction(name, fn, visitor) {
40852
+ if (arguments.length === 1) {
40853
+ return functionContext[name];
40854
+ }
40855
+
40856
+ // register with the functionContext
40857
+ functionContext[name] = fn;
40858
+
40859
+ // if there is an astVisitor register that, too
40860
+ if (visitor) astVisitors[name] = visitor;
40861
+
40862
+ // if the code generator has already been initialized,
40863
+ // we need to also register the function with it
40864
+ if (codeGenerator) codeGenerator.functions[name] = thisPrefix + name;
40865
+ return this;
40866
+ }
40867
+
40868
+ // register expression functions with ast visitors
40869
+ expressionFunction('bandwidth', bandwidth, scaleVisitor);
40870
+ expressionFunction('copy', copy, scaleVisitor);
40871
+ expressionFunction('domain', domain$2, scaleVisitor);
40872
+ expressionFunction('range', range$2, scaleVisitor);
40873
+ expressionFunction('invert', invert, scaleVisitor);
40874
+ expressionFunction('scale', scale$1, scaleVisitor);
40875
+ expressionFunction('gradient', scaleGradient, scaleVisitor);
40876
+ expressionFunction('geoArea', geoArea, scaleVisitor);
40877
+ expressionFunction('geoBounds', geoBounds, scaleVisitor);
40878
+ expressionFunction('geoCentroid', geoCentroid, scaleVisitor);
40879
+ expressionFunction('geoShape', geoShape, scaleVisitor);
40880
+ expressionFunction('geoScale', geoScale, scaleVisitor);
40881
+ expressionFunction('indata', indata, indataVisitor);
40882
+ expressionFunction('data', data, dataVisitor);
40883
+ expressionFunction('treePath', treePath, dataVisitor);
40884
+ expressionFunction('treeAncestors', treeAncestors, dataVisitor);
40885
+
40886
+ // register Vega-Lite selection functions
40887
+ expressionFunction('vlSelectionTest', selectionTest, selectionVisitor);
40888
+ expressionFunction('vlSelectionIdTest', selectionIdTest, selectionVisitor);
40889
+ expressionFunction('vlSelectionResolve', selectionResolve, selectionVisitor);
40890
+ expressionFunction('vlSelectionTuples', selectionTuples);
40891
+
40892
+ function parser (expr, scope) {
40893
+ const params = {};
40894
+
40895
+ // parse the expression to an abstract syntax tree (ast)
40896
+ let ast;
40897
+ try {
40898
+ expr = isString(expr) ? expr : $(expr) + '';
40899
+ ast = parser$1(expr);
40900
+ } catch (err) {
40901
+ error$1('Expression parse error: ' + expr);
40902
+ }
40903
+
40904
+ // analyze ast function calls for dependencies
40905
+ ast.visit(node => {
40906
+ if (node.type !== CallExpression) return;
40907
+ const name = node.callee.name,
40908
+ visit = codegenParams.visitors[name];
40909
+ if (visit) visit(name, node.arguments, scope, params);
40910
+ });
40911
+
40912
+ // perform code generation
40913
+ const gen = codeGenerator(ast);
40914
+
40915
+ // collect signal dependencies
40916
+ gen.globals.forEach(name => {
40917
+ const signalName = SignalPrefix + name;
40918
+ if (!has$1(params, signalName) && scope.getSignal(name)) {
40919
+ params[signalName] = scope.signalRef(name);
40920
+ }
40921
+ });
40922
+
40923
+ // return generated expression code and dependencies
40924
+ return {
40925
+ $expr: extend$1({
40926
+ code: gen.code
40927
+ }, scope.options.ast ? {
40928
+ ast
40929
+ } : null),
40930
+ $fields: gen.fields,
40931
+ $params: params
40932
+ };
40933
+ }
40934
+
40185
40935
  const VIEW = 'view',
40186
40936
  LBRACK = '[',
40187
40937
  RBRACK = ']',
@@ -40477,7 +41227,7 @@ function applyDefaults (encode, type, role, style, config) {
40477
41227
  }
40478
41228
 
40479
41229
  // resolve styles, apply with increasing precedence
40480
- array$5(style).forEach(name => {
41230
+ array$6(style).forEach(name => {
40481
41231
  const props = config.style && config.style[name];
40482
41232
  for (const key in props) {
40483
41233
  if (!has(key, encode)) {
@@ -40859,7 +41609,7 @@ function parseUpdate (spec, scope, target) {
40859
41609
  }
40860
41610
 
40861
41611
  // separate event streams from signal updates
40862
- events = array$5(events).filter(s => s.signal || s.scale ? (sources.push(s), 0) : 1);
41612
+ events = array$6(events).filter(s => s.signal || s.scale ? (sources.push(s), 0) : 1);
40863
41613
 
40864
41614
  // merge internal operator listeners
40865
41615
  if (sources.length > 1) {
@@ -41234,6 +41984,8 @@ const GuideLabelStyle = 'guide-label';
41234
41984
  const GuideTitleStyle = 'guide-title';
41235
41985
  const GroupTitleStyle = 'group-title';
41236
41986
  const GroupSubtitleStyle = 'group-subtitle';
41987
+
41988
+ /** All values of LegendType */
41237
41989
  const Symbols = 'symbol';
41238
41990
  const Gradient = 'gradient';
41239
41991
  const Discrete = 'discrete';
@@ -41981,7 +42733,7 @@ function parseData$1 (from, group, scope) {
41981
42733
  if (!from.data) {
41982
42734
  op = parseTransform(extend$1({
41983
42735
  type: 'aggregate',
41984
- groupby: array$5(facet.groupby)
42736
+ groupby: array$6(facet.groupby)
41985
42737
  }, facet.aggregate), scope);
41986
42738
  op.params.key = scope.keyRef(facet.groupby);
41987
42739
  op.params.pulse = getDataRef(facet, scope);
@@ -42751,7 +43503,7 @@ function analyze(data, scope, ops) {
42751
43503
  }
42752
43504
  } else if (data.source) {
42753
43505
  // derives from one or more other data sets
42754
- source = upstream = array$5(data.source).map(d => ref(scope.getData(d).output));
43506
+ source = upstream = array$6(data.source).map(d => ref(scope.getData(d).output));
42755
43507
  output.push(null); // populate later
42756
43508
  }
42757
43509
 
@@ -43386,20 +44138,20 @@ function buildAxisEncode(_, spec) {
43386
44138
  }
43387
44139
 
43388
44140
  function parseScope (spec, scope, preprocessed) {
43389
- const signals = array$5(spec.signals),
43390
- scales = array$5(spec.scales);
44141
+ const signals = array$6(spec.signals),
44142
+ scales = array$6(spec.scales);
43391
44143
 
43392
44144
  // parse signal definitions, if not already preprocessed
43393
44145
  if (!preprocessed) signals.forEach(_ => parseSignal(_, scope));
43394
44146
 
43395
44147
  // parse cartographic projection definitions
43396
- array$5(spec.projections).forEach(_ => parseProjection$1(_, scope));
44148
+ array$6(spec.projections).forEach(_ => parseProjection$1(_, scope));
43397
44149
 
43398
44150
  // initialize scale references
43399
44151
  scales.forEach(_ => initScale(_, scope));
43400
44152
 
43401
44153
  // parse data sources
43402
- array$5(spec.data).forEach(_ => parseData$2(_, scope));
44154
+ array$6(spec.data).forEach(_ => parseData$2(_, scope));
43403
44155
 
43404
44156
  // parse scale definitions
43405
44157
  scales.forEach(_ => parseScale(_, scope));
@@ -43408,13 +44160,13 @@ function parseScope (spec, scope, preprocessed) {
43408
44160
  (preprocessed || signals).forEach(_ => parseSignalUpdates(_, scope));
43409
44161
 
43410
44162
  // parse axis definitions
43411
- array$5(spec.axes).forEach(_ => parseAxis$1(_, scope));
44163
+ array$6(spec.axes).forEach(_ => parseAxis$1(_, scope));
43412
44164
 
43413
44165
  // parse mark definitions
43414
- array$5(spec.marks).forEach(_ => parseMark(_, scope));
44166
+ array$6(spec.marks).forEach(_ => parseMark(_, scope));
43415
44167
 
43416
44168
  // parse legend definitions
43417
- array$5(spec.legends).forEach(_ => parseLegend$1(_, scope));
44169
+ array$6(spec.legends).forEach(_ => parseLegend$1(_, scope));
43418
44170
 
43419
44171
  // parse title, if defined
43420
44172
  if (spec.title) parseTitle(spec.title, scope);
@@ -43528,7 +44280,7 @@ function collectSignals(spec, config) {
43528
44280
  map = {};
43529
44281
 
43530
44282
  // add spec signal array
43531
- array$5(spec.signals).forEach(s => {
44283
+ array$6(spec.signals).forEach(s => {
43532
44284
  if (has$1(pre, s.name)) {
43533
44285
  // merge if built-in signal
43534
44286
  s = extend$1(pre[s.name], s);
@@ -43540,7 +44292,7 @@ function collectSignals(spec, config) {
43540
44292
  });
43541
44293
 
43542
44294
  // add config signal array
43543
- array$5(config.signals).forEach(s => {
44295
+ array$6(config.signals).forEach(s => {
43544
44296
  if (!has$1(map, s.name) && !has$1(pre, s.name)) {
43545
44297
  // add to signal list if not already defined
43546
44298
  signals.push(s);
@@ -43732,8 +44484,8 @@ Scope.prototype = Subscope.prototype = {
43732
44484
  compareRef(cmp) {
43733
44485
  let signal = false;
43734
44486
  const check = _ => isSignal(_) ? (signal = true, this.signalRef(_.signal)) : isExpr$1(_) ? (signal = true, this.exprRef(_.expr)) : _;
43735
- const fields = array$5(cmp.field).map(check),
43736
- orders = array$5(cmp.order).map(check);
44487
+ const fields = array$6(cmp.field).map(check),
44488
+ orders = array$6(cmp.order).map(check);
43737
44489
  return signal ? ref(this.add(Compare({
43738
44490
  fields: fields,
43739
44491
  orders: orders
@@ -43743,7 +44495,7 @@ Scope.prototype = Subscope.prototype = {
43743
44495
  let signal = false;
43744
44496
  const check = _ => isSignal(_) ? (signal = true, ref(sig[_.signal])) : _;
43745
44497
  const sig = this.signals;
43746
- fields = array$5(fields).map(check);
44498
+ fields = array$6(fields).map(check);
43747
44499
  return signal ? ref(this.add(Key({
43748
44500
  fields: fields,
43749
44501
  flat: flat
@@ -44149,7 +44901,7 @@ var version$4 = "5.30.0";
44149
44901
 
44150
44902
  // -- Transforms -----
44151
44903
 
44152
- extend$1(transforms, tx, vtx, encode$1, geo, force, label, tree, reg, voronoi, wordcloud, xf);
44904
+ extend$1(transforms, tx, vtx, encode$2, geo, force, label, tree, reg, voronoi, wordcloud, xf);
44153
44905
 
44154
44906
  const vegaImport = /*#__PURE__*/Object.freeze({
44155
44907
  __proto__: null,
@@ -44172,7 +44924,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44172
44924
  interpolateColors: interpolateColors,
44173
44925
  interpolateRange: interpolateRange$1,
44174
44926
  quantizeInterpolator: quantizeInterpolator,
44175
- scale: scale$4,
44927
+ scale: scale$5,
44176
44928
  scheme: scheme$1,
44177
44929
  projection: projection,
44178
44930
  View: View$1,
@@ -44181,7 +44933,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44181
44933
  locale: locale$2,
44182
44934
  resetDefaultLocale: resetDefaultLocale,
44183
44935
  timeFormatLocale: timeFormatDefaultLocale,
44184
- expressionFunction: expressionFunction,
44936
+ expressionFunction: expressionFunction$1,
44185
44937
  parse: parse,
44186
44938
  runtimeContext: context,
44187
44939
  codegenExpression: codegen,
@@ -44195,7 +44947,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44195
44947
  accessor: accessor,
44196
44948
  accessorFields: accessorFields,
44197
44949
  accessorName: accessorName,
44198
- array: array$5,
44950
+ array: array$6,
44199
44951
  ascending: ascending$2,
44200
44952
  clampRange: clampRange,
44201
44953
  compare: compare$2,
@@ -44227,7 +44979,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44227
44979
  lerp: lerp,
44228
44980
  logger: logger,
44229
44981
  lruCache: lruCache,
44230
- merge: merge$3,
44982
+ merge: merge$4,
44231
44983
  mergeConfig: mergeConfig,
44232
44984
  one: one$2,
44233
44985
  pad: pad$3,
@@ -44283,7 +45035,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44283
45035
  regressionExp: exp$1,
44284
45036
  regressionLinear: linear$2,
44285
45037
  regressionLoess: loess,
44286
- regressionLog: log$3,
45038
+ regressionLog: log$4,
44287
45039
  regressionPoly: poly,
44288
45040
  regressionPow: pow$3,
44289
45041
  regressionQuad: quad,
@@ -44319,7 +45071,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44319
45071
  utcdayofyear: utcdayofyear,
44320
45072
  utcweek: utcweek,
44321
45073
  week: week,
44322
- format: format$3,
45074
+ format: format$4,
44323
45075
  formats: formats$1,
44324
45076
  inferType: inferType,
44325
45077
  inferTypes: inferTypes,
@@ -44357,7 +45109,7 @@ const vegaImport = /*#__PURE__*/Object.freeze({
44357
45109
  font: font$1,
44358
45110
  fontFamily: fontFamily,
44359
45111
  fontSize: fontSize,
44360
- intersect: intersect$2,
45112
+ intersect: intersect$3,
44361
45113
  intersectBoxLine: intersectBoxLine,
44362
45114
  intersectPath: intersectPath,
44363
45115
  intersectPoint: intersectPoint,
@@ -44530,6 +45282,7 @@ var Functions = {
44530
45282
  return apply('slice', arguments);
44531
45283
  },
44532
45284
  reverse: x => x.slice().reverse(),
45285
+ sort: x => x.slice().sort(ascending$2),
44533
45286
  // string functions
44534
45287
  parseFloat: parseFloat,
44535
45288
  parseInt: parseInt,
@@ -46275,7 +47028,7 @@ function getMarkStyleConfig(prop, mark, styleConfigIndex) {
46275
47028
  return getStyleConfig(prop, getStyles(mark), styleConfigIndex);
46276
47029
  }
46277
47030
  function getStyleConfig(p, styles, styleConfigIndex) {
46278
- styles = array$5(styles);
47031
+ styles = array$6(styles);
46279
47032
  let value;
46280
47033
  for (const style of styles) {
46281
47034
  const styleConfig = styleConfigIndex[style];
@@ -46289,7 +47042,7 @@ function getStyleConfig(p, styles, styleConfigIndex) {
46289
47042
  * Return Vega sort parameters (tuple of field and order).
46290
47043
  */
46291
47044
  function sortParams(orderDef, fieldRefOption) {
46292
- return array$5(orderDef).reduce((s, orderChannelDef) => {
47045
+ return array$6(orderDef).reduce((s, orderChannelDef) => {
46293
47046
  s.field.push(vgField(orderChannelDef, fieldRefOption));
46294
47047
  s.order.push(orderChannelDef.sort ?? 'ascending');
46295
47048
  return s;
@@ -46318,7 +47071,7 @@ function mergeTitle(title1, title2) {
46318
47071
  return title2;
46319
47072
  }
46320
47073
  else {
46321
- return [...array$5(title1), ...array$5(title2)].join(', ');
47074
+ return [...array$6(title1), ...array$6(title2)].join(', ');
46322
47075
  }
46323
47076
  }
46324
47077
  function mergeTitleComponent(v1, v2) {
@@ -49430,7 +50183,7 @@ function initEncoding(encoding, mark, filled, config) {
49430
50183
  }
49431
50184
  }
49432
50185
  // Array of fieldDefs for detail channel (or production rule)
49433
- normalizedEncoding[channel] = array$5(channelDef).reduce((defs, fieldDef) => {
50186
+ normalizedEncoding[channel] = array$6(channelDef).reduce((defs, fieldDef) => {
49434
50187
  if (!isFieldDef(fieldDef)) {
49435
50188
  warn(emptyFieldDef(fieldDef, channel));
49436
50189
  }
@@ -49475,7 +50228,7 @@ function fieldDefs(encoding) {
49475
50228
  for (const channel of keys(encoding)) {
49476
50229
  if (channelHasField(encoding, channel)) {
49477
50230
  const channelDef = encoding[channel];
49478
- const channelDefArray = array$5(channelDef);
50231
+ const channelDefArray = array$6(channelDef);
49479
50232
  for (const def of channelDefArray) {
49480
50233
  if (isFieldDef(def)) {
49481
50234
  arr.push(def);
@@ -49565,7 +50318,7 @@ function pathGroupingFields(mark, encoding) {
49565
50318
  case KEY: {
49566
50319
  const channelDef = encoding[channel];
49567
50320
  if (isArray(channelDef) || isFieldDef(channelDef)) {
49568
- for (const fieldDef of array$5(channelDef)) {
50321
+ for (const fieldDef of array$6(channelDef)) {
49569
50322
  if (!fieldDef.aggregate) {
49570
50323
  details.push(vgField(fieldDef, {}));
49571
50324
  }
@@ -51394,7 +52147,7 @@ function stack(m, encoding) {
51394
52147
  // Ignore tooltip in stackBy (https://github.com/vega/vega-lite/issues/4001)
51395
52148
  if (channel !== 'tooltip' && channelHasField(encoding, channel)) {
51396
52149
  const channelDef = encoding[channel];
51397
- for (const cDef of array$5(channelDef)) {
52150
+ for (const cDef of array$6(channelDef)) {
51398
52151
  const fieldDef = getFieldDef(cDef);
51399
52152
  if (fieldDef.aggregate) {
51400
52153
  continue;
@@ -53164,7 +53917,7 @@ const project = {
53164
53917
  const type = selCmpt.type;
53165
53918
  const cfg = model.config.selection[type];
53166
53919
  const init = selDef.value !== undefined
53167
- ? array$5(selDef.value)
53920
+ ? array$6(selDef.value)
53168
53921
  : null;
53169
53922
  // If no explicit projection (either fields or encodings) is specified, set some defaults.
53170
53923
  // If an initial value is set, try to infer projections.
@@ -53690,7 +54443,7 @@ const interval = {
53690
54443
  warn(`${evt} is not an ordered event stream for interval selections.`);
53691
54444
  continue;
53692
54445
  }
53693
- const filters = array$5(((_a = evt.between[0]).filter ?? (_a.filter = [])));
54446
+ const filters = array$6(((_a = evt.between[0]).filter ?? (_a.filter = [])));
53694
54447
  if (!filters.includes(filterExpr)) {
53695
54448
  filters.push(filterExpr);
53696
54449
  }
@@ -53969,7 +54722,7 @@ function wrapCondition({ model, channelDef, vgChannel, invalidValueRef, mainRefF
53969
54722
  const condition = isConditionalDef(channelDef) && channelDef.condition;
53970
54723
  let valueRefs = [];
53971
54724
  if (condition) {
53972
- const conditions = array$5(condition);
54725
+ const conditions = array$6(condition);
53973
54726
  valueRefs = conditions.map(c => {
53974
54727
  const conditionValueRef = mainRefFn(c);
53975
54728
  if (isConditionalParameter(c)) {
@@ -54087,7 +54840,7 @@ function tooltipData(encoding, stack, config, { reactiveGeom } = {}) {
54087
54840
  type: encoding[mainChannel].type // for secondary field def, copy type from main channel
54088
54841
  };
54089
54842
  const title = fieldDef.title || defaultTitle(fieldDef, formatConfig);
54090
- const key = array$5(title).join(', ').replaceAll(/"/g, '\\"');
54843
+ const key = array$6(title).join(', ').replaceAll(/"/g, '\\"');
54091
54844
  let value;
54092
54845
  if (isXorY(channel)) {
54093
54846
  const channel2 = channel === 'x' ? 'x2' : 'y2';
@@ -55194,14 +55947,14 @@ const legendBindings = {
55194
55947
  if (isObject(selDef.select) && (selDef.select.on || selDef.select.clear)) {
55195
55948
  const legendFilter = 'event.item && indexof(event.item.mark.role, "legend") < 0';
55196
55949
  for (const evt of selCmpt.events) {
55197
- evt.filter = array$5(evt.filter ?? []);
55950
+ evt.filter = array$6(evt.filter ?? []);
55198
55951
  if (!evt.filter.includes(legendFilter)) {
55199
55952
  evt.filter.push(legendFilter);
55200
55953
  }
55201
55954
  }
55202
55955
  }
55203
55956
  const evt = isLegendStreamBinding(selCmpt.bind) ? selCmpt.bind.legend : 'click';
55204
- const stream = isString(evt) ? eventSelector(evt, 'view') : array$5(evt);
55957
+ const stream = isString(evt) ? eventSelector(evt, 'view') : array$6(evt);
55205
55958
  selCmpt.bind = { legend: { merge: stream } };
55206
55959
  },
55207
55960
  topLevelSignals: (model, selCmpt, signals) => {
@@ -55606,7 +56359,7 @@ function parseUnitSelection(model, selDefs) {
55606
56359
  type,
55607
56360
  init: def.value,
55608
56361
  bind: def.bind,
55609
- events: isString(defaults.on) ? eventSelector(defaults.on, 'scope') : array$5(duplicate(defaults.on))
56362
+ events: isString(defaults.on) ? eventSelector(defaults.on, 'scope') : array$6(duplicate(defaults.on))
55610
56363
  });
55611
56364
  if (isTimerSelection(selCmpt)) {
55612
56365
  nTimerSelections++;
@@ -55746,7 +56499,7 @@ function assembleAxis(axisCmpt, kind, config, opt = { header: false }) {
55746
56499
  else if (isConditionalAxisValue(propValue)) {
55747
56500
  // deal with conditional axis value
55748
56501
  const { condition, ...valueOrSignalRef } = propValue;
55749
- const conditions = array$5(condition);
56502
+ const conditions = array$6(condition);
55750
56503
  const propIndex = CONDITIONAL_AXIS_PROP_INDEX[prop];
55751
56504
  if (propIndex) {
55752
56505
  const { vgProp, part } = propIndex;
@@ -55952,7 +56705,7 @@ function getAxisConfigStyle(axisConfigTypes, config) {
55952
56705
  // TODO: add special casing to add conditional value based on orient signal
55953
56706
  let style = config[configType]?.style;
55954
56707
  if (style) {
55955
- style = array$5(style);
56708
+ style = array$6(style);
55956
56709
  for (const s of style) {
55957
56710
  toMerge.push(config.style[s]);
55958
56711
  }
@@ -56791,7 +57544,7 @@ function getFirstConditionValue(channelDef) {
56791
57544
  }
56792
57545
  function getConditionValue(channelDef, reducer) {
56793
57546
  if (hasConditionalValueDef(channelDef)) {
56794
- return array$5(channelDef.condition).reduce(reducer, channelDef.value);
57547
+ return array$6(channelDef.condition).reduce(reducer, channelDef.value);
56795
57548
  }
56796
57549
  else if (isValueDef(channelDef)) {
56797
57550
  return channelDef.value;
@@ -61926,7 +62679,7 @@ class LookupNode extends DataFlowNode {
61926
62679
  return new Set([this.transform.lookup]);
61927
62680
  }
61928
62681
  producedFields() {
61929
- return new Set(this.transform.as ? array$5(this.transform.as) : this.transform.from.fields);
62682
+ return new Set(this.transform.as ? array$6(this.transform.as) : this.transform.from.fields);
61930
62683
  }
61931
62684
  hash() {
61932
62685
  return `Lookup ${hash({ transform: this.transform, secondary: this.secondary })}`;
@@ -61937,7 +62690,7 @@ class LookupNode extends DataFlowNode {
61937
62690
  // lookup a few fields and add create a flat output
61938
62691
  foreign = {
61939
62692
  values: this.transform.from.fields,
61940
- ...(this.transform.as ? { as: array$5(this.transform.as) } : {})
62693
+ ...(this.transform.as ? { as: array$6(this.transform.as) } : {})
61941
62694
  };
61942
62695
  }
61943
62696
  else {
@@ -64623,7 +65376,7 @@ class LayerModel extends Model {
64623
65376
  assembleGroupStyle() {
64624
65377
  const uniqueStyles = new Set();
64625
65378
  for (const child of this.children) {
64626
- for (const style of array$5(child.assembleGroupStyle())) {
65379
+ for (const style of array$6(child.assembleGroupStyle())) {
64627
65380
  uniqueStyles.add(style);
64628
65381
  }
64629
65382
  }